/* ============================================================
   Andvari — andvari.app
   One shared stylesheet. Pure CSS, no external requests.
   Brand fonts (Hanken Grotesk + Spline Sans Mono) are self-hosted
   as variable woff2 in /assets/fonts — nothing loads off-origin.
   ============================================================ */

/* ---- Self-hosted brand fonts (variable, full weight axis) ---- */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/HankenGrotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/HankenGrotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Spline Sans Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('assets/fonts/SplineSansMono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Spline Sans Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('assets/fonts/SplineSansMono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Tokens ---- */
:root {
  --bg:        #f3f4f7;   /* page canvas, cool slate */
  --surface:   #ffffff;   /* cards */
  --inset:     #eceef1;   /* secondary fills */
  --ink:       #3b4252;   /* primary ink */
  --ink-2:     #6b7280;   /* secondary ink */
  --ink-3:     #8b91a0;   /* tertiary / captions */
  --line:      #e3e6ec;   /* hairline border */
  --accent:    #4f6fa8;   /* slate indigo, primary action */
  --accent-ink:#3f5b8c;   /* darker accent for text/links on light */
  --accent-press:#445f90; /* pressed primary */
  --fjord:     #36507f;   /* depth: dark panels / footer */
  --fjord-deep:#2c4068;   /* footer base */
  --gold:      #c79a54;   /* rare treasured flourish */

  --sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'Spline Sans Mono', ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;

  --r-card: 16px;
  --r-field: 12px;
  --r-pill: 999px;

  --gutter: 22px;
  --maxw: 1080px;
  --prose: 680px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 450;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Visible focus everywhere */
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Layout helpers ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-pill);
  z-index: 100; font-weight: 600;
}
.skip-link:focus { left: 16px; text-decoration: none; }

/* ---- Header ---- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 70px; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand .word {
  font-weight: 800; font-size: 22px; letter-spacing: -0.02em; color: var(--ink);
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink-2); font-weight: 550; font-size: 15.5px;
  padding: 9px 14px; border-radius: var(--r-pill); line-height: 1;
}
.nav a:hover { color: var(--ink); background: var(--inset); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); }

/* ---- Buttons / App Store badge ---- */
.appstore-badge {
  display: inline-flex; align-items: center; gap: 13px;
  background: #20283a; color: #fff;
  border-radius: var(--r-pill); padding: 13px 24px 13px 20px;
  border: 1px solid #2c3548;
}
.appstore-badge:hover { text-decoration: none; }
.appstore-badge .b-mark { width: 26px; height: 26px; color: #fff; flex: none; }
.appstore-badge .b-text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.appstore-badge .b-eyebrow {
  font-family: var(--mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: #aeb6c8;
}
.appstore-badge .b-main { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin-top: 2px; }
.appstore-badge.badge-accent { background: var(--accent); border-color: var(--accent); padding: 15px 26px; }
.appstore-badge.badge-accent .b-main { margin-top: 0; }
.appstore-badge.badge-accent:hover { background: var(--accent-press); }

/* ---- Hero ---- */
.hero { padding: clamp(56px, 9vw, 104px) 0 clamp(40px, 6vw, 72px); }
.hero h1 {
  font-size: clamp(38px, 6.2vw, 62px);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.04;
  max-width: 16ch; text-wrap: balance;
}
.hero .accent-word { position: relative; white-space: nowrap; }
.hero .accent-word::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em;
  height: 3px; background: var(--gold); border-radius: 2px; opacity: 0.9;
}
.hero .subhead {
  margin-top: 26px; max-width: 54ch;
  font-size: clamp(18px, 2.2vw, 21px); color: var(--ink-2); line-height: 1.55;
  text-wrap: pretty;
}
.hero .cta-row { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.hero .cta-note { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }

/* ---- Privacy panel ---- */
.privacy-panel { padding: clamp(36px, 5vw, 56px) 0; }
.privacy-panel .inner {
  background: var(--accent); color: #fff;
  border-radius: var(--r-card); padding: clamp(28px, 4vw, 44px);
  display: flex; gap: clamp(20px, 3vw, 32px); align-items: flex-start;
}
.privacy-panel .p-mark {
  width: 52px; height: 52px; color: #fff; flex: none;
  background: rgba(255,255,255,0.12); border-radius: 13px; padding: 11px;
}
.privacy-panel p {
  font-size: clamp(18px, 2.3vw, 23px); font-weight: 550; line-height: 1.5;
  letter-spacing: -0.01em; max-width: 40ch; text-wrap: pretty;
}

/* ---- Features ---- */
.features { padding: clamp(48px, 7vw, 84px) 0 clamp(24px, 4vw, 40px); }
.features .eyebrow {
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink);
}
.features .sec-title {
  margin-top: 12px; font-size: clamp(26px, 3.6vw, 34px); font-weight: 800;
  letter-spacing: -0.02em; max-width: 20ch;
}
.feature-grid {
  margin-top: clamp(28px, 4vw, 44px);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
.feature-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 28px;
}
.feature-card .f-icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--inset); border-radius: 12px; color: var(--accent); margin-bottom: 18px;
}
.feature-card .f-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.feature-card p { margin-top: 9px; color: var(--ink-2); font-size: 16px; line-height: 1.6; text-wrap: pretty; }

