/* ==========================================================
   SheetToApp — landing page styles
   1. Tokens   2. Base   3. Components   4. Sections   5. Mockups
   ========================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand palette — midnight frame, saffron brand, cobalt for data & links */
  --midnight: #0E1526;     /* Header, hero, footer, dark panels */
  --midnight-2: #172038;   /* Raised dark surfaces, contact section */
  --sun: #F5A524;          /* Saffron — brand, primary buttons, highlights */
  --sun-dark: #E08E0B;     /* Primary hover */
  --sun-soft: #FDEFD2;     /* Highlighted rows */
  --accent: #3354D1;       /* Cobalt — links, ticks, data on light */
  --accent-dark: #2640A3;  /* Link hover, emphasis */
  --ink: #141B2D;          /* Headings on light */
  --ink-2: #3E4659;        /* Body copy */
  --ink-3: #636B7E;        /* Secondary text (5.3:1 on white) */
  --grid: #DEE3EC;         /* Gridlines, borders */
  --grid-strong: #C3CAD8;  /* Form borders */
  --mist: #EEF1F7;         /* Tinted surfaces */
  --paper: #FAFBFD;        /* Page background */
  --white: #FFFFFF;
  --on-dark: #E4E8F1;      /* Body text on midnight */
  --on-dark-2: #A9B3C7;    /* Secondary text on midnight */
  --blue: #4F68D6;         /* Second data colour in mockups */

  /* Status (mockups + form) */
  --ok-bg: #DDF0E5;  --ok: #1E6B45;
  --warn-bg: #FCEFC7; --warn: #855A0C;
  --bad-bg: #F8E0DC; --bad: #A33A2F;

  /* Type */
  --font-display: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-h1: clamp(2.2rem, 1.4rem + 2.8vw, 3.45rem);
  --fs-h2: clamp(1.85rem, 1.35rem + 2vw, 2.7rem);
  --fs-h3: 1.3rem;
  --fs-lead: clamp(1.075rem, 1rem + .3vw, 1.2rem);
  --fs-body: 1.0625rem;
  --fs-small: .9375rem;
  --fs-xs: .8125rem;

  /* Space & shape */
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(72px, 9vw, 128px);
  --r-frame: 14px;
  --r-card: 10px;
  --r-ctrl: 10px;
  --shadow-frame: 0 1px 0 rgba(14, 21, 38, .04), 0 28px 56px -28px rgba(14, 21, 38, .32), 0 2px 6px rgba(14, 21, 38, .06);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { color: var(--ink); font-family: var(--font-display); margin: 0; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.04; letter-spacing: -.025em; font-weight: 700; }
h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -.02em; font-weight: 700; }
h3 { font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -.01em; font-weight: 650; }
h4 { font-size: 1rem; font-weight: 650; letter-spacing: 0; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--sun); color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-block: 0; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.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; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- 3. Components ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .65em 1.15em;
  border-radius: var(--r-ctrl); border: 1.5px solid transparent;
  font-family: var(--font-body); font-weight: 650; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--sun); color: var(--midnight); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 8px 20px -10px rgba(245,165,36,.65); }
.btn-primary:hover { background: var(--sun-dark); color: var(--midnight); }
.btn-ghost { background: transparent; border-color: var(--grid-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--mist); }
.btn-ghost-light { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn-sm { min-height: 40px; padding: .5em .95em; font-size: .9375rem; }
.btn-lg { min-height: 52px; padding: .8em 1.4em; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; }

.pill {
  display: inline-block; padding: .18em .6em; border-radius: 999px;
  font-size: .72rem; font-weight: 650; line-height: 1.4; white-space: nowrap;
  background: var(--mist); color: var(--ink-2);
}
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: #E1E9F6; color: #24497F; }
.app-chip { font-size: .72rem; font-weight: 600; color: var(--ink-3); border: 1px solid var(--grid); border-radius: 6px; padding: .15em .5em; background: #fff; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(14, 21, 38, .94);
  -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: rgba(255, 255, 255, .12); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 750; font-size: 1.3rem; letter-spacing: -.02em; }
.brand-to { font-weight: 500; color: var(--sun); margin: 0 .04em; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: #C9D0DE; text-decoration: none; font-size: .9688rem; font-weight: 550; }
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1.5px solid rgba(255, 255, 255, .22); border-radius: 10px; background: transparent; cursor: pointer; position: relative; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  position: absolute; left: 50%; width: 18px; height: 2px; margin-left: -9px; background: #fff; border-radius: 2px; content: ""; transition: transform .2s var(--ease), opacity .2s;
}
.nav-toggle-bars { top: 50%; margin-top: -1px; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: inline-block; }
  .header-actions { margin-left: auto; }
  .main-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0; margin: 0;
    background: var(--midnight); border-bottom: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 16px 32px -20px rgba(0, 0, 0, .6);
  }
  .nav-open .main-nav { display: block; }
  .main-nav ul { flex-direction: column; padding: 8px var(--gutter) 16px; }
  .main-nav a { padding: 12px 8px; font-size: 1.0625rem; border-bottom: 1px solid rgba(255, 255, 255, .08); border-radius: 0; }
}
@media (max-width: 400px) {
  .header-actions .btn-sm { padding: .5em .7em; font-size: .875rem; }
  .brand-name { font-size: 1.15rem; }
  .header-inner { gap: 12px; }
}

