/* Homepage: hero copy, the cabinet (marquee, bezel + CRT, control panel with the year dial, coin door), the shelf. */
:root { --tilt: 0; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 580px); align-items: start; gap: clamp(28px, 5vw, 72px); max-width: var(--wrap); margin: 0 auto; padding: clamp(8px, 2vw, 28px) var(--gutter) 0; }
.hero-copy { display: flex; flex-direction: column; gap: 18px; padding-top: clamp(16px, 9vh, 120px); }
.hero-copy .h-display { max-width: 13ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 0; padding: 0; list-style: none; font: 400 .78rem var(--f-mono); letter-spacing: .06em; color: var(--ink-3); }
.hero-facts li::before { content: "/ "; color: var(--era); }

/* ---------- the cabinet: one physical object ---------- */
.cabinet {
  --lam: #18161c; position: relative; padding: 12px 14px 0; border-radius: 22px 22px 10px 10px;
  /* black laminate side-art panel with a faint vertical grain */
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .012) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, #0f0e12, var(--lam) 9%, #141217 50%, var(--lam) 91%, #0f0e12);
  /* T-molding edge in the era colour, then the cabinet's shadow and the light it throws into the room */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .07), inset 0 0 0 1px rgba(0, 0, 0, .7),
    0 0 0 2px #060508, 0 0 0 4px color-mix(in srgb, var(--era) 55%, #111), 0 0 0 5px #060508,
    0 50px 90px -30px rgba(0, 0, 0, .95), 0 0 140px -40px var(--era-glow);
}

