/* =========================================================
   rohan.wtf · Option C: pro page, pixel hero
   ========================================================= */

:root {
  --bg: #0f1118;
  --bg-deep: #0a0c11;
  --surface: #171a24;
  --line: #262a36;
  --text: #E8E6E1;
  --text-strong: #FFF1E8;
  --text-soft: #C9CCD4;
  --muted: #9aa0ad;
  --green: #3DDC84;
  --green-hi: #8ff0b8;
  --yellow: #FFEC27;
  --blue: #29ADFF;
  --purple: #83769C;

  --font-pixel: 'Press Start 2P', monospace;
  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --gutter: 64px;
  --max: 1312px;
  --shadow: 6px 6px 0 var(--bg-deep);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
p, h1, h2, h3, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--green); }
a:hover { color: var(--green-hi); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--yellow); color: var(--bg); padding: 12px 16px;
  font-family: var(--font-mono); text-decoration: none;
}
.skip-link:focus { top: 16px; }

@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.blink { animation: blink 1s steps(1) infinite; }

/* ---------- buttons ---------- */
.btn {
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 22px; font-size: 16px; text-decoration: none; transition: transform .08s steps(2);
}
.btn--primary { background: var(--green); color: var(--bg); font-weight: 600; box-shadow: 4px 4px 0 var(--bg); }
.btn--primary:hover { color: var(--bg); background: var(--green-hi); }
.btn--primary:active { transform: translate(4px, 4px); box-shadow: none; }
.btn--ghost { background: var(--bg); color: var(--text); border: 2px solid var(--text); font-weight: 500; }
.btn--ghost:hover { color: var(--bg); background: var(--text); }
.btn--pixel {
  min-height: 44px; padding: 0 16px; border: 2px solid var(--green);
  font-family: var(--font-pixel); font-size: 10px; color: var(--green);
}
.btn--pixel:hover { background: var(--green); color: var(--bg); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 72px;
  display: flex; align-items: center; gap: 36px; padding: 0 var(--gutter);
  background: rgba(15, 17, 24, .78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-bottom: 2px solid rgba(255, 255, 255, .08);
}
.nav__logo { font-family: var(--font-pixel); font-size: 14px; color: var(--green); text-decoration: none; margin-right: auto; }
.nav__menu { display: flex; align-items: center; gap: 36px; }
.nav__menu a:not(.btn) { font-family: var(--font-mono); font-size: 15px; color: var(--text); text-decoration: none; }
.nav__menu a:not(.btn):hover { color: var(--green); }
.nav__toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: none; border: 2px solid var(--text); color: var(--text); cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  position: relative; height: min(640px, 100svh); min-height: 520px; overflow: hidden;
  background: #141a33;
}
.hero__art { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__content {
  position: relative; z-index: 1; max-width: 700px;
  padding: 150px var(--gutter) 0;
  display: flex; flex-direction: column; gap: 22px;
}
/* Name: banded sunset gradient (hard stops, like the sky) + pixel outline + drop shadow */
.hero__title {
  position: relative; isolation: isolate;
  font-family: var(--font-pixel); font-weight: 400; font-size: 44px; line-height: 1.3;
  color: var(--text-strong);
}
.hero__title span {
  background: linear-gradient(180deg,
    #FFF1E8 0 22%, #FFEC27 22% 44%, #FFA300 44% 64%, #FF77A8 64% 82%, #3DDC84 82% 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
@media (min-width: 601px) { .hero__title { white-space: nowrap; } .hero__content { max-width: 820px; } }
.hero__title::before {
  content: attr(data-text);
  position: absolute; inset: 0; z-index: -1;
  color: var(--bg);
  text-shadow:
    -3px -3px 0 var(--bg), 0 -3px 0 var(--bg), 3px -3px 0 var(--bg),
    -3px 0 0 var(--bg), 3px 0 0 var(--bg),
    -3px 3px 0 var(--bg), 0 3px 0 var(--bg), 3px 3px 0 var(--bg),
    6px 6px 0 #7E2553, 9px 9px 0 #3a1440;
}
@media (forced-colors: active) {
  .hero__title span { -webkit-text-fill-color: CanvasText; color: CanvasText; background: none; }
}
.hero__lede { font-size: 21px; line-height: 1.5; color: #F3EEE6; max-width: 580px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }

.player { animation: idle 1.2s steps(1) infinite; }
@keyframes idle { 0%, 49% { transform: translate(192px, 131px); } 50%, 100% { transform: translate(192px, 130px); } }
.coins rect { animation: blink 1.6s steps(1) infinite; }
.coins rect:nth-child(2n) { animation-delay: .8s; }
.shimmer { animation: shimmer 2.4s steps(1) infinite; }
@keyframes shimmer { 0%, 49% { transform: translateX(0); } 50%, 100% { transform: translateX(3px); } }

/* ---------- shared type ---------- */
.eyebrow { font-family: var(--font-mono); font-size: 13px; letter-spacing: 2px; color: var(--green); }
.eyebrow--yellow { font-size: 14px; color: var(--yellow); }
.h2 { font-family: var(--font-pixel); font-weight: 400; font-size: 22px; line-height: 1.4; color: var(--text-strong); }
.body { font-size: 18px; line-height: 1.65; color: var(--text-soft); }

.stack { display: flex; flex-direction: column; gap: 22px; }
.stack--tight { gap: 14px; }
.card { background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); }
.pip { display: inline-block; width: 12px; height: 12px; }
.pip--yellow { background: var(--yellow); }

/* ---------- sections ---------- */
.section { max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 96px var(--gutter) 0; }
.section--split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 80px; row-gap: 56px; }
.section__head { display: flex; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.rule { flex: 1; height: 2px; background: var(--line); margin-bottom: 12px; }

/* achievement */
.achievement { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.achievement__label { display: flex; align-items: center; gap: 10px; font-family: var(--font-pixel); font-size: 10px; color: var(--yellow); }
.achievement__text { font-size: 18px; line-height: 1.5; }

/* stat bars */
.bars { display: flex; flex-direction: column; gap: 26px; }
.bar { display: flex; flex-direction: column; gap: 10px; }
.bar__row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 15px; }
.bar__val { color: var(--green); }
.bar__track {
  height: 14px; max-width: 540px;
  background: repeating-linear-gradient(to right, var(--line) 0 14px, transparent 14px 18px);
}
.bar__fill {
  height: 100%; width: 0;
  background: repeating-linear-gradient(to right, var(--green) 0 14px, transparent 14px 18px);
  transition: width 1.2s steps(20);
}
.bars.is-visible .bar__fill { width: calc(var(--v) * 1%); }
.no-js .bar__fill { width: calc(var(--v) * 1%); }

.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tags li { padding: 6px 12px; border: 2px solid var(--line); font-family: var(--font-mono); font-size: 14px; color: var(--text-soft); }

/* shared grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

/* archives */
.archive { display: flex; flex-direction: column; }
.archive li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 18px 0; border-bottom: 2px solid var(--line);
}
.archive a { font-size: 18px; color: var(--text); text-decoration: none; }
.archive a::before { content: '▶ '; font-size: 12px; color: var(--green); }
.archive a:hover { color: var(--green); }
.archive span { font-family: var(--font-mono); font-size: 14px; color: var(--muted); white-space: nowrap; }

/* save points */
.saves { margin-top: 22px; }
.save { padding-top: 22px; border-top: 4px solid; display: flex; flex-direction: column; gap: 10px; }
.save--purple { border-color: var(--purple); }
.save--blue { border-color: var(--blue); }
.save--green { border-color: var(--green); }
.save__co { font-family: var(--font-pixel); font-size: 11px; color: var(--text-strong); }
.save__co--green { color: var(--green); }
.save__role { font-family: var(--font-mono); font-size: 14px; color: var(--muted); }

/* footer */
.footer {
  margin-top: 120px; padding: 56px var(--gutter);
  background: var(--bg-deep); border-top: 2px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 32px;
}
.footer__title { font-family: var(--font-pixel); font-size: 26px; color: var(--text-strong); }
.footer__sub { font-size: 17px; color: var(--muted); }
.footer__ctas { margin-left: auto; display: flex; flex-wrap: wrap; gap: 14px; }
.footer__legal { width: 100%; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.hint { opacity: .5; }

/* ---------- easter egg: CRT mode (Konami code) ---------- */
html.crt body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 99;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, .25) 3px, transparent 4px);
  box-shadow: inset 0 0 160px rgba(0, 0, 0, .8);
}
html.crt body { filter: saturate(1.25) contrast(1.05); }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  :root { --gutter: 40px; }
  .nav__menu { gap: 22px; }
  .section--split { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav { padding: 0 20px; }
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: fixed; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 2px solid var(--line);
    padding: 8px 20px 20px; display: none;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav__menu .btn { margin-top: 16px; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .hero { height: auto; min-height: 640px; }
  .hero__content {
    padding: 104px 16px 200px;
  }
  .hero__content::before {
    content: ''; position: absolute; inset: 88px 8px 188px; z-index: -1;
    background: rgba(15, 17, 24, .55);
  }
  .hero__title { font-size: 28px; }
  .hero__lede { font-size: 18px; }
  .h2 { font-size: 17px; }
  .section { padding-top: 72px; }
  .archive li { flex-direction: column; gap: 6px; }
  .footer { padding: 40px 16px; }
  .footer__title { font-size: 20px; }
  .footer__ctas { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bar__fill { width: calc(var(--v) * 1%); }
}
