/* ==========================================================================
   WBC Software
   Palette derived from the WBC mark: petrol teal #064C53 on light.
   Surfaces are near-black nudged a few degrees toward the brand hue; the
   accent #A3C8CE is the mark's own edge tone, so both sit on one hue axis.
   Colour stays scarce — it marks the brand, never decorates.
   ========================================================================== */


/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body, h1, h2, h3, p, figure, dl, dd, ol, ul {
  margin: 0;
  padding: 0;
}

ol, ul { list-style: none; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

img, svg { display: block; max-width: 100%; }


/* --------------------------------------------------------------------------
   Variables
   -------------------------------------------------------------------------- */

:root {
  /* Brand — taken from the mark */
  --brand:          #064C53;   /* the mark's petrol teal; a fill, never text */
  --brand-deep:     #04353A;

  /* Surfaces — near-black, carrying a trace of the brand hue */
  --bg:             #080B0C;
  --surface:        #0E1315;
  --surface-hover:  #131A1C;
  --border:         #202A2C;
  --border-soft:    #161E20;
  --border-strong:  #2F3D40;

  --text-primary:   #EEF3F3;
  --text-secondary: #9EAAAC;
  /* Carries real content (section indices, step numbers, copyright), so it
     must clear the 4.5:1 AA floor for small text — 4.83:1. */
  --text-muted:     #74807F;

  --accent:         #A3C8CE;   /* the mark's own edge tone */
  --accent-bright:  #C6E0E4;
  --accent-veil:    rgba(163, 200, 206, 0.10);

  /* Type */
  --font-display: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body:    'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Layout — one source of truth for vertical rhythm */
  --container:   1240px;
  --pad-x:       clamp(1.25rem, 5vw, 3rem);
  --section-pad: clamp(5rem, 10vw, 8.5rem);
  --nav-h:       68px;
  --gutter-w:    150px;
  --gutter-gap:  40px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}


/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Display face is used only at >= 1.5rem; Inter owns everything below. */
.hero-title,
.section-title,
.problem-title,
.case-title,
.contact-title {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

.hero-title {
  font-size: clamp(2.35rem, 4.4vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.032em;
  max-width: 16ch;
}

.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  line-height: 1.12;
  max-width: 22ch;
}

.section-title-sm { font-size: clamp(1.5rem, 2.4vw, 1.9rem); }

.contact-title {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.1;
  max-width: 18ch;
}

.problem-title,
.case-title {
  font-size: clamp(1.5rem, 2vw, 1.65rem);
  line-height: 1.25;
}

.case-title { font-size: clamp(1.5rem, 1.8vw, 1.55rem); }

/* Monospace utility — labels, indices, values. Never body copy. */
.gutter-index,
.gutter-label,
.gutter-meta,
.panel-bar,
.panel-row,
.card-label,
.problem-index,
.problem-tag,
.step-index,
.case-tech,
.availability,
.nav-brand,
.flow-band,
.flow-outputs li,
.footer-wordmark,
.mobile-menu-index {
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}


/* --------------------------------------------------------------------------
   Layout — the metadata gutter
   -------------------------------------------------------------------------- */

.section-grid {
  width: min(var(--container), 100%);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
}

.section { padding-block: var(--section-pad); }

.section + .section { padding-top: 0; }

section[id] { scroll-margin-top: calc(var(--nav-h) + 1.5rem); }

/* Mobile / tablet: the gutter reflows to a single inline strip. */
.gutter {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.gutter-index { color: var(--text-muted); }
.gutter-meta  { color: var(--text-muted); }
.gutter-rule  { display: none; }

@media (min-width: 1100px) {
  .section-grid {
    grid-template-columns: var(--gutter-w) minmax(0, 1fr);
    gap: 0 var(--gutter-gap);
  }

  /* Sticky is the whole point of the gutter: the label stays beside the
     content while long sections scroll past. Needs align-self: start,
     since a stretched grid child has no room to stick within. */
  .gutter {
    position: sticky;
    top: calc(var(--nav-h) + 2rem);
    align-self: start;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    padding-top: 0.6rem;
  }

  .gutter-rule {
    display: block;
    width: 28px;
    height: 1px;
    background: var(--border);
    margin-block: 0.35rem;
  }
}


/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.nav.is-scrolled {
  background: rgba(8, 11, 12, 0.80);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border-soft);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav.is-scrolled { background: rgba(8, 11, 12, 0.97); }
}

.nav-inner {
  width: min(var(--container), 100%);
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-brand {
  font-size: 0.8125rem;
  color: var(--text-primary);
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.nav-mark {
  height: 25px;
  width: auto;
  flex: none;
}

.nav-brand-sub {
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
}

.nav-brand:hover .nav-brand-sub { color: var(--text-secondary); }

.nav-links {
  display: none;
  gap: 2rem;
  font-size: 0.875rem;
}

.nav-links a {
  color: var(--text-secondary);
  transition: color 0.25s var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current='true'] { color: var(--text-primary); }

.nav-cta {
  display: none;
  font-size: 0.875rem;
  color: var(--text-primary);
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-cta:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

@media (min-width: 880px) {
  .nav-links { display: flex; }
  .nav-cta   { display: inline-block; }
}

/* Language switch */
.lang-switch {
  display: none;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
}

.lang-btn {
  color: var(--text-muted);
  padding: 0.35rem 0.2rem;
  transition: color 0.25s var(--ease);
}

.lang-btn:hover { color: var(--text-secondary); }
.lang-btn[aria-pressed='true'] { color: var(--text-primary); }
.lang-sep { color: var(--border-strong); }

@media (min-width: 880px) {
  .lang-switch { display: flex; }
}

/* In the mobile menu it is always shown, at any width. */
.lang-switch-mobile {
  display: flex;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-soft);
}

/* Mobile menu */
.nav-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: -8px;
}

.nav-toggle-bars {
  display: grid;
  gap: 5px;
  width: 20px;
}

.nav-toggle-bars span {
  height: 1px;
  background: var(--text-primary);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bars span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bars span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* Declared after the base rules above — with no preprocessor, source order is
   what makes this win at equal specificity. */
@media (min-width: 880px) {
  .nav-toggle { display: none; }
}

.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 55;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  padding: 1rem var(--pad-x) 2rem;
}

.mobile-menu-inner a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-primary);
}

.mobile-menu-index {
  font-size: 0.6875rem;
  color: var(--text-muted);
}


/* --------------------------------------------------------------------------
   Components — buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9375rem;
  padding: 0.8rem 1.35rem;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease),
              color 0.25s var(--ease);
}

.btn .btn-arrow { transition: transform 0.25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--accent);
  color: var(--brand-deep);
}

.btn-primary:hover { background: var(--accent-bright); }

.btn-ghost {
  border-color: var(--border);
  color: var(--text-primary);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

.btn-lg {
  font-size: 1rem;
  padding: 1rem 1.75rem;
}

/* Third-tier action: a plain link, so the row reads filled -> outlined -> quiet
   rather than three buttons of equal weight. */
.btn-quiet {
  color: var(--text-secondary);
  /* Flush left so it lines up with the buttons' edges when the row wraps.
     Vertical padding stays for the tap target. */
  padding-inline: 0;
}

.btn-quiet:hover {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--border-strong);
}

