/* Voxolo — site-wide chrome: navigation, the CTA button system, and the
   shared footer. Loaded LAST in every page's <head> so it wins over the
   page-level styles that used to define these same rules in five places.

   Two things live here that the rest of the site depends on:

   1. The CTA colour ramp (--cta / --cta-d). The brand coral (--coral #EF6F5D)
      is an ACCENT, not a button colour: white text on it measures 2.96:1, and
      the old nav button rendered --soft on coral at 1.89:1. Both fail WCAG AA
      for the 16px bold text these buttons use (AA needs 4.5:1; the large-text
      exemption starts at 18.66px bold). --cta #C44A35 is the same hue family
      pushed dark enough to pass: 4.80:1 against white, 5.96:1 at --cta-d.
      Do not "restore the brand coral" on .btn-cta without re-measuring.

   2. The launch swap. Every store CTA is marked [data-store-cta] and ships in
      its pre-launch state — pointing at the email capture on the page. When
      the App Store listing goes live, set VOXOLO_STORE_URL in assets/site.js
      and every one of them retargets and relabels site-wide. See site.js. */

:root{
  --cta:#C44A35;        /* AA-safe against white — see note above */
  --cta-d:#B03C29;
  --nav-h:66px;
}

/* ---- buttons ------------------------------------------------------------ */

.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5em;
  font-family:var(--disp);font-weight:700;padding:.85em 1.4em;border-radius:14px;
  cursor:pointer;border:0;font-size:1rem;text-align:center;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease}

/* .btn-primary keeps the warm coral wash for secondary moments (in-page jumps,
   "see the phrases"). .btn-cta is the conversion button and is the darker ramp. */
.btn-primary{background:linear-gradient(135deg,var(--cta),var(--cta-d));color:#fff;
  box-shadow:0 10px 24px -10px rgba(176,60,41,.6)}
