/* ============================================================
   SpatialSyria — launch page
   Instrument-grade minimalism. Dark, quiet, precise.
   Amber appears only where something is live or observed.
   ============================================================ */

/* ---------- 1. Fonts (all self-hosted, all OFL) ---------- */
@font-face{font-family:'Space Grotesk';font-weight:380;font-style:normal;font-display:swap;
  src:url(/fonts/space-grotesk-380.woff2) format('woff2');}
@font-face{font-family:'Space Grotesk';font-weight:700;font-style:normal;font-display:swap;
  src:url(/fonts/space-grotesk-700.woff2) format('woff2');}
@font-face{font-family:'Inter';font-weight:100 900;font-style:normal;font-display:swap;
  src:url(/fonts/inter-var.woff2) format('woff2');}
@font-face{font-family:'JetBrains Mono';font-weight:100 800;font-style:normal;font-display:swap;
  src:url(/fonts/jetbrains-mono-var.woff2) format('woff2');}
/* Arabic is unicode-range gated: never downloaded for English visitors. */
@font-face{font-family:'IBM Plex Sans Arabic';font-weight:400;font-style:normal;font-display:swap;
  src:url(/fonts/plex-arabic-400.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+FB50-FDFF,U+FE70-FEFF;}
@font-face{font-family:'IBM Plex Sans Arabic';font-weight:700;font-style:normal;font-display:swap;
  src:url(/fonts/plex-arabic-700.woff2) format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+FB50-FDFF,U+FE70-FEFF;}
/* MUST stay last of the Arabic faces. Where unicode-ranges overlap, the final
   matching @font-face wins — so these four codepoints resolve to a 3KB subset
   instead of the 42KB face. That is the whole English page's Arabic need: the
   "عربي" toggle label. Reorder these rules and the saving silently disappears. */
@font-face{font-family:'IBM Plex Sans Arabic';font-weight:400;font-style:normal;font-display:swap;
  src:url(/fonts/plex-arabic-toggle.woff2) format('woff2');
  unicode-range:U+0628,U+0631,U+0639,U+064A;}

/* ---------- 2. Tokens ---------- */
:root{
  /* Ground is near-black; the raised surface is the brand navy, so the site
     and the logo kit are one system. See assets/brand/BRAND-NOTES.md. */
  --ground:#070B10;
  --surface:#0B2740;
  --line:rgba(215,227,244,.12);
  --line-2:rgba(215,227,244,.22);

  --ink:#F2F4F3;
  --muted:#8FA3B8;
  --ice:#D7E3F4;
  --amber:#E8833A;           /* means live / observed. Used sparingly. */
  --amber-dim:rgba(232,131,58,.14);

  --fd:'Space Grotesk','IBM Plex Sans Arabic',system-ui,sans-serif;
  --fb:'Inter','IBM Plex Sans Arabic',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --fm:'JetBrains Mono','IBM Plex Sans Arabic',ui-monospace,Consolas,monospace;

  --gut:clamp(20px,4.6vw,84px);
  --ease:cubic-bezier(.22,.61,.36,1);
}

/* ---------- 3. Base ---------- */
*,*::before,*::after{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;scrollbar-color:#1B2733 var(--ground);overflow-x:clip;}
body{
  margin:0;background:var(--ground);color:var(--ink);
  font-family:var(--fb);font-size:16px;line-height:1.62;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
h1,h2,h3{margin:0;font-family:var(--fd);font-weight:380;line-height:1.02;letter-spacing:-.02em;}
p{margin:0;}
a{color:var(--ink);text-decoration-color:var(--line-2);text-underline-offset:.24em;}
a:hover{text-decoration-color:var(--ice);}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;}
::selection{background:var(--amber);color:var(--ground);}
img,svg,canvas{max-width:100%;}

/* Focus: visible, never removed. Accessibility floor. */
:focus-visible{outline:2px solid var(--amber);outline-offset:3px;border-radius:2px;}

.wrap{max-width:1280px;margin:0 auto;padding-inline:var(--gut);}
.mono{font-family:var(--fm);font-size:11.5px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--muted);font-weight:500;}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;}

/* Hidden upward, never sideways: a horizontal offset creates document overflow
   in RTL and blows the page width out. Vertical is safe in both directions. */
.skip{position:absolute;top:-120px;inset-inline-start:var(--gut);z-index:99;
  background:var(--surface);color:var(--ink);padding:12px 18px;
  font-family:var(--fm);font-size:12px;}
.skip:focus{top:10px;}

/* ---------- 4. Header ---------- */
.head{display:flex;align-items:center;justify-content:space-between;gap:20px;
  padding-block:22px;border-bottom:1px solid var(--line);}
.head .logo{display:block;height:30px;width:auto;}
.lang-btn{font-family:var(--fm);font-size:12px;letter-spacing:.12em;color:var(--muted);
  border:1px solid var(--line);padding:7px 14px;border-radius:2px;
  transition:color .2s var(--ease),border-color .2s var(--ease);}
