/* Star-Spangled Tycoon — home page. Cosmic campaign trail.
 * Palette follows the scroll: each world section sets --acc (and the backdrop) as it comes into view. */
:root {
  --space: #070a1c; --space-2: #0e1433; --space-3: #18204a;
  --ivory: #f3eedf; --muted: #a9b0cc; --dim: #6f7799;
  --red: #d6243a; --red-deep: #9e1026;
  --gold-1: #fbe39a; --gold-2: #f2c14e; --gold-3: #b8862b;
  --acc: #5aa2ff;
  --foil: linear-gradient(100deg, #b8862b 0%, #f2c14e 22%, #fff4c9 38%, #f2c14e 52%, #b8862b 74%, #f2c14e 100%);
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Libre Franklin", "Franklin Gothic Medium", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--space); color: var(--ivory); font: 400 18px/1.6 var(--body); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold-2); color: var(--space); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 8px; }

/* ---------- starfield (one canvas behind everything) ---------- */
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, .site-nav, footer { position: relative; z-index: 1; }

/* ---------- nav ---------- */
.site-nav { position: fixed; z-index: 20; inset: 0 0 auto 0; display: flex; align-items: center; gap: 28px; padding: 14px var(--gutter);
  transition: background .3s, box-shadow .3s; }
.site-nav.solid { background: rgba(7, 10, 28, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(242, 193, 78, .18); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span { font: 800 22px/1 var(--display); letter-spacing: .02em; background: var(--foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-nav .links { display: flex; gap: 24px; }
.site-nav .links a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--muted); }
.site-nav .links a:hover { color: var(--ivory); }
@media (max-width: 860px) { .site-nav .links { display: none; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px; font: 700 17px/1 var(--body); text-decoration: none; border: 0; cursor: pointer; }
.btn-play { background: linear-gradient(180deg, #ea3148, var(--red) 55%, var(--red-deep)); color: #fff; box-shadow: 0 0 0 2px rgba(251, 227, 154, .55) inset, 0 12px 30px -8px rgba(214, 36, 58, .75); }
.btn-play:hover { filter: brightness(1.08); }
.btn-play svg { width: 16px; height: 16px; }
.btn-small { padding: 10px 18px; font-size: 15px; }
.btn-soon { background: rgba(243, 238, 223, .06); color: var(--muted); box-shadow: 0 0 0 1px rgba(243, 238, 223, .18) inset; cursor: default; }
.btn-soon b { color: var(--ivory); font-weight: 600; }
a.btn-soon { cursor: pointer; }

/* ---------- hero ---------- */
.hero { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 24px;
  padding: 110px var(--gutter) 60px; max-width: 1480px; margin: 0 auto; }
.wordmark { margin: 0; font: 900 clamp(64px, 10.5vw, 168px)/.84 var(--display); letter-spacing: -.005em; text-transform: uppercase;
  background: var(--foil); background-size: 250% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 0 rgba(158, 16, 38, .55)) drop-shadow(0 18px 40px rgba(0, 0, 0, .5)); }
.wordmark span { display: block; }
.wordmark .ss { font-size: .58em; letter-spacing: .02em; }
.hero-line { font: 700 clamp(24px, 2.6vw, 34px)/1.2 var(--display); letter-spacing: .01em; margin: 26px 0 10px; color: var(--ivory); max-width: 22ch; }
.hero-copy { color: var(--muted); max-width: 46ch; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.orbit { position: relative; aspect-ratio: 1; width: min(100%, 640px); justify-self: center; }
.orbit .planet { position: absolute; inset: 21%; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(127, 196, 255, .35), 0 0 60px 10px rgba(90, 162, 255, .35), 0 0 160px 40px rgba(40, 90, 220, .18); }
.orbit .planet img { width: 100%; height: 100%; border-radius: 50%; }
.orbit .ring { position: absolute; left: 50%; top: 50%; width: 118%; height: 34%; transform: translate(-50%, -50%) rotate(-14deg); border-radius: 50%;
  border: 1px solid rgba(242, 193, 78, .28); pointer-events: none; }
.orbit .sat { position: absolute; left: 0; top: 0; width: 17%; aspect-ratio: 1; will-change: transform; }
.orbit .sat img { width: 100%; height: 100%; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); }
.orbit .sat a { display: block; border-radius: 50%; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 96px; text-align: left; }
  .orbit { order: -1; width: min(86vw, 440px); margin: 0 auto -10px; }
}

/* ---------- ticker ---------- */
.ticker { display: flex; align-items: stretch; border-block: 1px solid rgba(242, 193, 78, .25); background: rgba(14, 20, 51, .72); overflow: hidden; }
.ticker b { flex: none; display: flex; align-items: center; padding: 0 16px; background: var(--red); color: #fff; font: 800 17px/1 var(--display); letter-spacing: .06em; }
.ticker .track { display: flex; gap: 48px; padding: 12px 0; white-space: nowrap; animation: tick 90s linear infinite; color: var(--muted); font-size: 15px; }
.ticker .track span::before { content: "★"; color: var(--gold-2); margin-right: 14px; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- section heads ---------- */
.sec { padding: clamp(80px, 12vw, 150px) var(--gutter); max-width: 1320px; margin: 0 auto; }
.sec h2 { font: 800 clamp(40px, 6vw, 76px)/.95 var(--display); margin: 0 0 18px; letter-spacing: -.005em; }
.sec .lede { color: var(--muted); max-width: 58ch; margin: 0; font-size: 19px; }

/* ---------- campaign trail ---------- */
.trail { position: relative; }
.trail-worlds { position: relative; overflow: clip; }
.trail-intro { padding-bottom: 40px; }
.trail-bg { position: sticky; top: 0; height: 100vh; margin-bottom: -100vh; overflow: hidden; z-index: 0; }
.trail-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity 1.1s ease, transform 8s ease-out; }
.trail-bg img.on { opacity: .9; transform: scale(1); }
.trail-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 10, 28, .94) 0%, rgba(7, 10, 28, .7) 42%, rgba(7, 10, 28, .15) 75%, rgba(7, 10, 28, .35) 100%),
  linear-gradient(180deg, var(--space) 0%, transparent 16%, transparent 84%, var(--space) 100%); }
.rail { position: sticky; top: 0; height: 100vh; margin-bottom: -100vh; width: 64px; margin-left: var(--gutter); z-index: 2; display: flex; align-items: center; pointer-events: none; }
.rail .line { position: relative; width: 2px; height: 62vh; background: rgba(243, 238, 223, .14); margin-left: 20px; }
.rail .fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: linear-gradient(180deg, var(--gold-2), var(--acc)); transition: background .6s; }
.rail .stop { position: absolute; left: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--space); border: 2px solid rgba(243, 238, 223, .35); transition: background .4s, border-color .4s; }
.rail .stop.done { background: var(--gold-2); border-color: var(--gold-2); }
.rail .rocket { position: absolute; left: 50%; top: 0; width: 30px; height: 60px; margin: -30px 0 0 -15px; transform: rotate(180deg); object-fit: contain; max-width: none; filter: drop-shadow(0 0 12px rgba(242, 193, 78, .6)); }
.world { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; padding: 80px var(--gutter) 80px calc(var(--gutter) + 96px); }
.world .inner { max-width: 640px; }
.world .num { font: 700 20px/1 var(--display); color: var(--acc); letter-spacing: .04em; transition: color .6s; }
.world h3 { font: 900 clamp(56px, 8.5vw, 124px)/.86 var(--display); margin: 8px 0 6px; text-transform: uppercase; letter-spacing: -.01em; }
.world .motto { font: italic 400 21px/1.3 var(--body); color: var(--gold-1); margin: 0 0 22px; }
.world .bio { color: var(--ivory); opacity: .9; margin: 0 0 22px; max-width: 52ch; }
.world .mech { border-left: 3px solid var(--acc); padding: 2px 0 2px 16px; margin: 0 0 26px; color: var(--muted); font-size: 16px; transition: border-color .6s; max-width: 52ch; }
.world .mech strong { color: var(--ivory); display: block; font-weight: 700; }
.world .biz { display: grid; grid-template-columns: repeat(5, minmax(0, 76px)); gap: 10px 12px; margin: 0; padding: 0; list-style: none; }
.world .biz a { display: block; border-radius: 16px; outline-offset: 2px; }
.world .biz img { width: 100%; aspect-ratio: 1; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); transition: transform .25s; }
.world .biz a:hover img, .world .biz a:focus-visible img { transform: translateY(-4px) scale(1.06); }
.world .money { margin-top: 18px; font-size: 14px; color: var(--dim); }
@media (max-width: 700px) {
  .rail { display: none; }
  .world { padding-left: var(--gutter); min-height: 88vh; }
  .world .biz { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* ---------- cabinet ---------- */
.cabinet .row { display: flex; gap: 22px; overflow-x: auto; padding: 36px 4px 22px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--gold-3) transparent; }
.member { flex: none; width: 168px; text-align: center; text-decoration: none; scroll-snap-align: start; }
.member .face { width: 148px; height: 148px; margin: 0 auto 12px; border-radius: 50%; overflow: hidden; background: var(--space-3);
  box-shadow: 0 0 0 3px var(--gold-2), 0 0 0 7px rgba(242, 193, 78, .16), 0 16px 30px rgba(0, 0, 0, .45); transition: transform .25s; }
.member .face svg { width: 100%; height: 100%; display: block; }
.member:hover .face, .member:focus-visible .face { transform: rotate(-4deg) scale(1.04); }
.member b { display: block; font: 700 22px/1.05 var(--display); }
.member small { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; line-height: 1.3; }

/* ---------- features ---------- */
.agenda { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 64px; margin-top: 56px; }
.plank { display: grid; grid-template-columns: 84px 1fr; gap: 20px; align-items: start; }
.plank img { width: 84px; height: 84px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .5)); }
.plank h3 { font: 800 30px/1 var(--display); margin: 4px 0 8px; }
.plank p { margin: 0; color: var(--muted); }
.scope { margin-top: 64px; color: var(--muted); max-width: 70ch; font-size: 17px; }
.scope strong { color: var(--gold-1); font-weight: 600; }
@media (max-width: 760px) { .agenda { grid-template-columns: 1fr; } .plank { grid-template-columns: 64px 1fr; } .plank img { width: 64px; height: 64px; } }

