/* legal/legal.css
   Shared stylesheet for every Apex Web Partners policy/legal page
   under /legal/. Reuses the exact design tokens, header/nav, mobile
   menu, and footer rules from the main site (index.html) so every
   page — marketing or legal — reads as one consistent site. Kept as
   one external file (rather than the inline <style> the main site
   uses) so the strict per-route CSP for /legal/(.*) in vercel.json can
   stay a simple `style-src 'self'` with no per-page hash bookkeeping
   as these pages are edited over time.

   ⚠️ Apex Design System (Phase 1 -- Product Quality): tokens now come
   from design-system/tokens.css via @import (same-origin, CSP-'self'-
   covered, no hash needed) instead of a locally duplicated :root block
   -- the real, working example design-system/tokens.css's own header
   points to. This also means the accessibility fix to --gray-dim
   (#6c6c76 -> #82828c, now WCAG AA-passing at 4.5:1+) applies here
   automatically. Only the two tokens genuinely unique to this page
   family (the amber placeholder-flag color) stay local. */
@import url('/design-system/tokens.css');
:root{
  --amber: #e8b84b;
  --amber-dim: rgba(232,184,75,0.14);
}
*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  /* ⚠️ Apex Design System fix: also zero transition-DELAY, not just
     duration -- see design-system/motion.css's header for why a
     duration-only reset still leaves a visible wait. */
  *{animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important; transition-delay:0ms !important;}
}
body{
  background:var(--black);
  color:var(--off-white);
  font-family:'Satoshi',-apple-system,BlinkMacSystemFont,sans-serif;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
h1,h2,h3,h4,.disp{
  font-family:'Clash Display', 'Satoshi', sans-serif;
  font-weight:600;
  letter-spacing:-0.02em;
  line-height:1.15;
}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;}
button{font-family:inherit;cursor:pointer;}
.wrap{max-width:var(--maxw); margin:0 auto; padding:0 28px;}
section{position:relative;}
::selection{background:var(--blue); color:white;}

/* ⚠️ Apex Design System fix (Phase 2 -- frontend quality gate). These 9
   legal pages shipped with NO skip link: a keyboard or screen-reader user
   had to tab through the entire header and nav on every one of them
   before reaching the policy text. index.html got one in Phase 1; this
   page family was missed, and nothing caught it until
   test/frontendQualityGates.test.js started asserting the landmark
   contract on every public page. */
.skip-link{
  position:absolute; left:12px; top:-60px; z-index:1000;
  background:var(--off-white); color:var(--black); padding:12px 18px; border-radius:8px;
  font-size:14px; font-weight:600; transition:top .2s var(--ease);
}
.skip-link:focus{top:12px;}

a:focus-visible, button:focus-visible{
  outline:2px solid var(--blue-bright);
  outline-offset:3px;
  border-radius:4px;
}

.eyebrow{
  font-size:12.5px;
  letter-spacing:0.16em;
  text-transform:uppercase;
  color:var(--blue-bright);
  font-weight:600;
  display:flex;
  align-items:center;
  gap:10px;
}
.eyebrow::before{
  content:"";
  width:16px;height:1px;
  background:var(--blue-bright);
  display:inline-block;
}
.muted{color:var(--gray);}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:14px 26px;
  border-radius:999px;
  font-weight:600;
  font-size:14.5px;
  letter-spacing:-0.01em;
  border:1px solid transparent;
  transition:transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, border-color .3s, color .3s;
  white-space:nowrap;
}
.btn-primary{background:var(--blue); color:white;}
.btn-primary:hover{background:var(--blue-bright); box-shadow:0 8px 30px -6px var(--blue-glow); transform:translateY(-2px);}
.btn-ghost{background:transparent; border-color:var(--line-strong); color:var(--off-white);}
.btn-ghost:hover{border-color:var(--blue-bright); color:var(--blue-bright); transform:translateY(-2px);}
.btn-sm{padding:10px 18px; font-size:13.5px;}

/* ---------- NAV (matches index.html exactly) ---------- */
header{
  position:sticky; top:0; z-index:100;
  backdrop-filter:blur(16px) saturate(140%);
  background:rgba(8,8,10,0.72);
  border-bottom:1px solid var(--line);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 28px;
  max-width:var(--maxw); margin:0 auto;
}
.wordmark{display:flex; flex-direction:column; line-height:1; gap:3px;}
.wordmark .apex{font-family:'Clash Display',sans-serif; font-size:19px; font-weight:700; letter-spacing:0.02em;}
.wordmark .sub{font-size:9.5px; letter-spacing:0.26em; color:var(--gray-dim); font-weight:600;}
.nav-links{display:flex; align-items:center; gap:34px;}
.nav-links a{
  font-size:14px; color:var(--gray); font-weight:500;
  position:relative; padding:4px 0;
  transition:color .25s;
}
.nav-links a::after{
  content:""; position:absolute; left:0; bottom:-2px; width:0; height:1px;
  background:var(--blue-bright); transition:width .3s var(--ease);
}
.nav-links a:hover{color:var(--off-white);}
.nav-links a:hover::after{width:100%;}
.nav-right{display:flex; align-items:center; gap:18px;}
.burger{display:none; flex-direction:column; gap:5px; background:none; border:none; padding:6px;}
.burger span{width:22px; height:1.5px; background:var(--off-white); display:block; transition:.3s;}
.mobile-menu{
  display:none; position:fixed; inset:0; z-index:99; background:var(--black);
  padding:100px 28px 40px; flex-direction:column; gap:6px;
}
.mobile-menu.open{display:flex;}
.mobile-menu a{font-size:24px; font-family:'Clash Display',sans-serif; padding:14px 0; border-bottom:1px solid var(--line);}
/* ⚠️ Apex Design System fix (Phase 1 -- Product Quality audit): this
   page family's own header claims "zero inline style="" attributes
   anywhere in the markup, so the CSP needs no 'unsafe-hashes'" -- that
   was FALSE until this fix. Every one of the 9 /legal/ pages carried one
   inline style="margin-top:20px; width:fit-content;" on its mobile-menu
   CTA, which the real, hash-free /legal/(.*) CSP silently blocked in any
   CSP-enforcing browser (confirmed via a live headless-browser CSP
   check, not assumed) -- the button still worked, it just never got its
   spacing. Fixed at the source (this class) instead of adding a hash,
   which is what the original design intended. */