.lang-btn:hover{color:var(--ink);border-color:var(--line-2);}

/* ---------- 5. Hero ---------- */
.hero{display:grid;grid-template-columns:1fr;gap:clamp(34px,5vw,64px);
  padding-block:clamp(44px,7vw,88px) clamp(40px,6vw,72px);align-items:center;}
@media (min-width:960px){
  .hero{grid-template-columns:minmax(0,55fr) minmax(0,45fr);}
}

.eyebrow{display:block;margin-bottom:clamp(20px,2.4vw,30px);color:var(--muted);}

h1{font-size:clamp(34px,5.6vw,68px);letter-spacing:-.028em;max-width:16ch;}
.hero-sub{margin-top:clamp(18px,2.2vw,26px);font-size:clamp(15.5px,1.35vw,19px);
  color:var(--muted);max-width:52ch;line-height:1.6;}

/* Status: the one place amber signals "live" in the text column. */
.status{display:flex;align-items:center;gap:10px;margin-top:clamp(20px,2.4vw,28px);}
.status .dot{width:7px;height:7px;border-radius:50%;background:var(--amber);flex:none;
  box-shadow:0 0 0 4px var(--amber-dim);}
.status .mono{color:var(--ice);}

/* ---------- 6. Waitlist ---------- */
.waitlist{margin-top:clamp(30px,3.6vw,44px);max-width:520px;}
.waitlist-label{display:block;font-size:15px;color:var(--ink);margin-bottom:14px;}
.field-row{display:flex;gap:10px;flex-wrap:wrap;}
.field-row input[type=email]{
  flex:1 1 240px;min-width:0;background:rgba(11,39,64,.42);color:var(--ink);
  border:1px solid var(--line);border-radius:2px;padding:13px 15px;font:inherit;font-size:15px;
  transition:border-color .2s var(--ease),background .2s var(--ease);
}
.field-row input[type=email]::placeholder{color:#6E8399;}
.field-row input[type=email]:hover{border-color:var(--line-2);}
.field-row input[type=email]:focus{border-color:var(--amber);background:rgba(11,39,64,.62);
  outline:none;box-shadow:0 0 0 3px var(--amber-dim);}
.btn{flex:0 0 auto;background:var(--amber);color:#1A0E05;font-weight:600;font-size:15px;
  padding:13px 24px;border-radius:2px;transition:filter .2s var(--ease);}
.btn:hover{filter:brightness(1.09);}

.privacy{margin-top:12px;font-size:13px;color:var(--muted);line-height:1.55;}
.form-msg{margin-top:12px;font-size:14px;color:var(--ice);}
.form-msg:empty{display:none;}
.form-msg[data-state=error]{color:var(--amber);}
/* Honeypot: clipped rather than offset, for the same RTL-overflow reason. */
.hp{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);
  white-space:nowrap;}

/* ---------- 7. Hero map ---------- */
.map-block{margin:0;}
.map-frame{position:relative;border:1px solid var(--line);border-radius:3px;overflow:hidden;
  background-color:var(--ground);background-size:cover;background-position:center;
  aspect-ratio:1/1;}
@media (max-width:959px){.map-frame{max-height:52vh;}}

.map-frame canvas{display:block;width:100%;height:100%;}
/* The canvas fades in after the headline has painted — LCP is the H1, not this. */
.map-frame canvas{opacity:0;transition:opacity .9s var(--ease);}
.map-frame canvas.in{opacity:1;}

/* Static fallback as a background image, so browsers that use the live canvas
   never download it. .static is set by site.js for no-canvas / low-end / data
   failure; the media query covers reduced-motion; <noscript> covers no-JS. */
.map-frame.static{background-image:url(/assets/hero-static.png);}
@media (prefers-reduced-motion:reduce){
  .map-frame{background-image:url(/assets/hero-static.png);}
}

/* Physical sides, flipped explicitly for RTL below. Logical insets are unreliable
   here because direction:ltr on the element (needed to keep "2026-03" in digit
   order) also flips how inset-inline-* resolve. */
.map-readout{position:absolute;bottom:10px;right:12px;font-family:var(--fm);font-size:12px;
  letter-spacing:.14em;color:var(--ice);direction:ltr;
  text-shadow:0 1px 4px rgba(7,11,16,.95);}

/* Legend: a quiet key, not a panel. It must be legible without competing with
   the map — the distinction it explains matters, its styling does not. */
.map-legend{position:absolute;bottom:10px;left:10px;display:flex;
  flex-direction:column;gap:5px;}
.map-legend span{display:flex;align-items:center;gap:7px;font-family:var(--fm);font-size:9.5px;
  letter-spacing:.07em;color:rgba(215,227,244,.62);text-transform:uppercase;line-height:1.2;
  text-shadow:0 1px 3px rgba(7,11,16,.95);}
