/* =====================================================================
   ToneWell — SHARED SITE STYLES  (assets/css/site.css)
   ---------------------------------------------------------------------
   This file is loaded by EVERY page. It controls:
     1. Fonts
     2. Brand colours for dark mode and light mode   <-- change colours here
     3. Basic text styles, buttons and cards
     4. The top navigation bar (incl. the mobile menu)
     5. The footer
     6. Animations and accessibility helpers

   Styles that only one page uses live in assets/css/pages/<page>.css.

   HOW THEMES WORK: the <html> tag has class="tw" and data-theme="dark"
   or data-theme="light". assets/js/site.js switches between them when
   the visitor presses the sun/moon button and remembers the choice.
   ===================================================================== */


/* ---------- 1. FONTS --------------------------------------------------
   DM Sans (main text) and DM Mono (small uppercase labels) are stored in
   assets/fonts so the site does not depend on Google. Licence: SIL Open
   Font License 1.1 (free for commercial use). */
@font-face{font-family:"DM Mono";font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/dm-mono-400.woff2") format("woff2")}
@font-face{font-family:"DM Mono";font-style:normal;font-weight:500;font-display:swap;src:url("../fonts/dm-mono-500.woff2") format("woff2")}
@font-face{font-family:"DM Sans";font-style:normal;font-weight:300 700;font-display:swap;src:url("../fonts/dm-sans.woff2") format("woff2")}
@font-face{font-family:"DM Sans";font-style:italic;font-weight:300 500;font-display:swap;src:url("../fonts/dm-sans-italic.woff2") format("woff2")}
/* Newsreader: headings only (20 Nov 2026), regular and italic at weight 400. Same licence: /assets/fonts/Newsreader-OFL.txt */
@font-face{font-family:"Newsreader";font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/newsreader-400.woff2") format("woff2")}
@font-face{font-family:"Newsreader";font-style:italic;font-weight:400;font-display:swap;src:url("../fonts/newsreader-italic-400.woff2") format("woff2")}


/* ---------- 2. BRAND COLOURS ------------------------------------------
   Every colour on the site comes from these variables.
   --bg / --bg2      page background / raised background
   --card / --card2  card backgrounds
   --line / --line2  thin divider lines (subtle / stronger)
   --text            main text     --text2 secondary text   --text3 faint text
   --accent          ToneWell purple (links, labels, highlights)
   --grad            purple gradient used on main buttons
   --pos*            green "good" colours     --amb* amber "caution" colours
   --warm*           warm accent (sparing highlights; see the dark block)
   ---------------------------------------------------------------------- */

/* DARK MODE (default) */
.tw{
  --bg:#060810;--bg2:#0B0F1A;
  --card:rgba(255,255,255,.03);--card2:rgba(255,255,255,.05);
  --line:rgba(255,255,255,.07);--line2:rgba(255,255,255,.13);
  --text:#FAFAF7;--text2:#94A3B8;--text3:#94A3B8;
  --accent:#A78BFA;
  --grad:linear-gradient(135deg,#4F46E5 0%,#7C3AED 100%);
  --gradv:linear-gradient(180deg,#4F46E5 0%,#7C3AED 100%);
  --stopA:#4F46E5;--stopB:#A78BFA;
  --vbg:rgba(124,58,237,.12);--vbg2:rgba(124,58,237,.06);--vborder:rgba(124,58,237,.32);
  --pos:#34D399;--posbg:rgba(16,185,129,.12);--posborder:rgba(16,185,129,.30);
  --amb:#FCD34D;--ambbg:rgba(245,158,11,.12);--ambborder:rgba(245,158,11,.30);
  --logo:none;
  --glow:rgba(124,58,237,.30);
  --navbg:rgba(6,8,16,.72);
  --range:rgba(255,255,255,.16);
  --field:rgba(255,255,255,.03);
  /* WARM ACCENT (TWR-11, 16 Nov 2026), used sparingly: journey step markers, the waveform's reading segment, small labels, soft glows.
     PROVISIONAL: "Apricot" until Oliver picks one of three sets on the dev-only decision board /dev/choices/. Passes WCAG AA. */
  --warm:#F4B183;--warmbg:rgba(244,177,131,.12);--warmline:rgba(244,177,131,.38);--warmglow:rgba(244,177,131,.20);
  background:var(--bg);color:var(--text);
  font-family:"DM Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;overflow-x:clip;
  transition:background-color .4s ease,color .4s ease;
  color-scheme:dark;
}

/* LIGHT MODE */
.tw[data-theme="light"]{
  --bg:#FAFAF7;--bg2:#FFFFFF;
  --card:#FFFFFF;--card2:#FFFFFF;
  --line:rgba(11,15,26,.08);--line2:rgba(11,15,26,.14);
  /* --text3 and --accent are a shade darker than the design file (#64748B, #6C63C4) so small labels on the
     pale violet badges and pills pass the WCAG AA contrast check (4.5:1). Phase 12, 12 Nov 2026.
     Buttons, waveforms and gradients keep the original purple (--grad, --stopA/B below). */
  --text:#0B0F1A;--text2:#334155;--text3:#5A6A80;
  --accent:#645CB6;
  --grad:#6C63C4;--gradv:#6C63C4;
  --stopA:#6C63C4;--stopB:#6C63C4;
  --vbg:rgba(108,99,196,.10);--vbg2:rgba(108,99,196,.05);--vborder:rgba(108,99,196,.30);
  --pos:#065F46;--posbg:rgba(16,185,129,.12);--posborder:rgba(4,120,87,.30);
  --amb:#92400E;--ambbg:rgba(245,158,11,.12);--ambborder:rgba(180,83,9,.30);
  --logo:invert(1);
  --glow:rgba(108,99,196,.16);
  --navbg:rgba(250,250,247,.78);
  --range:rgba(11,15,26,.16);
  --field:#FAFAF7;
  --warm:#9A4B1E;--warmbg:rgba(154,75,30,.08);--warmline:rgba(154,75,30,.30);--warmglow:rgba(154,75,30,.10);
  color-scheme:light;
}


/* ---------- 3. BASICS, TEXT, BUTTONS, CARDS ---------------------------- */
body{margin:0}
*{box-sizing:border-box}
/* Anything with the "hidden" attribute stays hidden (used by accordions, tabs, form states) */
[hidden]{display:none !important}
.tw a{color:inherit}
.tw h1,.tw h2,.tw h3{text-wrap:balance}
.tw p{text-wrap:pretty}
.tw a:focus-visible,.tw button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

/* Page width container: content is never wider than 1280px */
.wrap{max-width:1280px;margin:0 auto;padding:0 40px}

/* Small uppercase label above headings, e.g. "• THE GAP" */
.kicker{font-family:"DM Mono",ui-monospace,Menlo,monospace;font-size:11px;font-weight:500;letter-spacing:.22em;text-transform:uppercase;color:var(--accent);display:inline-flex;align-items:center;gap:10px;line-height:1}
.kicker-quiet{color:var(--text3)}
.dot{width:6px;height:6px;border-radius:9999px;background:currentColor;opacity:.75;display:inline-block}
.small{font-size:14px;line-height:1.55;color:var(--text2);margin:0}

/* Buttons: .btn-primary = purple filled, .btn-ghost = outlined, .btn-sm = smaller */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:52px;padding:0 26px;border-radius:9999px;font-size:15px;font-weight:500;text-decoration:none;transition:transform .1s ease,background-color .2s ease,border-color .2s ease,box-shadow .2s ease;cursor:pointer;border:1px solid transparent;font-family:inherit;white-space:nowrap}
.btn:active{transform:scale(.97)}
.tw .btn-primary{background:var(--grad);color:#FAFAF7;box-shadow:0 12px 32px -16px rgba(99,102,241,.55)}
.tw .btn-primary:hover{box-shadow:0 18px 40px -14px rgba(99,102,241,.75);transform:translateY(-1px)}
.tw .btn-ghost{background:transparent;color:var(--text);border-color:var(--line2)}
.tw .btn-ghost:hover{border-color:var(--vborder);background:var(--vbg)}
.btn-sm{min-height:44px;padding:0 20px;font-size:14px}
.btn[disabled]{opacity:.6;cursor:wait}

/* Text that is read out by screen readers but not shown on screen */
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* "Skip to content" link for keyboard users — only visible when focused */
.skip{position:absolute;left:16px;top:-60px;z-index:100;background:var(--accent);color:#fff !important;padding:12px 18px;border-radius:9999px;text-decoration:none;font-size:14px;font-weight:500}
.skip:focus{top:12px}


/* ---------- 4. TOP NAVIGATION BAR ------------------------------------- */
.nav{position:sticky;top:0;z-index:30;background:var(--navbg);backdrop-filter:blur(18px) saturate(140%);-webkit-backdrop-filter:blur(18px) saturate(140%);border-bottom:1px solid var(--line)}
.nav-in{display:flex;align-items:center;justify-content:space-between;gap:24px;height:76px}
.logo{display:inline-flex;align-items:center;min-height:44px}
.logo-img{height:22px;width:auto;filter:var(--logo);display:block}
.nav-links{display:flex;gap:30px;font-size:14px}
.nav-links a{text-decoration:none;color:var(--text2);transition:color .1s ease;padding:12px 0}
.nav-links a:hover,.nav-links a[aria-current="page"]{color:var(--text)}
.nav-cta{display:flex;align-items:center;gap:12px}
.icon-btn{width:44px;height:44px;border-radius:9999px;border:1px solid var(--line2);background:transparent;color:var(--text);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:border-color .2s ease,background-color .2s ease;flex:none}
.icon-btn:hover{border-color:var(--vborder);background:var(--vbg)}
.link-quiet{font-size:14px;text-decoration:none;color:var(--text2);padding:12px 8px}
.link-quiet:hover{color:var(--text)}

/* Sun / moon icon in the theme button: show the one that matches the theme */
.tw[data-theme="dark"] .ic-moon,.tw[data-theme="light"] .ic-sun{display:none}

/* Thin purple reading-progress line under the nav bar */
.prog{position:absolute;left:0;right:0;bottom:-1px;height:1px;background:var(--grad);transform:scaleX(0);transform-origin:left}

/* Mobile menu (the "☰" button). Hidden on wide screens, shown below 1080px. */
.menu-btn{display:none}
.ic-close{display:none}
.menu-open .ic-close{display:block}
.menu-open .ic-menu{display:none}
.mmenu{display:none}
.menu-open .mmenu{display:block;position:fixed;left:0;right:0;top:77px;bottom:0;z-index:29;background:var(--bg);overflow-y:auto;padding:16px 0 48px;border-top:1px solid var(--line)}
.mmenu a.mm-link{display:block;font-size:28px;font-weight:300;letter-spacing:-.01em;text-decoration:none;color:var(--text);padding:14px 0;border-bottom:1px solid var(--line)}
.mmenu a.mm-link[aria-current="page"]{color:var(--accent)}
.mmenu .btn-row{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}
.menu-open body{overflow:hidden}


/* ---------- 5. FOOTER -------------------------------------------------- */
.foot{border-top:1px solid var(--line);padding:72px 0 48px}
.foot-grid{display:grid;grid-template-columns:minmax(0,2fr) repeat(3,minmax(0,1fr));gap:40px}
.foot h4{font-family:"DM Mono",ui-monospace,Menlo,monospace;font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--text3);font-weight:500;margin:0 0 16px}
.foot a{display:block;text-decoration:none;color:var(--text2);font-size:14px;padding:6px 0}
.foot a:hover{color:var(--text)}
.foot .logo{display:inline-flex}
.legal{margin-top:72px;padding-top:28px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:32px;flex-wrap:wrap;font-size:12px;line-height:1.6;color:var(--text3)}

/* Sticky "Start your scan" bar shown at the bottom of the screen on phones */
.mcta{display:none}


/* ---------- 5b. VIDEO (click to load) -------------------------------- */
/* Still image + round play button; becomes the YouTube player when pressed (assets/js/site.js, section 5).
   Used by src/_includes/partials/video.njk on Home, How it works and Try ToneWell. */
.vid{position:relative;border-radius:16px;overflow:hidden;border:1px solid var(--line);background:var(--card2);aspect-ratio:16/9}
.vid-btn{position:absolute;inset:0;display:block;color:#FAFAF7}
.vid-img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .4s ease}
.vid-btn:hover .vid-img{transform:scale(1.02)}
.vid-play{position:absolute;left:50%;top:50%;width:76px;height:76px;margin:-38px 0 0 -38px;border-radius:9999px;background:var(--grad);display:flex;align-items:center;justify-content:center;box-shadow:0 18px 40px -12px rgba(76,29,149,.65);transition:transform .15s ease}
.vid-play svg{margin-left:3px}
.vid-btn:hover .vid-play{transform:scale(1.06)}
.tw .vid-btn:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}
.vid iframe{position:absolute;inset:0;width:100%;height:100%;border:0}


/* ---------- 5c. PHOTO BANDS ----------------------------------------- */
/* Wide lifestyle photos placed between sections (src/_includes/partials/photo.njk, src/_data/imagery.json). */
.ph-wrap{padding-top:120px}
/* Soft fade into the page on every side, like the Home hero photo (23 Nov 2026). A mask, so it works in both themes. */
.ph{margin:0;overflow:hidden;aspect-ratio:21/9;-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 14%,#000 86%,transparent 100%),linear-gradient(180deg,transparent 0,#000 12%,#000 70%,transparent 100%);-webkit-mask-composite:source-in;mask-image:linear-gradient(90deg,transparent 0,#000 14%,#000 86%,transparent 100%),linear-gradient(180deg,transparent 0,#000 12%,#000 70%,transparent 100%);mask-composite:intersect}
.ph img{display:block;width:100%;height:100%;object-fit:cover}
@media (max-width:720px){.ph-wrap{padding-top:72px}.ph{aspect-ratio:4/3}}


/* ---------- 6. ANIMATIONS + SCREEN SIZES ------------------------------- */
/* .rv = fade-in as the section scrolls into view (modern browsers only) */
@supports (animation-timeline: view()){
  .rv{animation:rv linear both;animation-timeline:view();animation-range:entry 0% entry 35%}
  @keyframes rv{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}
  .prog{animation:prog linear both;animation-timeline:scroll(root)}
  @keyframes prog{from{transform:scaleX(0)}to{transform:scaleX(1)}}
}

/* Tablets and small laptops */
@media (max-width:1080px){
  .nav-links{display:none}
  .menu-btn{display:inline-flex}
}

/* Phones */
@media (max-width:720px){
  .wrap{padding:0 16px}
  .kicker{line-height:1.45}  /* small uppercase labels can wrap onto 2 lines on phones: give them room */
  .tw input,.tw textarea,.tw select{font-size:16px}  /* 16px+ stops iPhones zooming in when a form field is tapped */
  .link-quiet{display:none}
  .nav-cta .btn{display:none}
  .foot-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .foot-grid > :first-child{grid-column:1 / -1}
  .mcta{display:flex;position:fixed;left:16px;right:16px;bottom:16px;z-index:20}
  .mcta .btn{width:100%}
  .has-mcta .foot{padding-bottom:96px}
}

/* Visitors who switch off animations in their device settings get none */
@media (prefers-reduced-motion:reduce){.tw *{animation:none !important;transition:none !important}}


/* ---------- 7. TYPE (decided 12 Nov 2026) --------------------------------
   Everything about the type refresh lives HERE, so it can be adjusted or
   removed in one place. ".tw" in front of each rule makes it win over the
   matching rule in each page's own stylesheet. No layout, animation or
   interaction is changed.
     - Page hero titles, section headings, the big statements and quotes all use
       Newsreader at weight 400 with letter spacing -0.01em (20 Nov 2026; before
       that DM Sans, and before that the serif whose curled "f" Alex flagged).
       Hero titles share one size on every page so the designed line breaks stay
       ("Your voice / already knows."). Only the Home hero's second line is in
       italic (assets/css/pages/index.css). Everything else stays DM Sans: body
       text, card and tile titles, buttons, navigation, prices, labels and FAQ
       questions.
     - Price figures ($59, $99): normal letter spacing and even-width lining
       digits, so they no longer look compressed (TWR-10).
     - Labels and body text are larger for easier reading; the Roadmap day text
       matches the body text elsewhere.
   ---------------------------------------------------------------------- */
/* Hero titles, section headings, statements and quotes: Newsreader */
.tw :is(.h-hero,.hero-sub,.blog-h,.legal-h,.post-h,.h-section,.h-vid,.statement,.pull-q,.quote-big,.post-cta-h){font-family:"Newsreader",Georgia,serif;font-weight:400;letter-spacing:-.01em}
/* Price figures: normal spacing, even-width lining digits (TWR-10) */
.tw .amt{letter-spacing:0;font-variant-numeric:lining-nums tabular-nums}
.tw :is(.h-hero,.hero-sub){font-size:clamp(46px,7vw,104px);line-height:1.1}
.tw :is(.blog-h,.legal-h){line-height:1.12}
/* Hero two-column layouts: centre the text column on the headline so the two
   sit on one line, whatever their heights (was bottom-aligned). */
.tw .hero-grid{align-items:center}
.tw .hero-side{padding-bottom:0}
.tw .h-section{line-height:1.12}
/* Headings inside articles, Privacy and Terms (.prose h2 and h3, from blog.css and legal.css) follow the same rule (23 Nov 2026) */
.tw .prose :is(h2,h3){font-family:"Newsreader",Georgia,serif;font-weight:400;letter-spacing:-.01em}
.tw .prose h2{line-height:1.12}
.tw .prose h3{line-height:1.2}
/* Looser spacing on the other light, tightly spaced headings (they stay in DM Sans) */
.tw :is(.who-t,.p-name,.trans,.mm-link){letter-spacing:-.01em}
/* Small uppercase labels above headings ("Your 10-day roadmap"): 11px -> 13px */
.tw .kicker{font-size:13px;letter-spacing:.18em}
.tw .step-n{font-size:13px;letter-spacing:.18em}
/* Card headings 2px bigger */
.tw .h-3{font-size:clamp(22px,2vw,26px)}
/* Body text bigger for easier reading */
.tw .body{font-size:18px;line-height:1.65}
.tw .lead{font-size:clamp(19px,1.6vw,23px)}
.tw .small{font-size:16px}
/* Roadmap day text matches the body text everywhere else */
.tw .road .small{font-size:18px;line-height:1.6}
