/* ==========================================================================
   NorthLabs -- components.css
   Buttons, nav, cards, forms, footer, and other reusable components
   ========================================================================== */

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.9rem 1.7rem;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  will-change: transform;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(79, 124, 255, 0.55);
}

.btn-primary:hover {
  box-shadow: 0 12px 32px -8px rgba(139, 92, 246, 0.6);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-accent-blue);
  background: rgba(79, 124, 255, 0.08);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
  border: 1px solid var(--color-border-soft);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.07);
}

.btn--block {
  width: 100%;
}

.btn--lg {
  padding: 1.05rem 2.1rem;
  font-size: var(--fs-base);
}

.btn-icon {
  display: inline-flex;
  transition: transform var(--dur-fast) var(--ease-out);
}

.btn:hover .btn-icon {
  transform: translateX(3px);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-weight: 700;
  line-height: 1.06;
}

.hero h1 .text-gradient {
  display: block;
  font-size: clamp(1.35rem, 1.6vw + 0.9rem, 2.1rem);
  font-weight: 500;
  line-height: 1.25;
  margin-top: var(--space-4);
  letter-spacing: -0.01em;
}

/* ---- Header / Nav ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-block: var(--space-4);
  transition: background var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out), padding var(--dur-med) var(--ease-out);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(10, 14, 23, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--color-border-soft);
  padding-block: var(--space-3);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--fs-md);
  letter-spacing: -0.01em;
  color: #fff;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-7);
}

.nav-links a {
  position: relative;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--dur-fast) var(--ease-out);
  padding-block: var(--space-1);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #fff;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: var(--gradient-primary);
  transition: width var(--dur-med) var(--ease-out);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-cta {
  display: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* Mobile nav panel */
.mobile-nav {
  position: fixed;
  inset: 0;
  top: 0;
  z-index: 90;
  background: rgba(8, 11, 18, 0.98);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-9) var(--container-pad);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out), visibility var(--dur-med);
}

.mobile-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.mobile-nav-links a {
  font-family: var(--font-heading);
  font-size: var(--fs-2xl);
  font-weight: 600;
  color: #fff;
}

.mobile-nav-foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (min-width: 960px) {
  .nav-links {
    display: flex;
  }
  .nav-cta {
    display: inline-flex;
  }
  .nav-toggle {
    display: none;
  }
  .mobile-nav {
    display: none;
  }
}

/* ---- Cards ---- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: var(--shadow-lg);
}

/* ---- Service cards ---- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 720px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .services-grid {
    grid-template-columns: repeat(12, 1fr);
  }
  .service-card {
    grid-column: span 6;
  }
  .service-card--wide {
    grid-column: span 12;
  }
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.service-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary-soft);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: var(--color-accent-cyan);
  flex-shrink: 0;
}

.service-card__icon svg {
  width: 26px;
  height: 26px;
}

.service-card h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-1);
}

.service-card__lede {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.service-card__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-4);
}

.tag {
  font-size: var(--fs-xs);
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--color-border-soft);
  color: var(--color-text-muted);
}

.service-card__number {
  position: absolute;
  top: var(--space-5);
  right: var(--space-6);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--color-text-faint);
}

/* ---- Flow steps (How We Help) ---- */
.flow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: stretch;
}

.flow-step {
  flex: 1 1 140px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  position: relative;
}

.flow-step__index {
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  color: var(--color-accent-cyan);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-2);
  display: block;
}

.flow-step h4 {
  font-size: var(--fs-base);
  font-weight: 600;
}

.flow-arrow {
  display: none;
  align-items: center;
  color: var(--color-text-faint);
  flex: 0 0 auto;
}

@media (min-width: 860px) {
  .flow-arrow {
    display: flex;
  }
}

.flow-arrow svg {
  width: 20px;
  height: 20px;
}

.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-8);
}

@media (min-width: 720px) {
  .outcomes-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.outcome-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--color-border-soft);
}

.outcome-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent-cyan);
  flex-shrink: 0;
  margin-top: 2px;
}

.outcome-item span {
  font-size: var(--fs-sm);
  color: var(--color-text);
}

/* ---- Client transformations gallery ----
   Headers on the left, a sticky illustration on the right. js/gallery.js
   advances the active item on a timer; every visual state below is driven
   by .is-active, so the markup still reads correctly with JS disabled. */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  align-items: start;
}

@media (min-width: 980px) {
  .gallery {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: var(--space-8);
  }
}

/* ---- Left column: client headers ---- */
.gallery-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gallery-item {
  position: relative;
  border-top: 1px solid var(--color-border-soft);
  transition: border-color var(--dur-med) var(--ease-out);
}

.gallery-item:last-child {
  border-bottom: 1px solid var(--color-border-soft);
}

.gallery-item.is-active {
  border-top-color: var(--color-border);
}

.gallery-item__heading {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

.gallery-item__head {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6) 0;
  background: none;
  border: none;
  text-align: left;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}

.gallery-item__index {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  transition: color var(--dur-med) var(--ease-out);
}

.gallery-item.is-active .gallery-item__index {
  color: var(--color-accent-cyan);
}

