/* RAIMSTORM: marketing site
   Brand: THE EYE (src/ui/brandmark.js in the game repo): storm slate, hi-vis orange, radar teal,
   Barlow Condensed / Barlow / IBM Plex Mono. Deliberately nothing like RAIMACTION (no purple,
   no gold, no crowns) or RAIMFUN (no cream, no candy colours): this is weather and rescue gear.

   Asset base path: every image in every HTML file is referenced with the literal, consistent
   prefix "assets/" (no other prefix is used anywhere, and no image is referenced from CSS via
   url()). To move images to Cloudinary, replace that one prefix across *.html with the Cloudinary
   delivery base, e.g. https://res.cloudinary.com/<cloud_name>/image/upload/<version>/raimstorm/ */

:root {
  --slate: #0B1620;
  --slate2: #11222F;
  --slate3: #1A3242;
  --line: #28485C;
  --hivis: #FF6A13;
  --hivis-hi: #FF8B40;
  --hivis-lo: #D9500A;
  --kerb: #7A2A06;
  --teal: #0E7C86;
  --teal-hi: #19B3B8;
  --amber: #FFB020;
  --rain: #EAF2F5;
  --mist: #8FA6B3;
  --go: #39D98A;
  --tape: #F4F7F8;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 12px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--slate);
  color: var(--rain);
  font-family: var(--body);
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em; margin: 0 0 0.45em; line-height: 1.02; }
h1 { font-size: clamp(2.6rem, 7.4vw, 5.2rem); }
h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); }
h3 { font-size: 1.45rem; }
p { color: var(--mist); }
.lede { color: var(--rain); font-size: 1.16rem; max-width: 34em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
section { padding: clamp(44px, 7vw, 96px) 0; position: relative; }
section.alt { background: var(--slate2); }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--hivis); color: var(--slate); padding: 10px 16px; z-index: 100; font-weight: 700; }
.skip-link:focus { left: 0; }

/* ---- Header ------------------------------------------------------------ */
header.site { position: sticky; top: 0; z-index: 40; background: rgba(11, 22, 32, 0.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: block; line-height: 0; text-decoration: none; }
.wordmark { height: 30px; width: auto; display: block; }
nav.primary { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); font-family: var(--mono); font-weight: 600; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.04em; }
nav.primary a:not(.btn) { text-decoration: none; color: var(--mist); }
nav.primary a:not(.btn):hover, nav.primary a:not(.btn):focus-visible { color: var(--teal-hi); }
nav.primary a[aria-current="page"] { color: var(--rain); }
.nav-toggle { display: none; background: none; border: 2px solid var(--line); border-radius: 10px; color: var(--rain); width: 46px; height: 46px; font-size: 1.3rem; }

/* ---- Buttons: hi-vis on a kerb, like the game's own primary button ------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-weight: 800; font-size: 1.12rem; letter-spacing: 0.05em; text-transform: uppercase;
  text-decoration: none; border-radius: 10px; padding: 14px 26px; min-height: 52px; border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--hivis); color: var(--slate); box-shadow: 0 5px 0 var(--kerb); position: relative; }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--hivis-hi); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--kerb); }
.btn-secondary { background: transparent; color: var(--rain); border-color: var(--teal-hi); }
.btn-secondary:hover, .btn-secondary:focus-visible { background: rgba(25, 179, 184, 0.14); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

/* ---- Eyebrow: a strip of the jacket's reflective tape ------------------ */
.eyebrow {
  display: inline-block; font-family: var(--mono); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--slate); background: var(--hivis); padding: 4px 12px 3px; margin-bottom: 16px;
  border-top: 3px solid var(--tape); border-bottom: 3px solid var(--tape);
}

/* The section divider is the hi-vis jacket's own reflective band. */
.tape { height: 16px; background: linear-gradient(var(--hivis) 0 3px, var(--tape) 3px 7px, var(--hivis) 7px 9px, var(--tape) 9px 13px, var(--hivis) 13px 16px); }

