/* ============================================================
   Xsprint AI Labs — site stylesheet (one file for every page)
   1. Design tokens: verbatim copy of brand/tokens.css
   2. Site tokens, font fallbacks, base, typography
   3. Layout, header, nav, buttons, pills, links
   4. Sections: hero, what we do, products (cards), founders, contact, footer
   5. Motion (reveals, hero rise), utilities, policy pages, 404
   ============================================================ */

/* Xsprint Labs design tokens — v1.0 (2026-11-07)
   Dark-first. Import this file, then use the semantic tokens (--bg, --fg, --accent …) in components.
   Fonts: <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Anek+Latin:wght@500;700;800&family=Anek+Malayalam:wght@500;700&family=Inter:wght@400;500;600&display=swap"> */

:root {
  /* ---- Primitive colors ---- */
  --x-ink-950: #0B0D12;  /* page background, dark */
  --x-ink-900: #12151C;  /* surface */
  --x-ink-800: #1A1E27;  /* raised surface */
  --x-ink-700: #2A3040;  /* borders on dark */
  --x-ink-600: #4B5264;  /* muted text on light */
  --x-ink-500: #6B7385;  /* strong borders; disabled on dark. 4.4:1 on Paper, so never text on light */
  --x-ink-400: #8B93A7;  /* muted text on dark */
  --x-ink-300: #AEB4C2;  /* secondary text on dark */
  --x-ink-200: #C9CED9;  /* borders on light */
  --x-ink-100: #E3E6EC;  /* dividers on light */
  --x-ink-50:  #F4F5F8;  /* "Paper": light background, text on dark */
  --x-white:   #FFFFFF;

  --x-vermilion-700: #C43309;  /* accent text on light backgrounds (5.5:1 on white) */
  --x-vermilion-600: #E63E10;  /* accent hover on light */
  --x-vermilion-500: #FF4D1C;  /* THE brand accent. 5.9:1 on ink-950 */
  --x-vermilion-400: #FF6A3D;  /* accent hover on dark */
  --x-vermilion-300: #FF9470;
  --x-vermilion-100: #FFE4DB;

  --x-lagoon-800: #0A7765;  /* secondary accent text on light (5.5:1 on white) */
  --x-lagoon-600: #10A890;  /* 2.7:1 on Paper: not for text or focus rings on light */
  --x-lagoon-500: #14C9AB;
  --x-lagoon-400: #20E3C2;  /* secondary accent on dark (11.9:1) */
  --x-lagoon-100: #D6F7F0;

  --x-success-500: #35C97A;  --x-success-700: #1F8A50;
  --x-warning-500: #F5B82E;  --x-warning-700: #946500;
  --x-error-500:   #E5484D;  --x-error-700:   #C8323A;

  /* ---- Semantic colors (dark theme = default) ---- */
  --bg:            var(--x-ink-950);
  --bg-elev:       var(--x-ink-900);
  --bg-raised:     var(--x-ink-800);
  --border:        var(--x-ink-700);
  --border-strong: var(--x-ink-500);
  --fg:            var(--x-ink-50);
  --fg-2:          var(--x-ink-300);
  --fg-muted:      var(--x-ink-400);
  --accent:        var(--x-vermilion-500);
  --accent-hover:  var(--x-vermilion-400);
  --accent-fg:     var(--x-ink-950);     /* text ON an accent fill */
  --accent-2:      var(--x-lagoon-400);
  --link:          var(--x-vermilion-400);
  --focus:         var(--x-lagoon-400);
  --success:       var(--x-success-500);
  --warning:       var(--x-warning-500);
  --error:         var(--x-error-500);
  --logo-back:     var(--x-ink-50);      /* the thin stroke of the mark; use `color:` on inline SVG */
  color-scheme: dark;

  /* ---- Typography ---- */
  --font-display:   "Anek Latin", "Inter", system-ui, sans-serif;
  --font-body:      "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-malayalam: "Anek Malayalam", "Noto Sans Malayalam", sans-serif;
  --font-mono:      ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-xs:   0.75rem;   /* 12 — eyebrows, legal */
  --text-sm:   0.875rem;  /* 14 — captions, UI */
  --text-base: 1rem;      /* 16 — body */
  --text-lg:   1.125rem;  /* 18 — lead body */
  --text-xl:   1.375rem;  /* 22 — H4 */
  --text-2xl:  1.75rem;   /* 28 — H3 */
  --text-3xl:  2.25rem;   /* 36 — H2 */
  --text-4xl:  3rem;      /* 48 — H1 mobile */
  --text-5xl:  4rem;      /* 64 — H1 */
  --text-6xl:  5.5rem;    /* 88 — hero display */

  --leading-tight: 1.05;  /* display */
  --leading-snug:  1.2;   /* headings */
  --leading-body:  1.6;
  --tracking-display: -0.03em;
  --tracking-heading: -0.02em;
  --tracking-caps: 0.08em;

  /* ---- Spacing (4px base) ---- */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-6: 1.5rem;  --space-8: 2rem;   --space-12: 3rem;   --space-16: 4rem;
  --space-24: 6rem;   --space-32: 8rem;
  --measure: 65ch;
  --container: 72rem;
  --gutter: max(16px, env(safe-area-inset-left, 0px));

  /* ---- Shape ---- */
  --radius-sm: 4px;    /* inputs, chips */
  --radius-md: 8px;    /* buttons, cards */
  --radius-lg: 16px;   /* panels, product frames */
  --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 8px 24px rgba(0,0,0,.45);

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(.2,.8,.2,1);
  --dur-fast: 120ms; --dur-base: 200ms; --dur-slow: 400ms;
}

