:root {
  --ink: #06110d;
  --ink-2: #0a1b14;
  --paper: #eef4ed;
  --muted: #a9b8ae;
  --lime: #8dff1f;
  --green: #19d465;
  --line: rgba(218, 255, 227, .14);
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body { margin: 0; color: var(--paper); background: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.noise { position: fixed; inset: 0; z-index: 20; opacity: .025; pointer-events: none; background-image: repeating-radial-gradient(circle at 17% 29%, #fff 0 1px, transparent 1px 4px); background-size: 7px 9px; }
.topbar { position: absolute; inset: 0 0 auto; z-index: 10; height: 92px; padding: 0 clamp(22px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 900; letter-spacing: -.03em; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; color: #07130b; background: var(--lime); font-size: 13px; transform: skew(-6deg); box-shadow: 5px 5px 0 rgba(141,255,31,.16); }
.brand-name { font-size: 17px; }
.brand-name span { color: var(--lime); }
.topbar nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 42px); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.topbar nav a { opacity: .72; transition: .2s ease; }
.topbar nav a:hover { opacity: 1; color: var(--lime); }
.topbar nav .nav-play { opacity: 1; border: 1px solid rgba(141,255,31,.5); padding: 12px 18px; color: var(--lime); }

.hero { min-height: 760px; height: 100svh; position: relative; display: flex; align-items: center; overflow: hidden; background: #04100c; }
.hero-bg { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(2,10,8,.98) 0%, rgba(2,10,8,.84) 31%, rgba(2,10,8,.28) 64%, rgba(2,10,8,.12) 100%), linear-gradient(0deg, #04100c 0%, transparent 32%), url('assets/raiens-hero.webp') 67% center / cover no-repeat; transform: scale(1.015); animation: heroIn 1.5s cubic-bezier(.2,.8,.2,1) both; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 34%; background: linear-gradient(0deg, var(--ink), transparent); pointer-events: none; }
.hero-content { position: relative; z-index: 2; width: min(92%, var(--max)); margin: 70px auto 0; }
.eyebrow { display: inline-flex; gap: 9px; align-items: center; margin-bottom: 26px; color: #c9d7ce; font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .16em; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 16px var(--lime); animation: pulse 1.4s infinite; }
.hero-kicker, .overline { color: var(--lime); font: 900 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .2em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 9px 0 22px; font-size: clamp(72px, 9.5vw, 150px); line-height: .77; letter-spacing: -.075em; font-style: italic; font-weight: 950; text-shadow: 0 12px 40px rgba(0,0,0,.3); }
h1 span { color: rgba(238,244,237,.04); -webkit-text-stroke: 2px var(--paper); }
.hero-lead { color: #c4d0c8; font-size: clamp(16px, 1.7vw, 21px); line-height: 1.55; }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.hero-flow { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; color: #d9e6dd; }
.hero-flow span { min-height: 34px; padding: 7px 11px 7px 8px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.13); background: rgba(4,17,12,.55); backdrop-filter: blur(9px); font-size: 11px; font-weight: 800; }
.hero-flow b { width: 20px; height: 20px; display: grid; place-items: center; flex: 0 0 auto; color: #07130b; background: var(--lime); font: 950 10px/1 ui-monospace, monospace; }
.button { border: 0; min-height: 54px; padding: 0 21px; display: inline-flex; align-items: center; justify-content: center; gap: 22px; cursor: pointer; font-size: 11px; font-weight: 950; letter-spacing: .11em; transition: transform .2s ease, background .2s ease, color .2s ease; }
.button:hover { transform: translateY(-3px); }
.button-primary { color: #071109; background: var(--lime); box-shadow: 6px 6px 0 rgba(141,255,31,.16); }
.button-primary b { font-size: 20px; }
.button-ghost { color: #fff; border: 1px solid rgba(255,255,255,.22); background: rgba(7,17,13,.45); backdrop-filter: blur(10px); }
.level-card { position: absolute; z-index: 3; right: clamp(24px, 5vw, 72px); bottom: 64px; width: 240px; padding: 18px; border: 1px solid rgba(255,255,255,.18); border-left: 3px solid var(--lime); background: rgba(4,17,12,.68); backdrop-filter: blur(12px); }
.level-card span, .level-card small { display: block; color: #a9b8ae; font: 700 8px/1.4 ui-monospace, monospace; letter-spacing: .15em; }
.level-card strong { display: block; margin: 5px 0 12px; font-style: italic; font-size: 19px; }
.xp-track { height: 5px; margin-bottom: 9px; background: rgba(255,255,255,.12); }
.xp-track i { display: block; width: 78%; height: 100%; background: var(--lime); box-shadow: 0 0 12px rgba(141,255,31,.5); }
.scroll-cue { position: absolute; z-index: 3; left: 50%; bottom: 27px; width: 25px; height: 39px; border: 1px solid rgba(255,255,255,.25); border-radius: 16px; }
.scroll-cue span { position: absolute; top: 8px; left: 10px; width: 3px; height: 7px; border-radius: 2px; background: var(--lime); animation: scroll 1.8s infinite; }
.pixel { position: absolute; z-index: 2; width: 9px; height: 9px; background: var(--lime); box-shadow: 0 0 15px var(--lime); }
.pixel-a { top: 28%; right: 8%; animation: float 4s ease-in-out infinite; }
.pixel-b { top: 21%; right: 32%; width: 5px; height: 5px; animation: float 5s 1s ease-in-out infinite; }

.section { width: min(92%, var(--max)); margin: 0 auto; padding: 130px 0; }
.section-tag { display: flex; align-items: center; gap: 18px; margin-bottom: 54px; color: #73857a; font: 800 10px/1 ui-monospace, monospace; letter-spacing: .19em; }
.section-tag::after { content: ""; width: 70px; height: 1px; background: #314039; }
h2 { margin: 12px 0 30px; font-size: clamp(46px, 6vw, 82px); line-height: .91; letter-spacing: -.06em; font-style: italic; }
h2 em { color: var(--lime); font-style: inherit; }
.challenge-copy > p:not(.overline) { max-width: 620px; color: var(--muted); font-size: 17px; line-height: 1.8; }
.game-overview-head { display: flex; align-items: end; justify-content: space-between; gap: clamp(32px, 7vw, 100px); }
.game-overview-head > p { max-width: 470px; margin-bottom: 30px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.game-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 34px; }
.game-category-card { position: relative; min-height: 430px; padding: 34px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); background: #0b1d15; transition: transform .25s ease, border-color .25s ease, background .25s ease; }
.game-category-card + .game-category-card { border-left: 0; }
.game-category-card:hover { z-index: 1; transform: translateY(-8px); border-color: rgba(141,255,31,.5); }
.game-category-card.featured { background: linear-gradient(145deg, rgba(141,255,31,.14), transparent 58%), #0b2117; }
.game-category-number { position: absolute; top: 22px; right: 25px; color: #435349; font: 800 10px/1 monospace; }
.game-category-icon { width: 66px; height: 66px; margin-bottom: 44px; display: grid; place-items: center; color: #06120b; background: var(--lime); font-size: 29px; transform: rotate(-4deg); box-shadow: 7px 7px 0 rgba(141,255,31,.11); }
.game-category-card > small { color: var(--lime); font: 850 9px/1 monospace; letter-spacing: .16em; }
.game-category-card h3 { margin: 12px 0 16px; font-size: clamp(27px, 2.8vw, 36px); line-height: .92; letter-spacing: -.045em; font-style: italic; }
.game-category-card p { min-height: 68px; margin-bottom: 22px; color: #92a297; line-height: 1.6; }
.game-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.game-tags span { padding: 6px 8px; border: 1px solid rgba(255,255,255,.12); color: #aebdb3; font: 800 8px/1 monospace; letter-spacing: .08em; }
.game-category-card > a { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.1); color: var(--paper); font-size: 10px; font-weight: 950; letter-spacing: .13em; }
.game-category-card > a b { color: var(--lime); font-size: 20px; transition: transform .2s ease; }
.game-category-card > a:hover b { transform: translateX(5px); }

.power { width: 100%; padding-left: max(4%, calc((100% - var(--max))/2)); padding-right: max(4%, calc((100% - var(--max))/2)); background: #091812; }
.power-head { display: flex; justify-content: space-between; align-items: end; gap: clamp(32px, 7vw, 100px); }
.power-head > p { max-width: 470px; margin-bottom: 30px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.power-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 30px; }
.power-card { position: relative; min-height: 340px; padding: 36px; border: 1px solid var(--line); background: #0b1d15; transition: transform .25s ease, border-color .25s ease; }
.power-card + .power-card { border-left: 0; }
.power-card:hover { z-index: 1; transform: translateY(-8px); border-color: rgba(141,255,31,.5); }
.power-card.featured { background: linear-gradient(150deg, rgba(141,255,31,.13), transparent 60%), #0b2117; }
.power-number { position: absolute; top: 22px; right: 25px; color: #435349; font: 800 10px/1 monospace; }
.power-icon { width: 64px; height: 64px; margin-bottom: 55px; display: grid; place-items: center; color: #06120b; background: var(--lime); font-size: 27px; transform: rotate(-4deg); }
.power-card h3 { margin: 0 0 14px; font-size: 28px; font-style: italic; }
.power-card p { min-height: 70px; color: #92a297; line-height: 1.6; }
.power-meta { display: inline-flex; margin-top: 26px; padding: 7px 9px; border: 1px solid rgba(141,255,31,.25); color: var(--lime); font: 850 8px/1 monospace; letter-spacing: .12em; }

.challenge { display: grid; grid-template-columns: .7fr 1.3fr; align-items: center; gap: clamp(45px, 7vw, 100px); }
.challenge-copy .button { margin-top: 20px; }
.game-shell { border: 1px solid rgba(141,255,31,.25); background: #07160f; box-shadow: 18px 18px 0 #0a2418; }
.game-hud { height: 72px; padding: 0 24px; display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center; text-align: center; border-bottom: 1px solid var(--line); }
.game-hud > div:first-child { text-align: left; }
.game-hud > div:last-child { text-align: right; }
.game-hud small { display: block; color: #728178; font: 800 8px/1 monospace; letter-spacing: .13em; }
.game-hud strong { color: var(--lime); font: 900 23px/1 monospace; }
.game-title { font-size: 11px; font-weight: 950; letter-spacing: .16em; }
.game-field { position: relative; height: 430px; overflow: hidden; cursor: crosshair; background: linear-gradient(90deg, transparent 49.8%, rgba(255,255,255,.15) 50%, transparent 50.2%), repeating-linear-gradient(90deg, rgba(35,119,63,.35) 0 14%, rgba(23,92,48,.35) 14% 28%), linear-gradient(#0d3b24, #092b1b); }
.game-field::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 70px rgba(0,0,0,.55); }
.goal { position: absolute; top: 35px; left: 50%; width: 54%; height: 42%; transform: translateX(-50%); border: 5px solid rgba(255,255,255,.82); border-bottom: 2px solid rgba(255,255,255,.45); background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 22px 22px; perspective: 300px; }
.goal span { position: absolute; inset: -5px; box-shadow: 0 0 22px rgba(255,255,255,.12); }
.field-line { position: absolute; left: 50%; bottom: -65px; width: 220px; height: 140px; border: 2px solid rgba(255,255,255,.22); border-radius: 50%; transform: translateX(-50%); }
.game-ball { position: absolute; z-index: 3; left: calc(50% - 31px); top: 67%; width: 62px; height: 62px; padding: 0; border: 0; border-radius: 50%; display: none; place-items: center; background: #fff; font-size: 52px; line-height: 1; cursor: pointer; filter: drop-shadow(0 12px 8px rgba(0,0,0,.35)); transition: transform .11s ease; touch-action: manipulation; }
.game-ball:hover { transform: scale(1.08); }
.game-ball.hit { animation: hit .16s ease; }
.game-message { position: absolute; z-index: 4; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(3,15,9,.7); backdrop-filter: blur(4px); text-align: center; }
.game-message b { color: var(--lime); font-size: clamp(32px, 5vw, 58px); font-style: italic; letter-spacing: -.05em; }
.game-message span { margin-top: 8px; color: #c2cec6; font-size: 13px; }
.game-message.is-hidden { display: none; }

.final-cta { position: relative; min-height: 500px; padding: 120px 4%; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; text-align: center; background: var(--lime); color: #071009; }
.final-grid { position: absolute; inset: 0; opacity: .15; background-image: linear-gradient(#071009 1px, transparent 1px), linear-gradient(90deg, #071009 1px, transparent 1px); background-size: 52px 52px; transform: perspective(350px) rotateX(58deg) scale(1.6) translateY(20%); }
.final-cta > *:not(.final-grid) { position: relative; }
.final-cta p { margin-bottom: 15px; font: 900 11px/1 monospace; letter-spacing: .2em; }
.final-cta h2 { margin: 0; font-size: clamp(51px, 8vw, 112px); }
.final-cta h2 span { color: rgba(7,16,9,.06); -webkit-text-stroke: 2px #071009; }
.ball-mark { margin-top: 28px; width: 55px; height: 55px; display: grid; place-items: center; border: 2px solid #071009; border-radius: 50%; font-size: 30px; }
.final-game-link { position: relative; z-index: 1; margin-top: 24px; padding: 15px 21px; border: 2px solid #071009; color: #071009; font-size: 11px; font-weight: 950; letter-spacing: .11em; transition: .2s ease; }
.final-game-link:hover { color: var(--lime); background: #071009; transform: translateY(-3px); }
.final-game-link b { margin-left: 15px; font-size: 18px; }
footer { min-height: 105px; padding: 25px clamp(22px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #030b08; }
footer p, footer > a:last-child { margin: 0; color: #718078; font: 800 9px/1.4 monospace; letter-spacing: .13em; }

.reveal { opacity: 1; transform: none; }
.has-home-reveal .reveal { opacity: 0; transform: translateY(24px); transition: opacity .75s ease, transform .75s ease; }
.has-home-reveal .reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes heroIn { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: scale(1.015); } }
@keyframes pulse { 50% { opacity: .45; transform: scale(.7); } }
@keyframes scroll { to { transform: translateY(14px); opacity: 0; } }
@keyframes float { 50% { transform: translateY(-18px) rotate(90deg); } }
@keyframes hit { 50% { transform: scale(.65) rotate(25deg); } }

@media (max-width: 900px) {
  .topbar nav a:not(.nav-play) { display: none; }
  .hero { min-height: 720px; }
  .hero-bg { background: linear-gradient(0deg, #04100c 0%, rgba(2,10,8,.78) 45%, rgba(2,10,8,.18) 100%), url('assets/raiens-hero.webp') 70% center / cover no-repeat; }
  .hero-content { align-self: flex-end; margin-bottom: 105px; }
  h1 { font-size: clamp(70px, 19vw, 120px); }
  .level-card { display: none; }
  .scroll-cue { display: none; }
  .game-overview-head, .power-head { display: grid; gap: 0; }
  .game-overview-head > p, .power-head > p { max-width: 650px; }
  .game-category-grid, .challenge { grid-template-columns: 1fr; }
  .game-category-card + .game-category-card { border-left: 1px solid var(--line); border-top: 0; }
  .power-grid { grid-template-columns: 1fr; }
  .power-card + .power-card { border-left: 1px solid var(--line); border-top: 0; }
  .game-shell { width: 100%; }
}

@media (max-width: 600px) {
  .topbar { height: 74px; padding: 0 18px; }
  .brand-name { font-size: 14px; }
  .brand-mark { width: 34px; height: 34px; }
  .topbar nav .nav-play { padding: 10px 13px; }
  .hero { min-height: 700px; height: 100svh; }
  .home-page .hero-content { width: calc(100% - 36px); margin-bottom: var(--app-dock-clearance, 84px); }
  .hero-kicker { font-size: 9px; }
  h1 { margin-top: 11px; font-size: clamp(64px, 21vw, 92px); line-height: .8; }
  .hero-lead { font-size: 15px; }
  .hero-actions { display: grid; margin-top: 25px; }
  .hero-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 13px; }
  .hero-flow span { min-height: 48px; padding: 6px 4px; flex-direction: column; justify-content: center; gap: 4px; font-size: 8px; text-align: center; }
  .hero-flow b { width: 18px; height: 18px; font-size: 9px; }
  .button { width: 100%; }
  .section { width: calc(100% - 36px); padding: 88px 0; }
  .section-tag { margin-bottom: 38px; }
  h2 { font-size: 43px; }
  .game-overview-head > p, .power-head > p, .challenge-copy > p:not(.overline) { font-size: 15px; }
  .game-category-card { min-height: 390px; padding: 28px; }
  .game-category-icon { margin-bottom: 34px; }
  .power { width: 100%; padding-left: 18px; padding-right: 18px; }
  .power-card { min-height: 300px; padding: 28px; }
  .power-icon { margin-bottom: 38px; }
  .challenge { gap: 40px; }
  .game-shell { box-shadow: 9px 9px 0 #0a2418; }
  .game-field { height: 360px; }
  .goal { width: 68%; }
  .game-title { font-size: 9px; }
  .final-cta { min-height: 430px; padding: 90px 18px; }
  footer { flex-direction: column; justify-content: center; text-align: center; }
}

@media (max-width: 600px) and (max-height: 760px) {
  .home-page .hero { min-height: 620px; }
  .home-page .hero-content { margin-bottom: var(--app-dock-clearance, 78px); }
  .home-page .eyebrow { margin-bottom: 14px; }
  .home-page h1 { margin-bottom: 14px; font-size: clamp(58px, 18vw, 72px); }
  .home-page .hero-actions { margin-top: 17px; }
  .home-page .hero-actions .button-ghost,
  .home-page .hero-flow { display: none; }
}

@media (forced-colors: active) {
  h1 span,
  .final-cta h2 span {
    color: CanvasText;
    -webkit-text-stroke: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .has-home-reveal .reveal { opacity: 1; transform: none; }
}
