/* ==========================================================================
   Valencia AI & Automations
   Built on the Valencia design system.

   Structure of this file:
     1. Tokens          — every colour, size and space the site uses
     2. Base            — resets and default element styles
     3. Layout          — the band rhythm and the content container
     4. Header & footer
     5. Components      — buttons, cards, chips, forms, accordion
     6. Page sections   — hero, rule list, steps, stats, pricing
     7. Motion          — scroll reveal
     8. Responsive      — 1024px, 900px, 620px
   Change a token in section 1 and it changes everywhere.
   ========================================================================== */

/* 1. TOKENS ================================================================ */

:root {
  /* Surfaces */
  --canvas: #f7f4ef;              /* page background — warm paper, never pure white */
  --surface: #ffffff;             /* cards, the header, the form well */
  --surface-sunken: #efeae1;      /* alternating section bands */
  --surface-tint: #edf3fb;        /* quiet blue fill: featured price card */
  --surface-ink: #173b6c;         /* the dark anchor band */
  --surface-ink-raised: #214b7c;  /* cards sitting on the dark band */

  /* Text */
  --ink: #101b2b;                 /* headings on light grounds */
  --ink-muted: #4d5a6c;           /* body copy on light grounds */
  --ink-faint: #5c6879;           /* captions, hints, breadcrumbs */
  --on-ink: #f4f1eb;              /* headings on the dark band */
  --on-ink-muted: #a9b6c7;        /* body copy on the dark band */
  --on-accent: #ffffff;           /* text on a filled button */

  /* Brand blues — both taken from the Valencia mark */
  --accent-strong: #173b6c;       /* link text on light grounds */
  --accent: #2f6fcd;              /* primary button fill, focus ring */
  --accent-light: #9dc2f5;        /* links and accents on the dark band */

  /* Soft signal red — at most once per section */
  --signal: #b33c45;
  --signal-light: #f08a90;

  /* Borders. -control variants clear 3:1 and are the only ones allowed to
     carry meaning (inputs, selected states). The others are decorative. */
  --border: #e2dbd0;
  --border-control: #8a8071;
  --border-ink: #2a3a50;
  --border-ink-control: #647c9f;

  --focus: var(--accent);
  --focus-on-ink: var(--accent-light);

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Spacing — a 4px grid */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Radii — tight by design */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* Shadows — structure comes from borders, not glow */
  --shadow-sm: 0 1px 2px rgba(16, 27, 43, 0.06);
  --shadow-md: 0 6px 16px rgba(16, 27, 43, 0.08);
  --shadow-lg: 0 18px 44px rgba(16, 27, 43, 0.14);

  /* Layout */
  --container: 1180px;
  --container-text: 680px;
}

/* 2. BASE ================================================================== */

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 28px;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
.on-ink :focus-visible { outline-color: var(--focus-on-ink); }

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

.skip-link {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 100;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--surface-ink);
  color: var(--on-ink);
  font-size: 15px;
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

/* Shared type styles ------------------------------------------------------ */

.eyebrow {
  display: block;
  margin-bottom: var(--space-3);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
}
.on-ink .eyebrow { color: var(--signal-light); }

.display-xl,
.display-lg,
.display-md {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}
.display-xl { font-size: clamp(40px, 6.2vw, 76px); line-height: 1.02; letter-spacing: -0.03em; }
.display-lg { font-size: clamp(30px, 4vw, 52px);  line-height: 1.06; letter-spacing: -0.025em; }
.display-md { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -0.02em; }
.on-ink .display-xl,
.on-ink .display-lg,
.on-ink .display-md { color: var(--on-ink); }

.lead {
  max-width: 54ch;
  font-size: 20px;
  line-height: 32px;
  color: var(--ink-muted);
}
.on-ink .lead { color: var(--on-ink-muted); }

.prose { max-width: 58ch; color: var(--ink-muted); }
.on-ink .prose { color: var(--on-ink-muted); }

/* 3. LAYOUT ================================================================ */

/* Bands run the full window width; only their contents are capped. This
   alternation is what gives the page structure — see Band in the system. */
