/* The page: layout, type, sections. Colors, sizes and speeds come from tokens.css. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink-text); font: 16px/1.6 var(--font-body); overflow-x: hidden; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 300; letter-spacing: -0.02em; margin: 0; color: var(--ink-value); }
a { color: inherit; }
p { margin: 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; position: relative; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 8px 14px; background: var(--bg); color: var(--ink-value); border-radius: 6px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--mid); outline-offset: 3px; }

/* the sky: a soft Daylight glow that rises as you scroll */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sky::before {
  content: ""; position: absolute; left: -20%; right: -20%; height: 700px; top: calc(100% - 200px);
  transform: translateY(calc(var(--sun, 0) * -55vh)); will-change: transform, opacity;
  filter: blur(80px); opacity: calc(0.3 + var(--sun, 0) * 0.25);
  background: radial-gradient(ellipse at 35% 50%, var(--lo), transparent 55%), radial-gradient(ellipse at 65% 50%, var(--hi), transparent 55%);
}

/* nav */
nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(20, 20, 23, 0.72); border-bottom: 1px solid var(--line); }
nav .wrap { display: flex; align-items: center; height: 64px; gap: 26px; }
.logo { display: flex; align-items: center; gap: 10px; margin-right: auto; font: 600 17px var(--font-head); color: var(--ink-value); text-decoration: none; }
.logo img { width: 32px; height: 24px; filter: drop-shadow(0 0 10px rgba(230, 90, 114, 0.35)); }
nav .tabs { display: flex; gap: 26px; }

/* hero */
.hero { position: relative; padding: 84px 0 0; text-align: center; }
.hero .spot { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 30%), color-mix(in srgb, var(--lo) 16%, transparent), transparent 60%); }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); line-height: 1.04; }
.hero h1 .g { background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.js .hero h1 .w { display: inline-block; opacity: 0; transform: translateY(8px); animation: rise var(--slow) var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.lead { color: var(--ink-label); font-size: 18px; max-width: 520px; margin: 20px auto 28px; }
.ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.picker { margin: 0 auto 14px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; max-width: 440px; }
.picker .lbl { color: var(--ink-label); font-size: 13px; margin-right: 6px; }
.stage { margin: 50px auto 0; max-width: 1000px; }
.hint { margin-top: 26px; color: var(--ink-label); font-size: 14px; }
.hint .wlink { margin-left: 4px; }

/* the slideshow: slides cross-fade slowly; the shown one settles from a slight zoom (a calm drift) */
.reel { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #0e0e11; isolation: isolate;
  box-shadow: 0 0 0 1px var(--line), 0 50px 100px -30px rgba(0, 0, 0, 0.75), 0 0 140px -50px var(--hi), 0 0 140px -60px var(--lo); }
.reel::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 2;
  background: linear-gradient(180deg, transparent 72%, rgba(14, 14, 17, 0.3)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.1s var(--ease-sine); }
.slide.on { opacity: 1; z-index: 1; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide .shot { transform: scale(1.045); transition: transform 0s linear 1.1s; }
.slide.on .shot { transform: scale(1); transition: transform 9s cubic-bezier(0.2, 0.6, 0.3, 1); }
.slide.wide .shot { object-fit: contain; }
.slide .back { filter: blur(26px) brightness(0.5) saturate(1.15); transform: scale(1.15); }

/* one thin line per picture, no names: click one to show it; the shown one's line fills, then the next picture comes (js/reel.js) */
.looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; text-align: left; }
.look { position: relative; height: 18px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; color: var(--ink-label);
  -webkit-tap-highlight-color: transparent; }
.look::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 1px; background: var(--line); transition: background-color var(--normal) var(--ease); }
.look .run { position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; opacity: 0;
  transition: opacity var(--slow) var(--ease); }
.look.on .run { opacity: 1; animation: run 7s linear forwards; }
.looks.rest .look.on .run { animation-play-state: paused; }
@media (hover: hover) { .stage:has(.reel:hover) .look.on .run { animation-play-state: paused; } }
@keyframes run { to { transform: scaleX(1); } }
.look:hover::before { background: var(--mid); }
.look:focus-visible { outline: none; }
.look:focus-visible::before { background: var(--mid); }
@media (prefers-reduced-motion: reduce) {
  .look.on .run { animation: none; transform: scaleX(1); }
  .slide .shot, .slide.on .shot { transform: none; transition: none; }
}

/* sections */
section { padding: 120px 0 0; }
.head { max-width: 600px; margin-bottom: 40px; }
.head h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.1; }
.head p { color: var(--ink-label); margin-top: 14px; }