/* The glyph carries the recognition; the colour stays in the site palette. */
.btn-whatsapp .wa-icon {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
}

.btn-whatsapp:hover { border-color: var(--accent); }
.btn-whatsapp:hover .wa-icon { color: var(--accent); }

.btn-lg.btn-whatsapp .wa-icon { width: 17px; height: 17px; }


/* --------------------------------------------------------------------------
   Components — the instrument panel
   The signature primitive: hairline border, monospace title bar, rows with
   dotted leaders and right-aligned values. Reused for the hero readout, the
   engagement-model diagram and the stack list.
   -------------------------------------------------------------------------- */

.panel {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  overflow: hidden;
}

.panel-bar {
  font-size: 0.6875rem;
  /* Secondary, not muted: muted on Slate is ~4.4:1, under the AA floor.
     The bar stays quiet through size, tracking and the rule beneath it. */
  color: var(--text-secondary);
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.panel-row {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.8rem 1.15rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: none;
}

.panel-row + .panel-row { border-top: 1px solid var(--border-soft); }

.panel-foot { border-top: 1px solid var(--border); }

/* dt is its own flex container so its ::after can be the flexible leader —
   a pseudo-element of a flex item is not a flex item of the grandparent. */
.panel-row dt {
  display: flex;
  flex: 1 1 auto;
  align-items: baseline;
  gap: 0.75rem;
  min-width: 0;
  color: var(--text-secondary);
}

.panel-row dt::after {
  content: '';
  flex: 1 1 auto;
  min-width: 1.5rem;
  border-bottom: 1px dotted var(--border);
  transform: translateY(-0.28em);
}

.panel-row dd {
  flex: 0 1 auto;
  color: var(--text-primary);
  text-align: right;
}

.panel-row dd.is-accent { color: var(--accent); }


/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-top: calc(var(--nav-h) + clamp(3.5rem, 11vh, 7rem));
  /* No bottom padding: the following .section supplies the gap. Adding it here
     too would double the space, since `.section + .section` cannot match .hero. */
  padding-bottom: 0;
}

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(3rem, 7vw, 4rem);
}