/* ---------- ads ---------- */
.ad { max-width: 1000px; margin: 0 auto; padding: 0 var(--gutter); }
.ad > small { display: block; text-align: center; color: var(--dim); font-size: 12px; margin-bottom: 8px; }
.ad ins { display: block; min-height: 100px; }
.house { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 20px 26px; border-radius: 20px; text-decoration: none;
  background: radial-gradient(120% 180% at 0% 0%, rgba(214, 36, 58, .28), transparent 55%), var(--space-2); box-shadow: 0 0 0 1px rgba(242, 193, 78, .25) inset; }
.house img { width: 72px; height: 72px; border-radius: 18px; }
.house b { font: 800 28px/1.05 var(--display); display: block; }
.house span { color: var(--muted); font-size: 16px; }
.house em { font-style: normal; font-weight: 700; color: var(--gold-1); white-space: nowrap; }
@media (max-width: 640px) { .house { grid-template-columns: 56px 1fr; } .house img { width: 56px; height: 56px; } .house em { grid-column: 1 / -1; } }

/* ---------- election ---------- */
.race { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.ballot { margin-top: 36px; display: grid; gap: 22px; }
.cand { display: grid; grid-template-columns: 88px 1fr; gap: 18px; align-items: center; }
.cand .face { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px var(--ivory); }
.cand .face svg { width: 100%; height: 100%; display: block; }
.cand b { font: 800 26px/1 var(--display); display: block; }
.cand small { color: var(--muted); font-size: 14px; }
.meter { height: 12px; border-radius: 6px; background: rgba(243, 238, 223, .1); margin-top: 10px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 50%; border-radius: 6px; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.cand.flip .meter i { background: linear-gradient(90deg, #6d2f86, #b56be0); }
.cand.money .meter i { background: linear-gradient(90deg, #1f5a2a, #54c26a); }
.tally { color: var(--muted); font-size: 15px; margin-top: 18px; }
.tools { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(243, 238, 223, .12); }
.tools li { border-bottom: 1px solid rgba(243, 238, 223, .12); }
.tools a { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center; padding: 18px 4px; text-decoration: none; }
.tools a:hover b { color: var(--gold-1); }
.tools img { width: 56px; height: 56px; }
.tools b { font: 800 25px/1 var(--display); display: block; transition: color .2s; }
.tools span { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .race { grid-template-columns: 1fr; gap: 48px; } }

/* ---------- finale ---------- */
.finale { position: relative; overflow: hidden; text-align: center; padding: clamp(110px, 16vw, 200px) var(--gutter); }
.finale .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; z-index: -1; }
.finale::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 50% 50%, rgba(7, 10, 28, .2), var(--space) 88%); }
.finale img.congress { width: 132px; height: 132px; margin: 0 auto 18px; filter: drop-shadow(0 0 40px rgba(255, 95, 210, .55)); }
.finale h2 { font: 900 clamp(46px, 7.5vw, 104px)/.9 var(--display); margin: 0 auto 20px; max-width: 14ch; text-transform: uppercase;
  background: var(--foil); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.finale p { color: var(--muted); margin: 0 auto 32px; max-width: 48ch; }
.finale .hero-actions { justify-content: center; }

/* ---------- footer ---------- */
footer { border-top: 1px solid rgba(242, 193, 78, .2); padding: 40px var(--gutter) 56px; color: var(--dim); font-size: 14px; }
footer .in { max-width: 1320px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 14px 32px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ivory); }

/* ---------- the one page-load moment: foil sheen + orbit fade-in ---------- */
@media (prefers-reduced-motion: no-preference) {
  .wordmark { animation: sheen 2.4s .25s cubic-bezier(.3, .7, .2, 1) both; }
  .orbit { animation: arrive 1.6s .1s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes sheen { from { background-position: 100% 0; } to { background-position: 0% 0; } }
  @keyframes arrive { from { opacity: 0; transform: scale(.9) rotate(-8deg); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .ticker .track { animation: none; flex-wrap: wrap; white-space: normal; padding-inline: 16px; }
  .trail-bg img { transition: opacity .3s; transform: none; }
}
.btn, .brand span { white-space: nowrap; }
@media (max-width: 480px) {
  .site-nav { gap: 12px; padding-block: 10px; }
  .brand span { font-size: 19px; }
  .brand img { width: 30px; height: 30px; }
  .orbit { margin-bottom: -36px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}
