/*
  Direction
  Product:   Pompatour, a first-person rhythm horror shooter for PC. This page says the site is on its way and where to follow.
  Character: showy, uneasy, precise.
  World:     an old theater lobby after hours: velvet, brass bulbs, paper tickets.
  Moment:    the lit marquee sign with the title, after the curtains part. Nothing else glows.
  Signature: the chasing bulb row, used on the marquee only. It answers the pointer, and now and then it misbehaves.
*/

@font-face {
  font-family: "Limelight";
  src: url("fonts/limelight-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* One warm-neutral ramp, three text roles, one accent */
  --page: #0b0a0c;
  --card: #121014;
  --hairline: rgba(243, 234, 215, 0.12);
  --text: #f3ead7;        /* primary */
  --text-2: #b9bcc4;      /* secondary */
  --text-3: #85858b;      /* muted, meta only */
  --accent: #d1328f;      /* selection and hover only */
  --bulb: #ffcf70;
  --bulb-glow: rgba(255, 190, 90, 0.4);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  background: var(--page);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  overflow-x: hidden;
}

/* Curtains: two full panels that part once on load and rest as velvet at both edges */
.curtain {
  --peek: clamp(24px, 8vw, 168px);
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: calc(50vw + 1px);
  background: repeating-linear-gradient(
    90deg,
    #17090f 0px, #2a0d1b 16px, #12070c 32px, #230b17 48px
  );
  pointer-events: none;
}
.curtain-left {
  --rest: calc(var(--peek) - 50vw - 1px);
  left: 0;
  transform: translateX(var(--rest));
  box-shadow: inset -1px 0 0 var(--hairline);
  animation: part-left 1800ms var(--ease) 300ms both;
}
.curtain-right {
  --rest: calc(50vw + 1px - var(--peek));
  right: 0;
  transform: translateX(var(--rest));
  box-shadow: inset 1px 0 0 var(--hairline);
  animation: part-right 1800ms var(--ease) 300ms both;
}
@keyframes part-left  { from { transform: translateX(0); } to { transform: translateX(var(--rest)); } }
@keyframes part-right { from { transform: translateX(0); } to { transform: translateX(var(--rest)); } }

.stage {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 48px clamp(36px, 14vw, 192px) 64px;
}

/* Marquee frame */
.marquee {
  position: relative;
  width: min(100%, 760px);
  padding: clamp(40px, 7vw, 72px) clamp(24px, 5vw, 48px);
  text-align: center;
  border: 1px solid var(--hairline);
  background: var(--card);
  animation: rise 400ms var(--ease) 900ms both;
}

/* Two interleaved rows of bulbs that take turns lighting up */
.bulbs {
  position: absolute;
  inset: 12px;
  pointer-events: none;
  --dot: radial-gradient(circle, var(--bulb) 0 3px, var(--bulb-glow) 4px, transparent 7px);
  background:
    var(--dot) top left / 48px 16px repeat-x,
    var(--dot) bottom left / 48px 16px repeat-x,
    var(--dot) top left / 16px 48px repeat-y,
    var(--dot) top right / 16px 48px repeat-y;
}
.bulbs-b {
  background-position: 24px top, 24px bottom, left 24px, right 24px;
  animation: chase 1600ms steps(1, end) infinite;
}
.bulbs-a { animation: chase 1600ms steps(1, end) infinite reverse; }

@keyframes chase {
  0%   { opacity: 1; }
  50%  { opacity: 0.12; }
  100% { opacity: 1; }
}

/* Cursor and touch light: the same bulbs at full brightness, revealed around the pointer */
.bulbs-hot {
  --dot-hot: radial-gradient(circle, #fff1c9 0 3px, var(--bulb) 3.5px 4px, var(--bulb-glow) 5px, transparent 8px);
  background:
    var(--dot-hot) 12px top / 24px 16px repeat-x,
    var(--dot-hot) 12px bottom / 24px 16px repeat-x,
    var(--dot-hot) 0 12px / 16px 24px repeat-y,
    var(--dot-hot) 100% 12px / 16px 24px repeat-y;
  -webkit-mask-image: radial-gradient(circle 110px at var(--mx, -999px) var(--my, -999px), #000 0%, transparent 100%);
  mask-image: radial-gradient(circle 110px at var(--mx, -999px) var(--my, -999px), #000 0%, transparent 100%);
  transition: opacity 150ms var(--ease);
}
.marquee.is-pulse .bulbs-hot {
  -webkit-mask-image: none;
  mask-image: none;
  opacity: 0.7;
}

/* A bulb that has gone out for a while */
.dead {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--card);
  pointer-events: none;
  opacity: 0;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Type: labels 12/16, subhead 20/28, hero headline from the scale */
.kicker {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.01em;
  color: var(--text-2);
}

.title {
  margin: 0;
  font-family: "Limelight", Georgia, "Times New Roman", serif;  /* marquee lettering, the one display face */
  font-size: clamp(26px, 7.2vw, 72px);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--text);
}

.title .ch {
  transition: color 300ms var(--ease);
  animation: strike 520ms steps(1, end) calc(1300ms + var(--i, 0) * 90ms) both;
}
@keyframes strike {
  0%   { opacity: 0; }
  18%  { opacity: 1; }
  34%  { opacity: 0.2; }
  52%  { opacity: 1; }
  70%  { opacity: 0.5; }
  100% { opacity: 1; }
}
.title .ch.lit, .title.cheer .ch { color: var(--bulb); }

.rule {
  width: 80px;
  height: 1px;
  margin: 24px auto;
  background: var(--hairline);
}

.soon {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: 0.01em;
  color: var(--text);
}

/* Ticket-stub links. The notch mask sits on a pseudo-element so the focus ring is not clipped. */
.stubs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.stub {
  --notch: radial-gradient(circle 8px at 0 50%, transparent 98%, #000 100%) left / 51% 100% no-repeat,
           radial-gradient(circle 8px at 100% 50%, transparent 98%, #000 100%) right / 51% 100% no-repeat;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 24px;
  color: var(--page);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition:
    color 150ms var(--ease),
    transform 150ms var(--ease);
}
.stub::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--text);
  -webkit-mask: var(--notch);
  mask: var(--notch);
  transition: background-color 150ms var(--ease);
}
.stub:hover, .stub:focus-visible { color: #fff; }
.stub:hover::before, .stub:focus-visible::before { background: var(--accent); }
.stub:active { transform: scale(0.98); }
.stub:focus-visible { outline: 2px solid var(--bulb); outline-offset: 4px; }

.foot {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.01em;
  color: var(--text-3);
  text-align: center;
}

.kicker { animation: rise 400ms var(--ease) 2200ms both; }
.rule   { animation: rise 400ms var(--ease) 2300ms both; }
.soon   { animation: rise 400ms var(--ease) 2500ms both; }
.stubs, .play, .foot { animation: rise 400ms var(--ease) 2800ms both; }

/* With scripting on, hold every entrance until the page and the title font are ready */
.js:not(.ready) .curtain,
.js:not(.ready) .marquee,
.js:not(.ready) .kicker,
.js:not(.ready) .rule,
.js:not(.ready) .soon,
.js:not(.ready) .ch,
.js:not(.ready) .stubs,
.js:not(.ready) .play,
.js:not(.ready) .foot { animation-play-state: paused; }

/* Tap the beat: opens under the marquee. Silent. */
.beat {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 400ms var(--ease);
}
.beat[data-open="true"] { grid-template-rows: 1fr; }
.beat-inner {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
}
.beat[data-open="true"] .beat-inner { padding: 20px 24px 8px; }
.beat-pad {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--text-2);
  border-radius: 50%;
  background: var(--card);
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 150ms var(--ease), transform 150ms var(--ease);
}
.beat-pad:hover, .beat-pad:focus-visible { border-color: var(--accent); }
.beat-pad:active { transform: scale(0.98); }
.beat-pad:focus-visible { outline: 2px solid var(--bulb); outline-offset: 4px; }
.ring {
  position: absolute;
  inset: -1px;
  border: 1px solid var(--bulb);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.grade {
  flex: none;
  height: 20px;
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.01em;
  color: var(--text-2);
  opacity: 0;
}
.grade[data-grade="Showstopper"] { color: var(--text); }
.grade[data-grade="Flop"] { color: var(--text-3); }

.play {
  padding: 8px 12px;
  border: 0;
  background: none;
  color: var(--text-2);
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-underline-offset: 4px;
  transition: color 150ms var(--ease);
}
.play:hover, .play:focus-visible { color: var(--text); }
.play:focus-visible { outline: 2px solid var(--bulb); outline-offset: 4px; }
.play[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .curtain, .marquee, .kicker, .rule, .soon, .ch, .stubs, .play, .foot { animation: none; }
  .bulbs-a, .bulbs-b { animation: none; }
  .stub, .stub::before, .title .ch, .bulbs-hot { transition: none; }
}
