/* ═══════════════════════════════════════════════════════════
   ALA.ia — landing page
   Implements design-system/ala-ia/MASTER.md
   Editorial-technical palette: warm paper ground, serif prose,
   mono machine labels, hairline / crop-mark detailing.
   ═══════════════════════════════════════════════════════════ */

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

:root {
  /* ── Color: warm paper ground, ink, one rust accent ──
     Contrast on --paper (#D9D8D0): ink 12.2:1 · ink-muted 5.2:1
     · ink-subtle 4.8:1 · accent-ink 5.1:1. --accent (3.8:1) is for
     display sizes and non-text marks only. */
  --paper:         #D9D8D0;
  --paper-raised:  #E4E3DC;

  --ink:           #1A1A17;
  --ink-muted:     #56554E;
  --ink-subtle:    #5C5B54;

  /* Hairlines do all the structural work — no filled borders. */
  --rule:          rgba(26, 26, 23, 0.16);
  --rule-strong:   rgba(26, 26, 23, 0.34);

  /* Rust, spent sparingly: drop cap, section numbers, diagram marks */
  --accent:        #B8442B;
  --accent-ink:    #983622;
  --accent-soft:   rgba(184, 68, 43, 0.10);
  --destructive:   #A32B1E;

  /* Inverted surfaces (vision slab, primary buttons) */
  --slab:          #171613;
  --slab-2:        #22211C;
  --on-slab:       #F1F0E9;
  --on-slab-muted: #9C9A90;

  /* ── Type ── */
  --font-serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-sans:  'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:  'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ── Spacing ── */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;

  /* Only the floating chrome casts a shadow; the page itself is flat. */
  --shadow-pill: 0 1px 2px rgba(26,26,23,0.07), 0 10px 26px rgba(26,26,23,0.07);
  --shadow-slab: 0 1px 2px rgba(26,26,23,0.10), 0 18px 40px rgba(26,26,23,0.10);

  --radius-pill: 999px;
  --radius-sm:   2px;

  --dur:      240ms;
  --dur-slow: 520ms;
  --ease:     cubic-bezier(0.22, 0.61, 0.36, 1);

  --section-y: clamp(2.25rem, 5vw, 4.5rem);
  --nav-h:     4.75rem;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: rgba(26, 26, 23, 0.34) var(--paper);
  accent-color: var(--accent-ink);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-synthesis-weight: none;
  font-kerning: normal;
  caret-color: var(--accent-ink);
}

a { text-underline-offset: 0.22em; text-decoration-thickness: 1px; }

body.nav-locked { overflow: hidden; }

::selection { background: var(--accent-soft); color: var(--ink); }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(var(--space-lg), 4vw, var(--space-3xl));
}

section { scroll-margin-top: 6rem; }

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

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -140%);
  z-index: 200;
  padding: 0.75rem 1.5rem;
  background: var(--slab);
  color: var(--on-slab);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ═══ Typography ═══════════════════════════════════════════
   The serif carries headlines AND prose — the signature move.
   Sans is reserved for UI chrome; mono for machine labels. */

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.75rem, 5.6vw, 4.5rem); }
h2 { font-size: clamp(2.1rem, 4vw, 3.25rem); }
h3 { font-size: 1.6rem; line-height: 1.25; }

/* Machine label: "02 · WHERE WE SIT" */
.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: var(--space-lg);
}

.section-label .num { color: var(--accent-ink); }
.section-label .sep { color: var(--rule-strong); }

/* Dotted hairline closing out a label row */
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background-image: repeating-linear-gradient(
    to right, var(--rule-strong) 0 1px, transparent 1px 5px
  );
}

/* ═══ Buttons ═══════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 46px;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              background-size var(--dur) var(--ease);
}

.btn svg { width: 1rem; height: 1rem; transition: transform var(--dur) var(--ease); }

/* Primary: solid ink pill */
.btn-primary {
  background: var(--slab);
  color: var(--on-slab);
  border-radius: var(--radius-pill);
}
.btn-primary:hover { background: var(--slab-2); }
.btn-primary:hover svg { transform: translateX(3px); }

