/* I See No Light: one screen. The game's own type (Corokaz, Bowlby One SC), one accent (ember); controls are pills. */

@font-face { font-family: "Corokaz"; src: url("../assets/fonts/corokaz.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Bowlby One SC"; src: url("../assets/fonts/bowlby-one-sc.woff2") format("woff2"); font-display: swap; }

:root {
  color-scheme: dark;
  --bone: #f0e1c7;
  --ember-hi: #ffc07a;
  --ember-ink: #1c0d04;
  --line: rgba(240, 225, 199, .22);
  --display: "Corokaz", "Bowlby One SC", ui-sans-serif, system-ui, sans-serif;
  --label: "Bowlby One SC", ui-sans-serif, system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: #000; color: var(--bone); font-family: var(--display); -webkit-font-smoothing: antialiased; overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
h1, p { margin: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--ember-hi); color: var(--ember-ink); }
:focus-visible { outline: 2px solid var(--ember-hi); outline-offset: 4px; }

.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  font-family: var(--label); text-transform: uppercase; letter-spacing: .06em; text-decoration: none;
  transition: transform .25s var(--ease), border-color .25s;
}
.chip:active { transform: translateY(1px) scale(.98); }
.chip {
  height: 40px; padding: 0 16px; font-size: .68rem; color: var(--bone);
  border-color: var(--line); background: rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.chip:hover { border-color: rgba(255, 157, 74, .6); }
.chip[aria-pressed="true"] { border-color: rgba(255, 157, 74, .7); color: var(--ember-hi); }
.chip__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.chip__bars i { width: 2px; height: 4px; background: currentColor; }
.chip[aria-pressed="true"] .chip__bars i { animation: bars 1s var(--ease) infinite alternate; }
.chip[aria-pressed="true"] .chip__bars i:nth-child(2) { animation-delay: -.4s; }
.chip[aria-pressed="true"] .chip__bars i:nth-child(3) { animation-delay: -.7s; }
@keyframes bars { from { height: 3px; } to { height: 12px; } }

/* The main menu, alive. */
.hero { position: relative; height: 100dvh; overflow: hidden; isolation: isolate; }
.stage { position: absolute; inset: 0; }
.stage__canvas, .stage__poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage__poster { object-fit: cover; object-position: 51% 46%; transform: scale(1.12); transition: opacity 1.1s ease; }
.hero.is-live .stage__poster { opacity: 0; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 40%; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0));
}

.sound { position: absolute; z-index: 2; top: calc(14px + env(safe-area-inset-top)); right: var(--gutter); }

.hero__title {
  position: absolute; z-index: 2; left: 50%; top: calc(54px + 1vh);
  width: min(56vw, 86vh, 1040px); transform: translateX(-50%);
}
.hero__title img { position: relative; width: 100%; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .7)); }
.hero__glow {
  position: absolute; inset: -30% -10% -50%; opacity: .6; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 70%, rgba(255, 150, 60, .28), rgba(255, 120, 40, 0) 70%);
}

.hero__soon {
  position: absolute; z-index: 2; left: 50%; bottom: calc(clamp(28px, 7vh, 72px) + env(safe-area-inset-bottom));
  transform: translateX(-50%); display: grid; justify-items: center; gap: clamp(18px, 3vh, 30px);
}
.hero__studio { width: clamp(96px, 9vw, 132px); opacity: .9; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .8)); }
.hero__coming {
  font-size: clamp(2rem, 3.6vw, 3.2rem); line-height: 1; color: var(--ember-hi); white-space: nowrap;
  text-shadow: 0 0 22px rgba(255, 140, 50, .75), 0 2px 10px rgba(0, 0, 0, .9);
}

/* Phones held upright: the painting on top, the words beneath it (matches stage.js). */
@media (max-aspect-ratio: 4/5) {
  .stage__poster { height: 74dvh; object-position: 51% 50%; transform: none;
    -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
  .hero__title { width: 86vw; top: calc(66px + env(safe-area-inset-top)); }
  .hero::after { height: 34%; background: linear-gradient(to top, #000 55%, rgba(0, 0, 0, 0)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .stage__poster { transition: none; }
}