/* ---- Honest note ---- */
.note { padding: clamp(20px, 4vw, 40px) 0 clamp(56px, 8vw, 88px); }
.note .inner {
  border-left: 2px solid var(--line); padding: 4px 0 4px 22px;
  max-width: 64ch; color: var(--ink-3); font-size: 15px; line-height: 1.6;
}
.note .inner strong { color: var(--ink-2); font-weight: 600; }

/* ---- Footer ---- */
.site-footer { background: var(--fjord-deep); color: #c7d0e2; }
.site-footer .wrap {
  padding: 44px var(--gutter); display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 20px;
}
.site-footer .f-brand { display: inline-flex; align-items: center; gap: 11px; }
.site-footer .f-brand .mark { width: 26px; height: 26px; color: #fff; }
.site-footer .f-brand .word { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; color: #fff; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer nav a { color: #c7d0e2; font-weight: 550; font-size: 15px; }
.site-footer nav a:hover { color: #fff; }
.site-footer .copy { font-family: var(--mono); font-size: 13px; color: #8b97b3; }

/* ============================================================
   Legal / prose pages (privacy, support)
   ============================================================ */
.page-head { padding: clamp(48px, 7vw, 80px) 0 clamp(20px, 3vw, 32px); }
.page-head h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 800; letter-spacing: -0.03em; }
.page-head .updated { margin-top: 14px; font-family: var(--mono); font-size: 14px; color: var(--ink-3); }
.page-head .lede { margin-top: 18px; max-width: var(--prose); font-size: 19px; color: var(--ink-2); text-wrap: pretty; }

.prose { padding-bottom: clamp(56px, 8vw, 96px); }
.prose .col { max-width: var(--prose); }
.prose section + section { margin-top: 38px; }
.prose h2 {
  font-size: 21px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink);
  padding-top: 22px; border-top: 1px solid var(--line);
}
.prose section:first-child h2 { border-top: 0; padding-top: 0; }
.prose h2.flush { border-top: 0; padding-top: 0; }
.prose p { margin-top: 12px; color: var(--ink); line-height: 1.7; }
.prose p.secondary { color: var(--ink-2); }
.prose .mono { font-family: var(--mono); }
.prose a { font-weight: 550; }

/* Contact line */
.contact-card {
  margin-top: 26px; max-width: var(--prose);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 22px 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.contact-card .c-mark { width: 40px; height: 40px; color: var(--accent); flex: none; }
.contact-card .c-text { font-size: 16px; color: var(--ink-2); }
.contact-card .c-text a { font-family: var(--mono); font-size: 15.5px; }

/* FAQ — native <details>, zero JS */
.faq { margin-top: 14px; max-width: var(--prose); }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq details summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 2px; font-size: 18px; font-weight: 650; letter-spacing: -0.01em; color: var(--ink);
}
.faq details summary::-webkit-details-marker { display: none; }
.faq details summary .chev {
  flex: none; width: 20px; height: 20px; color: var(--ink-3);
  transition: transform 180ms ease;
}
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq details summary:hover { color: var(--accent-ink); }
.faq details .answer { padding: 0 2px 22px; color: var(--ink-2); line-height: 1.7; max-width: 60ch; }
.faq details .answer a { font-weight: 550; }

/* ---- Entrance: subtle fade/rise on first paint ----
   Bulletproof: content is visible by default; the hidden→visible
   animation is *added* only when motion is welcome. If animations
   never run (reduced-motion, or a frozen/background tab), everything
   simply shows in its final state. */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .reveal    { animation: rise 620ms cubic-bezier(0.22, 0.61, 0.36, 1) both; }
  .reveal.d1 { animation-delay: 80ms; }
  .reveal.d2 { animation-delay: 160ms; }
  .reveal.d3 { animation-delay: 240ms; }
}

@media (prefers-reduced-motion: reduce) {
  .faq details summary .chev { transition: none; }
  * { scroll-behavior: auto !important; }
}

/* ---- Responsive ---- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .privacy-panel .inner { flex-direction: column; gap: 18px; }
  .nav a { padding: 9px 10px; }
  .site-header .wrap { min-height: 62px; }
}
@media (max-width: 420px) {
  :root { --gutter: 18px; }
  .brand .word { font-size: 20px; }
}
