.front .nav { border-bottom-color: transparent; }
.front .nav.scrolled { border-bottom-color: var(--line-subtle); }
.front .foot { margin-top: 40px; }

.hero { position: relative; padding-top: 88px; text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-subtle); color: var(--muted); font: 500 13px var(--font); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.hero h1 { margin-top: 26px; font: 600 clamp(44px, 7.2vw, 88px)/0.98 var(--display); letter-spacing: -0.05em; background: linear-gradient(180deg, #fff 30%, rgba(236, 238, 242, 0.55)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.2em; margin-bottom: -0.12em; }
.hero .lead { max-width: 30em; margin: 24px auto 0; color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; }
.hero .go { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 36px; }
.hero small { display: block; margin-top: 16px; color: var(--faint); font-size: 13px; }

.shot { --tint: 121, 134, 219; position: relative; margin-top: 64px; perspective: 2000px; }
.shot::before { content: ""; position: absolute; left: 6%; right: 6%; top: 8%; bottom: -6%; z-index: -1; background: radial-gradient(closest-side, rgba(var(--tint), 0.42), transparent); filter: blur(60px); transition: background 1.2s var(--ease); }
.tilt { transform-origin: 50% 0; transform: rotateX(calc(16deg * (1 - var(--p, 1)))) scale(calc(0.92 + 0.08 * var(--p, 1))); will-change: transform; }
.window { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: #0a0b0f; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 50px 120px -40px rgba(0, 0, 0, 0.9); }
.window img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.window img.next { clip-path: polygon(calc(100% + 12%) 0, calc(100% + 12%) 0, 100% 100%, 100% 100%); animation: wipe 1s var(--ease-wipe) forwards; }
@keyframes wipe { to { clip-path: polygon(0 0, calc(100% + 12%) 0, 100% 100%, -12% 100%); } }
.window::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.credit { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; color: var(--faint); font-size: 13px; }
.credit b { color: var(--muted); font-weight: 500; }
.bars { display: flex; gap: 6px; }
.bars button { position: relative; width: 18px; height: 16px; padding: 0; border: 0; background: none; cursor: pointer; transition: width 0.4s var(--ease); }
.bars button::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.bars button[aria-current] { width: 40px; }
.bars button[aria-current]::after { content: ""; position: absolute; left: 0; top: 7px; width: 100%; height: 2px; border-radius: 2px; background: var(--fg); transform-origin: 0 50%; animation: fill 6s linear forwards; }
.held .bars button[aria-current]::after { animation-play-state: paused; }
@keyframes fill { from { transform: scaleX(0); } to { transform: none; } }
.js .hero .rise { opacity: 1; transform: none; animation: rise 0.7s var(--ease-move) both; animation-delay: calc(var(--i, 0) * 60ms); transition: none; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.say { padding-block: 200px 160px; }
.say p { max-width: 21em; margin: 0 auto; font: 600 clamp(28px, 3.6vw, 46px)/1.22 var(--display); letter-spacing: -0.03em; text-align: center; }
.say span { color: rgba(236, 238, 242, calc(0.16 + 0.84 * var(--o, 1))); transition: color 0.2s; }
.say span.gold { color: rgba(217, 192, 138, calc(0.2 + 0.8 * var(--o, 1))); }

.lib { padding-bottom: 80px; }
.lib__head, .game__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; }
.lib__head h2, .game__head h2 { margin-top: 10px; font: 600 clamp(32px, 4vw, 52px)/1.04 var(--display); letter-spacing: -0.04em; }
.lib__head > p, .game__head > p { color: var(--muted); font-size: 17px; }
.lib__shot { position: relative; margin-top: 48px; }
.lib__shot::before { content: ""; position: absolute; inset: 10% 8% -10%; z-index: -1; background: radial-gradient(closest-side, rgba(217, 192, 138, 0.16), transparent); filter: blur(50px); }
.lib__shot img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 50px 120px -40px rgba(0, 0, 0, 0.9); }

.game { padding-block: 40px 120px; }
.game__shot { position: relative; margin: 48px 0 0; }
.game__frame { position: relative; overflow: hidden; border-radius: 16px; aspect-ratio: 2000 / 837; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 60px 120px -40px rgba(0, 0, 0, 0.9); }
.game__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.1 - 0.1 * var(--g, 1))); transform-origin: 50% 60%; will-change: transform; }
.game__shot::before { content: ""; position: absolute; inset: 20% 10% -8%; z-index: -1; background: radial-gradient(closest-side, rgba(190, 60, 80, 0.22), transparent); filter: blur(50px); }
.game__shot figcaption { margin-top: 16px; color: var(--faint); font-size: 13px; }
.game__shot figcaption b { color: var(--muted); font-weight: 500; }

.turn { position: relative; height: 330vh; }
.turn__stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.turn__in { position: relative; height: 100%; padding-top: 60px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 40px; }
.turn__fig { position: relative; margin-right: 8%; }
.turn__fig::before { content: ""; position: absolute; left: 50%; top: 42%; width: 150%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: -1; background: radial-gradient(closest-side, rgba(126, 112, 230, 0.26), rgba(126, 112, 230, 0.08) 55%, transparent); pointer-events: none; }
.turn__fig::after { content: ""; position: absolute; left: 50%; bottom: 7%; width: 70%; height: 6%; transform: translateX(-50%); z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(180, 170, 255, 0.16), transparent); pointer-events: none; }
.turn canvas, .turn img { position: relative; display: block; height: min(calc(100vh - 90px), 880px); width: auto; aspect-ratio: 606 / 1160; }
.turn__words { position: relative; height: 170px; }
.turn__line { position: absolute; left: 0; right: 0; top: 0; opacity: 0; transform: translateY(16px); transition: opacity 0.5s, transform 0.6s var(--ease-move); }
.turn__line.on { opacity: 1; transform: none; }
.turn__steps { display: flex; gap: 6px; margin-top: 8px; }
.turn__steps i { width: 18px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.2); transition: width 0.4s var(--ease), background 0.4s; }
.turn__steps i.on { width: 40px; background: var(--fg); }
.turn__line h2 { font: 600 clamp(30px, 4vw, 52px)/1.04 var(--display); letter-spacing: -0.04em; }
.turn__line p { margin-top: 12px; color: var(--muted); font-size: 18px; }
.turn__cap { margin-top: 28px; color: var(--faint); font-size: 13px; }
.turn__cap b { color: var(--muted); font-weight: 500; }