/* Light theme: opt in with data-theme="light" on <html>, or follow the OS. */
@media (prefers-color-scheme: light) {
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  --bg: var(--x-ink-50); --bg-elev: var(--x-white); --bg-raised: var(--x-white);
  --border: var(--x-ink-200); --border-strong: var(--x-ink-500);
  --fg: var(--x-ink-950); --fg-2: var(--x-ink-600); --fg-muted: var(--x-ink-600);
  --accent: var(--x-vermilion-500); --accent-hover: var(--x-vermilion-600); --accent-fg: var(--x-ink-950);
  --accent-2: var(--x-lagoon-800); --link: var(--x-vermilion-700); --focus: var(--x-lagoon-800);
  --success: var(--x-success-700); --warning: var(--x-warning-700); --error: var(--x-error-700);
  --logo-back: var(--x-ink-950);
  --shadow-1: 0 1px 2px rgba(11,13,18,.08); --shadow-2: 0 8px 24px rgba(11,13,18,.12);
  color-scheme: light;
} }
:root[data-theme="light"] {
  --bg: var(--x-ink-50); --bg-elev: var(--x-white); --bg-raised: var(--x-white);
  --border: var(--x-ink-200); --border-strong: var(--x-ink-500);
  --fg: var(--x-ink-950); --fg-2: var(--x-ink-600); --fg-muted: var(--x-ink-600);
  --accent: var(--x-vermilion-500); --accent-hover: var(--x-vermilion-600); --accent-fg: var(--x-ink-950);
  --accent-2: var(--x-lagoon-800); --link: var(--x-vermilion-700); --focus: var(--x-lagoon-800);
  --success: var(--x-success-700); --warning: var(--x-warning-700); --error: var(--x-error-700);
  --logo-back: var(--x-ink-950);
  --shadow-1: 0 1px 2px rgba(11,13,18,.08); --shadow-2: 0 8px 24px rgba(11,13,18,.12);
  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur-base: 0ms; --dur-slow: 0ms; }
}

/* ============================================================
   2. Site tokens
   ============================================================ */
:root {
  --ease-in: cubic-bezier(.4,0,.6,1);
  --dur-sweep: 450ms;
  --step: 20px;                 /* dot-field pitch; 24px from 768 */
  --header-h: 56px;             /* 64px from 768 */
  --field-dot: rgba(244,245,248,.07);
  --font-display: "Anek Latin", "Anek Latin Fallback", "Inter", system-ui, sans-serif;
  --font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --field-dot: rgba(11,13,18,.09); } }