.gallery-item__titles {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.gallery-item__client {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  transition: color var(--dur-med) var(--ease-out);
}

.gallery-item.is-active .gallery-item__client {
  color: var(--color-accent-cyan);
}

.gallery-item__title {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-muted);
  transition: color var(--dur-med) var(--ease-out);
}

.gallery-item.is-active .gallery-item__title,
.gallery-item__head:hover .gallery-item__title {
  color: var(--color-text);
}

.gallery-item__chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-text-faint);
  transition: transform var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
}

.gallery-item.is-active .gallery-item__chevron {
  transform: rotate(180deg);
  color: var(--color-accent-cyan);
}

/* ---- Expanding panel ---- */
.gallery-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-med) var(--ease-out);
}

.gallery-item.is-active .gallery-item__panel {
  grid-template-rows: 1fr;
}

.gallery-item__panel-inner {
  overflow: hidden;
  min-height: 0;
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease-out);
}

.gallery-item.is-active .gallery-item__panel-inner {
  opacity: 1;
}

/* Without JS nothing can expand a panel, so show them all. */
html:not(.js) .gallery-item__panel {
  grid-template-rows: 1fr;
}

html:not(.js) .gallery-item__panel-inner {
  opacity: 1;
}

.gallery-item__lede {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  max-width: 58ch;
}

.gallery-item__impact-label {
  margin-top: var(--space-5);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.impact-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-3);
  list-style: none;
}

.impact-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--color-text);
}

.impact-list li svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--color-accent-cyan);
}

.gallery-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding-bottom: var(--space-6);
}

/* Illustration shown inside the panel while the sticky column is hidden. */
.gallery-item__media-inline {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-soft);
  overflow: hidden;
  background: radial-gradient(120% 120% at 20% 20%, rgba(79, 124, 255, 0.25), transparent 60%),
    radial-gradient(120% 120% at 80% 80%, rgba(139, 92, 246, 0.25), transparent 60%),
    var(--color-bg-alt);
}

.gallery-item__media-inline svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@media (min-width: 980px) {
  .gallery-item__media-inline {
    display: none;
  }
}

/* ---- Auto-advance progress bar ---- */
.gallery-item__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.gallery-item.is-active .gallery-item__progress {
  opacity: 1;
}

.gallery-item__progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left center;
  /* Matches TICK_MS in js/gallery.js so the stepped updates read as a
     continuous sweep. */
  transition: transform 100ms linear;
}

/* ---- Right column: sticky illustration ---- */
.gallery-media {
  display: none;
}

@media (min-width: 980px) {
  .gallery-media {
    display: block;
    position: sticky;
    top: 120px;
  }
}

.gallery-media__frame {
  position: relative;
  /* Close to the 16:9 of the illustrations, so they are not heavily letterboxed. */
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-soft);
  overflow: hidden;
  background: radial-gradient(120% 120% at 20% 20%, rgba(79, 124, 255, 0.25), transparent 60%),
    radial-gradient(120% 120% at 80% 80%, rgba(139, 92, 246, 0.25), transparent 60%),
    var(--color-bg-alt);
}

.gallery-media__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}

.gallery-media__slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.gallery-media__slide svg {
  width: 100%;
  height: 100%;
  /* The artwork carries its own margin inside the viewBox. */
  transform: scale(1.14);
}

/* ---- Approach steps ---- */
.approach-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.approach-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-5);
  padding-block: var(--space-6);
  border-top: 1px solid var(--color-border-soft);
}

.approach-item:last-child {
  border-bottom: 1px solid var(--color-border-soft);
}

.approach-item__num {
  font-family: var(--font-heading);
  font-size: var(--fs-3xl);
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.5;
  line-height: 1;
  min-width: 3ch;
}

.approach-item h4 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-2);
}

.approach-item p {
  color: var(--color-text-muted);
  max-width: 60ch;
}

/* ---- Why us grid ---- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 720px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .why-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.why-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.why-item__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border-soft);
  color: var(--color-accent-blue);
}

.why-item__icon svg {
  width: 22px;
  height: 22px;
}

.why-item h4 {
  font-size: var(--fs-md);
}

.why-item p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* ---- Expertise chain ---- */
.chain {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.chain-node {
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border-soft);
  font-size: var(--fs-sm);
  font-weight: 500;
  white-space: nowrap;
}

.chain-sep {
  color: var(--color-accent-cyan);
  opacity: 0.7;
}

.expertise-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-7);
}

@media (min-width: 720px) {
  .expertise-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.expertise-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--color-text);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
}

.expertise-list li svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent-violet);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---- Global reach ---- */
.global-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 960px) {
  .global-wrap {
    grid-template-columns: 1fr 1fr;
  }
}

.global-copy p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

.global-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-soft);
}

.global-stats div strong {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  color: #fff;
  margin-bottom: var(--space-1);
}