.hero-lede {
  margin-top: 1.75rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.5rem;
}

.availability {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 2.75rem;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

/* Static halo — a live indicator that does not move. */
.availability-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-veil);
  flex: none;
}

.hero-panel { max-width: 480px; }

@media (min-width: 1280px) {
  .hero-body {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.68fr);
    align-items: center;
    gap: clamp(2.5rem, 5vw, 4rem);
  }
  .hero-panel { max-width: none; }
}


/* --------------------------------------------------------------------------
   Sections — shared body rhythm
   -------------------------------------------------------------------------- */

.section-lede {
  margin-top: 1.25rem;
  font-size: 1.0625rem;
  max-width: 52ch;
}

.section-title + .cards,
.section-title + .problems,
.section-title + .cases,
.section-title + .prose,
.section-title + .panel,
.section-lede + .cards,
.section-lede + .problems,
.section-lede + .steps,
.section-lede + .cases {
  margin-top: clamp(2.75rem, 5vw, 4rem);
}


/* Services — a contiguous ruled block, not floating cards. The 1px grid gap
   over a Graphite background produces the hairlines. */
.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.card {
  background: var(--bg);
  padding: 1.75rem 1.6rem 2rem;
  transition: background 0.3s var(--ease);
}

.card:hover { background: var(--surface-hover); }

.card-label {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 1rem;
}

.card-text {
  font-size: 0.9375rem;
  line-height: 1.6;
}

@media (min-width: 620px)  { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }


/* Problems — editorial rows */
.problems { border-top: 1px solid var(--border-soft); }

.problem {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--border-soft);
  transition: border-color 0.3s var(--ease);
}

.problem:hover { border-bottom-color: var(--border); }

.problem-index {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: color 0.3s var(--ease);
}

.problem:hover .problem-index { color: var(--accent); }

.problem-text {
  margin-top: 0.85rem;
  max-width: 54ch;
  font-size: 0.9375rem;
}

.problem-tag {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  align-self: start;
}

.problem-tag span { color: var(--text-muted); }

@media (min-width: 780px) {
  .problem {
    grid-template-columns: 4rem minmax(0, 1fr) auto;
    gap: 2rem;
    align-items: start;
  }
  .problem-index { padding-top: 0.4rem; }
  .problem-tag { padding-top: 0.5rem; text-align: right; }
}


/* Approach — timeline */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.25rem;
  padding-left: 1.75rem;
}

.step { position: relative; }

/* One connector per step rather than a single line across the whole list, so
   the run terminates exactly at the last node instead of dangling past it. */
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: calc(-1.75rem + 3px);
  top: calc(0.4rem + 7px);
  bottom: calc(-2.25rem - 0.4rem);
  width: 1px;
  background: var(--border);
}

.step-node {
  position: absolute;
  top: 0.4rem;
  left: -1.75rem;
  width: 7px;
  height: 7px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
}

.step-index {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.step-title {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 0.4rem;
}

.step-text {
  margin-top: 0.6rem;
  font-size: 0.9375rem;
  max-width: 34ch;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    padding-left: 0;
  }

  /* Padding belongs on the step, not the grid: on the container it moves the
     whole row down and the node lands on top of the index instead of above it. */
  .step { padding-top: 2.25rem; }
  .step-node { top: 0; left: 0; }

  /* Same connector, rotated: node edge (7px) across to the next node. */
  .step:not(:last-child)::after {
    left: 7px;
    top: 3px;
    bottom: auto;
    width: calc(100% + 2rem - 7px);
    height: 1px;
  }
}