:root[data-theme="light"] { --field-dot: rgba(11,13,18,.09); }
@media (min-width: 768px) { :root { --step: 24px; --header-h: 64px; } }

/* Metric-matched fallbacks so copy keeps its place while the web fonts load.
   Measured (Capsize / fontaine method) from the shipped Inter 400 and Anek Latin 800 files against Arial:
   size-adjust from the frequency-weighted average character width, overrides from the hhea/typo metrics. */
@font-face {
  font-family: "Inter Fallback"; src: local("Arial"), local("Helvetica");
  size-adjust: 107.34%; ascent-override: 90.25%; descent-override: 22.47%; line-gap-override: 0%;
}
@font-face {
  font-family: "Anek Latin Fallback"; src: local("Arial"), local("Helvetica");
  size-adjust: 101.73%; ascent-override: 88.47%; descent-override: 19.66%; line-gap-override: 0%;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--fg);
  font: 400 var(--text-base)/var(--leading-body) var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  margin: 0; font-family: var(--font-display); font-weight: 700;
  line-height: var(--leading-snug); letter-spacing: var(--tracking-heading); text-wrap: balance;
}
h2 { font-size: clamp(1.75rem, 1.35rem + 1.6vw, var(--text-3xl)); line-height: 1.1; }
h3 { font-size: clamp(1.375rem, 1.2rem + .7vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); line-height: 1.25; }
p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .15em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--accent-fg); }

/* ---- Type styles ---- */
.eyebrow {
  font: 600 var(--text-xs)/1.2 var(--font-body); text-transform: uppercase;
  letter-spacing: var(--tracking-caps); color: var(--fg-muted);
}
.lead { font-size: var(--text-lg); color: var(--fg-2); }
.display {
  font: 800 clamp(3rem, 2.4rem + 2.5vw, var(--text-5xl))/1 var(--font-display);
  letter-spacing: var(--tracking-display);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ============================================================
   3. Layout, header, buttons, pills, links
   ============================================================ */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--space-16); }
.section.rule { border-top: 1px solid var(--border); }
.section-head { max-width: 40ch; margin-bottom: var(--space-12); }
.section-head .eyebrow { margin-bottom: var(--space-3); }
@media (min-width: 768px) {
  .section { padding-block: var(--space-24); }
  .section-head { margin-bottom: var(--space-16); }
}

/* Skip link */
.skip {
  position: absolute; top: var(--space-2); left: var(--space-2); z-index: 100;
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  background: var(--accent); color: var(--accent-fg); font: 600 15px/1 var(--font-body);
  text-decoration: none; transform: translateY(-200%);
}
.skip:focus { transform: none; outline-color: var(--fg); }