.map-legend i{flex:none;width:7px;height:7px;border-radius:50%;}
.map-legend .k-asset{background:var(--amber);box-shadow:0 0 5px rgba(232,131,58,.9);}
.map-legend .k-approx{border:1.5px solid var(--amber);background:transparent;}
.map-legend .k-port{background:var(--ice);}

/* The illustrative caption is real visible text. It is removed only when the
   loop is driven by actual VIIRS output. See site/CLAUDE.md. */
.map-caption{margin-top:11px;font-family:var(--fm);font-size:11px;letter-spacing:.06em;
  color:var(--muted);line-height:1.5;}

/* ---------- 8. Pillars ---------- */
.pillars{border-top:1px solid var(--line);display:grid;grid-template-columns:1fr;}
@media (min-width:820px){.pillars{grid-template-columns:repeat(3,1fr);}}
.pillar{padding:clamp(26px,3.4vw,40px) 0;border-bottom:1px solid var(--line);}
@media (min-width:820px){
  .pillar{padding-inline-end:clamp(20px,2.6vw,40px);border-bottom:0;}
  .pillar + .pillar{padding-inline-start:clamp(20px,2.6vw,40px);
    border-inline-start:1px solid var(--line);}
}
.pillar .mono{display:block;color:var(--muted);margin-bottom:12px;}
.pillar p{font-size:15.5px;line-height:1.6;color:var(--ink);max-width:34ch;}
.pillar p b{font-weight:600;}

/* Restrained reveal — the only motion outside the hero canvas.
   Gated on .reveal-ready, which site.js sets immediately before wiring the
   observer. If the script never gets that far, nothing is ever hidden — content
   must never depend on JS succeeding to be visible. */
[data-reveal]{opacity:1;}
html.reveal-ready [data-reveal]{opacity:0;transform:translateY(12px);
  transition:opacity .7s var(--ease),transform .7s var(--ease);}
html.reveal-ready [data-reveal].in{opacity:1;transform:none;}

/* ---------- 9. Footer ---------- */
.foot{border-top:1px solid var(--line);padding-block:clamp(30px,4vw,50px) 40px;
  display:grid;gap:18px;}
.foot-legal{font-size:14px;color:var(--muted);max-width:60ch;line-height:1.6;}
.foot-row{display:flex;flex-wrap:wrap;gap:10px 26px;align-items:center;font-size:14px;}
.foot-row a{color:var(--ice);}
.foot-meta{display:flex;flex-wrap:wrap;gap:8px 24px;color:var(--muted);}
.foot-meta .mono{color:var(--muted);}

/* ---------- 10. Interior pages (thanks, data-sources, 404) ---------- */
.page{padding-block:clamp(48px,7vw,96px) clamp(40px,6vw,80px);}
.page h1{font-size:clamp(28px,3.8vw,46px);max-width:22ch;}
.page .lede{margin-top:20px;font-size:17px;color:var(--muted);max-width:58ch;}
.back{display:inline-block;margin-top:34px;font-family:var(--fm);font-size:12px;
  letter-spacing:.12em;text-transform:uppercase;color:var(--ice);}

.src-list{margin-top:clamp(30px,4vw,48px);display:grid;gap:0;border-top:1px solid var(--line);}
.src{padding:22px 0;border-bottom:1px solid var(--line);display:grid;gap:7px;}
.src h2{font-size:17px;font-family:var(--fb);font-weight:600;letter-spacing:0;line-height:1.4;}
.src p{font-size:14.5px;color:var(--muted);max-width:70ch;}
.src .mono{color:var(--muted);}
.src a{color:var(--ice);font-size:14px;}
.src-note{margin-top:30px;font-size:14.5px;color:var(--muted);max-width:60ch;}

/* ---------- 11. Arabic + RTL ---------- */
html[lang=ar] body{font-family:'IBM Plex Sans Arabic',var(--fb);line-height:1.85;}
html[lang=ar] h1,html[lang=ar] h2,html[lang=ar] h3{
  font-family:'IBM Plex Sans Arabic',var(--fd);font-weight:700;letter-spacing:0;line-height:1.3;}
html[lang=ar] h1{font-size:clamp(28px,4.6vw,54px);}
/* Mono/HUD strings stay LTR even in RTL — they are instrument labels. */
html[dir=rtl] .map-readout{right:auto;left:12px;}
html[dir=rtl] .map-legend{left:auto;right:10px;}
html[dir=rtl] .map-legend span{letter-spacing:0;}
html[lang=ar] .mono{letter-spacing:0;font-family:'IBM Plex Sans Arabic',var(--fm);}
html[lang=ar] .eyebrow,html[lang=ar] .map-caption{letter-spacing:0;}

/* ---------- 12. Reduced motion — disables ALL motion, no exceptions ---------- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation:none!important;transition:none!important;scroll-behavior:auto!important;
  }
  html.reveal-ready [data-reveal]{opacity:1;transform:none;}
  .map-frame canvas{opacity:1;}
}