.more { padding-block: 120px 40px; }
.more > h2 { max-width: 16em; font: 600 clamp(32px, 4vw, 52px)/1.04 var(--display); letter-spacing: -0.04em; }
.more > h2 span { color: var(--faint); }
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.tile { position: relative; overflow: hidden; border-radius: 16px; background: linear-gradient(180deg, #111319, #0c0d12); border: 1px solid rgba(255, 255, 255, 0.07); padding: 30px 30px 0; display: flex; flex-direction: column; min-height: 380px; }
.tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent); }
.tile h3 { font: 600 20px/1.25 var(--display); letter-spacing: -0.02em; }
.tile p { margin-top: 8px; color: var(--muted); font-size: 15px; max-width: 26em; }
.tile .pic { margin-top: auto; padding-top: 28px; }
.tile .pic img { width: 100%; height: auto; border-radius: 10px 10px 0 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 -20px 60px -20px rgba(0, 0, 0, 0.8); }
.tile--wide { grid-column: span 6; padding: 40px 40px 0; min-height: 0; }
.tile--wide > div:first-child { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 48px; align-items: end; }
.tile--wide > div:first-child p { margin-top: 0; }
.tile--wide .pic { padding-top: 32px; }
.tile--half { grid-column: span 3; }
.tile--third { grid-column: span 2; min-height: 250px; }
.tile--third .keys { padding-bottom: 28px; }
.tile--fit .pic { padding: 28px 0 30px; }
.tile--fit .pic img { border-radius: 10px; }
.big { font: 200 72px/1 var(--word); color: var(--accent); letter-spacing: -0.03em; }
.keys { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding: 28px 0 30px; }
.keys kbd { min-width: 34px; padding: 7px 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-bottom-width: 2px; color: var(--fg); font: 600 13px var(--font); text-align: center; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding-block: 120px; border-bottom: 1px solid var(--line-subtle); }
.two h3 { margin-top: 10px; font: 300 52px/1 var(--word); }
.two .says { margin-top: 14px; color: var(--muted); font-size: 17px; }
.two ul { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.two li { display: flex; gap: 12px; }
.two li .icon { margin-top: 3px; color: var(--accent); }

.end { padding-block: 40px 120px; }
.end__card { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: end center; min-height: 600px; padding: 72px 24px 64px; border-radius: 20px; text-align: center; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.end__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.end__card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(7, 8, 11, 0.94) 12%, rgba(7, 8, 11, 0.5) 52%, rgba(7, 8, 11, 0.1)), radial-gradient(60% 50% at 50% 100%, rgba(7, 8, 11, 0.6), transparent); }
.end__card .mark { width: 60px; height: 60px; margin: 0 auto; border-radius: 14px; box-shadow: 0 18px 50px -12px rgba(217, 192, 138, 0.5); }
.end h2 { margin-top: 26px; font: 600 clamp(36px, 5vw, 64px)/1 var(--display); letter-spacing: -0.045em; }
.end p { margin-top: 14px; color: rgba(236, 238, 242, 0.78); font-size: 18px; }
.end .go { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; margin-top: 32px; }
.end small { display: block; margin-top: 26px; color: rgba(236, 238, 242, 0.5); font-size: 12px; }

@media (max-width: 860px) {
  .front .nav .links { display: none; }
  .front .nav .btn { display: inline-flex; margin-left: auto; }
  .hero { padding-top: 64px; }
  .shot { margin-top: 48px; }
  .window { border-radius: 10px; }
  .say { padding-block: 120px 100px; }
  .turn { height: 280vh; }
  .turn__in { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0; align-items: start; padding-top: 80px; }
  .turn__words { height: 150px; }
  .turn canvas, .turn img { height: 64vh; }
  .turn__fig { margin: 0 auto; }
  .turn__cap { display: none; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile--wide, .tile--half, .tile--third { grid-column: auto; }
  .tile--wide { padding: 26px 18px 0; }
  .tile--wide > div:first-child { grid-template-columns: minmax(0, 1fr); }
  .tile--wide .pic { padding-top: 22px; }
  .tile { padding: 26px 26px 0; min-height: 0; }
  .two { grid-template-columns: minmax(0, 1fr); gap: 56px; padding-block: 80px; }
  .credit { flex-direction: column-reverse; align-items: flex-start; }
  .lib__head, .game__head { grid-template-columns: minmax(0, 1fr); }
  .game { padding-bottom: 80px; }
  .game__frame { aspect-ratio: 4 / 3; border-radius: 10px; }
  .game__frame img { object-position: 52% 50%; }
  .end__card { min-height: 520px; padding: 48px 20px 40px; border-radius: 14px; }
  .end__bg { object-position: 50% 20%; }
  .lib__shot img { border-radius: 8px; }
}