/* Model — engagement flow */
.model-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 3.5rem);
}

.model-note {
  margin-top: 1.75rem;
  max-width: 46ch;
  font-size: 0.9375rem;
}

.flow { max-width: 400px; }

.flow-band {
  padding: 1rem 1.15rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-primary);
}

/* The only solid brand fill on the page — it marks WBC in the flow. */
.flow-band-accent {
  color: var(--text-primary);
  background: var(--brand);
  box-shadow: inset 2px 0 0 var(--accent);
}

.flow-link { position: relative; height: 28px; }

.flow-link::before {
  content: '';
  position: absolute;
  left: 1.15rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-strong);
}

.flow-link::after {
  content: '';
  position: absolute;
  left: calc(1.15rem - 2.5px);
  bottom: 6px;
  width: 6px;
  height: 6px;
  border-right: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  transform: rotate(45deg);
}

.flow-outputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}

.flow-outputs li {
  background: var(--surface);
  padding: 0.9rem 1.15rem;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

@media (min-width: 1280px) {
  .model-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
    align-items: center;
  }
}


/* Experience */
.cases {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.case {
  background: var(--bg);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  transition: background 0.3s var(--ease);
}

.case:hover { background: var(--surface-hover); }

.case-text {
  margin-top: 1rem;
  margin-bottom: 1.75rem;
  font-size: 0.9375rem;
}

/* auto margin pins to the card bottom; more reliable than relying on a
   sibling's flex-grow to absorb the free space. */
.case-tech {
  margin-top: auto;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  font-size: 0.6875rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
}

@media (min-width: 760px) {
  .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Tech lines are bottom-pinned, so a two-line entry would drop its rule
     below its neighbours'. Reserve two lines once cards share a row. */
  .case-tech { min-height: 3.5rem; }
}

@media (min-width: 1100px) { .cases { grid-template-columns: repeat(3, minmax(0, 1fr)); } }


/* Stack — deliberately small */
.stack { max-width: 620px; margin-top: 2.25rem; }
.stack .panel-row dd { color: var(--text-secondary); }


/* About */
.prose { max-width: 62ch; }
.prose p + p { margin-top: 1.35rem; }
.prose p:first-child { color: var(--text-primary); font-size: 1.0625rem; }


/* Contact */
.section-contact { padding-bottom: var(--section-pad); }

.contact-block {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  padding: clamp(2.25rem, 6vw, 4rem);
}

.contact-lede {
  margin-top: 1.15rem;
  font-size: 1.0625rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.25rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}

.contact-links a {
  color: var(--text-secondary);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.contact-links a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--border-strong);
}


/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--border-soft);
  padding-block: 3rem;
}

.footer-inner {
  width: min(var(--container), 100%);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  font-size: 0.8125rem;
}

.footer-wordmark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.75rem;
  color: var(--text-primary);
}

.footer-mark {
  height: 22px;
  width: auto;
  flex: none;
}

.footer-tagline { margin-top: 0.5rem; color: var(--text-secondary); }

.footer-meta { text-align: left; color: var(--text-secondary); }
.footer-copy { margin-top: 0.5rem; color: var(--text-muted); }

@media (min-width: 620px) { .footer-meta { text-align: right; } }


/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

/* Guarded on .js so the page is fully readable without JavaScript. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--reveal-i, 0) * 70ms);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* The one orchestrated moment: the hero panel resolves its rows on load. */
.hero-panel .panel-row {
  opacity: 0;
  animation: panel-row 0.6s var(--ease) forwards;
  animation-delay: calc(320ms + var(--i, 0) * 90ms);
}

@keyframes panel-row {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}


/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--accent);
  color: var(--brand-deep);
  border-radius: 3px;
  font-size: 0.875rem;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus { transform: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero-panel .panel-row { opacity: 1; animation: none; }
}


/* --------------------------------------------------------------------------
   Scrollspy state — set by script.js
   -------------------------------------------------------------------------- */

.gutter-label { transition: color 0.35s var(--ease); }

.gutter.is-active .gutter-label { color: var(--text-primary); }
