/* RAIMACTION: marketing site
   Brand: Guardian v1.0 (docs/brand/tokens.json in the game repo), same palette and
   type system as the game itself, so the site reads as part of the same product.

   Asset base path: every image in every HTML file is referenced with the literal,
   consistent prefix "assets/" (see assets/ in this folder; 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>/raimaction/
   That is the single, one-place change this file's own comment is pointing at. */

:root {
  --obsidian: #0B0812;
  --surface: #181020;
  --surface-2: #211733;
  --purple: #4B1D73;
  --bright-purple: #8D5BD1;
  --bronze: #B87936;
  --gold: #D8AD55;
  --highlight: #F3D99B;
  --emerald: #25D99A;
  --ivory: #F7F2E8;
  --muted: #B9ADCB;
  --danger: #E75D68;

  --display: "Cinzel", serif;
  --label: "Rajdhani", sans-serif;
  --body: "Barlow", sans-serif;

  --radius-control: 10px;
  --radius-panel: 14px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% -8%, rgba(37, 217, 154, 0.10), transparent 40%),
    radial-gradient(circle at 88% 4%, rgba(216, 173, 85, 0.10), transparent 42%),
    var(--obsidian);
  color: var(--ivory);
  font-family: var(--body);
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---- Motion system -------------------------------------------------- */
@keyframes ra-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ra-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes ra-drift { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-2%,2%) scale(1.06); } }
@keyframes ra-glow-pulse { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
@keyframes ra-pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(216,173,85,.5), 0 6px 18px -4px rgba(216,173,85,.45); }
  50% { box-shadow: 0 0 0 9px rgba(216,173,85,0), 0 8px 26px -2px rgba(216,173,85,.7); }
}
@keyframes ra-sheen { 0% { transform: translateX(-130%) skewX(-15deg); } 55%, 100% { transform: translateX(240%) skewX(-15deg); } }

/* Reveal-on-scroll targets: hidden only once JS confirms motion is OK (html.js-anim),
   so no-JS visitors and prefers-reduced-motion visitors always see full content. */
html.js-anim section .panel,
html.js-anim section .op-card,
html.js-anim .section-head {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
html.js-anim .panel.is-visible,
html.js-anim .op-card.is-visible,
html.js-anim .section-head.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow { animation: ra-fade-up .6s ease both; }
  .hero h1 { animation: ra-fade-up .6s ease .08s both; }
  .hero .lede { animation: ra-fade-up .6s ease .16s both; }
  .hero .btn-row { animation: ra-fade-up .6s ease .24s both; }
  .hero .stat-row { animation: ra-fade-up .6s ease .32s both; }
  .hero-art { animation: ra-fade-up .7s ease .1s both; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0 0 0.5em; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.3rem); }
h3 { font-size: clamp(1.1rem, 2.4vw, 1.4rem); font-family: var(--label); font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; }

p { color: var(--muted); }
.lede { color: var(--ivory); font-size: 1.15rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
section { padding: clamp(40px, 7vw, 96px) 0; }

/* Skip link */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--obsidian);
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0; font-family: var(--label); font-weight: 700;
}
.skip-link:focus { left: 0; }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11, 8, 18, 0.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(141, 91, 209, 0.25);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; gap: 16px; }
.brand-logo { height: 34px; width: auto; }
nav.primary { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); font-family: var(--label); font-weight: 700; letter-spacing: 0.02em; }
nav.primary a:not(.btn) { text-decoration: none; color: var(--muted); font-size: 1.02rem; }
nav.primary a:not(.btn):hover, nav.primary a:not(.btn):focus-visible { color: var(--highlight); }
.nav-toggle { display: none; background: none; border: 2px solid var(--bright-purple); border-radius: var(--radius-control); color: var(--ivory); width: 44px; height: 44px; font-size: 1.3rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--label); font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  text-decoration: none; border-radius: var(--radius-control); padding: 13px 26px; font-size: 1rem;
  border: 2px solid transparent; min-height: 48px; cursor: pointer; transition: transform .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--gold); color: var(--obsidian); position: relative; overflow: hidden;
  animation: ra-pulse-glow 2.6s ease-in-out infinite;
}
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: 0; width: 36%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.65), transparent);
  animation: ra-sheen 3.4s ease-in-out infinite;
}
.btn-primary:hover, .btn-primary:focus-visible { background: var(--highlight); }
.btn-secondary { background: var(--purple); color: var(--ivory); border-color: var(--bright-purple); }
.btn-secondary:hover, .btn-secondary:focus-visible { border-color: var(--highlight); }
.btn-ghost { background: transparent; color: var(--ivory); border-color: var(--muted); }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: var(--highlight); color: var(--highlight); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