.band { padding: var(--space-9) 0; }
.band-canvas { background: var(--canvas); }
.band-sunken { background: var(--surface-sunken); }
.band-ink    { background: var(--surface-ink); padding: var(--space-10) 0; }
.band-tight  { padding-top: var(--space-7); padding-bottom: var(--space-7); }

.wrap {
  width: min(100% - var(--space-10), var(--container));
  margin-inline: auto;
}
.wrap-text { max-width: var(--container-text); }

/* The heading block that opens a section */
.section-head { display: grid; gap: var(--space-4); margin-bottom: var(--space-7); }
.section-head h2 { max-width: 18ch; }
.section-head p { max-width: 54ch; color: var(--ink-muted); }
.on-ink .section-head p { color: var(--on-ink-muted); }

/* The asymmetric variant: heading left, supporting sentence right. */
.section-head-split {
  grid-template-columns: 1.3fr 0.7fr;
  gap: var(--space-7);
  align-items: end;
}
.section-head-split p { padding-bottom: var(--space-2); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.grid { display: grid; gap: var(--space-5); }
.grid > *, .hero-grid > *, .page-hero-grid > *, .contact-grid > *, .cta-grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* 4. HEADER & FOOTER ======================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--canvas);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 200ms ease;
}
.site-header.is-stuck { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-3) 0;
}

.brand { display: inline-flex; align-items: center; gap: var(--space-3); }
.brand svg { width: 38px; height: 34px; flex: none; }
.brand svg path { transition: fill 180ms ease; }
.brand-name { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name strong {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-name span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
/* In the footer the mark sits on the dark band, where ink-faint is unreadable. */
.on-ink .brand-name span { color: var(--on-ink-muted); }

.site-nav { display: flex; align-items: center; gap: var(--space-5); }
.site-nav a {
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 160ms ease;
}
.site-nav a:hover { color: var(--ink); }
/* The current page is marked by an underline, not colour alone. */
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--signal); }
.site-nav .btn { border-bottom: 0; }
/* `.site-nav a` is more specific than `.btn-primary`, so without this the nav
   button's label inherits the muted nav colour and all but disappears. */
.site-nav a.btn-primary { color: var(--on-accent); }
.site-nav a.btn-primary:hover { color: var(--on-accent); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 10px;
  border: 1px solid var(--border-control);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  border-radius: var(--radius-xs);
  background: var(--ink);
}

/* Footer sits inside the closing ink band, divided by a hairline rather than
   starting a second dark band. */
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: var(--space-7);
  margin-top: var(--space-9);
  padding-top: var(--space-7);
  border-top: 1px solid var(--border-ink);
}
.site-footer p { margin-top: var(--space-4); max-width: 38ch; font-size: 15px; line-height: 24px; color: var(--on-ink-muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-5); }
.footer-links a { font-size: 15px; color: var(--on-ink-muted); }
.footer-links a:hover { color: var(--on-ink); }
.footer-legal { margin-top: var(--space-7); font-family: var(--font-mono); font-size: 12px; color: var(--on-ink-muted); }

/* 5. COMPONENTS ============================================================ */

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-primary:disabled { background: var(--accent-strong); opacity: 0.75; cursor: default; }
.btn-secondary { border-color: var(--border-control); color: var(--ink); }
.btn-secondary:hover { background: var(--surface-sunken); border-color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0 var(--space-4); font-size: 15px; }

/* On the dark band, accent is too close in value to read as a button. */
.on-ink .btn-primary { background: var(--accent-light); color: var(--ink); }
.on-ink .btn-primary:hover { background: var(--on-ink); }
.on-ink .btn-secondary { border-color: var(--border-ink-control); color: var(--on-ink); }
.on-ink .btn-secondary:hover { background: var(--surface-ink-raised); border-color: var(--on-ink); }

.link {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-strong);
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease;
}
.link:hover { border-bottom-color: currentColor; }
.on-ink .link { color: var(--accent-light); }