/* ---------- 4. Sections ---------- */
.section { padding: var(--section-y) 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p { font-size: var(--fs-lead); color: var(--ink-2); max-width: 58ch; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

.inline-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap;
  margin-top: clamp(32px, 4vw, 48px); padding-top: 28px; border-top: 1px solid var(--grid);
}
.inline-cta p { font-size: 1.125rem; color: var(--ink); font-weight: 550; max-width: 52ch; }
.note { margin-top: 28px; color: var(--ink-3); font-size: var(--fs-small); max-width: 70ch; }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 8vw, 104px); overflow: hidden;
  /* spreadsheet gridlines on the midnight frame */
  background-color: var(--midnight);
  background-image:
    radial-gradient(ellipse 70% 60% at 78% 45%, rgba(51, 84, 209, .22), transparent 70%),
    repeating-linear-gradient(to right, rgba(255,255,255,.055) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.055) 0 1px, transparent 1px 32px);
  color: var(--on-dark-2);
}
.hero h1 { color: #fff; }
.hero .btn-ghost { border-color: rgba(255, 255, 255, .3); color: #fff; }
.hero .btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .08); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6.4fr); gap: clamp(36px, 5vw, 64px); align-items: center; }
.hero-kicker { color: var(--sun); font-weight: 650; font-size: var(--fs-small); margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.hero-kicker::before { content: ""; width: 22px; height: 10px; background: var(--sun); border-radius: 2px; flex: none; }
.hero-lede { margin-top: 22px; font-size: var(--fs-lead); max-width: 52ch; color: #C9D0DE; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-assurances { margin-top: 28px; display: grid; gap: 8px; font-size: var(--fs-small); color: var(--on-dark); }
.hero-assurances li { display: flex; gap: 10px; align-items: baseline; }
.hero-assurances li::before { content: ""; width: 14px; height: 8px; border-left: 2px solid var(--sun); border-bottom: 2px solid var(--sun); transform: rotate(-45deg) translateY(-3px); flex: none; }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: 680px; }
}
@media (max-width: 480px) { .hero-ctas .btn { width: 100%; } }

