/* iPhone and iPad lineup in the hero. Each device plays a real level live. */

.hero-devices { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(24px, 4vw, 56px); padding-top: clamp(8px, 2vw, 24px); padding-bottom: clamp(80px, 6.5vw, 96px); } /* Leaves room for the device shadows, because .hero clips its overflow. */

.devices-copy { display: grid; gap: 14px; justify-items: start; padding: clamp(20px, 2.4vw, 30px); border: 1.5px solid var(--glass-edge); border-radius: 28px; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 14px 32px var(--shade); }
.hero .devices-copy .kicker { order: 0; color: var(--ink-soft); font-size: .8rem; text-shadow: none; }
.devices-title { font-family: var(--display); font-size: clamp(2rem, 3.2vw, 3rem); font-weight: 700; line-height: 1.02; letter-spacing: -.01em; text-wrap: balance; }
.devices-copy > p:not(.kicker) { line-height: 1.45; }

.device-controls { display: grid; gap: 10px; width: 100%; }
.device-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.device-chip, .device-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 6px 13px; border: 1.5px solid rgba(35, 26, 82, .16); border-radius: 14px; background: #fff; color: var(--ink); font-family: var(--display); font-size: .95rem; font-weight: 600; line-height: 1.1; cursor: pointer; transition: background .16s ease, border-color .16s ease, color .16s ease; }
.device-chip::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.device-chip:hover { border-color: var(--c); }
.device-chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.device-chip[aria-pressed="true"]::before { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85); }
.device-toggle { justify-self: start; min-height: 44px; border-color: transparent; background: transparent; color: var(--ink-soft); padding-inline: 6px; }
.device-toggle:hover { color: var(--ink); }
.device-toggle svg { width: 15px; height: 15px; fill: currentColor; }