/* Cards ------------------------------------------------------------------ */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.card:hover { border-color: var(--border-control); box-shadow: var(--shadow-md); }
.card h3 { font-size: 19px; line-height: 26px; font-weight: 600; color: var(--ink); }
.card p { font-size: 15px; line-height: 24px; color: var(--ink-muted); }
.card .link { margin-top: auto; padding-top: var(--space-2); }

.on-ink .card { background: var(--surface-ink-raised); border-color: var(--border-ink); box-shadow: none; }
.on-ink .card:hover { border-color: var(--border-ink-control); }
.on-ink .card h3 { color: var(--on-ink); }
.on-ink .card p { color: var(--on-ink-muted); }

/* Chips ------------------------------------------------------------------ */
.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  display: inline-block;
  padding: 6px var(--space-3);
  border: 1px solid var(--border-control);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}
.on-ink .chip { border-color: var(--border-ink-control); color: var(--on-ink-muted); }
a.chip:hover { border-color: var(--ink); color: var(--ink); }

/* Ticked list ------------------------------------------------------------ */
.ticks { display: grid; gap: var(--space-3); }
.ticks li {
  position: relative;
  padding-left: var(--space-6);
  color: var(--ink-muted);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: 13px;
  width: 14px; height: 2px;
  background: var(--signal);
}
.on-ink .ticks li { color: var(--on-ink-muted); }
.on-ink .ticks li::before { background: var(--signal-light); }

.ticks-sm li { font-size: 15px; line-height: 24px; padding-left: var(--space-5); }
.ticks-sm li::before { top: 11px; width: 10px; }

/* Form ------------------------------------------------------------------- */
.form { display: grid; gap: var(--space-4); }
.field { display: grid; gap: var(--space-2); }
.field > span { font-size: 15px; font-weight: 600; color: var(--ink); }
.field input,
.field textarea {
  width: 100%;
  padding: 12px var(--space-4);
  font-size: 16px;
  line-height: 24px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-control);
  border-radius: var(--radius-sm);
}
.field textarea { resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--ink-faint); }
.form-hint { font-family: var(--font-mono); font-size: 13px; line-height: 20px; color: var(--ink-faint); }
.form-status { min-height: 20px; font-size: 14px; line-height: 20px; color: var(--accent-strong); }
.form-status.is-error { color: var(--signal); }

/* Accordion -------------------------------------------------------------- */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.faq-item + .faq-item { margin-top: var(--space-3); }
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 400;
  color: var(--signal);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p {
  padding: 0 var(--space-6) var(--space-5);
  font-size: 16px;
  line-height: 27px;
  color: var(--ink-muted);
}

/* 6. PAGE SECTIONS ========================================================= */

/* Hero ------------------------------------------------------------------- */
.hero { padding-top: var(--space-9); padding-bottom: var(--space-8); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-8);
  align-items: center;
}
.hero h1 { max-width: 13ch; }
.hero .lead { margin-top: var(--space-5); }

/* The dark panel beside the hero copy — the page's first moment of contrast */
.ink-panel {
  padding: var(--space-7);
  background: var(--surface-ink);
  border-radius: var(--radius-lg);
  color: var(--on-ink);
}
.ink-panel svg { width: 48px; height: 43px; margin-bottom: var(--space-6); }
.on-ink .brand svg path:nth-child(1),
.on-ink .brand svg path:nth-child(5),
.ink-panel svg path:nth-child(1),
.ink-panel svg path:nth-child(5) { fill: var(--accent-light); }
.on-ink .brand svg path:nth-child(2),
.on-ink .brand svg path:nth-child(4),
.ink-panel svg path:nth-child(2),
.ink-panel svg path:nth-child(4) { fill: var(--signal-light); }
.on-ink .brand svg path:nth-child(3),
.ink-panel svg path:nth-child(3) { fill: var(--on-ink); }
.ink-panel h2 { font-family: var(--font-display); font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; color: var(--on-ink); }
.ink-panel .panel-list { display: grid; gap: var(--space-5); margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--border-ink); }
.ink-panel .panel-list div { display: grid; grid-template-columns: 34px 1fr; gap: var(--space-4); align-items: baseline; }
.ink-panel .panel-list b { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--signal-light); }
.ink-panel .panel-list span { font-size: 15px; line-height: 24px; color: var(--on-ink-muted); }