/* Header: sticky, solid by default; transparent over the hero until the sentinel passes */
.site-header {
  position: sticky; top: 0; z-index: 20; height: var(--header-h);
  background: var(--bg); border-bottom: 1px solid var(--border);
  transition: background-color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.has-hero .site-header { margin-bottom: calc(-1 * var(--header-h)); }
html.js .has-hero .site-header:not(.is-stuck) { background: transparent; border-bottom-color: transparent; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); height: 100%; }
.brand { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; padding-inline: 4px; margin-inline-start: -4px; color: var(--logo-back); text-decoration: none; border-radius: var(--radius-sm); }  /* 44px target; -4px keeps the mark flush with the gutter */
.brand-logo { width: 36px; height: 36px; }        /* crops the lockup to its 5×5 mark on phones */
@media (min-width: 768px) { .brand-logo { width: 176px; height: 44px; } }  /* 44px tall: the AI LABS line stays readable */
.site-nav ul { display: flex; gap: var(--space-1); }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-3);
  border-radius: var(--radius-md); font: 500 var(--text-sm)/1 var(--font-body);
  color: var(--fg-2); text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 50% calc(100% - 10px) / 0 1px no-repeat;
  transition: color var(--dur-fast), background-size var(--dur-fast) var(--ease-out);
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--fg); }
.site-nav a[aria-current] { background-size: calc(100% - 2 * var(--space-3)) 1px; }
.header-sentinel { position: absolute; left: 0; width: 1px; height: 1px; pointer-events: none; }
@media (max-width: 379px) { .site-nav ul { gap: 0; } .site-nav a { padding: 0 var(--space-2); } .site-nav a[aria-current] { background-size: calc(100% - 2 * var(--space-2)) 1px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 0 20px; border-radius: var(--radius-md); border: 1px solid transparent;
  font: 600 15px/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn-secondary:hover { background: var(--bg-raised); }

/* Status pills: the label is body text (AA in both themes); the semantic colour sits on the dot and border. */
.pill {
  display: inline-flex; align-items: center; gap: var(--space-2); padding: 6px 10px;
  color: var(--fg-2); border: 1px solid currentColor; border-radius: var(--radius-pill);
  font: 600 var(--text-xs)/1.2 var(--font-body); text-transform: uppercase; letter-spacing: var(--tracking-caps);
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--live { border-color: var(--success); }  .pill--live::before { background: var(--success); }
.pill--dev { border-color: var(--warning); }   .pill--dev::before { background: var(--warning); }
.pill--muted { color: var(--fg-muted); }

/* Text link with a drawn underline */
.link {
  display: inline-block; min-height: 44px; line-height: 44px; color: var(--link); font-weight: 500; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(50% + .7em) / 0 1px no-repeat;
  transition: background-size var(--dur-fast) var(--ease-out);
}
.link:hover, .link:focus-visible { background-size: 100% 1px; }

/* ============================================================
   4. Sections
   ============================================================ */
/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; padding: calc(var(--header-h) + var(--space-16)) 0 var(--space-24); }
.field::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, var(--field-dot) 1.5px, transparent 2px) 0 0 / var(--step) var(--step);
  -webkit-mask-image: linear-gradient(#000 80%, transparent 100%);
          mask-image: linear-gradient(#000 80%, transparent 100%);
}
.hero-canvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-copy { position: relative; z-index: 1; }
.hero-title {
  margin-top: var(--space-4); max-width: 14ch; color: var(--fg);
  font-weight: 800; font-size: clamp(3.5rem, 2.2rem + 5.5vw, 5.5rem); line-height: .98;
  letter-spacing: var(--tracking-display); text-wrap: balance;
}
.hero .lead { margin-top: var(--space-6); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.dateline { margin-top: var(--space-12); font-size: var(--text-sm); color: var(--fg-muted); }
@media (min-width: 768px) {
  .hero { display: flex; align-items: center; min-height: 100vh; min-height: 100svh; padding-block: calc(var(--header-h) + var(--space-16)) var(--space-16); }
}

/* ---- What we do ---- */
.pillars { position: relative; overflow: hidden; }
.pillars .container { position: relative; z-index: 1; }
.texture {
  /* Inline SVG of "മലയാളം" outlined from Anek Malayalam 700; --tx is the font-size the live word had. */
  --tx: clamp(8rem, 18vw, 14rem);
  position: absolute; right: calc(-.05 * var(--tx)); bottom: calc(-.27 * var(--tx)); z-index: 0; pointer-events: none;
  width: calc(4.23 * var(--tx)); height: auto; color: var(--fg); opacity: .05;
}
.pillars-grid { display: grid; gap: var(--space-8); }
.pillar { border-top: 1px solid var(--border); padding-top: var(--space-6); }
.pillar-num { font: 800 var(--text-5xl)/1 var(--font-display); letter-spacing: var(--tracking-display); opacity: .18; }
.pillar h3 { margin: var(--space-4) 0 var(--space-2); font-size: var(--text-xl); }
.pillar p:last-child { color: var(--fg-2); max-width: 32ch; }
@media (min-width: 768px) {
  .pillars-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-8); }
  .pillar { border-top: 0; border-left: 1px solid var(--border); padding: 0 0 0 var(--space-6); }
}

/* ---- Products: one grid of cards, DWED featured across the full width ---- */
.products-grid { display: grid; gap: var(--space-6); }
.product-card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-6);
}
.product-card--featured { grid-column: 1 / -1; }
.product { display: grid; gap: var(--space-12); }
.product-head { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-6); }
.product-head--row { justify-content: space-between; margin-bottom: var(--space-8); }
.product-icon { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.product-text h3 .display { display: block; }
.product-sub { display: block; margin-top: var(--space-2); font-size: clamp(1.375rem, 1.2rem + .7vw, var(--text-2xl)); }
.product-card-title { max-width: 20ch; }
.product-card-text { margin-top: var(--space-3); color: var(--fg-2); max-width: 40ch; }
.product-lead { margin-top: var(--space-4); color: var(--fg-2); max-width: 40ch; }
.product-stack { margin-top: var(--space-4); font-size: var(--text-sm); color: var(--fg-muted); }
.features { margin-top: var(--space-8); display: grid; }
.features li { padding: var(--space-3) 0; border-top: 1px solid var(--border); color: var(--fg-2); font-size: var(--text-sm); line-height: 1.5; }
.features li:last-child { border-bottom: 1px solid var(--border); }
.badges {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
  margin-top: var(--space-8); padding: var(--space-4); background: var(--bg-raised);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.badges a { display: inline-flex; min-height: 44px; border-radius: 7px; }
.badges img { height: 44px; width: auto; }
/* The official Play PNG carries transparent padding (opaque area 168 of 250px): size the box so the visible badge is 44px. */
.badges .badge--play { height: 65px; margin-block: -10.5px; }
.product-link { margin-top: var(--space-4); }
.frames {
  display: flex; gap: var(--space-4); align-items: flex-start;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-inline: var(--space-6);
  margin-inline: calc(-1 * var(--space-6)); padding: var(--space-1) var(--space-6) var(--space-4);
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.frame {
  flex: 0 0 62vw; max-width: 240px; scroll-snap-align: center;
  padding: 10px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: 24px;
}
.frame img { aspect-ratio: 1080 / 2400; width: 100%; height: auto; object-fit: cover; border-radius: 16px; }
@media (min-width: 768px) {
  .products-grid { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: 1fr 1fr; column-gap: var(--space-6); }
  .features li:nth-last-child(2) { border-bottom: 1px solid var(--border); }
  .frames { overflow: visible; justify-content: center; margin: 0; padding: 0; scroll-snap-type: none; }
  .frame { flex: 0 1 216px; }
}
@media (min-width: 1100px) {
  .product { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-16); align-items: start; }
  .frames { justify-content: flex-end; }
  .frame:nth-child(2) { flex-basis: 240px; }
  .frame:nth-child(odd) { margin-top: 40px; }
}

/* ---- Founders ---- */
.founders-grid { display: grid; gap: var(--space-12); }
.founder { padding-top: var(--space-6); border-top: 1px solid var(--border); }
.founder h3 { font-size: var(--text-xl); }
.founder .eyebrow { margin-top: var(--space-2); }
.founder .bio { margin-top: var(--space-4); color: var(--fg-2); max-width: 42ch; }
.founder .bio--placeholder { color: var(--fg-muted); font-style: italic; }
.founder .link { margin-top: var(--space-2); }
@media (min-width: 768px) { .founders-grid { grid-template-columns: 1fr 1fr; gap: var(--space-12); } }

/* ---- Contact: the one Vermilion band ---- */
.band { background: var(--x-vermilion-500); color: var(--x-ink-950); border-top: 0; }
.band .eyebrow, .band a { color: var(--x-ink-950); }
.band :focus-visible { outline-color: var(--x-ink-950); }
.band ::selection { background: var(--x-ink-950); color: var(--x-ink-50); }
.contact-title { margin: var(--space-3) 0 var(--space-12); font-weight: 800; font-size: clamp(3.5rem, 2.2rem + 5.5vw, 5.5rem); line-height: .98; letter-spacing: var(--tracking-display); }
.contact-list li { border-top: 1px solid rgba(11,13,18,.3); }
.contact-list li:last-child { border-bottom: 1px solid rgba(11,13,18,.3); }
.contact-list a {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4);
  min-height: 44px; padding: var(--space-4) 0; text-decoration: none; overflow-wrap: anywhere;
  font: 700 clamp(1.5rem, 1rem + 2.2vw, 2.25rem)/1.15 var(--font-display); letter-spacing: var(--tracking-heading);
}
.contact-list a > span:first-child { flex: 1 1 auto; min-width: 0; }  /* the arrow wraps to its own line before the address breaks */
.contact-list a > span:last-child { flex: none; margin-inline-start: auto; font-size: 1.25rem; }
@media (max-width: 399px) { .contact-list a { font-size: 1.25rem; } }
.contact-list a:hover span:first-child { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); padding: var(--space-16) 0; font-size: var(--text-sm); color: var(--fg-muted); }
.footer-grid { display: grid; gap: var(--space-8); }
.footer-mark { width: 48px; height: 48px; color: var(--logo-back); margin-bottom: var(--space-4); }
.footer-brandline { color: var(--fg-2); margin-bottom: var(--space-2); }
.footer-legal { max-width: 65ch; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--fg-2); text-decoration: none; }
.footer-nav a:hover { color: var(--fg); text-decoration: underline; }
.theme-toggle {
  justify-self: start; min-height: 44px; padding: 0 var(--space-4); border: 1px solid var(--border);
  border-radius: var(--radius-md); background: transparent; color: var(--fg-2); font: 500 var(--text-sm)/1 var(--font-body);
  cursor: pointer; transition: color var(--dur-fast), border-color var(--dur-fast), background-color var(--dur-fast);
}
.theme-toggle:hover { color: var(--fg); border-color: var(--border-strong); }
.theme-toggle[aria-pressed="true"] { background: var(--bg-raised); color: var(--fg); }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1fr auto auto; align-items: end; gap: var(--space-12); }
}