/* Hero demo frame */
.hero-demo { margin: 0; min-width: 0; }
.demo-toggle {
  display: inline-flex; padding: 4px; gap: 4px; margin-bottom: 14px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px;
}
.demo-toggle button {
  border: 0; background: transparent; padding: 8px 14px; border-radius: 8px; cursor: pointer;
  font-size: .9375rem; font-weight: 600; color: var(--on-dark-2); min-height: 38px;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.demo-toggle button[aria-pressed="true"] { background: #fff; color: var(--midnight); }
.demo-toggle button[aria-pressed="false"]:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.demo-toggle { align-items: center; }
.demo-arrow { position: relative; width: 18px; height: 2px; background: rgba(255, 255, 255, .3); border-radius: 2px; flex: none; transition: background-color .3s var(--ease); }
.demo-arrow::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 2px solid rgba(255, 255, 255, .3); border-right: 2px solid rgba(255, 255, 255, .3); transform: rotate(45deg); transition: border-color .3s var(--ease); }
.hero-demo[data-view="app"] .demo-arrow { background: var(--sun); }
.hero-demo[data-view="app"] .demo-arrow::after { border-color: var(--sun); }
.demo-stage { display: grid; position: relative; }
.demo-stage > [data-panel] {
  grid-area: 1 / 1; min-width: 0;
  transition: opacity .55s var(--ease), transform .7s var(--ease), filter .55s var(--ease), visibility 0s linear 0s;
}
.hero-demo[data-view="app"] .sheet { opacity: 0; transform: scale(.965) translateY(10px) rotate(-.6deg); filter: blur(3px); visibility: hidden; transition-delay: 0s, 0s, 0s, .7s; }
.hero-demo[data-view="sheet"] .app { opacity: 0; transform: translateY(18px); visibility: hidden; transition-delay: 0s, 0s, 0s, .7s; }
.hero-demo[data-view="app"] .app .kpi,
.hero-demo[data-view="app"] .app .app-card { animation: rise .6s var(--ease) both; }
.hero-demo[data-view="app"] .app .kpi:nth-child(2) { animation-delay: .08s; }
.hero-demo[data-view="app"] .app .kpi:nth-child(3) { animation-delay: .16s; }
.hero-demo[data-view="app"] .app .app-card { animation-delay: .22s; }
.hero-demo[data-view="app"] .app .app-requests { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.demo-caption { margin-top: 14px; font-size: var(--fs-xs); color: #8D97AC; }

/* Frames sitting on the midnight hero need a deeper shadow */
.hero .sheet, .hero .app { box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 34px 70px -24px rgba(0, 0, 0, .65); }

/* Spreadsheet look */
.sheet {
  background: #fff; border: 1px solid #CFCFCF; border-radius: 6px; overflow: hidden;
  font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif; font-size: 13.5px; color: #222;
  box-shadow: var(--shadow-frame); align-self: start;
}
.sheet-title { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; background: #217346; color: #fff; font-size: 12.5px; }
.sheet-file { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-saved { opacity: .85; white-space: nowrap; }
.sheet-grid { display: grid; }
.sr { display: grid; grid-template-columns: 30px .6fr 1.1fr .8fr .7fr .7fr 1.35fr; }
.sr > * { border-right: 1px solid #E1E1E1; border-bottom: 1px solid #E1E1E1; padding: 5px 7px; min-height: 29px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }
.sr > b { font-weight: 700; background: #F7F7F7; }
.sh { background: #F0F0F0; color: #666; text-align: center; font-size: 12px; padding: 3px; min-height: 22px; }
.sn { background: #F0F0F0; color: #666; text-align: center; font-size: 12px; }
.sr .muted { color: #999; font-style: italic; }
.c-warn { background: #FFE699; }
.c-bad { color: #C00000; font-weight: 700 !important; }
.c-hl { background: #FFF2A8; }
.sheet-tabs { display: flex; gap: 2px; padding: 0 8px; background: #F0F0F0; border-top: 1px solid #D6D6D6; font-size: 12px; overflow: hidden; }
.sheet-tabs span { padding: 6px 12px; color: #555; white-space: nowrap; }
.sheet-tabs .on { background: #fff; color: #217346; font-weight: 700; border-bottom: 2px solid #217346; }

/* App look */
.app {
  display: grid; grid-template-columns: 112px minmax(0, 1fr);
  background: #fff; border: 1px solid var(--grid); border-radius: var(--r-frame); overflow: hidden;
  box-shadow: var(--shadow-frame); font-size: 13px; align-self: start;
}
.app-side { background: var(--midnight-2); color: var(--on-dark-2); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; }
.app-side span { padding: 7px 10px; border-radius: 7px; font-weight: 550; }
.app-side .on { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 3px 0 0 var(--sun); }
.app-logo { display: block; width: 26px; height: 26px; border-radius: 7px; background: var(--grid); margin: 0 0 12px 8px; padding: 0 !important; }
.app-main { padding: 16px; display: grid; gap: 12px; background: var(--paper); min-width: 0; }
.app-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.app-top strong { font-family: var(--font-display); color: var(--ink); font-size: 1.05rem; }
.kpis { display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: 10px; }
.kpi { background: #fff; border: 1px solid var(--grid); border-radius: var(--r-card); padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.kpi span { color: var(--ink-3); font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi strong { color: var(--ink); font-family: var(--font-display); font-size: 1.3rem; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi small { display: block; margin-top: 1px; font-family: var(--font-body); font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.meter { display: block; height: 6px; border-radius: 6px; background: var(--mist); margin-top: 6px; overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.app-cols { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 10px; }
.app-card { background: #fff; border: 1px solid var(--grid); border-radius: var(--r-card); padding: 10px 12px; min-width: 0; }
.app-card-h { font-weight: 650; color: var(--ink); margin-bottom: 6px; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mini-table th { text-align: left; color: var(--ink-3); font-weight: 600; font-size: 11px; padding: 4px 6px; border-bottom: 1px solid var(--grid); }
.mini-table th.num { text-align: right; }
.mini-table td { padding: 6px 5px; border-bottom: 1px solid var(--mist); color: var(--ink); white-space: nowrap; }
.mini-table tr:last-child td { border-bottom: 0; }
.row-hl td { background: var(--sun-soft); }
.req-list { display: grid; gap: 6px; }
.req-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--mist); }
.req-list li:last-child { border-bottom: 0; }
.req-list b { display: block; white-space: nowrap; color: var(--ink); font-weight: 600; }
.req-list span > span, .req-list li > span:first-child { color: var(--ink-3); font-size: 12px; }
.req-list li > span:first-child b { font-size: 12.5px; }

@media (max-width: 620px) {
  .app { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .app-cols { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi-wide { grid-column: 1 / -1; order: -1; }
  .sr { grid-template-columns: 26px .55fr 1.15fr .85fr .7fr .7fr; }
  .hide-sm { display: none !important; }
  .sheet { font-size: 12.5px; }
}

/* ---------- Problems register ---------- */
.problems { background: #fff; border-top: 1px solid var(--grid); border-bottom: 1px solid var(--grid); }
.register { border-top: 2px solid var(--ink); }
.register-head, .register-row { display: grid; grid-template-columns: 1fr 1fr; }
.register-head span { padding: 14px 0; font-weight: 650; font-size: var(--fs-small); color: var(--ink-3); border-bottom: 1px solid var(--grid); }
.register-head span:last-child, .register-row p:last-child { padding-left: clamp(20px, 4vw, 48px); border-left: 1px solid var(--grid); }
.register-row p { padding: 20px clamp(20px, 4vw, 48px) 20px 0; border-bottom: 1px solid var(--grid); font-size: 1.0625rem; position: relative; }
.register-row p:first-child { color: var(--ink-3); padding-left: 28px; }
.register-row p:first-child::before {
  content: ""; position: absolute; left: 2px; top: 1.62em; width: 12px; height: 2px; background: var(--bad); opacity: .75;
}
.register-row p:last-child { color: var(--ink); font-weight: 550; padding-left: calc(clamp(20px, 4vw, 48px) + 28px); }
.register-row p:last-child::before {
  content: ""; position: absolute; left: clamp(20px, 4vw, 48px); top: 1.15em; width: 12px; height: 7px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg);
}
.register-row { position: relative; }
.register-row::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; background: #fff; border: 1px solid var(--grid);
  background-image: linear-gradient(var(--accent), var(--accent)), linear-gradient(45deg, transparent 49%, var(--accent) 50%, var(--accent) 62%, transparent 63%);
  background-size: 10px 2px, 0 0; background-position: 7px 11px, 0 0; background-repeat: no-repeat;
}
.register-row::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -4px 0 0 1px; z-index: 1;
  border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: rotate(45deg);
}
.register-row:hover p:last-child { background: linear-gradient(to right, var(--sun-soft), rgba(253,239,210,0) 70%); }
@media (max-width: 720px) {
  .register-head { display: none; }
  .register-row::before, .register-row::after { display: none; }
  .register-row { grid-template-columns: 1fr; padding: 18px 0; border-bottom: 1px solid var(--grid); }
  .register-row p, .register-row p:last-child { border: 0; padding: 4px 0 4px 28px; }
  .register-row p:first-child::before { left: 2px; top: 1em; }
  .register-row p:last-child::before { left: 2px; top: .7em; }
  .register-row { position: relative; }
.register-row::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; background: #fff; border: 1px solid var(--grid);
  background-image: linear-gradient(var(--accent), var(--accent)), linear-gradient(45deg, transparent 49%, var(--accent) 50%, var(--accent) 62%, transparent 63%);
  background-size: 10px 2px, 0 0; background-position: 7px 11px, 0 0; background-repeat: no-repeat;
}
.register-row::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -4px 0 0 1px; z-index: 1;
  border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: rotate(45deg);
}
.register-row:hover p:last-child { background: none; }
}

/* ---------- Audience tabs ---------- */
.tabs { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.tab-list { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--grid); }
.tab-list [role="tab"] {
  text-align: left; background: transparent; border: 0; padding: 12px 16px 12px 18px; margin-left: -1px;
  border-left: 3px solid transparent; cursor: pointer; font-weight: 600; color: var(--ink-3); font-size: 1rem; line-height: 1.35;
  border-radius: 0 8px 8px 0; transition: color .2s, background-color .2s, border-color .2s;
}
.tab-list [role="tab"]:hover { color: var(--ink); background: var(--mist); }
.tab-list [role="tab"][aria-selected="true"] { color: var(--ink); border-left-color: var(--accent); background: #fff; box-shadow: 0 1px 3px rgba(14,21,38,.08); }
.tab-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(24px, 3.5vw, 44px); align-items: start; }
.tab-panel[hidden] { display: none; }
.tab-panel:focus-visible { outline-offset: 8px; }
html.js .tab-panel:not([hidden]) { animation: fadeIn .35s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
html:not(.js) .tab-panel { padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid var(--grid); }
.panel-copy h3 { font-size: 1.55rem; }
.panel-problem { margin-top: 12px; }
.panel-copy h4 { margin-top: 22px; margin-bottom: 10px; }
.ticks { display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 26px; color: var(--ink); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 11px; height: 6px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }
.panel-outcome { margin-top: 22px; padding: 14px 16px; background: var(--mist); border-radius: var(--r-card); color: var(--ink); }
.panel-outcome strong { color: var(--accent-dark); }
@media (max-width: 980px) {
  .tabs { grid-template-columns: 1fr; }
  .tab-list {
    flex-direction: row; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--grid); gap: 4px;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
  }
  .tab-list [role="tab"] { flex: none; white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; margin: 0 0 -1px; padding: 12px 14px; scroll-snap-align: start; }
  .tab-list [role="tab"][aria-selected="true"] { border-bottom-color: var(--accent); box-shadow: none; }
}
@media (max-width: 760px) { .tab-panel { grid-template-columns: 1fr; } }

/* Mini UIs inside tabs */
.mini-ui {
  background: #fff; border: 1px solid var(--grid); border-radius: var(--r-frame); padding: 18px;
  box-shadow: var(--shadow-frame); font-size: 13px; display: grid; gap: 14px; color: var(--ink);
}
.mu-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mu-head b { font-family: var(--font-display); font-size: 1rem; }
.mu-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mu-col { background: var(--paper); border: 1px solid var(--mist); border-radius: 8px; padding: 8px; display: grid; gap: 6px; align-content: start; min-height: 150px; }
.mu-col-h { font-size: 11px; color: var(--ink-3); font-weight: 650; }
.mu-card { display: block; font-style: normal; background: #fff; border: 1px solid var(--grid); border-radius: 6px; padding: 7px 8px; font-size: 12px; line-height: 1.3; }
.mu-hl { background: var(--sun-soft) !important; border-color: #F2C46D !important; }
.mu-alert { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.mu-bars { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding-bottom: 4px; border-bottom: 1px solid var(--grid); }
.mu-bars i { flex: 1; height: var(--h); background: #CAD4F1; border-radius: 4px 4px 0 0; }
.mu-bars i.on { background: var(--accent); }
.mu-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mu-split div { background: var(--paper); border: 1px solid var(--mist); border-radius: 8px; padding: 10px; display: grid; }
.mu-split span { font-size: 11.5px; color: var(--ink-3); }
.mu-split b { font-family: var(--font-display); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.mu-list { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0 0; border-top: 1px solid var(--mist); font-size: 12.5px; }
.mu-list span:last-child { color: var(--ink-3); }
.mu-units { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.mu-units i { aspect-ratio: 1; border-radius: 5px; background: #C5D0EF; }
.mu-units i.due { background: var(--sun); }
.mu-units i.vac { background: #fff; border: 1.5px dashed var(--grid-strong); }
.mu-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11.5px; color: var(--ink-3); }
.mu-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mu-legend i { width: 10px; height: 10px; border-radius: 3px; background: #C5D0EF; display: inline-block; }
.mu-legend i.due { background: var(--sun); }
.mu-legend i.vac { background: #fff; border: 1.5px dashed var(--grid-strong); }
.mu-sched { display: grid; grid-template-columns: 46px 1fr; gap: 8px 10px; align-items: center; }
.mu-sched .t { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mu-sched .slot { display: block; font-style: normal; padding: 10px 12px; border-radius: 8px; background: #E1E9F6; border-left: 3px solid var(--blue); font-size: 12.5px; }
.mu-sched .slot[style*="--c:2"] { background: var(--ok-bg); border-left-color: var(--accent); }
.mu-sched .slot[style*="--c:3"] { background: #F1ECF8; border-left-color: #6B4FA0; }
.mu-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mu-stats div { border: 1px solid var(--grid); border-radius: 8px; padding: 12px 10px; display: grid; }
.mu-stats b { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; }
.mu-stats span { font-size: 11.5px; color: var(--ink-3); }
.mu-stats .warn { background: var(--sun-soft); border-color: #F2C46D; }
.mu-stats .muted b { color: var(--ink-3); }

/* ---------- Capabilities anatomy ---------- */
.capabilities { background: var(--mist); }
.anatomy { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.anatomy-ui {
  position: sticky; top: 96px;
  background: #fff; border: 1px solid var(--grid); border-radius: var(--r-frame); padding: 16px 16px 22px;
  box-shadow: var(--shadow-frame); font-size: 13px; color: var(--ink); display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px;
  margin-right: 66px;
}
.anatomy-ui [data-cap] { transition: box-shadow .25s var(--ease), background-color .25s var(--ease); border-radius: 8px; }
.anatomy-ui [data-cap].is-on { box-shadow: 0 0 0 2px var(--sun), 0 0 0 7px rgba(245, 165, 36, .35); background-color: #FFF8EA; }
.an-top { display: flex; gap: 10px; align-items: center; }
.an-search { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--grid); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-user { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border: 1px solid var(--grid); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.an-user i { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); }
.an-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 2px; }
.an-stats div { background: var(--paper); border: 1px solid var(--mist); border-radius: 8px; padding: 10px; display: grid; }
.an-stats span { font-size: 11px; color: var(--ink-3); }
.an-stats b { font-family: var(--font-display); font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.an-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 10px; }
.an-table { border: 1px solid var(--grid); overflow: hidden; }
.an-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--mist); font-size: 12.5px; }
.an-row:last-child { border-bottom: 0; }
.an-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-h { background: var(--paper); color: var(--ink-3); font-weight: 600; font-size: 11px; }
.an-h [data-cap] { margin: -3px -4px; padding: 3px 4px; }
.pay { color: var(--ok); font-weight: 600; }
.pay.due { color: var(--bad); }
.an-side { display: grid; gap: 10px; align-content: start; }
.an-tasks { border: 1px solid var(--grid); padding: 10px; display: grid; gap: 6px; font-size: 12px; }
.an-tasks span { padding: 5px 8px; background: var(--paper); border-radius: 6px; }
.an-report { border: 1.5px dashed var(--grid-strong); padding: 10px; text-align: center; font-weight: 600; font-size: 12px; color: var(--accent-dark); }
.an-phone {
  position: absolute; right: -66px; bottom: 28px; width: 86px; height: 150px;
  background: #fff; border: 2px solid var(--ink); border-radius: 16px !important; padding: 18px 8px 8px;
  display: grid; gap: 6px; align-content: start; box-shadow: var(--shadow-frame);
}
.an-phone i { height: 16px; border-radius: 4px; background: var(--mist); }
.an-phone i:first-child { background: var(--accent); opacity: .85; }
.cap-list { display: grid; gap: 4px; }
.cap-list button {
  width: 100%; text-align: left; display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--r-card);
  background: transparent; border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.cap-list button b { color: var(--ink); font-weight: 650; font-size: 1.0625rem; }
.cap-list button span { color: var(--ink-2); font-size: var(--fs-small); }
.cap-list button:hover, .cap-list button[aria-pressed="true"] { background: #fff; border-color: var(--grid); }
.cap-list button[aria-pressed="true"] b { box-shadow: inset 0 -.45em 0 var(--sun-soft); }
@media (max-width: 900px) {
  .anatomy { grid-template-columns: minmax(0, 1fr); }
  .anatomy-ui { position: relative; top: 0; margin-right: 0; }
  .an-phone { display: none; }
  .anatomy-ui[data-active="mobile"] { box-shadow: 0 0 0 2px var(--sun), 0 0 0 7px rgba(245, 165, 36, .35); }
  .cap-list { grid-template-columns: 1fr 1fr; margin-top: 30px; }
}
@media (max-width: 560px) {
  .cap-list { grid-template-columns: 1fr; }
  .an-body { grid-template-columns: 1fr; }
  .an-side { grid-template-columns: 1fr 1fr; }
  .an-phone { display: none; }
  .anatomy-ui { margin-bottom: 0; }
}

/* ---------- Why custom ---------- */
.contrast { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: var(--r-frame); overflow: hidden; border: 1px solid var(--grid); }
.contrast-col { padding: clamp(24px, 3.5vw, 40px); background: #fff; }
.contrast-col h3 { margin-bottom: 18px; }
.contrast-col ul { display: grid; gap: 14px; }
.contrast-col li { position: relative; padding-left: 28px; }
.contrast-col li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 12px; height: 2px; background: var(--ink-3); }
.contrast-ours { background: var(--midnight); }
.contrast-ours h3 { color: #fff; }
.contrast-ours li { color: var(--on-dark); }
.contrast-ours li::before { top: .5em; width: 12px; height: 7px; background: none; border-left: 2.5px solid var(--sun); border-bottom: 2.5px solid var(--sun); transform: rotate(-45deg); }
.honest-note { margin-top: 24px; padding: 16px 20px; border-left: 4px solid var(--sun); background: #fff; border-radius: 0 var(--r-card) var(--r-card) 0; max-width: 820px; color: var(--ink); }
.phases { margin-top: clamp(48px, 6vw, 72px); }
.phases > p { margin-top: 6px; color: var(--ink-3); }
.phase-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 20px; }
.phase-track li { display: grid; gap: 4px; padding: 18px 18px 20px; background: #fff; border: 1px solid var(--grid); border-top: 6px solid var(--accent); }
.phase-track li:nth-child(1) { border-radius: var(--r-card) 0 0 var(--r-card); }
.phase-track li:nth-child(2) { border-top-color: #8EA2E6; }
.phase-track li:nth-child(3) { border-top-color: var(--grid); border-radius: 0 var(--r-card) var(--r-card) 0; border-top-style: dashed; }
.phase-n { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 650; }
.phase-track b { font-family: var(--font-display); color: var(--ink); font-size: 1.15rem; }
.phase-track span:last-child { font-size: var(--fs-small); }
@media (max-width: 760px) {
  .contrast { grid-template-columns: 1fr; }
  .phase-track { grid-template-columns: 1fr; }
  .phase-track li, .phase-track li:nth-child(1), .phase-track li:nth-child(3) { border-radius: var(--r-card); }
}

/* ---------- Process ---------- */
.process { background: #fff; border-top: 1px solid var(--grid); border-bottom: 1px solid var(--grid); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: step; border-top: 2px solid var(--ink); }
.steps li { counter-increment: step; padding: 28px 28px 32px 0; border-bottom: 1px solid var(--grid); display: flex; flex-direction: column; gap: 10px; }
.steps li:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--grid); }
.steps li::before {
  content: counter(step); font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; line-height: 1;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.steps p { font-size: 1rem; }
.step-get { margin-top: auto; padding-top: 10px; font-size: var(--fs-small) !important; color: var(--ink); font-weight: 550; display: flex; gap: 10px; align-items: baseline; }
.step-get::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--sun); transform: translateY(1px); }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--grid); }
}
@media (max-width: 600px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li:nth-child(even) { padding: 22px 0 24px 64px; border-left: 0; position: relative; }
  .steps li::before { position: absolute; left: 0; top: 22px; font-size: 2.1rem; }
}

/* ---------- Example solutions ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 32px); }
.work-item { display: grid; grid-template-rows: auto 1fr; background: #fff; border: 1px solid var(--grid); border-radius: var(--r-frame); overflow: hidden; }
.work-visual { background: var(--mist); padding: clamp(20px, 3vw, 32px) clamp(20px, 3vw, 36px) 0; border-bottom: 1px solid var(--grid); display: flex; align-items: flex-end; height: 248px; overflow: hidden; }
.work-visual img { width: 100%; border-radius: 8px 8px 0 0; }
.work-body { padding: 22px clamp(20px, 3vw, 28px) 26px; display: grid; gap: 10px; align-content: start; }
.work-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: var(--fs-small); color: var(--ink-3); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; border: 1px dashed var(--grid-strong); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 650; background: var(--paper); }
.tag-client { border-style: solid; border-color: var(--accent); color: var(--accent-dark); }
.work-features { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.work-features li { font-size: var(--fs-xs); padding: 3px 10px; border-radius: 6px; background: var(--mist); color: var(--ink); font-weight: 550; }
.empty-state { grid-column: 1 / -1; padding: 40px; text-align: center; border: 1.5px dashed var(--grid-strong); border-radius: var(--r-frame); color: var(--ink-2); }
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; } }

/* Preview screens inside work tiles */
.pv { width: 100%; background: #fff; border: 1px solid var(--grid); border-bottom: 0; border-radius: 10px 10px 0 0; padding: 14px; display: grid; gap: 12px; font-size: 12.5px; color: var(--ink); box-shadow: 0 -10px 30px -18px rgba(14,21,38,.35); min-height: 188px; align-content: start; }
.pv-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.pv-head b { font-family: var(--font-display); font-size: .98rem; }
.pv-kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pv-kanban div { display: grid; gap: 6px; align-content: start; background: var(--paper); border-radius: 8px; padding: 8px; }
.pv-kanban span { font-size: 11px; color: var(--ink-3); font-weight: 650; }
.pv-kanban i { font-style: normal; background: #fff; border: 1px solid var(--grid); border-radius: 6px; padding: 6px 8px; font-size: 11.5px; }
.pv-kanban i.hl { background: var(--sun-soft); border-color: #F2C46D; }
.pv-rows { display: grid; }
.pv-rows > span { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 8px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--mist); }
.pv-rows > span.hl { background: var(--sun-soft); }
.pv-rows em { font-style: normal; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-rows i { font-style: normal; }
.pv-phone { width: 200px; max-width: 100%; margin: 0 auto; border: 2px solid var(--ink); border-bottom: 0; border-radius: 18px 18px 0 0; padding: 14px 12px 6px; display: grid; gap: 6px; }
.pv-phone span { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; background: var(--paper); border-radius: 6px; }
.pv-phone .chk { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--grid-strong); background: #fff; position: relative; }
.pv-phone .chk.on { background: var(--accent); border-color: var(--accent); }
.pv-phone .chk.on::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }
.pv-bars { display: flex; gap: 10px; align-items: flex-end; height: 104px; border-bottom: 1px solid var(--grid); }
.pv-bars i { flex: 1; height: var(--h); background: #CAD4F1; border-radius: 4px 4px 0 0; }
.pv-bars i.on { background: var(--accent); }
.pv-split { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-3); flex-wrap: wrap; }
.pv-split b { color: var(--ink); margin-left: 4px; }

/* ---------- Who you'll work with ---------- */
.about[hidden] { display: none; }
.about { padding-top: 0; }
.about-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center; padding: clamp(28px, 4vw, 44px); background: #fff; border: 1px solid var(--grid); border-radius: var(--r-frame); }
.about-photo { width: 200px; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--mist); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 3.4rem; color: var(--accent); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-name { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.about-name b { color: var(--ink); font-size: 1.15rem; }
.about-name span { color: var(--ink-3); }
.about-bio { margin-top: 10px; max-width: 64ch; }
.about-note { margin-top: 14px; color: var(--ink); font-weight: 550; }
@media (max-width: 640px) { .about-grid { grid-template-columns: 1fr; } .about-photo { width: 120px; font-size: 2.2rem; } }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.faq-aside { position: sticky; top: 100px; display: grid; gap: 18px; justify-items: start; }
.faq-aside p { font-size: var(--fs-lead); }
.faq-list { border-top: 2px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--grid); }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative;
  font-family: var(--font-display); font-weight: 650; font-size: 1.15rem; color: var(--ink); line-height: 1.3;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before, .faq-list summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 16px; height: 2px; background: var(--accent); border-radius: 2px; transition: transform .25s var(--ease);
}
.faq-list summary::after { transform: rotate(90deg); }
.faq-list details[open] summary::after { transform: rotate(0deg); }
.faq-list summary:hover { color: var(--accent-dark); }
.faq-list details p { padding: 0 44px 22px 0; max-width: 68ch; }
@media (max-width: 860px) {
  .faq-grid { grid-template-columns: 1fr; }
  .faq-aside { position: static; }
}

/* ---------- Contact ---------- */
.contact { background: var(--midnight-2); color: var(--on-dark); position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    repeating-linear-gradient(to right, rgba(255,255,255,.04) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 32px);
}
.contact-grid { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6.2fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact h2 { color: #fff; }
.contact-lede { margin-top: 18px; font-size: var(--fs-lead); color: var(--on-dark); max-width: 46ch; }
.next-steps { margin-top: 36px; display: grid; gap: 0; counter-reset: ns; }
.next-steps li { counter-increment: ns; position: relative; padding: 0 0 22px 52px; display: grid; gap: 2px; }
.next-steps li::before {
  content: counter(ns); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--sun); color: var(--ink); font-weight: 700; font-family: var(--font-display);
}
.next-steps li:not(:last-child)::after { content: ""; position: absolute; left: 16.5px; top: 36px; bottom: 2px; width: 1px; background: rgba(255,255,255,.25); }
.next-steps b { color: #fff; font-weight: 650; }
.next-steps span { font-size: var(--fs-small); color: var(--on-dark-2); }
.direct-contact { margin-top: 12px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.18); }
.direct-contact[hidden] { display: none; }
.direct-contact p { color: #fff; font-weight: 600; margin-bottom: 12px; }
.direct-links { display: flex; flex-wrap: wrap; gap: 10px; }
.form-card { background: #fff; color: var(--ink-2); border-radius: 16px; padding: clamp(22px, 3.5vw, 36px); box-shadow: 0 30px 60px -30px rgba(0,0,0,.5); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* Form */
.form-intro { font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; margin-bottom: 18px; min-width: 0; }
.field label { font-weight: 600; color: var(--ink); font-size: .9688rem; }
.req { color: var(--bad); }
.opt { font-weight: 400; color: var(--ink-3); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 13px; border: 1.5px solid var(--grid-strong); border-radius: 8px;
  background: #fff; color: var(--ink); font: inherit; font-size: 1rem; line-height: 1.4;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 92px; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat;
}
.field input::placeholder, .field textarea::placeholder { color: #8A92A3; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(245, 165, 36, .45); }
.field-hint { font-size: var(--fs-xs); color: var(--ink-3); }
.field-error { font-size: .875rem; color: var(--bad); font-weight: 550; display: none; }
.has-error .field-error { display: flex; gap: 6px; align-items: baseline; }
.has-error .field-error::before { content: "!"; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; transform: translateY(2px); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad) !important; }
.field-check { grid-template-columns: 22px 1fr; gap: 4px 12px; align-items: start; }
.field-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }
.field-check label { font-weight: 400; color: var(--ink-2); font-size: var(--fs-small); }
.field-check .field-error { grid-column: 2; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { border-radius: var(--r-card); padding: 14px 16px; margin-bottom: 20px; font-size: var(--fs-small); display: grid; gap: 6px; }
.form-status[hidden] { display: none; }
.form-status:focus { outline: none; }
.form-status:focus-visible { outline: 3px solid var(--sun); }
.form-status strong { color: var(--ink); font-size: 1rem; }
.form-status-ok { background: var(--ok-bg); border-left: 4px solid var(--ok); }
.form-status-error { background: var(--bad-bg); border-left: 4px solid var(--bad); }
.form-status-warn { background: var(--warn-bg); border-left: 4px solid #C18F1C; }
.status-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--midnight); border-top: 1px solid rgba(255, 255, 255, .06); color: var(--on-dark-2); padding: 64px 0 28px; font-size: var(--fs-small); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.brand-invert, .brand-invert:hover { color: #fff; }
.footer-brand p { margin-top: 14px; max-width: 42ch; }
.parent-brand[hidden] { display: none; }
.footer-brand .parent-brand { margin-top: 10px; color: #8D97AC; }
.site-footer h2 { font-family: var(--font-body); font-size: var(--fs-small); color: #fff; font-weight: 650; margin-bottom: 12px; }
.site-footer ul { display: grid; gap: 8px; }
.site-footer a { color: #DCE2EE; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); }
.footer-base ul { display: flex; gap: 20px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Legal placeholder pages ---------- */
.legal { max-width: 760px; padding-top: 56px; padding-bottom: 96px; }
.legal h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); margin-bottom: 18px; }
.legal h2 { font-size: 1.35rem; margin: 32px 0 8px; }
.legal p, .legal li { margin-bottom: 8px; }
.legal ul { list-style: disc; padding-left: 22px; }
.placeholder-banner { padding: 16px 18px; border-left: 4px solid var(--sun); background: var(--sun-soft); color: var(--ink); border-radius: 0 var(--r-card) var(--r-card) 0; margin-bottom: 28px; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}

/* Header CTA: shorter label on the narrowest phones */
.cta-short { display: none; }
.nav-cta { display: none; }
@media (max-width: 440px) {
  .cta-long { display: none; }
  .cta-short { display: inline; }
  .brand-name { font-size: 1.12rem; }
  .brand-mark { width: 28px; height: 28px; }
  .header-inner { gap: 10px; }
}
@media (max-width: 359px) {
  .header-cta { display: none; }
  .main-nav .nav-cta { display: block; }
  .main-nav .nav-cta a { color: var(--sun); font-weight: 700; }
}
@media (max-width: 420px) {
  .an-stats b { font-size: 1.1rem; }
  .an-user { padding-left: 8px; }
}