/* Hero */
.hero { padding-top: clamp(48px, 8vw, 90px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow {
  font-family: var(--label); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); font-size: 0.9rem; margin-bottom: 14px; display: inline-block;
}
.eyebrow::before { content: "\25C6"; margin-right: 8px; color: var(--emerald); text-shadow: 0 0 6px rgba(37,217,154,.8); }
.hero-art { position: relative; }
.hero-art img {
  height: auto;
  filter: drop-shadow(0 28px 44px rgba(141, 91, 209, 0.55)) drop-shadow(0 0 18px rgba(216, 173, 85, 0.22));
  animation: ra-float 6s ease-in-out infinite;
}
.hero-art::after {
  content: ""; position: absolute; inset: -40px; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(216,173,85,0.18), transparent 65%);
  animation: ra-glow-pulse 4s ease-in-out infinite;
}
.stat-row { display: flex; gap: clamp(12px, 3vw, 22px); margin-top: 32px; flex-wrap: wrap; }
.stat {
  position: relative; border: 1px solid rgba(216,173,85,.4);
  background: linear-gradient(180deg, rgba(216,173,85,.08), rgba(141,91,209,.06));
  padding: 10px 18px 8px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.stat b { display: block; font-family: var(--label); font-size: 1.8rem; color: var(--gold); line-height: 1; text-shadow: 0 0 12px rgba(216,173,85,.45); }
.stat span { font-family: var(--label); font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* Panels / cards */
.panel {
  background: var(--surface); border: 1px solid rgba(141,91,209,0.3); border-radius: var(--radius-panel);
  padding: 28px; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
section .panel:hover, section .op-card:hover {
  border-color: var(--bright-purple); transform: translateY(-3px);
  box-shadow: 0 16px 34px -18px rgba(141,91,209,.6);
}
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.op-card h3 { color: var(--gold); margin-bottom: 10px; }
.op-card .tag { display: inline-block; font-family: var(--label); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--emerald); border: 1px solid var(--emerald); border-radius: 999px; padding: 2px 10px; margin-bottom: 12px; }

.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head .eyebrow { margin-bottom: 10px; }

/* Screens / gallery */
.gallery { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.gallery figure { flex: 0 0 auto; width: min(78vw, 360px); margin: 0; scroll-snap-align: start; }
.gallery img { border-radius: var(--radius-panel); border: 1px solid rgba(141,91,209,0.3); }
.gallery figcaption { font-family: var(--label); font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; font-size: 0.85rem; color: var(--highlight); margin-top: 10px; }

/* Embed / Play section */
.embed-shell {
  background: var(--surface); border: 1px solid rgba(141,91,209,0.35); border-radius: var(--radius-panel);
  aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.embed-shell iframe { width: 100%; height: 100%; border: 0; display: none; }
.embed-placeholder { text-align: center; padding: 32px; max-width: 480px; }
.embed-placeholder .glyph { font-size: 2.6rem; margin-bottom: 14px; }
.install-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.install-steps li { display: flex; gap: 14px; align-items: flex-start; }
.install-steps b { font-family: var(--label); background: var(--gold); color: var(--obsidian); border-radius: 50%; width: 28px; height: 28px; min-width: 28px; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; }

/* Founder / about */
.founder { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: start; }
.founder img { border-radius: var(--radius-panel); border: 1px solid rgba(141,91,209,0.3); }
.post-nominals { font-family: var(--label); color: var(--gold); letter-spacing: 0.02em; }

/* Footer */
footer.site { border-top: 1px solid rgba(141,91,209,0.25); padding: 44px 0 36px; }
footer.site .wrap { display: flex; flex-direction: column; gap: 18px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 24px; font-family: var(--label); font-size: 0.95rem; }
.foot-links a { text-decoration: none; color: var(--muted); }
.foot-links a:hover { color: var(--highlight); }
.foot-fine { font-size: 0.85rem; color: var(--muted); max-width: 760px; }
.foot-fine a { color: var(--muted); text-decoration: underline; }

.badge-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.store-badge { height: 48px; }

/* Utility */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted-link { color: var(--muted); text-decoration: underline; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: min(300px, 78vw); margin: 0 auto; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .founder { grid-template-columns: 1fr; }
  .founder img { width: 160px; }
}

@media (max-width: 600px) {
  nav.primary { position: fixed; inset: 64px 12px auto 12px; background: var(--surface); border: 1px solid var(--bright-purple);
    border-radius: var(--radius-panel); 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: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-toggle { display: block; }
  .grid-3 { grid-template-columns: 1fr; }
}

/* 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; }
}
