/* ALEATOR — aleatorgame.com
   Palette and type lifted from the game itself: the near-black title screen,
   casino-felt green, gold #FFD700, Jersey 10 for display, JetBrains Mono for
   body copy. */

/* Self-hosted — no third-party font requests, and nothing to disclose in the
   privacy policy. Same faces the game itself uses. */
@font-face {
  font-family: 'Jersey 10';
  src: url('fonts/Jersey10.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg:        #07070E;
  --bg-2:      #0B0B16;
  --panel:     #10101C;
  --felt:      #0F5132;
  --felt-dk:   #072B1B;
  --gold:      #FFD700;
  --gold-dim:  rgba(255, 215, 0, 0.22);
  --text:      rgba(255, 255, 255, 0.87);
  --dim:       rgba(255, 255, 255, 0.55);
  --faint:     rgba(255, 255, 255, 0.34);
  --maxw:      1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ── display type ─────────────────────────────────────────────────────── */
.display {
  font-family: 'Jersey 10', 'JetBrains Mono', monospace;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 0.95;
  color: var(--gold);
}

h1.display { font-size: clamp(66px, 13vw, 150px); }
h2.display { font-size: clamp(34px, 5.5vw, 54px); margin-bottom: 16px; }
h3.display { font-size: clamp(26px, 3.6vw, 34px); margin-bottom: 10px; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}

.rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
  margin: 0 auto;
  width: 100%;
  max-width: 320px;
}

/* ── nav ──────────────────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 7, 14, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
nav .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
}
nav .mark {
  font-family: 'Jersey 10', monospace;
  font-size: 30px; color: var(--gold);
  letter-spacing: 0.06em; text-decoration: none;
}
nav .links { display: flex; gap: 26px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
nav .links a { color: var(--dim); text-decoration: none; }
nav .links a:hover { color: var(--gold); }
@media (max-width: 620px) { nav .links a.hide-sm { display: none; } }

/* ── hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: 92px 0 64px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: -40% 50% auto 50%;
  width: 1200px; height: 900px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 215, 0, 0.10), transparent 72%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}
.hero h1 { text-shadow: 0 0 46px rgba(255, 215, 0, 0.34); position: relative; }
.hero .tagline {
  margin-top: 20px;
  font-size: 12.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--dim); position: relative;
}
.hero .pitch {
  max-width: 620px; margin: 26px auto 0;
  font-size: 16px; position: relative;
}
.badges {
  margin-top: 22px; font-size: 12px; letter-spacing: 0.06em;
  color: var(--faint); position: relative;
}

.cta {
  display: inline-block; margin-top: 34px; position: relative;
  padding: 15px 34px; border-radius: 11px;
  background: linear-gradient(180deg, #FFE68A 0%, #E8B437 42%, #A8770F 100%);
  color: #241703;
  font-family: 'Jersey 10', monospace; font-size: 26px; letter-spacing: 0.05em;
  box-shadow: 0 10px 34px rgba(255, 190, 60, 0.22), inset 0 1px 0 rgba(255,255,255,0.5);
  text-decoration: none;
}
.cta.disabled {
  background: none; border: 1.5px solid var(--gold-dim); color: var(--gold);
  box-shadow: none; cursor: default;
}
.cta.disabled:hover { text-decoration: none; }
.cta-sub { margin-top: 12px; font-size: 11.5px; letter-spacing: 0.16em; color: var(--faint); text-transform: uppercase; position: relative; }

/* ── phone frames ─────────────────────────────────────────────────────── */
.phone {
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255,215,0,0.05);
  overflow: hidden;
  background: #000;
}

/* ── sections ─────────────────────────────────────────────────────────── */
section { padding: 82px 0; }
section.tint { background: linear-gradient(180deg, var(--bg), var(--bg-2) 40%, var(--bg)); }
.section-head { text-align: center; margin-bottom: 52px; }
.section-head p { color: var(--dim); max-width: 620px; margin: 8px auto 0; }

