/* Home only: the hero stage and the Theme World cards. Loaded before
   styles.css so its responsive overrides still win. */
.hero-stage { --stage-ink: var(--text-tertiary); position: relative; min-height: 630px; overflow: hidden; border-radius: var(--radius); color: var(--ink); background: var(--paper); isolation: isolate; }
.stage-label { position: absolute; z-index: 4; color: var(--stage-ink); font-family: var(--mono); font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; }
.stage-label-top { top: 28px; left: 30px; }
.stage-label-bottom { right: 30px; bottom: 44px; color: var(--ink); }
.hero-icon-wrap { position: absolute; top: 50%; left: 50%; width: min(68%, 400px); aspect-ratio: 1; transform: translate(-50%,-54%); }
.hero-icon { position: relative; z-index: 2; width: 100%; }
.hero-rail { position: absolute; z-index: 3; bottom: 62px; left: 30px; display: block; width: 44%; }
.hero-scrub { display: block; width: 100%; height: 34px; margin: 0; background: transparent; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.hero-scrub::-webkit-slider-runnable-track { height: 2px; border-radius: var(--radius-sm); background: var(--ink); }
.hero-scrub::-webkit-slider-thumb { width: 16px; height: 16px; margin-top: -7px; border: 4px solid var(--coral); border-radius: var(--radius-sm); background: var(--paper); cursor: grab; -webkit-appearance: none; appearance: none; }
.hero-scrub::-moz-range-track { height: 2px; border-radius: var(--radius-sm); background: var(--ink); }
.hero-scrub::-moz-range-thumb { width: 8px; height: 8px; border: 4px solid var(--coral); border-radius: var(--radius-sm); background: var(--paper); cursor: grab; }
.hero-scrub:active::-webkit-slider-thumb { cursor: grabbing; }
.hero-scrub:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; border-radius: var(--radius-sm); }
.hero-rail::after { position: absolute; top: 100%; left: 0; margin-top: 2px; color: var(--stage-ink); font-family: var(--mono); font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; content: attr(data-label-rail); pointer-events: none; }
/* The proof registers exactly over the vector: same box, same inset, so the
   sharpening is the only thing that moves. */