/* ---- Hero: night storm, rain, radar ------------------------------------ */
.hero { overflow: hidden; padding-top: clamp(40px, 7vw, 84px); padding-bottom: 0; }
.storm-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 78% 18%, rgba(25,179,184,.20), transparent 70%),
    radial-gradient(ellipse 50% 40% at 15% 0%, rgba(143,166,179,.14), transparent 70%),
    linear-gradient(180deg, #08111A 0%, var(--slate) 70%);
}
.storm-sky::before { /* the eye: a slow radar sweep */
  content: ""; position: absolute; width: min(70vw, 760px); aspect-ratio: 1; right: -12%; top: -18%; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(25,179,184,0) 0deg, rgba(25,179,184,.0) 300deg, rgba(25,179,184,.28) 352deg, rgba(25,179,184,0) 360deg);
  border: 1px solid rgba(25,179,184,.18); box-shadow: inset 0 0 0 60px rgba(25,179,184,.03), inset 0 0 0 140px rgba(25,179,184,.02);
}
.rain { position: absolute; inset: -20% 0 0 0; opacity: .35;
  background-image: repeating-linear-gradient(105deg, transparent 0 22px, rgba(234,242,245,.18) 22px 23px, transparent 23px 54px);
  background-size: 260px 260px;
}
.rain-far { opacity: .18; background-size: 170px 170px; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 24px; align-items: end; }
.hero-copy { padding-bottom: clamp(40px, 6vw, 80px); }

.hero-crew { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 420px; }
.hero-crew::before { content: ""; position: absolute; left: 6%; right: 6%; bottom: 0; height: 40px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,106,19,.32), transparent 70%); }
/* The crew art is 339px wide: keep every figure at 168px or less so it stays 2x sharp. */
.hero-crew img { position: relative; width: 150px; flex: 0 0 auto; filter: drop-shadow(0 18px 26px rgba(0,0,0,.55)); }
.hero-crew img:nth-child(2) { width: 168px; z-index: 2; margin: 0 -26px; }

.readouts { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.readouts li { border: 1px solid var(--line); border-left: 3px solid var(--teal-hi); background: rgba(17,34,47,.72); padding: 8px 14px 7px; border-radius: 6px; }
.readouts b { display: block; font-family: var(--mono); font-weight: 600; font-size: 1.5rem; color: var(--rain); line-height: 1.1; }
.readouts span { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-hi); }

/* ---- Panels and cards --------------------------------------------------- */
.panel { background: var(--slate3); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: transform .2s ease, border-color .2s ease; }
section .panel:hover { transform: translateY(-3px); border-color: var(--teal); }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.align-center { align-items: center; }
.section-head { max-width: 760px; margin-bottom: 36px; }
.note { margin-top: 26px; max-width: 60em; }
.inline-link { color: var(--teal-hi); font-weight: 600; }
.tag { display: inline-block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-hi); border: 1px solid var(--teal); border-radius: 999px; padding: 2px 10px; margin-bottom: 12px; }

.rescue-card { border-left: 4px solid var(--hivis); }
.rescue-card h3 { color: var(--rain); margin-bottom: 8px; }
.rescue-card p { margin: 0 0 10px; }
.roles { font-family: var(--mono); font-size: 0.82rem; color: var(--teal-hi) !important; border-top: 1px dashed var(--line); padding-top: 10px; }
.roles b { color: var(--rain); font-weight: 600; }

/* ---- Crew ---------------------------------------------------------------- */
.crew { margin: 0; }
.crew-row { display: flex; gap: 6px; justify-content: center; align-items: flex-end; overflow-x: auto; padding: 10px 0 16px; scroll-snap-type: x mandatory; }
.crew-row img { width: 98px; flex: 0 0 auto; scroll-snap-align: center; filter: drop-shadow(0 12px 16px rgba(0,0,0,.5)); }
.crew figcaption { font-family: var(--mono); font-size: 0.84rem; color: var(--mist); text-align: center; margin-top: 12px; }

/* ---- Play / premium ------------------------------------------------------ */
.launch { text-align: center; padding: clamp(30px, 6vw, 56px); background:
  radial-gradient(ellipse at 50% 0%, rgba(255,106,19,.16), transparent 60%), var(--slate3); }