/* ============================================================
   5. Motion, policy pages, 404
   ============================================================ */
/* Reveal start states exist only with JS and no reduced-motion preference. */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0; transform: translateY(16px);
    transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  }
  html.js .frame.reveal { transform: translateY(32px); }
  html.js .reveal.is-in { opacity: 1; transform: none; }
  html.js .reveal[data-i="1"] { transition-delay: 60ms; }
  html.js .reveal[data-i="2"] { transition-delay: 120ms; }
  html.js .reveal[data-i="3"] { transition-delay: 180ms; }
  html.js .reveal[data-i="4"] { transition-delay: 240ms; }
  html.js .frame.reveal[data-i="1"] { transition-delay: 80ms; }
  html.js .frame.reveal[data-i="2"] { transition-delay: 160ms; }
  html.js .hero .rise {
    opacity: 0; animation: rise var(--dur-slow) var(--ease-out) forwards;
    animation-delay: calc(150ms + var(--i, 0) * 60ms);
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Policy pages (privacy-policy.html, terms-and-conditions.html, delete-account.html): <main class="container prose"> */
.prose { max-width: var(--measure); padding: var(--space-12) 0 var(--space-24); }
.prose h1 { font-weight: 800; font-size: clamp(2.25rem, 1.8rem + 2vw, var(--text-4xl)); line-height: var(--leading-tight); letter-spacing: var(--tracking-display); }
.prose .meta { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--fg-muted); }
.prose h2 { margin-top: var(--space-12); font-size: var(--text-2xl); }
.prose h3 { margin-top: var(--space-8); font-size: var(--text-xl); }
.prose p, .prose li { color: var(--fg-2); }
.prose p { margin-top: var(--space-4); }
.prose ul, .prose ol { margin-top: var(--space-4); padding-left: 1.25rem; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.prose li { margin-top: var(--space-2); }
.prose a { font-weight: 500; }

/* 404: <section class="notfound field"> */
.notfound { position: relative; min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); display: grid; place-items: center; text-align: center; padding: var(--space-16) 0; }
.notfound .container { position: relative; z-index: 1; }
.notfound-code { font: 800 clamp(8rem, 30vw, 18rem)/1 var(--font-display); letter-spacing: -.04em; }
.notfound p { margin: var(--space-4) 0 var(--space-8); font-size: var(--text-lg); color: var(--fg-2); }