.hero-loupe { position: absolute; inset: 0; z-index: 2; }
.hero-loupe[hidden], .hero-icon[hidden] { display: none; }
.hero-loupe img[data-hero-zoom] { width: 100%; height: 100%; image-rendering: pixelated; }
.loupe-actual { position: absolute; left: 50%; top: calc(100% + 14px); display: flex; align-items: center; gap: 8px; color: var(--stage-ink); font-family: var(--mono); font-size: .6875rem; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; transform: translateX(-50%); }
.loupe-actual em { font-style: normal; }
.loupe-actual img { image-rendering: pixelated; }
/* Arrival: each rung at native size; the 16px one in a tab (hero.js). */
.hero-grow { position: absolute; z-index: 3; top: 50%; left: 50%; image-rendering: pixelated; transform: translate(-50%,-50%); transition: left .26s cubic-bezier(.22,1,.36,1); }
.hero-grow.in-tab { left: calc(50% - 72px); }
.hero-grow-size { position: absolute; z-index: 3; top: calc(50% + var(--rung, 16px) / 2 + 12px); left: 50%; color: var(--stage-ink); font-family: var(--mono); font-size: .6875rem; letter-spacing: .06em; white-space: nowrap; transform: translateX(-50%); }
.hero-tab { position: absolute; z-index: 2; top: 50%; left: 50%; width: 184px; height: 36px; border: 1px solid rgb(20 21 26 / .16); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: color-mix(in oklab, var(--paper) 92%, var(--ink) 8%); transform: translate(-50%, -50%); transition: opacity .15s; }
.hero-tab::before { position: absolute; top: 50%; left: 38px; width: 92px; height: 6px; border-radius: 3px; background: color-mix(in oklab, var(--paper) 70%, var(--ink) 30%); transform: translateY(-50%); content: ""; }
.hero-tab::after { position: absolute; top: 50%; right: 12px; width: 8px; height: 8px; background: linear-gradient(45deg, transparent 45%, var(--stage-ink) 45% 55%, transparent 55%), linear-gradient(-45deg, transparent 45%, var(--stage-ink) 45% 55%, transparent 55%); transform: translateY(-50%); content: ""; }
.hero-tab.is-leaving { opacity: 0; }
.hero-stage.is-arriving .stage-label-bottom { opacity: 0; }
.stage-label-bottom { transition: opacity .24s; }
.stage-label-bottom.is-passed::before { display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--mint); vertical-align: 1px; content: ""; }
.hero-icon.is-growing { visibility: hidden; }
.hero-icon.is-opening { animation: hero-open .48s cubic-bezier(.22,1,.36,1) both; }
@keyframes hero-open { from { transform: scale(var(--grow-from, .3)); } to { transform: scale(1); } }
.world-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.world-card { position: relative; display: grid; min-height: 560px; grid-template-rows: auto 1fr auto; grid-column: span 4; padding: 30px; border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-lg); background: #20212a; overflow: hidden; isolation: isolate; }
.world-knot { --tile-color: #251d32; grid-column: span 7; }
.world-cat { --tile-color: #cfe6e1; --tile-radius: 25.85%; grid-column: span 5; }
.world-dog { --tile-color: #fff4e8; }
.world-koi { --tile-color: #e8e3d4; }
.world-hero { --tile-color: #f4eada; }
.world-sky { --tile-color: #f2e7d2; }
.world-coop { --tile-color: #151927; }
.world-forest { --tile-color: #e7c58e; }
.world-helm { --tile-color: #11151e; grid-column: span 12; }
.world-card { background: color-mix(in oklab, var(--tile-color) 86%, #fff4e8); }
.world-cat, .world-dog, .world-koi, .world-hero, .world-sky, .world-forest { border-color: rgba(25,26,32,.12); background: color-mix(in oklab, var(--tile-color) 55%, #fffaf5); }
.world-wide { min-height: 470px; grid-template-columns: .84fr 1.16fr; grid-template-rows: 1fr auto; gap: 24px 56px; }
.world-wide .world-copy { align-self: center; }
.world-wide .world-visual { grid-row: 1; grid-column: 2; }
.world-wide footer { grid-column: 1 / -1; }
.world-copy { position: relative; z-index: 2; }
.world-number { font-family: var(--mono); font-size: .6875rem; font-weight: var(--weight-ui); letter-spacing: .07em; text-transform: uppercase; opacity: .64; }
.world-card h3 { margin: 13px 0 14px; font-size: clamp(2rem, 3.2vw, 3.4rem); line-height: 1; letter-spacing: var(--track-title); }
.world-card:not(.world-wide) h3 { font-size: clamp(1.9rem, 2.7vw, 2.75rem); }
.world-card p { max-width: 560px; margin: 0; font-size: .9rem; opacity: .72; }
.world-device { display: inline-flex; margin-top: 20px; padding: 7px 10px; border: 1px solid currentColor; border-radius: var(--radius-pill); font-family: var(--mono); font-size: .6875rem; opacity: .68; }
.world-visual { display: grid; min-height: 230px; place-items: center; }
.world-icon { width: 100%; height: 100%; }

.world-visual .specimen-tile { width: 174px; }
.world-card footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 18px; border-top: 1px solid currentColor; font-family: var(--mono); font-size: .6875rem; opacity: .68; }
.world-card footer > span:last-child { display: flex; gap: 15px; }
.world-card footer a { text-underline-offset: 4px; }
.world-card footer a:hover { opacity: .65; }
.world-pixel { display: inline-flex; align-items: center; gap: 8px; }
.world-pixel img { box-sizing: content-box; width: 16px; height: 16px; max-width: none; padding: 4px; border: 1px solid rgba(25,26,32,.12); border-radius: var(--radius-sm); background: var(--paper); image-rendering: pixelated; }