/* Secondary: crop marks instead of a border — four corner ticks
   drawn as background layers, so no extra elements are needed. */
.bracket {
  --tick: 10px;
  --tw: 1px;
  background-color: transparent;
  background-repeat: no-repeat;
  background-image:
    linear-gradient(var(--rule-strong), var(--rule-strong)),
    linear-gradient(var(--rule-strong), var(--rule-strong)),
    linear-gradient(var(--rule-strong), var(--rule-strong)),
    linear-gradient(var(--rule-strong), var(--rule-strong)),
    linear-gradient(var(--rule-strong), var(--rule-strong)),
    linear-gradient(var(--rule-strong), var(--rule-strong)),
    linear-gradient(var(--rule-strong), var(--rule-strong)),
    linear-gradient(var(--rule-strong), var(--rule-strong));
  background-size:
    var(--tick) var(--tw), var(--tw) var(--tick),
    var(--tick) var(--tw), var(--tw) var(--tick),
    var(--tick) var(--tw), var(--tw) var(--tick),
    var(--tick) var(--tw), var(--tw) var(--tick);
  background-position:
    left top,     left top,
    right top,    right top,
    left bottom,  left bottom,
    right bottom, right bottom;
}

.btn-secondary {
  color: var(--ink);
  padding: 0.7rem 1.75rem;
}
.btn-secondary:hover { --tick: 16px; }

.btn-full { width: 100%; }

/* ═══ Reveal ═══════════════════════════════════════════════
   Fade and lift only — no scale, no overshoot. This palette
   wants motion that reads as settling, not springing. */
.js .reveal {
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity var(--dur-slow) var(--ease),
              transform var(--dur-slow) var(--ease);
  will-change: opacity, transform;
}
.js .reveal.visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* ═══ Nav — three floating pill clusters ══════════════════ */

#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(var(--space-md), 2.5vw, var(--space-xl));
  pointer-events: none;
}
#navbar > * { pointer-events: auto; }

.nav-cluster {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem;
  background: var(--paper-raised);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-pill);
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 0.9rem;
  border-radius: var(--radius-pill);
  color: var(--ink-muted);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active {
  color: var(--ink);
  background: rgba(26, 26, 23, 0.06);
}

/* Language switch */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; }

.lang-btn {
  min-width: 2.25rem;
  height: 2.1rem;
  padding: 0 0.5rem;
  border: none;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--ink-subtle);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.lang-btn:hover { color: var(--ink); }
.lang-btn[aria-pressed="true"] {
  background: rgba(26, 26, 23, 0.08);
  color: var(--ink);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  padding: 0 1rem;
  border-radius: var(--radius-pill);
  background: var(--slab);
  color: var(--on-slab);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur) var(--ease);
}
.nav-cta:hover { background: var(--slab-2); }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--ink);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.hamburger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ═══ Hero — text left, the robot right ════════════════════ */

#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: var(--space-2xl);
}

.hero-content { max-width: 34rem; }
.hero-content h1 { margin-bottom: var(--space-lg); }
.hero-content h1 .line { display: block; }