.launch .btn-row { justify-content: center; }
.launch p { max-width: 560px; margin-left: auto; margin-right: auto; }
.premium-teaser { padding: clamp(24px, 4vw, 44px); }
.plan-list { list-style: none; margin: 0; padding: 22px; background: var(--slate2); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 12px; }
.plan-list li { color: var(--mist); }
.plan-list b { color: var(--hivis-hi); }
.plan { display: flex; flex-direction: column; }
.plan .price { font-family: var(--mono); font-size: 2.2rem; color: var(--rain); margin: 0 0 6px; }
.plan .price span { font-size: 1rem; color: var(--mist); }
.plan .btn-row { margin-top: auto; padding-top: 16px; }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
.benefits { margin: 0; padding-left: 1.2em; color: var(--mist); display: grid; gap: 8px; }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps b { font-family: var(--mono); background: var(--hivis); color: var(--slate); border-radius: 50%; width: 30px; height: 30px; min-width: 30px; display: flex; align-items: center; justify-content: center; }

/* ---- Founder (shared About block) -------------------------------------- */
.founder { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: start; }
.founder img { border-radius: var(--radius); border: 1px solid var(--line); }

/* ---- Footer -------------------------------------------------------------- */
footer.site { border-top: 1px solid var(--line); padding: 42px 0 36px; background: #08111A; }
footer.site .wrap { display: flex; flex-direction: column; gap: 10px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 24px; font-family: var(--mono); font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.foot-links a { text-decoration: none; color: var(--mist); }
.foot-links a:hover { color: var(--teal-hi); }
.foot-fine { font-size: 0.86rem; color: var(--mist); margin: 0; max-width: 780px; }
.foot-fine a { color: var(--rain); }

.center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ---- Motion: rain, radar, beacon pulse, reveal. All off for reduced motion. */
@keyframes rs-rain { from { background-position: 0 0; } to { background-position: -80px 260px; } }
@keyframes rs-rain-far { from { background-position: 0 0; } to { background-position: -50px 170px; } }
@keyframes rs-sweep { to { transform: rotate(360deg); } }
@keyframes rs-beacon { 0%, 100% { box-shadow: 0 5px 0 var(--kerb), 0 0 0 0 rgba(255,106,19,.55); } 60% { box-shadow: 0 5px 0 var(--kerb), 0 0 0 14px rgba(255,106,19,0); } }
@keyframes rs-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes rs-sway { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

html.js-anim section .panel, html.js-anim .section-head, html.js-anim .crew {
  opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease;
}
html.js-anim .panel.is-visible, html.js-anim .section-head.is-visible, html.js-anim .crew.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .rain { animation: rs-rain .9s linear infinite; }
  .rain-far { animation: rs-rain-far 1.6s linear infinite; }
  .storm-sky::before { animation: rs-sweep 7s linear infinite; }
  .btn-primary { animation: rs-beacon 2.4s ease-out infinite; }
  .hero .eyebrow { animation: rs-rise .6s ease both; }
  .hero h1 { animation: rs-rise .6s ease .08s both; }
  .hero .lede { animation: rs-rise .6s ease .16s both; }
  .hero .btn-row { animation: rs-rise .6s ease .24s both; }
  .hero .readouts { animation: rs-rise .6s ease .32s both; }
  .hero-crew { animation: rs-rise .8s ease .1s both; }
  .hero-crew img:nth-child(2) { animation: rs-sway 6s ease-in-out 1s infinite; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 10px; }
  .hero-crew { min-height: 0; }
  .hero-crew img { width: 120px; }
  .hero-crew img:nth-child(2) { width: 140px; margin: 0 -22px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .founder { grid-template-columns: 1fr; }
  .founder img { width: 160px; }
  .crew-row { justify-content: flex-start; }
  .crew-row img { width: 96px; }
}
@media (max-width: 600px) {
  nav.primary { position: fixed; inset: 64px 12px auto 12px; background: var(--slate2); border: 1px solid var(--line); border-radius: var(--radius);
    flex-direction: column; align-items: flex-start; padding: 18px; gap: 16px; transform: translateY(-12px); opacity: 0; pointer-events: none; transition: all .18s ease; }
  nav.primary.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-toggle { display: block; }
  .grid-3 { grid-template-columns: 1fr; }
  .wordmark { height: 24px; }
}

/* Phones: headline, then the Play buttons, then the description, so the main button is on the first screen. */
@media (max-width: 600px) {
  .hero .wrap > div:first-child { display: flex; flex-direction: column; align-items: flex-start; }
  .hero .wrap > div:first-child > * { max-width: 100%; }
  .hero .btn-row { order: 1; margin-top: 6px; margin-bottom: 4px; }
  .hero .lede { order: 2; }
  .hero .stat-row, .hero .readouts { order: 3; }
}