/* Win.Feel: a section opens like our windows (fade on a sine, rise 8 px, 0.22 s); pieces lift 4 px, 0.02 s apart */
.js .feel { opacity: 0; transform: translateY(8px); }
.js .feel.in { opacity: 1; transform: none; transition: opacity var(--open) var(--ease-sine), transform var(--open) var(--ease); }
.js .feel .piece { opacity: 0; transform: translateY(4px); }
.js .feel.in .piece { opacity: 1; transform: none; transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease); }
/* if the page script never runs (a file failed to load), show everything after 3 s anyway */
.js .feel:not(.in), .js .feel:not(.in) .piece { animation: feel-fallback 0s 3s forwards; }
.js.ready .feel:not(.in), .js.ready .feel:not(.in) .piece { animation: none; }
@keyframes feel-fallback { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .js .feel, .js .feel .piece, .js .hero h1 .w { opacity: 1; transform: none; animation: none; }
  html { scroll-behavior: auto; }
}

/* cards that size to their text: the inside sits in the flow, inset by the border */
.card > .in, .site > .in, .support > .in, .bench > .in { position: relative; inset: auto; margin: var(--t, 0); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { display: flex; cursor: default; transition: transform var(--normal) var(--ease); }
.card::after { content: ""; position: absolute; inset: 0; border-radius: 6px; padding: 1px; background: var(--accent); opacity: 0; pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  transition: opacity var(--normal) var(--ease); }
@media (hover: hover) { .card:hover { transform: translateY(-2px); } .card:hover::after { opacity: 0.8; } }
.card > .in { flex: 1; padding: 20px 22px 22px; }
.card h3 { font-size: 18px; font-weight: 400; line-height: 1.3; }
.card p { margin-top: 8px; font-size: 14px; line-height: 1.55; }
.more { margin-top: 26px; color: var(--ink-label); font-size: 15px; }

/* the Cooldown Manager */
.cdm-top { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: 40px; }
.cdm-top .head { margin: 0; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 22px; font-size: 15px; line-height: 1.5; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 9px; height: 2px; border-radius: 1px; background: var(--accent); }
.shotcard { margin: 0; }
.shotcard > .in { position: relative; inset: auto; margin: var(--t); overflow: hidden; border-radius: 2px; }
.shotcard img { display: block; width: 100%; height: auto; }

/* the level up and quest animations (js/fx.js) */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.split .head { margin: 0; }
.bench > .in { padding: 20px 18px; }
.scene { position: relative; height: 300px; border-radius: 4px; overflow: hidden; margin-bottom: 18px; isolation: isolate;
  background: #1a1410; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5); }
/* the world behind, softly out of focus so the moment reads first */
.scene::before { content: ""; position: absolute; inset: -12px; z-index: -1; filter: blur(3px) saturate(1.1);
  background: linear-gradient(180deg, rgba(14, 14, 17, 0.5), rgba(14, 14, 17, 0.25) 45%, rgba(14, 14, 17, 0.7)), url(/img/look-test-sm.webp) 47% 44% / 300% auto; }
.bench .ctl { display: flex; gap: 12px; justify-content: center; }

.lvl { position: absolute; left: 0; right: 0; top: 112px; height: 0; opacity: 0; pointer-events: none; text-align: center; }
.lvl .line { position: absolute; top: -1px; height: 2px; width: min(190px, 40%); transform: scaleX(0); }
.lvl .line.l { right: 50%; transform-origin: right; background: linear-gradient(90deg, transparent, var(--lo) 55%, var(--mid)); }
.lvl .line.r { left: 50%; transform-origin: left; background: linear-gradient(90deg, var(--mid), var(--hi) 45%, transparent); }
.lvl .haze { position: absolute; left: 50%; top: 0; width: min(420px, 90%); height: 90px; opacity: 0; transform: translate(-50%, -50%) scaleX(0);
  background: radial-gradient(ellipse closest-side, color-mix(in srgb, var(--hi) 85%, #fff2d9), transparent); mix-blend-mode: screen; }
.lvl .flare { position: absolute; left: 50%; top: -29px; width: 220px; height: 110px; opacity: 0; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse closest-side, rgba(255, 235, 199, 0.85), transparent); mix-blend-mode: screen; }
.lvl .roll { position: absolute; left: 50%; bottom: 6px; width: 240px; height: 74px; margin-left: -120px; overflow: hidden; }
.lvl .num { position: absolute; inset: 0; opacity: 0; font: 600 64px/74px var(--font-game); color: #fff2d9; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }
.lvl .label { position: absolute; left: 50%; bottom: 80px; transform: translateX(-50%); opacity: 0; padding-left: 0.22em; white-space: nowrap;
  font: 600 13px/1 var(--font-game); letter-spacing: 0.22em; text-transform: uppercase;
  background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lvl .gains { position: absolute; left: 0; right: 0; top: 12px; opacity: 0; font: 500 14px var(--font-game); color: var(--ink-text); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); white-space: nowrap; }
.lvl .gains b { font-weight: 600; color: var(--ink-good); }
.lvl .gains i { font-style: normal; margin: 0 9px; color: var(--ink-label); }
.lvl .talents { position: absolute; left: 0; right: 0; top: 34px; opacity: 0; font: 600 14px var(--font-game); color: color-mix(in srgb, var(--hi) 80%, #fff2d9); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }

.qrows { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; }
.qrow { width: 260px; height: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; }
.qrow .txt { display: flex; align-items: center; gap: 5px; font: 600 13px/1 var(--font-game); color: var(--ink-text); text-shadow: 0 1px 2px #000, 0 0 2px #000; white-space: nowrap; }
.qrow .c { display: inline-block; color: var(--ink-value); }
.qrow .tick { width: 10px; height: 10px; background: var(--ink-good); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5.2 4 7.6 8.6 2.4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5.2 4 7.6 8.6 2.4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.qrow .bar { position: relative; width: 150px; height: 2px; margin-top: 3px; background: rgba(0, 0, 0, 0.55); overflow: hidden; border-radius: 1px; }
.qrow .fill { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.qrow .sweep { position: absolute; top: 0; bottom: 0; left: -28px; width: 28px; opacity: 0; background: linear-gradient(90deg, transparent, #fff, transparent); }
.qrow.gold .txt { color: var(--ink-money); }
.qrow.gold .fill { background: linear-gradient(90deg, color-mix(in srgb, var(--ink-money) 55%, #000), var(--ink-money)); }

/* downloads */
.sites { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.site > .in { padding: 24px 28px 26px; display: flex; flex-direction: column; align-items: flex-start; }
.site h3 { font-size: 24px; }
.site p { font-size: 14px; line-height: 1.55; margin: 8px 0 20px; }

/* support */
#support { padding-bottom: 40px; }
.support > .in { padding: 48px 56px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.support h2 { font-size: 36px; line-height: 1.1; }
.support p { margin-top: 14px; }
.support .two { display: flex; flex-direction: column; gap: 12px; }

footer { padding: 32px 0 56px; color: var(--ink-label); font-size: 13px; border-top: 1px solid var(--line); margin-top: 60px; }

@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .split, .sites, .cdm-top { grid-template-columns: 1fr; }
  .cdm-top { gap: 24px; }
  .looks { gap: 16px 18px; }
  .support > .in { grid-template-columns: 1fr; padding: 32px 28px; }
}
@media (max-width: 640px) {
  nav .tabs { display: none; }
  .hero { padding-top: 56px; }
  .cards { grid-template-columns: 1fr; }
  section { padding-top: 88px; }
  .scene { height: 270px; }
  .lvl { top: 100px; }
  .lvl .gains { font-size: 12px; }
  .lvl .gains i { margin: 0 5px; }
}