.global-stats div span {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.globe-visual {
  position: relative;
  /* An explicit width is required: margin-inline auto opts the grid item out
     of stretch, and the SVG has no intrinsic size to fall back on. */
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 480px;
  margin-inline: auto;
}

.globe-visual svg {
  width: 100%;
  height: 100%;
}

/* ---- CTA band ---- */
.cta-band {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-9) var(--space-6);
  text-align: center;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: radial-gradient(120% 160% at 50% 0%, rgba(79, 124, 255, 0.16), transparent 60%), var(--color-surface-2);
}

.cta-band h2 {
  font-size: var(--fs-3xl);
  max-width: 20ch;
  margin-inline: auto;
  margin-bottom: var(--space-4);
}

.cta-band p {
  color: var(--color-text-muted);
  max-width: 56ch;
  margin-inline: auto;
  margin-bottom: var(--space-6);
  font-size: var(--fs-md);
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--color-border-soft);
  padding-block: var(--space-9) var(--space-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  }
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  margin-block: var(--space-4);
  max-width: 34ch;
}

.footer-col h4 {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #fff;
  margin-bottom: var(--space-4);
  letter-spacing: 0.02em;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col a,
.footer-col address {
  font-style: normal;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  transition: color var(--dur-fast) var(--ease-out);
}

.footer-col a:hover {
  color: #fff;
}

/* Instagram / email / WhatsApp. Hrefs come from js/config.js at runtime. */
.contact-row {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.contact-link {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-soft);
  background: rgba(255, 255, 255, 0.025);
  color: var(--color-text-muted);
  transition: color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.contact-link:hover {
  color: #fff;
  border-color: var(--color-accent-blue);
  background: rgba(79, 124, 255, 0.12);
  transform: translateY(-2px);
}

.contact-link svg {
  width: 19px;
  height: 19px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-9);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-soft);
  font-size: var(--fs-xs);
  color: var(--color-text-faint);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-5);
}

/* ---- Forms (Start a Project page) ---- */
.form-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 1000px) {
  .form-shell {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: start;
  }
}

.form-aside h1 {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-4);
}

.form-aside p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}

.form-aside-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.form-aside-list li {
  display: flex;
  gap: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.form-aside-list svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent-cyan);
  flex-shrink: 0;
  margin-top: 2px;
}

.project-form {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

@media (min-width: 640px) {
  .form-row--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.field label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 500;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.field .optional {
  color: var(--color-text-faint);
  font-weight: 400;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: var(--fs-sm);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.field textarea {
  resize: vertical;
  min-height: 100px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--color-text-faint);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--color-accent-blue);
  background: rgba(79, 124, 255, 0.05);
  outline: none;
}

.field select {
  appearance: none;
  background-image: url(../assets/chevron-down.svg);
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 18px;
  padding-right: 2.5rem;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

@media (min-width: 640px) {
  .checkbox-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Selector kept specific enough to beat the generic `.field label` rule,
   since these checkboxes live inside a `.field` fieldset. */
.checkbox-grid .checkbox-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  cursor: pointer;
}

.checkbox-item:has(input:checked) {
  border-color: var(--color-accent-blue);
  background: rgba(79, 124, 255, 0.08);
}

/* Custom checkbox so the control matches the dark theme in every browser */
.checkbox-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 0;
  border: 1.5px solid var(--color-border);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-content: center;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.checkbox-item input[type="checkbox"]::after {
  content: "";
  width: 11px;
  height: 11px;
  background: #fff;
  transform: scale(0);
  transition: transform var(--dur-fast) var(--ease-out);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.checkbox-item input[type="checkbox"]:checked {
  background: var(--gradient-primary);
  border-color: transparent;
}

.checkbox-item input[type="checkbox"]:checked::after {
  transform: scale(1);
}

.checkbox-item:hover input[type="checkbox"]:not(:checked) {
  border-color: var(--color-accent-blue);
}

.checkbox-item span {
  font-size: var(--fs-sm);
}

.field-error {
  display: none;
  color: var(--color-error);
  font-size: var(--fs-xs);
  margin-top: var(--space-2);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--color-error);
}

.field.has-error .field-error {
  display: block;
}

.form-status {
  color: var(--color-error);
  font-size: var(--fs-sm);
  line-height: 1.5;
  margin-top: var(--space-4);
  text-align: center;
}

.form-status[hidden] {
  display: none;
}

.form-status a {
  color: inherit;
  text-decoration: underline;
}

.form-note {
  font-size: var(--fs-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-4);
  text-align: center;
}

/* Confirmation panel */
.form-confirm {
  display: none;
  text-align: center;
  padding: var(--space-8) var(--space-5);
}

.form-confirm.is-visible {
  display: block;
}

.project-form.is-submitted .form-fields {
  display: none;
}

.form-confirm__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-5);
  border-radius: 50%;
  background: var(--gradient-primary-soft);
  border: 1px solid rgba(34, 211, 238, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent-cyan);
}

.form-confirm__icon svg {
  width: 30px;
  height: 30px;
}

.form-confirm h2 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-3);
}

.form-confirm p {
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-inline: auto;
}

/* ---- Misc surfaces ---- */
.divider-glow {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.35), transparent);
  border: none;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