.device-stage { position: relative; width: min(100%, 760px); margin-inline: auto; aspect-ratio: 1 / .72; container-type: inline-size; }
.device { position: absolute; background: #120c2c; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .34), 0 24px 46px rgba(35, 26, 82, .4); }
.device-screen { --u: 1cqw; position: relative; isolation: isolate; overflow: hidden; container-type: inline-size; background: #1b0b52; }
.device-tablet .device-screen { --u: .66cqw; }
.device-screen img, .device-screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.device-screen img { object-fit: cover; }
.device-screen.live img { display: none; }
.device-screen img.shot-in { animation: shot-in .5s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes shot-in { from { transform: translateY(100%); } }
.device-phone .device-screen::after { content: ""; position: absolute; z-index: 4; top: calc(var(--u) * 2.6); left: 50%; width: calc(var(--u) * 29); height: calc(var(--u) * 8.4); border-radius: 99px; background: #0b0820; transform: translateX(-50%); }

/* The game's HUD, drawn over the live board. */
.game-top, .game-score, .game-tools, .game-win { position: absolute; z-index: 2; font-family: var(--display); pointer-events: none; }
.game-icon { fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.game-top { top: calc(var(--u) * 15); left: calc(var(--u) * 5); right: calc(var(--u) * 5); display: flex; align-items: center; justify-content: space-between; color: var(--ink); }
.device-tablet .game-top { top: calc(var(--u) * 5); }
.game-round { display: grid; place-items: center; width: calc(var(--u) * 10); height: calc(var(--u) * 10); border-radius: 50%; background: rgba(255, 255, 255, .92); }
.game-round .game-icon { width: calc(var(--u) * 5.6); height: calc(var(--u) * 5.6); }
.game-pill { display: grid; justify-items: center; padding: calc(var(--u) * 1.3) calc(var(--u) * 5.5); border-radius: calc(var(--u) * 5); background: rgba(255, 255, 255, .92); line-height: 1.12; }
.game-pill b { font-size: calc(var(--u) * 3.7); font-weight: 700; white-space: nowrap; }
.game-pill small { color: var(--ink-soft); font-size: calc(var(--u) * 2.7); font-weight: 500; }
.game-score { top: calc(var(--u) * 28); left: 0; right: 0; display: grid; justify-items: center; gap: calc(var(--u) * .5); color: #fff; text-shadow: 0 calc(var(--u) * .5) 0 rgba(35, 26, 82, .55); }
.device-tablet .game-score { top: calc(var(--u) * 17); }
.game-stars { display: flex; gap: calc(var(--u) * .8); }
.game-stars svg { width: calc(var(--u) * 5.6); height: calc(var(--u) * 5.6); fill: var(--sun); }
.game-stars svg.off { fill: rgba(255, 255, 255, .42); }
.game-moves { font-size: calc(var(--u) * 13); font-weight: 700; line-height: .95; font-variant-numeric: tabular-nums; }
.game-score small { font-size: calc(var(--u) * 2.6); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.game-par { padding: calc(var(--u) * .4) calc(var(--u) * 2.6); border-radius: calc(var(--u) * 2); background: rgba(35, 26, 82, .5); font-size: calc(var(--u) * 2.7); font-weight: 600; text-shadow: none; }
.game-tools { bottom: calc(var(--u) * 6); left: 0; right: 0; display: flex; align-items: flex-end; justify-content: center; gap: calc(var(--u) * 3); color: var(--ink); font-size: calc(var(--u) * 2.5); font-weight: 600; transition: opacity .2s ease; }
.game-tools span { display: grid; place-items: center; align-content: center; gap: calc(var(--u) * .4); width: calc(var(--u) * 15); height: calc(var(--u) * 15); border-radius: calc(var(--u) * 4.4); background: #fff; box-shadow: 0 calc(var(--u) * 1) 0 #c9c3df; }
.game-tools .game-hint { width: calc(var(--u) * 17); height: calc(var(--u) * 17); background: linear-gradient(180deg, var(--sun), var(--sun-deep)); box-shadow: 0 calc(var(--u) * 1) 0 var(--sun-edge); }
.game-tools .game-icon { width: calc(var(--u) * 5.4); height: calc(var(--u) * 5.4); }
.device-screen.won .game-tools { opacity: 0; }
.game-win { bottom: calc(var(--u) * 7); left: calc(var(--u) * 7); right: calc(var(--u) * 7); display: grid; justify-items: center; gap: calc(var(--u) * .8); padding: calc(var(--u) * 4) calc(var(--u) * 3); border-radius: calc(var(--u) * 6); background: rgba(255, 252, 248, .97); box-shadow: 0 calc(var(--u) * 3) calc(var(--u) * 8) rgba(35, 26, 82, .36); color: var(--ink); text-align: center; animation: game-win-in .42s cubic-bezier(.2, 1.4, .4, 1); }
.device-tablet .game-win { left: 20%; right: 20%; }
.game-win-stars { display: flex; align-items: flex-end; gap: calc(var(--u) * .6); margin-top: calc(var(--u) * -10); }
.game-win-stars svg { width: calc(var(--u) * 10); height: calc(var(--u) * 10); fill: var(--sun); stroke: #fff; stroke-width: 1.6; paint-order: stroke; }
.game-win-stars svg:nth-child(2) { width: calc(var(--u) * 13); height: calc(var(--u) * 13); }
.game-win-stars svg.off { fill: #ded9ee; }
.game-win b { font-size: calc(var(--u) * 6); font-weight: 700; line-height: 1; }
.game-win small { color: var(--ink-soft); font-size: calc(var(--u) * 3); font-weight: 500; }
@keyframes game-win-in { from { opacity: 0; transform: translateY(calc(var(--u) * 5)) scale(.92); } }

.device-tablet { z-index: 1; top: 1cqw; left: 24cqw; width: 52cqw; padding: 1.2cqw; border-radius: 3.6cqw; }
.device-tablet .device-screen { aspect-ratio: 2064 / 2752; border-radius: 2.4cqw; }
.device-phone { z-index: 2; bottom: 2.4cqw; width: 25.5cqw; padding: .9cqw; border-radius: 4.5cqw; }
.device-phone .device-screen { aspect-ratio: 1320 / 2868; border-radius: 3.7cqw; }
.device-left { left: 4cqw; transform: rotate(-4deg); }
.device-right { right: 4cqw; transform: rotate(4deg); }

@media (max-width: 1020px) {
  .hero-devices { grid-template-columns: minmax(0, 1fr); }
  .devices-copy { justify-items: center; text-align: center; }
  .device-chips { justify-content: center; }
  .device-toggle { justify-self: center; }
}

@media (max-width: 620px) {
  .devices-copy { gap: 10px; padding: 18px 16px 10px; }
  .device-controls { gap: 2px; }
  .device-chips { gap: 5px; }
  .device-chip { gap: 5px; padding: 6px 9px; font-size: .88rem; }
  .device-chip::before { width: 8px; height: 8px; }
  .device-stage { aspect-ratio: 1 / .93; }
  .device-tablet { left: 17cqw; width: 66cqw; padding: 1.5cqw; border-radius: 4.6cqw; }
  .device-tablet .device-screen { border-radius: 3.2cqw; }
  .device-phone { bottom: 2cqw; width: 27cqw; padding: 1cqw; border-radius: 5cqw; }
  .device-phone .device-screen { border-radius: 4.1cqw; }
  .device-left { left: 1.5cqw; }
  .device-right { right: 1.5cqw; }
}