.mobile-menu-cta{margin-top:20px; width:fit-content;}

@media (max-width:900px){
  .nav-links{display:none;}
  .burger{display:flex;}
  .nav-right .btn-primary{display:none;}
  .nav-right{gap:8px;}
}

/* ---------- LEGAL HERO ---------- */
.legal-hero{
  padding:72px 0 40px;
  border-bottom:1px solid var(--line);
  background:radial-gradient(ellipse 900px 400px at 18% -20%, rgba(61,92,255,0.14), transparent 60%);
}
.legal-hero h1{font-size:clamp(32px,5vw,52px); margin-top:14px;}
.legal-meta{color:var(--gray); font-size:14px; margin-top:16px;}
.legal-back{display:inline-flex; align-items:center; gap:8px; margin-top:26px; font-size:13.5px; color:var(--gray);}
.legal-back:hover{color:var(--off-white);}

/* ---------- LEGAL CONTENT ---------- */
.legal-body{padding:64px 0 100px;}
.legal-content{max-width:var(--maxw-text);}
.legal-content h2{font-size:22px; margin-top:44px; margin-bottom:14px; padding-top:24px; border-top:1px solid var(--line);}
.legal-content h2:first-child{margin-top:0; padding-top:0; border-top:none;}
.legal-content h3{font-size:16px; margin-top:24px; margin-bottom:8px; color:var(--off-white);}
.legal-content p{color:var(--gray); font-size:15px; line-height:1.75; margin-top:14px;}
.legal-content p:first-of-type{margin-top:0;}
.legal-content ul{list-style:none; display:flex; flex-direction:column; gap:10px; margin-top:14px;}
.legal-content li{display:flex; gap:10px; align-items:flex-start; font-size:15px; color:var(--gray); line-height:1.6;}
.legal-content li::before{content:"—"; color:var(--blue-bright); flex:none;}
.legal-content strong{color:var(--off-white); font-weight:600;}
.legal-content em{color:var(--gray-dim); font-style:italic;}
.legal-content a{color:var(--blue-bright); text-decoration:underline; text-underline-offset:3px;}
.legal-content a:hover{color:var(--off-white);}
.legal-divider{border:none; border-top:1px solid var(--line); margin:40px 0;}

.legal-callout{
  border:1px solid var(--line-strong); border-radius:12px; padding:20px 22px; margin-top:24px;
  background:rgba(255,255,255,0.02);
}
.legal-callout p{margin-top:8px;}
.legal-callout p:first-child{margin-top:0;}

/* Visible flag for a required-but-unfilled implementation placeholder. */
.legal-placeholder{
  display:inline-block;
  background:var(--amber-dim);
  border:1px solid var(--amber);
  color:var(--amber);
  padding:2px 9px;
  border-radius:6px;
  font-weight:600;
  font-size:0.94em;
  white-space:nowrap;
}

.legal-doclist{margin-top:14px; display:flex; flex-direction:column; gap:10px;}
.legal-doclist a{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 18px; border:1px solid var(--line); border-radius:10px;
  color:var(--off-white); font-size:14.5px; font-weight:500;
  transition:border-color .25s, background .25s;
}
.legal-doclist a:hover{border-color:var(--blue-bright); background:rgba(61,92,255,0.06);}
.legal-doclist a .arrow{color:var(--blue-bright); flex:none;}

/* ---------- FOOTER (matches index.html exactly) ---------- */
footer{border-top:1px solid var(--line); padding:64px 0 30px;}
.foot-grid{display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:40px;}
.foot-brand p{color:var(--gray); font-size:13.5px; margin-top:14px; max-width:240px;}
.foot-col h3{font-family:'Satoshi',-apple-system,BlinkMacSystemFont,sans-serif; font-size:12px; letter-spacing:0.08em; text-transform:uppercase; color:var(--gray-dim); margin-bottom:16px;}
.foot-col a, .foot-col button{
  display:block; color:var(--gray); font-size:14px; margin-bottom:12px; text-align:left;
  background:none; border:none; padding:0;
}
.foot-col a:hover, .foot-col button:hover{color:var(--off-white);}
.foot-bottom{
  margin-top:56px; padding-top:26px; border-top:1px solid var(--line);
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px;
  font-size:12.5px; color:var(--gray-dim);
}
@media (max-width:800px){.foot-grid{grid-template-columns:1fr 1fr;}}

@media (max-width:900px){
  .legal-hero{padding:56px 0 32px;}
  .legal-body{padding:48px 0 72px;}
}