/* video pair */
.videos {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 46px; max-width: 760px; margin: 0 auto;
}
.videos figure { text-align: center; }
.videos video { width: 100%; }
.videos figcaption {
  margin-top: 16px; font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dim);
}
@media (max-width: 700px) { .videos { grid-template-columns: 1fr; gap: 40px; max-width: 330px; } }

/* alternating feature rows */
.feature {
  display: grid; grid-template-columns: 0.85fr 1.15fr;
  gap: 56px; align-items: center;
  padding: 46px 0;
}
/* Even rows flip the image to the right — and must flip the COLUMN WIDTHS with
   it, or the shot lands in the wide column and every other screenshot renders
   noticeably bigger than its neighbours. */
.feature:nth-child(even) { grid-template-columns: 1.15fr 0.85fr; }
.feature:nth-child(even) .shot { order: 2; }
.feature .shot img { width: 100%; }
.feature .copy p + p { margin-top: 12px; }
.feature .copy p { color: var(--dim); }
.feature .copy p strong { color: var(--text); font-weight: 400; }
@media (max-width: 820px) {
  .feature,
  .feature:nth-child(even) { grid-template-columns: 1fr; }
  .feature { gap: 26px; padding: 30px 0; max-width: 430px; margin: 0 auto; }
  .feature:nth-child(even) .shot { order: 0; }
  /* a full-width phone shot per row makes the page a mile long on a phone —
     keep them present but modest */
  .feature .shot { max-width: 268px; margin: 0 auto; }
  section { padding: 58px 0; }
}

/* spec grid */
.grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 16px;
}
.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px; padding: 22px 24px;
}
.card h4 {
  font-size: 12px; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px; font-weight: 700;
}
.card p { color: var(--dim); font-size: 14px; margin: 0; }

/* honesty block */
.honesty {
  border: 1px solid var(--gold-dim); border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 81, 50, 0.20), rgba(7, 43, 27, 0.10));
  padding: 38px 40px; text-align: center;
}
.honesty p { color: var(--text); }
.honesty p + p { margin-top: 12px; }
.honesty .line { color: var(--dim); font-size: 13.5px; }
@media (max-width: 620px) { .honesty { padding: 28px 22px; } }

/* ── inner pages (support / privacy / terms) ──────────────────────────── */
.page-head { text-align: center; padding: 66px 0 10px; }
.page-head .sub {
  color: var(--faint); font-size: 11.5px; letter-spacing: 0.2em;
  text-transform: uppercase; margin-top: 10px;
}
.doc { padding-bottom: 92px; }
.doc h2 { margin-top: 40px; }
.doc h2:first-of-type { margin-top: 26px; }
.doc p, .doc li { margin-bottom: 13px; }
.doc ul { padding-left: 22px; }
.doc .lede {
  background: var(--panel); border: 1px solid var(--gold-dim);
  border-radius: 14px; padding: 24px 28px; text-align: center;
  font-size: 17px; color: var(--text); margin: 30px 0 8px;
}
.qa { margin-top: 18px; }
.qa .card { margin-bottom: 14px; }
.qa .card h4 { font-size: 13px; text-transform: none; letter-spacing: 0.04em; }
.qa .card p { color: var(--text); }

/* ── footer ───────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 44px 0 56px; text-align: center;
  color: var(--faint); font-size: 12.5px;
}
footer .flinks { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
footer .flinks a { color: var(--dim); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }
footer .flinks a:hover { color: var(--gold); }
footer .mark {
  font-family: 'Jersey 10', monospace; font-size: 26px; color: var(--gold);
  letter-spacing: 0.06em; display: block; margin-bottom: 14px;
}

/* ── scroll reveal ────────────────────────────────────────────────────── */
/* FAIL VISIBLE. The hidden state is scoped to .js, which only exists once the
   inline script at the top of <body> has run. No JavaScript, a blocked script,
   or an IntersectionObserver that never fires all leave the content on screen
   rather than blank. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