.hero-sub {
  font-size: clamp(1.1rem, 1.4vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 30rem;
  margin-bottom: var(--space-2xl);
  text-wrap: pretty;
}

.hero-actions { display: flex; gap: var(--space-md); flex-wrap: wrap; }

.hero-figure {
  position: relative;
  height: min(78vh, 44rem);
}

/* Particle field — a stippled robot drawn by particles.js on a 2D canvas.
   Decorative only; the script appends a canvas here and adds .is-live,
   which retires the static SVG standing in for it. */
.particle-field {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.particle-field canvas { display: block; }

.robot-fallback {
  width: min(52%, 16rem);
  height: auto;
  color: var(--ink);
}
.particle-field.is-live .robot-fallback { display: none; }

.hero-scroll-hint {
  position: absolute;
  bottom: var(--space-lg);
  left: clamp(var(--space-lg), 4vw, var(--space-3xl));
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--ink-subtle);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.scroll-line {
  width: 3.5rem;
  height: 1px;
  background: var(--rule-strong);
  transform-origin: left;
  animation: scrollPulse 2.8s var(--ease) infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleX(0.7); }
  50%      { opacity: 1;   transform: scaleX(1); }
}

/* ═══ Proof — figures on hairlines, not cards ═════════════ */

#proof { padding: var(--space-2xl) 0; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); }

.stat-card {
  padding: var(--space-lg) var(--space-xl);
  padding-left: var(--space-xl);
  border-left: 1px dashed var(--rule-strong);
}
.stat-card:first-child { border-left: 0; padding-left: 0; }

.stat-value {
  display: flex;
  align-items: baseline;
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
}

.stat-number { font-size: clamp(3rem, 6vw, 4.5rem); }
.stat-unit   { font-size: clamp(1.6rem, 3vw, 2.25rem); color: var(--accent-ink); }

.stat-label {
  margin-top: var(--space-md);
  max-width: 15rem;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
}

.capability-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  list-style: none;
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px dashed var(--rule-strong);
}

.capability-row li {
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ═══ Manifesto — the drop-cap lede ═══════════════════════ */

#manifesto { padding: var(--section-y) 0; }

.manifesto-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(var(--space-2xl), 7vw, 6rem);
  align-items: start;
}

.manifesto-figure { position: sticky; top: 7rem; }

.manifesto-pull {
  font-size: 1.6rem;
  line-height: 1.35;
  color: var(--ink);
  max-width: 20rem;
  text-wrap: balance;
}

.lede { font-size: 1.3rem; line-height: 1.5; text-wrap: pretty; }
.lede + .lede { margin-top: var(--space-lg); }

/* Boxed rust drop cap, set in the serif */
.lede-open::first-letter {
  float: left;
  font-size: 3.15em;
  line-height: 0.78;
  padding: 0.14em 0.16em 0.1em;
  margin: 0.06em 0.16em 0 0;
  color: var(--accent);
  border: 1px dashed var(--rule-strong);
}

/* ═══ Section headers ═════════════════════════════════════ */

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-md) clamp(var(--space-xl), 6vw, 5rem);
  align-items: start;
  margin-bottom: var(--space-2xl);
}

.section-header .section-label { grid-column: 1 / -1; margin-bottom: var(--space-sm); }

.section-header p {
  color: var(--ink-muted);
  font-size: 1.3rem;
  line-height: 1.55;
  text-wrap: pretty;
  padding-top: 0.35rem;
}

/* ═══ Services — a ruled index, not a card grid ═══════════ */

#services { padding: var(--section-y) 0; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  border-top: 1px dashed var(--rule-strong);
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-xl) var(--space-xl) var(--space-xl) 0;
  border-bottom: 1px dashed var(--rule-strong);
}

.service-icon {
  display: flex;
  align-items: center;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--ink);
  margin-bottom: var(--space-lg);
  transition: color var(--dur) var(--ease);
}
.service-card:hover .service-icon { color: var(--accent-ink); }
.service-icon svg { width: 1.5rem; height: 1.5rem; }

.service-card h3 { margin-bottom: var(--space-sm); }

.service-card > p {
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  text-wrap: pretty;
}

/* A concrete instance, set in the serif so it reads as a voice, not spec. */
.service-card > p.service-example {
  margin-top: calc(var(--space-sm) * -1);
  padding-left: var(--space-md);
  border-left: 1px solid var(--accent);
  color: var(--ink);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.5;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.75rem;
  list-style: none;
  margin-top: auto;
}

.service-tags li {
  color: var(--ink-subtle);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
/* Separator rides on the item it follows, so a wrap never strands
   a lone interpunct at the start of a line. */
.service-tags li:not(:last-child)::after {
  content: '·';
  margin-left: 0.75rem;
  color: var(--rule-strong);
}

/* ═══ Why — vision slab beside the commitments ═══════════ */

#why { padding: var(--section-y) 0; }

.why-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(var(--space-xl), 6vw, 5rem);
  align-items: stretch;
}