/* Inner-page hero: copy left, a short fact column right */
.page-hero { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.page-hero-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: var(--space-8); align-items: end; }
.page-hero h1 { max-width: 17ch; }
.page-hero .lead { margin-top: var(--space-5); font-size: 18px; line-height: 30px; }

.breadcrumb {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.breadcrumb a:hover { color: var(--ink); }

.fact-col { display: grid; gap: var(--space-5); padding-left: var(--space-7); border-left: 1px solid var(--border); }
.fact-col div { display: grid; gap: var(--space-1); }
.fact-col b { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal); }
.fact-col span { font-size: 15px; line-height: 24px; color: var(--ink-muted); }

/* Rule list — the alternative to yet another grid of identical cards ------ */
.rule-list { border-top: 1px solid var(--border); }
.rule-list > li {
  display: grid;
  grid-template-columns: 64px 1.1fr 1.4fr auto;
  gap: var(--space-6);
  align-items: baseline;
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--border);
  transition: background-color 160ms ease;
}
.rule-list > li:hover { background: rgba(16, 27, 43, 0.02); }
.rule-list .num { font-family: var(--font-mono); font-size: 14px; font-weight: 500; color: var(--signal); }
.rule-list h3 { font-family: var(--font-display); font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.rule-list p { font-size: 16px; line-height: 27px; color: var(--ink-muted); }

/* Steps ------------------------------------------------------------------ */
.step .num {
  display: block;
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
  font-size: 28px;
  line-height: 32px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--signal);
}
.on-ink .step .num { color: var(--signal-light); }

/* Timeline (process page) ------------------------------------------------ */
.timeline { border-top: 1px solid var(--border); }
.timeline > li {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--space-8);
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--border);
}
.timeline .stage { position: sticky; top: 100px; align-self: start; }
.timeline .stage b { display: block; font-family: var(--font-mono); font-size: 36px; font-weight: 500; letter-spacing: -0.02em; color: var(--signal); }
.timeline .stage span { display: block; margin-top: var(--space-2); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.timeline h3 { font-family: var(--font-display); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.timeline p { margin-top: var(--space-3); max-width: 56ch; color: var(--ink-muted); }
.timeline .ticks { margin-top: var(--space-5); }

/* Stats on the dark band ------------------------------------------------- */
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-7); margin-top: var(--space-7); padding-top: var(--space-7); border-top: 1px solid var(--border-ink); }
.stat b { display: block; font-family: var(--font-mono); font-size: 32px; line-height: 38px; font-weight: 500; letter-spacing: -0.02em; color: var(--on-ink); }
.stat span { display: block; margin-top: var(--space-2); font-size: 15px; line-height: 24px; color: var(--on-ink-muted); }

/* Pricing ---------------------------------------------------------------- */
.price-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.price-card.is-featured { background: var(--surface-tint); border-color: var(--accent); }
.price-card h3 { font-family: var(--font-display); font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.price-card .price { margin-top: var(--space-1); font-family: var(--font-mono); font-size: 13px; line-height: 20px; color: var(--signal); }
.price-card > p { font-size: 15px; line-height: 24px; color: var(--ink-muted); }
.price-card .btn { margin-top: auto; }
.price-badge {
  align-self: flex-start;
  padding: 4px var(--space-2);
  border-radius: var(--radius-xs);
  background: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-accent);
}

/* Contact ---------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--space-8); align-items: start; }
.contact-details { display: grid; gap: var(--space-5); margin-top: var(--space-7); padding-top: var(--space-6); border-top: 1px solid var(--border); }
.contact-details div { display: grid; gap: var(--space-1); }
.contact-details b { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.contact-details span, .contact-details a { font-size: 17px; color: var(--ink); }
.contact-details a:hover { color: var(--accent-strong); }
.form-well { padding: var(--space-7); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }

/* Closing call to action ------------------------------------------------- */
.cta-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: var(--space-8); align-items: center; }
.cta-grid .actions { margin-top: 0; }

/* 7. MOTION ================================================================ */