.btn-primary:hover{transform:translateY(-2px);color:#fff}

.btn-cta{background:linear-gradient(135deg,var(--cta),var(--cta-d));color:#fff;
  box-shadow:0 10px 24px -10px rgba(176,60,41,.6)}
.btn-cta:hover{transform:translateY(-2px);color:#fff}

.btn-ghost{background:transparent;color:var(--teal);border:1.5px solid var(--teal)}
.btn-ghost:hover{background:rgba(22,121,122,.08);color:var(--teal)}

/* On dark panels the teal ghost disappears. This variant is for .final/.news/.payoff. */
.btn-ondark{background:transparent;color:#fff;border:1.5px solid rgba(255,255,255,.5)}
.btn-ondark:hover{background:rgba(255,255,255,.12);color:#fff}

.btn:focus-visible,.nav a:focus-visible,.nav button:focus-visible{
  outline:3px solid var(--teal);outline-offset:2px}

@media (prefers-reduced-motion: reduce){
  .btn,.btn-primary:hover,.btn-cta:hover{transition:none;transform:none}
}

/* ---- header / navigation ------------------------------------------------ */
/* One header on all 14 pages. Before this, only index.html had real links and
   every other page offered a single "← Back to voxolo.app", which made
   how-it-works and the trip guides navigational dead ends. */

header.nav{position:sticky;top:0;z-index:60;background:rgba(250,246,238,.92);
  backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
header.nav .nav-in{display:flex;align-items:center;gap:18px;height:var(--nav-h);
  max-width:1140px;margin:0 auto;padding:0 22px}
/* legal.css styles bare `a` for body copy (teal, underlined) and has no global
   text-decoration reset, so without this the wordmark and nav links render
   underlined on support/privacy/terms. */
header.nav a{text-decoration:none}

.nav .brand{display:flex;align-items:center;gap:.55em;font-family:var(--disp);
  font-weight:800;font-size:1.35rem;color:var(--ink);flex:none;margin-right:auto}
.nav .brand .mark{width:34px;height:34px;display:grid;place-items:center}
.nav .brand .mark img{width:100%;height:100%;object-fit:contain;display:block}

.nav .links{display:flex;align-items:center;gap:22px}
/* Two things this selector must get right:
   - `:not(.btn)` so the CTA never inherits the muted link colour — the bug that
     made "Get the app" dark grey on orange.
   - the `>` child combinator so these rules stop at the top-level nav items and
     do not reach the anchors inside .submenu, which have their own two-line
     layout. Without it the mobile override below turns every dropdown row into
     a space-between flex row and pushes the descriptions off-screen. */
.nav .links > a:not(.btn),
.nav .links .menu-trigger{
  font-family:var(--body);font-weight:600;color:var(--soft);font-size:.96rem;
  background:none;border:0;padding:0;cursor:pointer;display:inline-flex;
  align-items:center;gap:.3em;white-space:nowrap}
.nav .links > a:not(.btn):hover,
.nav .links .menu-trigger:hover{color:var(--ink)}
.nav .links > a[aria-current="page"]{color:var(--teal);font-weight:700}

.nav .btn-cta{padding:.6em 1.1em;font-size:.94rem;border-radius:12px}

/* Trip-guides dropdown. The guides are the site's deepest content and had no
   nav entry at all; a menu surfaces all eight without needing a hub page. */
.nav .has-menu{position:relative}
.nav .menu-trigger::after{content:"";width:0;height:0;border-left:4px solid transparent;
  border-right:4px solid transparent;border-top:5px solid currentColor;margin-left:.15em}
.nav .submenu{position:absolute;top:calc(100% + 14px);left:50%;transform:translateX(-50%);
  background:var(--card);border:1px solid var(--line);border-radius:16px;
  box-shadow:0 18px 50px -22px rgba(70,30,20,.45);padding:10px;min-width:430px;
  display:none;grid-template-columns:1fr 1fr;gap:2px 18px}
.nav .has-menu.open .submenu{display:grid}
.nav .submenu .col-head{font-family:var(--disp);font-weight:800;font-size:.7rem;
  text-transform:uppercase;letter-spacing:.1em;color:var(--teal);padding:8px 12px 4px}
.nav .submenu a{display:block;padding:8px 12px;border-radius:10px;font-size:.93rem;
  font-weight:600;color:var(--ink)}
.nav .submenu a:hover{background:rgba(22,121,122,.08);color:var(--teal-d)}
.nav .submenu a .s{display:block;font-weight:500;font-size:.8rem;color:var(--soft)}

/* Burger — hidden on desktop, the only nav control below 900px. Previously
   mobile hid every link with no replacement control. */
.nav-burger{display:none;flex:none;background:none;border:1.5px solid var(--line);
  border-radius:11px;width:42px;height:38px;cursor:pointer;padding:0;
  align-items:center;justify-content:center}
.nav-burger span{display:block;width:18px;height:2px;background:var(--ink);
  border-radius:2px;position:relative}
.nav-burger span::before,.nav-burger span::after{content:"";position:absolute;left:0;
  width:18px;height:2px;background:var(--ink);border-radius:2px}
.nav-burger span::before{top:-6px}
.nav-burger span::after{top:6px}

@media(max-width:900px){
  .nav-burger{display:inline-flex}
  .nav .links{position:fixed;top:var(--nav-h);left:0;right:0;
    background:var(--cream);border-bottom:1px solid var(--line);
    flex-direction:column;align-items:stretch;gap:0;padding:10px 22px 22px;
    max-height:calc(100dvh - var(--nav-h));overflow-y:auto;display:none}
  header.nav.open .links{display:flex}
  .nav .links > a:not(.btn),
  .nav .links .menu-trigger{padding:13px 2px;font-size:1.05rem;
    border-bottom:1px solid var(--line);justify-content:space-between;width:100%}
  .nav .has-menu{position:static;width:100%}
  .nav .submenu{position:static;transform:none;display:none;grid-template-columns:1fr;
    box-shadow:none;border:0;border-bottom:1px solid var(--line);border-radius:0;
    min-width:0;padding:2px 0 10px}
  /* Dropdown rows keep their stacked title + description layout on mobile. */
  .nav .submenu a{display:block;white-space:normal;padding:10px 12px}
  .nav .submenu a .s{display:block}
  .nav .has-menu.open .submenu{display:grid}
  .nav .btn-cta{margin-top:16px;width:100%;padding:.9em 1.2em;font-size:1rem}
}

/* Anchored sections must clear the sticky header. */
:target{scroll-margin-top:calc(var(--nav-h) + 14px)}
section[id],div[id]{scroll-margin-top:calc(var(--nav-h) + 14px)}

/* ---- shared footer nav -------------------------------------------------- */

footer .foot-cols{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:28px}
@media(max-width:820px){footer .foot-cols{grid-template-columns:1fr 1fr;gap:24px}}
@media(max-width:480px){footer .foot-cols{grid-template-columns:1fr}}
footer .foot-cols h4{font-family:var(--disp);font-weight:800;font-size:.74rem;
  text-transform:uppercase;letter-spacing:.11em;color:var(--teal);margin:0 0 .9em}
footer .foot-cols ul{list-style:none;padding:0;margin:0}
footer .foot-cols li{margin-bottom:.55em}
footer .foot-cols a{color:var(--soft);font-weight:600;font-size:.92rem}
footer .foot-cols a:hover{color:var(--ink)}
footer .foot-legal{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;
  align-items:center;margin-top:34px;padding-top:20px;border-top:1px solid var(--line)}
footer .foot-legal p{margin:0;font-size:.85rem;color:var(--soft)}
footer .foot-legal nav{display:flex;gap:18px;flex-wrap:wrap}
footer .foot-legal a{color:var(--soft);font-size:.85rem;font-weight:600}
footer .foot-legal a:hover{color:var(--ink)}

/* ---- newsletter form ---------------------------------------------------- */
/* The segmented capture that used to exist only on the eight guide pages.
   language-page.css scopes the same look under `.news form`; this ruleset is
   keyed on .news-form so the index page can reuse it without pulling in the
   whole guide stylesheet. Keep the two in step. */

.news-form{text-align:left;background:#fff;border-radius:20px;padding:26px 26px 20px;
  color:var(--ink);max-width:560px;margin:0 auto}
.news-form .email-row{display:flex;gap:10px;margin-bottom:18px}
.news-form .email-row input{flex:1;min-width:0;border:1px solid var(--line);border-radius:12px;
  padding:.85em 1em;font-size:1rem;font-family:var(--body);color:var(--ink)}
.news-form fieldset{border:0;padding:0;margin:0 0 16px}
.news-form legend{font-family:var(--disp);font-weight:700;font-size:.82rem;text-transform:uppercase;
  letter-spacing:.08em;color:var(--soft);padding:0 0 8px}
.news-form .check-grid{display:flex;flex-wrap:wrap;gap:10px}
.news-form .check-opt{position:relative}
.news-form .check-opt input{position:absolute;opacity:0;width:100%;height:100%;top:0;left:0;
  cursor:pointer;margin:0}
.news-form .check-opt label{display:inline-flex;align-items:center;gap:.5em;
  border:1.5px solid var(--line);border-radius:20px;padding:.5em 1em;font-size:.92rem;
  font-weight:600;cursor:pointer;transition:border-color .15s ease, background .15s ease}
.news-form .check-opt input:checked + label{border-color:var(--teal);
  background:rgba(22,121,122,.09);color:var(--teal-d)}
.news-form .check-opt input:focus-visible + label{outline:3px solid var(--teal);outline-offset:2px}
.news-form .submit-row{display:flex;align-items:center;justify-content:space-between;gap:12px;
  flex-wrap:wrap}
.news-form .fine{font-size:.82rem;color:var(--soft);margin:0}
@media(max-width:520px){
  .news-form .submit-row{flex-direction:column;align-items:stretch}
  .news-form .btn{width:100%}
}

/* ---- App Store badge ----------------------------------------------------- */
/* Apple's official artwork, copied from marketing/Download-on-the-App-Store/US.
   This replaces a hand-drawn CSS approximation, which Apple's Identity
   Guidelines do not permit once the badge actually links to a live listing.

   Rules that come with the asset, and why the CSS looks thin:
   - Do not recolour, redraw, outline, or add effects. There is no `filter` or
     `background` here on purpose — the only permitted change is scale.
   - Two approved lockups ship, not one asset plus a filter. Black is for light
     backgrounds, white for the dark .final panel. Pick by background, never by
     inverting the other one.
   - Clear space must be at least 10% of the badge's height on every side. At
     50px tall that is 5px; the flex gaps around it are 12-14px, so it holds.
   - Apple's minimum badge width is 40px. 150x50 is comfortably above it and
     matches the height of the adjacent .btn. */

.badge{display:inline-block;line-height:0;transition:transform .15s ease}
.badge:hover{transform:translateY(-2px)}
.badge img{height:50px;width:auto;display:block}
.badge:focus-visible{outline:3px solid var(--teal);outline-offset:4px;border-radius:8px}