/* Inverted vision card */
.vision-slab {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--slab);
  color: var(--on-slab);
  padding: clamp(var(--space-xl), 3.5vw, var(--space-2xl));
  box-shadow: var(--shadow-slab);
}

.vision-slab h3 {
  font-size: clamp(1.75rem, 2.6vw, 2.4rem);
  margin-bottom: var(--space-md);
}
.vision-slab p {
  color: var(--on-slab-muted);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.why-points { display: flex; flex-direction: column; justify-content: center; }

.why-point {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-lg) 0;
  border-bottom: 1px dashed var(--rule-strong);
}
.why-point:first-child { border-top: 1px dashed var(--rule-strong); }

.why-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 0.62rem;
}

.why-point strong {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.3rem;
}
.why-point p {
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.6;
}


/* ═══ Process — a numbered rail ═══════════════════════════ */

#process { padding: var(--section-y) 0; }

.process-steps { list-style: none; border-top: 1px dashed var(--rule-strong); }

.process-step {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 15rem) minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: start;
  padding: var(--space-xl) 0;
  border-bottom: 1px dashed var(--rule-strong);
}

.step-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--accent-ink);
  padding-top: 0.4rem;
}

.process-step h3 { margin: 0; }

.step-time {
  display: inline-block;
  margin-top: var(--space-sm);
  color: var(--ink-subtle);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.step-content p {
  max-width: 38rem;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.62;
  text-wrap: pretty;
  padding-top: 0.2rem;
}

/* ═══ FAQ — a ruled list of disclosures ═══════════════════ */

#faq { padding: var(--section-y) 0; }

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(var(--space-2xl), 6vw, 5rem);
  align-items: start;
}

.faq-intro { position: sticky; top: 7rem; }
.faq-intro h2 { margin-bottom: var(--space-md); }
.faq-intro p {
  color: var(--ink-muted);
  font-size: 1.3rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.faq-list { border-top: 1px dashed var(--rule-strong); }

.faq-item { border-bottom: 1px dashed var(--rule-strong); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  min-height: 44px;
  padding: var(--space-lg) 0;
  font-size: 1.3rem;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
  transition: color var(--dur) var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent-ink); }

/* Plus that turns into a minus: two hairlines, one rotates away. */
.faq-item summary::after {
  content: '';
  flex-shrink: 0;
  width: 0.85rem;
  height: 0.85rem;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat;
  transition: transform var(--dur) var(--ease), background-size var(--dur) var(--ease);
}
.faq-item[open] summary::after {
  background-size: 100% 1px, 1px 0;
  transform: rotate(180deg);
}

.faq-item p {
  max-width: 36rem;
  padding-bottom: var(--space-lg);
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.65;
  text-wrap: pretty;
}

/* ═══ Contact ═════════════════════════════════════════════ */

#contact { padding: var(--section-y) 0; }

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(var(--space-2xl), 6vw, 5rem);
  align-items: start;
}

.contact-card h2 { margin-bottom: var(--space-md); }
.contact-intro {
  color: var(--ink-muted);
  font-size: 1.3rem;
  line-height: 1.55;
  max-width: 26rem;
  text-wrap: pretty;
}

.contact-form { font-family: var(--font-sans); }

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: var(--space-lg);
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}

/* Underline-only fields — the hairline vocabulary, not boxes */
.form-group input,
.form-group textarea {
  width: 100%;
  min-height: 44px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  border-radius: 0;
  padding: 0.5rem 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  resize: vertical;
  outline: none;
  transition: border-color var(--dur) var(--ease);
}

.form-group input:focus,
.form-group textarea:focus { border-bottom-color: var(--accent-ink); }
.form-group input:focus-visible,
.form-group textarea:focus-visible { outline: none; }

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--ink-subtle); opacity: 0.7; }