/* One idea: content rises and fades in as it enters the viewport. The
   stagger is set per element by script.js. */
.js .reveal { opacity: 0; transform: translateY(12px); }
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 500ms ease, transform 500ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

/* 8. RESPONSIVE ============================================================ */

@media (max-width: 1024px) {
  .wrap { width: min(100% - var(--space-8), var(--container)); }
  .hero-grid,
  .page-hero-grid,
  .contact-grid,
  .cta-grid { grid-template-columns: 1fr; gap: var(--space-7); }
  .section-head-split { grid-template-columns: 1fr; gap: var(--space-4); align-items: start; }
  .section-head-split p { padding-bottom: 0; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-col { padding-left: 0; padding-top: var(--space-6); border-left: 0; border-top: 1px solid var(--border); grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-list > li { grid-template-columns: 48px 1fr; gap: var(--space-3) var(--space-5); }
  .rule-list > li > p,
  .rule-list > li > .link { grid-column: 2; }
  .timeline > li { grid-template-columns: 1fr; gap: var(--space-5); }
  .timeline .stage { position: static; display: flex; align-items: baseline; gap: var(--space-4); }
  .timeline .stage span { margin-top: 0; }
}

@media (max-width: 900px) {
  .band { padding: var(--space-8) 0; }
  .band-ink { padding: var(--space-9) 0; }
  .menu-toggle { display: block; }
  .site-header { position: sticky; }
  .menu-toggle { flex-shrink: 0; }
  .header-inner { position: relative; }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 50;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    padding: var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: calc(100dvh - 88px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: var(--space-3) 0; font-size: 17px; border-bottom: 1px solid var(--border); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--signal); }
  .site-nav .btn { margin-top: var(--space-3); }
  .menu-toggle[aria-expanded="true"] span:nth-of-type(1) { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-of-type(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-of-type(3) { transform: translateY(-6px) rotate(-45deg); }

  .site-footer { flex-direction: column; gap: var(--space-6); }
}

@media (max-width: 620px) {
  body { font-size: 16px; line-height: 27px; }
  .wrap { width: min(100% - 40px, var(--container)); }
  .header-inner { gap: var(--space-3); }
  .brand { gap: var(--space-2); }
  .brand-name span { letter-spacing: 0.09em; }
  .band { padding: var(--space-7) 0; }
  .band-ink { padding: var(--space-8) 0; }
  .band-tight { padding: var(--space-5) 0; }
  .hero, .page-hero { padding-top: var(--space-6); padding-bottom: var(--space-7); }
  .hero-grid, .page-hero-grid, .contact-grid, .cta-grid { gap: var(--space-6); }
  .display-xl { font-size: clamp(36px, 10vw, 48px); line-height: 1.08; }
  .display-lg { font-size: clamp(28px, 8vw, 36px); line-height: 1.12; }
  .section-head { margin-bottom: var(--space-6); }
  .actions { flex-direction: column; align-items: stretch; gap: var(--space-3); margin-top: var(--space-5); }
  .btn { min-height: 48px; padding-block: 12px; text-align: center; line-height: 24px; }
  .chip { max-width: 100%; white-space: normal; }
  .rule-list > li { grid-template-columns: 28px minmax(0, 1fr); gap: var(--space-3); }
  .rule-list .link, .card .link { min-height: 44px; display: inline-flex; align-items: center; }
  .timeline > li { padding: var(--space-6) 0; }
  .site-footer { margin-top: var(--space-7); padding-top: var(--space-6); }
  .footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-5); }
  .footer-links a { display: flex; align-items: center; min-height: 44px; }
  .contact-details a, .form-status { overflow-wrap: anywhere; }
  .field input, .field textarea { min-width: 0; }
  .lead { font-size: 18px; line-height: 29px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; gap: var(--space-5); }
  .fact-col { grid-template-columns: 1fr; }
  .card, .price-card { padding: var(--space-5); }
  .ink-panel, .form-well { padding: var(--space-5); }
  .faq-item summary { padding: var(--space-4) var(--space-5); font-size: 18px; line-height: 26px; }
  .faq-item p { padding: 0 var(--space-5) var(--space-4); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