/* marquee: a backlit translucent panel; the art swaps per era */
.marquee { position: relative; overflow: hidden; padding: 16px 12px 14px; border-radius: 12px 12px 4px 4px; text-align: center; background: #120f0a; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .8), inset 0 2px 0 rgba(255, 255, 255, .08); isolation: isolate; }
.marquee::before { /* the tube behind the plastic */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 140% at 50% 120%, color-mix(in srgb, var(--era) 35%, transparent), transparent 62%), var(--marq, linear-gradient(180deg, #2a1f10, #120d07));
}
.marquee::after { /* glass sheen + bottom trim strip */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(170deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 38%), linear-gradient(0deg, #2b2830 0 3px, #000 3px 4px, transparent 4px);
}
.wordmark { margin: 0; font: 700 clamp(2.3rem, 1.2rem + 5.4vw, 4rem)/1 var(--f-display); letter-spacing: .2em; padding-left: .2em; color: #ffe3ad; text-shadow: 0 0 22px rgba(255, 181, 71, .45); transition: color .4s, letter-spacing .4s; }
.tagline { margin: 8px 0 0; min-height: 1.3em; font: 400 .74rem var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); opacity: .85; }

/* the signature moment: when the era changes the marquee tube re-strikes, once */
.marquee.relight::before, .marquee.relight .wordmark { animation: relight .7s steps(1, end) 1; }
@keyframes relight { 0% { opacity: .15 } 12% { opacity: .9 } 20% { opacity: .3 } 34% { opacity: 1 } 46% { opacity: .65 } 60%, 100% { opacity: 1 } }

/* six marquee panels */
html[data-era="1"] .marquee { --marq: #020904; }
html[data-era="1"] .wordmark { font-weight: 500; letter-spacing: .32em; color: transparent; -webkit-text-stroke: 1.3px #8dffc0; text-shadow: 0 0 14px rgba(92, 255, 161, .75); }
html[data-era="2"] .marquee { --marq: linear-gradient(180deg, #1a0430, #08010f); }
html[data-era="2"] .wordmark { font-style: italic; letter-spacing: .1em; color: #ffe24a; text-shadow: 3px 3px 0 #ff2f93, 6px 6px 0 rgba(0, 0, 0, .6), 0 0 26px rgba(255, 79, 163, .55); }
html[data-era="3"] .marquee { --marq: linear-gradient(180deg, #24135e, #120a33); }
html[data-era="3"] .wordmark { letter-spacing: .12em; background: linear-gradient(180deg, #fff0c4 0 30%, #ffa53a 55%, #ff5c8a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(3px 3px 0 #0e0830); }
html[data-era="4"] .marquee { --marq: linear-gradient(180deg, #e8e0cd, #cfc6b0); }
html[data-era="4"] .wordmark { font: 500 clamp(1.9rem, 1rem + 4.4vw, 3.2rem)/1.1 var(--f-mono); letter-spacing: .08em; color: #1e2f86; text-shadow: 1px 1px 0 #fff; }
html[data-era="4"] .tagline { color: #4b4436; }
html[data-era="5"] .marquee { --marq: linear-gradient(180deg, #2b8cff, #0c3c99); }
html[data-era="5"] .wordmark { letter-spacing: .06em; background: linear-gradient(180deg, #fff 0 46%, #bfe4ff 52%, #e9f6ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 2px 0 #07307d) drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }
html[data-era="5"] .tagline { color: #e6f3ff; }
html[data-era="6"] .marquee { --marq: #ff6b5e; }
html[data-era="6"] .wordmark { text-transform: lowercase; letter-spacing: -.01em; padding-left: 0; color: #fff; text-shadow: none; }
html[data-era="6"] .tagline { color: #fff3ec; }

/* bezel + screen */
.bezel { position: relative; margin-top: 10px; padding: clamp(10px, 2.4vw, 18px); border-radius: 16px; background: linear-gradient(180deg, #121115 0, #050506 70%); box-shadow: inset 0 0 0 1px #000, inset 0 10px 24px rgba(0, 0, 0, .9), inset 0 -1px 0 rgba(255, 255, 255, .06); }
.screen { position: relative; aspect-ratio: 4 / 3; width: min(100%, max(340px, calc((100vh - 480px) * 1.3333))); margin: 0 auto; overflow: hidden; border-radius: 4% / 5.3%; background: #000; box-shadow: 0 0 0 2px #000, 0 0 50px -12px var(--era); }
.screen canvas { display: block; width: 100%; height: 100%; }
.crt, .glass { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
.crt { display: none; background: repeating-linear-gradient(180deg, rgba(0, 0, 0, .28) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .65) 100%); }
html[data-crt="on"] .crt { display: block; }
html[data-crt="on"] .screen { border-radius: 7% / 9.3%; }
.glass { background: linear-gradient(160deg, rgba(255, 255, 255, .09) 0, rgba(255, 255, 255, 0) 30%); box-shadow: inset 0 0 50px 6px rgba(0, 0, 0, .5); }
html[data-crt="on"] .screen.power-on { animation: poweron .5s ease-out; }
@keyframes poweron { 0% { transform: scale(1, .004); filter: brightness(4); } 40% { transform: scale(1, .02); filter: brightness(2.5); } 100% { transform: none; filter: none; } }

/* control panel: a sloped deck with screws in the corners */
.panel {
  position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px 18px; margin: 12px -14px 0; padding: 18px 20px 14px;
  background: linear-gradient(180deg, #24212a 0, #1a181f 30%, #121015 100%); border-top: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 14px 20px -14px rgba(255, 255, 255, .08), inset 0 -2px 0 rgba(0, 0, 0, .6);
}
.panel::before, .panel::after { content: ""; position: absolute; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #8c8994, #3a3740 60%, #15131a); box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
.panel::before { left: 12px; } .panel::after { right: 12px; }
.panel-side { display: flex; align-items: center; justify-content: center; gap: 16px; }
.dial-wrap { text-align: center; }
.dial { position: relative; width: clamp(150px, 24vw, 176px); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.dial.is-turning { cursor: grabbing; }
.dial canvas { display: block; width: 100%; height: 100%; }
.dial:focus-visible { outline: 2px solid var(--era); outline-offset: 4px; border-radius: 50%; }
.dial-hint { margin: 4px 0 0; font: 400 .72rem var(--f-mono); letter-spacing: .04em; color: var(--ink-3); }

/* joystick (decorative; it leans while the dial spins) */
.stick { position: relative; width: 84px; height: 100px; }
.stick i { position: absolute; display: block; }
.stick-base { left: 4px; right: 4px; bottom: 0; height: 28px; border-radius: 50%; background: radial-gradient(ellipse at 50% 30%, #3a3742, #08070a); box-shadow: 0 3px 0 rgba(0, 0, 0, .6); }
.stick-shaft, .stick-ball { transform-origin: 50% 100%; transform: rotate(calc(var(--tilt, 0) * 18deg)); transition: transform .12s linear; }
.stick-shaft { left: 37px; bottom: 13px; width: 10px; height: 58px; border-radius: 5px; background: linear-gradient(90deg, #6f6c78, #e8e5ee 45%, #4b4853); }
.stick-ball { left: 23px; bottom: 58px; width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .7), var(--era) 40%, color-mix(in srgb, var(--era) 40%, #000) 100%); box-shadow: 0 6px 8px rgba(0, 0, 0, .45); transform-origin: 50% 160%; }

/* round arcade buttons (CRT + sound) with a silkscreened label underneath */
.arcade { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.arcade-btn { position: relative; width: 62px; height: 62px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: rgba(0, 0, 0, .7); background: radial-gradient(circle at 38% 30%, rgba(255, 255, 255, .55), var(--b, var(--era)) 42%, color-mix(in srgb, var(--b, var(--era)) 45%, #000) 100%); box-shadow: 0 0 0 4px #0b0a0d, 0 0 0 5px rgba(255, 255, 255, .08), 0 6px 0 4px #050406, 0 0 22px -4px var(--b, var(--era)); transition: transform .07s, box-shadow .07s, filter .2s; }
.arcade-btn.alt { --b: var(--era-2); }
.arcade-btn .ico { position: absolute; inset: 0; margin: auto; width: 24px; height: 24px; }
.arcade-btn[aria-pressed="false"] { filter: saturate(.15) brightness(.55); box-shadow: 0 0 0 4px #0b0a0d, 0 0 0 5px rgba(255, 255, 255, .08), 0 3px 0 4px #050406; transform: translateY(2px); }
.arcade-btn:active { transform: translateY(3px); }
.arcade-btn:focus-visible { outline-offset: 8px; border-radius: 50%; }
.arcade-lbl { font: 500 .62rem var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }

/* era chips: a row of labelled selector keys along the front edge of the deck */
.chips { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.chip { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; width: 100%; min-height: 52px; padding: 6px 4px 6px 12px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 6px; background: linear-gradient(180deg, #23202a, #17151c); color: var(--ink-2); text-align: left; cursor: pointer; box-shadow: 0 2px 0 #050406, inset 0 1px 0 rgba(255, 255, 255, .06); transition: transform .08s, background-color .2s, color .2s; }
.chip::before { content: ""; position: absolute; left: 5px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--c); opacity: .55; }
.chip-years { font: 500 .68rem var(--f-mono); letter-spacing: .02em; color: var(--ink-3); }
.chip-name { font: 700 .82rem/1.1 var(--f-display); letter-spacing: .01em; }
.chip:hover { color: var(--ink); }
.chip:active { transform: translateY(1px); }
.chip[aria-pressed="true"] { color: var(--ink); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, #1d1a22), #17151c); border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 1px 0 #050406, 0 0 18px -6px var(--c); transform: translateY(1px); }
.chip[aria-pressed="true"]::before { opacity: 1; box-shadow: 0 0 8px var(--c); }
.chip[aria-pressed="true"] .chip-years { color: var(--c); }

/* coin door: two lit FREE PLAY slots (desktop only) */
.coin-door { display: flex; justify-content: center; gap: 22px; margin: 0 -14px; padding: 12px 0 14px; background: linear-gradient(180deg, #0c0b0e, #131116); border-top: 1px solid #050406; border-radius: 0 0 10px 10px; }
.coin { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 6px; background: linear-gradient(180deg, #2c2a31, #1a181e); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 2px 0 #050406; }
.coin-slot { width: 6px; height: 22px; border-radius: 2px; background: #ff5a36; box-shadow: 0 0 10px rgba(255, 90, 54, .8), inset 0 0 0 1px rgba(0, 0, 0, .5); }
.coin-txt { font: 500 .6rem/1.35 var(--f-mono); letter-spacing: .14em; color: #c9c2b4; text-transform: uppercase; }
.coin-txt b { display: block; color: #ffb59f; font-weight: 500; }

/* ---------- shelf ---------- */
.shelf { max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--gutter) 0; scroll-margin-top: 8px; }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 20px; }
.shelf-head .eyebrow { margin-bottom: 6px; }
.shelf-sub { margin: 6px 0 0; color: var(--ink-3); font-size: .95rem; }
.shelf-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.shelf-more { margin: 22px 0 0; text-align: center; }

/* why strip */
.why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 36px); max-width: var(--wrap); margin: clamp(56px, 8vw, 104px) auto 0; padding: 0 var(--gutter); }
.why h2 { margin: 0 0 6px; font: 700 1.2rem/1.2 var(--f-display); }
.why p { margin: 0; color: var(--ink-2); font-size: .98rem; }
.why .eyebrow { margin-bottom: 10px; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 22px; }
  .hero-copy { gap: 12px; padding-top: 4px; }
  .hero-copy .h-display { max-width: 18ch; }
  .cabinet { width: min(100%, 600px); margin: 0 auto; }
}
@media (max-width: 719px) {
  .panel-side.left .stick { display: none; }
  .coin-door { display: none; }
  .cabinet { border-radius: 18px 18px 12px 12px; padding: 10px 10px 0; }
  .panel { margin: 10px -10px 0; padding: 18px 14px 14px; gap: 12px 10px; border-radius: 0 0 12px 12px; }
  .chips { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 4px -14px 0; padding: 2px 14px 6px; -webkit-overflow-scrolling: touch; }
  .chips::-webkit-scrollbar { display: none; }
  .chips li { flex: 0 0 auto; scroll-snap-align: start; }
  .chip { width: auto; min-width: 104px; min-height: 48px; }
  .why { grid-template-columns: 1fr; }
  .dial-hint { display: none; }
  .hero-cta { display: none; }
  .hero-copy .h-display { font-size: clamp(1.75rem, 1.2rem + 3vw, 2.4rem); }
  .hero-copy .lede { font-size: 1rem; }
  .hero-facts { display: none; }
}
@media (max-width: 400px) {
  .arcade-btn { width: 52px; height: 52px; }
  .arcade-btn .ico { width: 20px; height: 20px; }
  .dial { width: 148px; }
  .panel-side { gap: 0; }
}
/* phone in landscape: keep the cabinet short enough to see the screen and the dial together */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .hero-copy .lede, .hero-facts { display: none; }
  .hero-copy .h-display { font-size: 1.7rem; }
  .cabinet { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee.relight::before, .marquee.relight .wordmark { animation: none; }
  .stick-shaft, .stick-ball { transition: none; }
}

/* ---------- Today strip: the first thing on the page ---------- */
.today { max-width: var(--wrap); margin: 0 auto; padding: clamp(6px, 1.5vw, 18px) var(--gutter) 0; }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr); gap: 12px; min-height: 240px; }
.today-grid.has-recent { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, .9fr); }
.tcard { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px 16px 14px; border: 1px solid var(--rule); border-radius: var(--r-m); background: var(--room-2); overflow: hidden; }
.tcard::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--c, var(--era)); opacity: .9; }
.tcard-day { background: linear-gradient(180deg, color-mix(in srgb, var(--c, var(--era)) 9%, var(--room-2)), var(--room-2) 70%); border-color: color-mix(in srgb, var(--c, var(--era)) 32%, var(--rule)); }
.tcard-eyebrow { margin: 0; font: 500 .68rem/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--c, var(--era)); }
.tcard-wait { margin: 0; color: var(--ink-3); font-size: .95rem; }
.tcard-body { display: flex; gap: 14px; min-width: 0; flex: 1; }
.tcard-thumb { flex: none; width: 112px; height: 70px; object-fit: cover; border-radius: 6px; background: #000; box-shadow: 0 0 0 1px var(--rule); }
.tcard-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tcard-title { margin: 0; font: 700 1.3rem/1.1 var(--f-display); }
.tcard-title a { color: inherit; text-decoration: none; }
.tcard-title a:hover { text-decoration: underline; }
.tcard-meta { margin: 0; font: 400 .72rem/1.4 var(--f-mono); letter-spacing: .04em; color: var(--ink-3); }
.tcard-line { margin: 0; font-size: .95rem; line-height: 1.4; color: var(--ink-2); }
.tcard-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-top: auto; }
.tcard-foot .btn { --era: var(--c, var(--era)); --era-ink: #0a0a0c; }
.tcard-foot .btn-ghost { color: var(--ink); }
.tcard-clock { font: 400 .72rem var(--f-mono); letter-spacing: .04em; color: var(--ink-3); }
.recent-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.recent-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 3px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.recent-link:hover { background: rgba(241, 235, 223, .06); }
.recent-thumb { flex: none; width: 48px; height: 30px; object-fit: cover; border-radius: 3px; background: #000; box-shadow: 0 0 0 1px var(--rule); }
.recent-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.recent-txt b { font: 700 .95rem var(--f-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-txt small { font: 400 .68rem var(--f-mono); color: var(--ink-3); }
.today-ns { margin: 10px 0 0; color: var(--ink-3); }

/* ---------- the shelf's workshop row ---------- */
.workshop { margin-top: 26px; border: 1px solid var(--rule); border-radius: var(--r-m); background: rgba(21, 19, 26, .5); }
.workshop > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 18px; cursor: pointer; list-style: none; font: 500 .8rem var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); border-radius: var(--r-m); }
.workshop > summary::-webkit-details-marker { display: none; }
.workshop > summary::after { content: "+"; font-size: 1.2rem; color: var(--era); }
.workshop[open] > summary::after { content: "\2212"; }
.workshop > summary:hover { color: var(--ink); }
.workshop-grid { padding: 4px 16px 18px; }
.workshop-note { margin: 0; padding: 0 18px 14px; color: var(--ink-3); font-size: .92rem; }

@media (max-width: 1000px) {
  .today-grid, .today-grid.has-recent { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  /* reserve the loaded height so the placeholders do not cause layout shift */
  .tcard-day { min-height: 212px; }
  .tcard-week { min-height: 168px; }
  .tcard-recent { min-height: 150px; }
}
@media (max-width: 719px) {
  .today { padding-top: 4px; }
  .tcard { padding: 12px 12px 12px; gap: 8px; }
  .tcard-thumb { width: 88px; height: 55px; }
  .tcard-title { font-size: 1.15rem; }
  .tcard-note { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .tcard-foot .btn { flex: 1 1 auto; }
  .tcard-clock { flex: 1 1 100%; order: 3; }
  .recent-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workshop-grid { padding: 2px 10px 14px; }
}