.form-group input:user-invalid,
.form-group textarea:user-invalid { border-bottom-color: var(--destructive); }

.form-hint { color: var(--ink-subtle); font-size: 0.875rem; margin-top: 0.35rem; }

/* Spam trap — moved off-screen rather than display:none, which some bots skip */
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.form-status.visible { opacity: 1; }

/* ═══ Footer ══════════════════════════════════════════════ */

footer { padding: var(--space-xl) 0 var(--space-2xl); }

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px dashed var(--rule-strong);
}
.footer-inner .logo img { display: block; height: 1.75rem; width: auto; }
.footer-tagline { color: var(--ink-muted); font-size: 1.0625rem; margin-top: var(--space-sm); }

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}
.footer-heading {
  margin-bottom: var(--space-sm);
  color: var(--ink-subtle);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.footer-col a:hover { color: var(--accent-ink); }

.footer-copy {
  margin-top: var(--space-2xl);
  color: var(--ink-subtle);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* ═══ Section stepper — the bottom-right utility pill ═════ */

.section-nav {
  position: fixed;
  right: clamp(var(--space-md), 2.5vw, var(--space-xl));
  bottom: clamp(var(--space-md), 2.5vw, var(--space-xl));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.25rem;
  background: var(--paper-raised);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-pill);
}

.section-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              opacity var(--dur) var(--ease);
}
.section-nav button:hover:not(:disabled) {
  background: rgba(26, 26, 23, 0.07);
  color: var(--ink);
}
.section-nav button:disabled { opacity: 0.3; cursor: default; }
.section-nav svg { width: 14px; height: 14px; }

/* Ships hidden; main.js reveals it only when it has sections to step through. */
.section-nav[hidden] { display: none; }

/* ═══ Responsive ══════════════════════════════════════════ */

@media (max-width: 1024px) {
  .process-step {
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: var(--space-sm) var(--space-lg);
  }
  .process-step .step-head,
  .process-step .step-content { grid-column: 2; }

  .manifesto-grid { grid-template-columns: 1fr; }
  .manifesto-figure { position: static; }
  .manifesto-pull { max-width: none; }

  /* Five links plus the actions no longer fit in the bar: fold them
     into the sheet behind the menu button. */
  .hamburger { display: flex; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: var(--paper);
    padding: var(--space-2xl) var(--space-xl);
    gap: var(--space-sm);
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto;
  }
  .nav-links.open a {
    font-family: var(--font-serif);
    font-size: 2rem;
    padding: 0.15rem 0;
    min-height: 44px;
    color: var(--ink);
    background: none;
  }
  .nav-links.open a.active { color: var(--accent-ink); }
}

@media (max-width: 900px) {
  #hero {
    min-height: auto;
    padding-top: calc(var(--nav-h) + var(--space-2xl));
    padding-bottom: var(--space-2xl);
  }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-content { max-width: none; }
  .hero-figure { height: 24rem; order: -1; }

  .why-inner,
  .contact-card,
  .faq-grid,
  .footer-inner,
  .section-header { grid-template-columns: 1fr; }

  .faq-intro { position: static; }
  .section-header { gap: var(--space-md); }
  .section-header p { padding-top: 0; }

  .stats-grid { grid-template-columns: 1fr; }
  .stat-card {
    border-left: 0;
    padding: var(--space-lg) 0;
    border-bottom: 1px dashed var(--rule-strong);
  }
  .stat-card:first-child { padding-top: 0; }

  .form-row { grid-template-columns: 1fr; gap: 0; }
  .service-card { padding-right: 0; }
}

@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; }

  .hero-actions .btn { width: 100%; }
  .hero-scroll-hint { display: none; }
  .section-nav { display: none; }

  .process-step { grid-template-columns: 1fr; gap: var(--space-sm); }
  .process-step .step-head,
  .process-step .step-content { grid-column: 1; }
  .step-number { padding-top: 0; }

  .faq-item summary { font-size: 1.15rem; }
}

/* ═══ Reduced motion ══════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal { opacity: 1; transform: none; }
}
