/* Korom Live: colours and type taken from the Korom Festival 5.0 posters. */
:root {
  --night: #071c22;        /* deepest background */
  --teal-ink: #0b2a31;
  --teal-deep: #103b45;
  --teal: #2a9d97;         /* logo dot / stage light */
  --teal-bright: #4fc2b8;
  --orange: #f08a24;       /* "FESTIVAL", tagline */
  --orange-hot: #ff9f3a;
  --coral: #e8553e;        /* 5.0 badge, PERFORMING pill */
  --cream: #f7ecd6;        /* logo + name stickers */
  --ink: #13202a;          /* outlines, text on cream */
  --text: #f7f1e6;
  --muted: #b5c4c4;
  --line: rgba(247, 236, 214, 0.14);
  --radius: 18px;
  --display: "Bungee", "Inter", system-ui, sans-serif;
  --marker: "Permanent Marker", "Bungee", cursive;
  --condensed: "Anton", "Impact", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--night); }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column; color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(70% 55% at 50% 18%, rgba(42, 157, 151, 0.28), transparent 70%),
    repeating-linear-gradient(135deg, rgba(240, 138, 36, 0.035) 0 22px, transparent 22px 64px),
    repeating-linear-gradient(45deg, rgba(42, 157, 151, 0.05) 0 18px, transparent 18px 70px),
    linear-gradient(180deg, var(--teal-ink) 0%, var(--night) 70%);
  overflow-x: hidden;
}
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Stage spotlights in the top corners, like the posters */
.spot { position: fixed; top: -120px; width: 46vw; height: 90vh; pointer-events: none; z-index: 0; filter: blur(8px); opacity: .55; }
.spot-l { left: -12vw; background: conic-gradient(from 160deg at 20% 0%, transparent 0deg, rgba(255, 140, 50, .55) 12deg, transparent 34deg); }
.spot-r { right: -12vw; background: conic-gradient(from 200deg at 80% 0%, transparent 0deg, rgba(255, 140, 50, .55) 12deg, transparent 34deg); transform: scaleX(-1); }

/* ---------- wordmark ---------- */
.wordmark {
  font-family: var(--display); color: var(--cream); letter-spacing: .02em; line-height: 1;
  text-shadow: 0 3px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink), 4px 5px 0 rgba(0, 0, 0, .35);
}
.wordmark .o { position: relative; display: inline-block; }
.wordmark .o::after {
  content: ""; position: absolute; left: 50%; top: 52%; width: .34em; height: .34em; border-radius: 50%;
  transform: translate(-50%, -50%); box-shadow: 0 0 0 2px var(--ink);
}
.o-teal::after { background: var(--teal-bright); }
.o-coral::after { background: var(--coral); }
.live-word {
  font-family: var(--marker); color: var(--orange); text-transform: uppercase; line-height: 1;
  text-shadow: 2px 2px 0 var(--ink), -1px -1px 0 var(--ink), 3px 4px 0 rgba(0, 0, 0, .35);
  transform: rotate(-4deg); display: inline-block;
}
.badge {
  font: 700 12px/1 Inter, sans-serif; background: var(--coral); color: #fff; padding: 4px 6px; border-radius: 5px;
  box-shadow: 0 0 0 2px var(--ink), 0 2px 0 3px rgba(0, 0, 0, .25);
}

/* ---------- header ---------- */
.top {
  position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; max-width: 1240px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-left));
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .wordmark { font-size: 28px; }
.brand .live-word { font-size: 24px; margin-left: -2px; }
.top-right { display: flex; align-items: center; gap: 12px; }
.tickets-link {
  font-size: 13px; font-weight: 700; text-decoration: none; padding: 7px 12px; border-radius: 999px;
  border: 1.5px solid var(--line); color: var(--cream);
}
.tickets-link:hover { border-color: var(--orange); color: var(--orange); }
.pill {
  font-size: 12px; font-weight: 800; letter-spacing: .1em; padding: 5px 11px 5px 23px; border-radius: 999px;
  background: var(--coral); color: #fff; position: relative; box-shadow: 0 0 0 2px var(--ink);
}
.pill::before {
  content: ""; position: absolute; left: 10px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%; background: #fff; animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- page ---------- */
.page { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px 32px; }

.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 4px 2px 14px; }
.tag {
  font-family: var(--condensed); font-size: 18px; letter-spacing: .02em; text-transform: uppercase;
  background: var(--orange); color: var(--ink); padding: 3px 10px 2px; box-shadow: 3px 3px 0 var(--ink);
}
.when {
  font-family: var(--condensed); font-size: 20px; letter-spacing: .03em; text-transform: uppercase; color: var(--cream);
  text-shadow: 2px 2px 0 var(--ink);
}
.when i { color: var(--orange); font-style: normal; padding: 0 2px; }

/* ---------- stage ---------- */
.stage {
  position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; isolation: isolate;
  border-radius: var(--radius); border: 3px solid var(--cream);
  box-shadow: 0 0 0 3px var(--ink), 10px 12px 0 rgba(0, 0, 0, .35), 0 0 80px rgba(42, 157, 151, .25);
  background: #000 url("img/hero.jpg") center 30% / cover no-repeat;
}
.stage::before { /* dim + blur the poster behind the paywall */
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(90deg, rgba(7, 28, 34, .94) 0%, rgba(7, 28, 34, .78) 48%, rgba(7, 28, 34, .25) 100%);
  backdrop-filter: blur(2px);
}
.stage video { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; background: #000; }
.stage:not(.playing) video { opacity: 0; }
.stage.playing::before { display: none; }
.stage.idle { cursor: none; }

.watermark {
  position: absolute; z-index: 2; pointer-events: none; user-select: none;
  font-size: clamp(10px, 1.3vw, 14px); font-weight: 700; letter-spacing: .06em;
  color: rgba(255, 255, 255, .16); text-shadow: 0 1px 2px rgba(0, 0, 0, .35); transition: top 1.2s ease, left 1.2s ease;
}

.panel { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; padding: clamp(18px, 4vw, 52px); }
.panel.soft { justify-content: center; background: rgba(7, 28, 34, .72); }
#confirming { justify-content: center; background: rgba(7, 28, 34, .8); }
.panel-inner { width: min(470px, 100%); }
.panel-inner.center { text-align: center; display: grid; justify-items: center; gap: 6px; }
.panel h2 { font-family: var(--condensed); font-weight: 400; font-size: 30px; letter-spacing: .02em; text-transform: uppercase; margin: 10px 0 0; color: var(--cream); text-shadow: 2px 2px 0 var(--ink); }
.sub { color: var(--muted); margin: 0; }

.panel-logo { margin: 8px 0 6px; display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; font-weight: 400; }
.wordmark.big { font-size: clamp(44px, 7vw, 76px); text-shadow: 0 5px 0 var(--ink), 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 -3px 0 var(--ink), 7px 9px 0 rgba(0, 0, 0, .35); }
.live-word.big { font-size: clamp(34px, 5vw, 56px); margin-bottom: -2px; }
#eventSubtitle { font-weight: 600; color: var(--cream); opacity: .9; }

.status-chip {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink); background: var(--cream); padding: 4px 10px; border-radius: 999px;
}
.status-chip.live { background: var(--coral); color: #fff; }
.status-chip.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.6s infinite; }

.price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 16px 0 14px; }
#priceMain { font-family: var(--condensed); font-size: clamp(38px, 5vw, 54px); line-height: 1; color: var(--cream); text-shadow: 3px 3px 0 var(--ink); letter-spacing: .01em; }
.price-note { color: var(--muted); font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 18px; border-radius: 12px;
  border: 2px solid var(--line); background: rgba(247, 236, 214, .07); color: var(--text); font-weight: 700; cursor: pointer;
  text-decoration: none; transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { background: rgba(247, 236, 214, .13); }
.btn:active { transform: translate(2px, 2px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.primary { background: var(--orange); border-color: var(--ink); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn.primary:hover { background: var(--orange-hot); }
.btn.primary:active { box-shadow: 2px 2px 0 var(--ink); }
.btn.big { width: 100%; padding: 15px 18px; font-size: 17px; font-weight: 800; letter-spacing: .01em; border-radius: 14px; }

.perks { list-style: none; padding: 0; margin: 16px 0 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; color: var(--muted); font-size: 13px; }
.perks li { display: flex; gap: 7px; align-items: baseline; }
.perks li::before { content: "●"; color: var(--teal-bright); font-size: 9px; }

.link { background: none; border: 0; padding: 8px 0 0; color: var(--cream); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--orange); cursor: pointer; }
.code-form { display: flex; gap: 8px; margin-top: 10px; }
.code-form input {
  flex: 1; min-width: 0; padding: 11px 14px; border-radius: 12px; border: 2px solid var(--line);
  background: rgba(0, 0, 0, .35); color: var(--cream); font: 700 17px/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: .14em; text-transform: uppercase;
}
.code-form input:focus { outline: none; border-color: var(--orange); }
.link.subtle { display: block; font-size: 13px; opacity: .85; }
.ok-msg { color: var(--teal-bright); font-size: 13.5px; margin: 6px 0 0; min-height: 0; }
.ok-msg:empty { display: none; }
.pass-email { margin-top: 8px; }
.mini-link { border: 0; background: none; padding: 0; color: var(--coral); font-weight: 800; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.email-form { display: flex; gap: 6px; margin-top: 6px; }
.email-form input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--ink); background: #fff; color: var(--ink); font: 600 14px/1.2 Inter, sans-serif; }
.email-form input:focus { outline: 2px solid var(--orange); outline-offset: 1px; }
.email-form .btn { padding: 8px 14px; box-shadow: 2px 2px 0 var(--ink); }
.email-status { display: block; font-size: 12px; font-weight: 700; margin-top: 4px; }
.email-status:empty { display: none; }
.email-status.err { color: #b3261e; }
.error { color: #ffb4a6; min-height: 1.5em; margin: 8px 0 0; font-size: 13.5px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }

.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid rgba(247, 236, 214, .16); border-top-color: var(--orange); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.buffering { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; pointer-events: none; }

.unmute {
  position: absolute; z-index: 6; left: 50%; top: 16px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; border: 2px solid var(--ink); background: var(--cream); color: var(--ink);
  font-weight: 800; cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
}
.unmute svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- controls ---------- */
.controls {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 6px;
  padding: 30px 12px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); transition: opacity .25s ease;
}
.stage.idle .controls { opacity: 0; pointer-events: none; }
.spacer { flex: 1; }
.icon { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.icon:hover { background: rgba(255, 255, 255, .12); }
.icon svg { width: 22px; height: 22px; fill: #fff; }
#playBtn .i-play, #playBtn.paused .i-pause, #muteBtn .i-muted, #muteBtn.muted .i-vol { display: none; }
#playBtn.paused .i-play, #muteBtn.muted .i-muted { display: block; }
.volume { width: 90px; accent-color: var(--orange); }
.live-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; font-size: 12px; font-weight: 800; letter-spacing: .1em; padding: 6px 8px; border-radius: 8px; color: #fff; }
.live-btn i { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.live-btn.behind, .live-btn.behind i { color: var(--muted); }
.live-btn.behind i { background: var(--muted); }
.chip { border: 1.5px solid rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .35); border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 700; cursor: pointer; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; bottom: calc(100% + 8px); min-width: 160px; padding: 6px; background: rgba(11, 42, 49, .98); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink); }
.menu button { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; font-size: 14px; }
.menu button:hover { background: rgba(247, 236, 214, .08); }
.menu button[aria-checked="true"]::after { content: "●"; color: var(--orange); }
.menu small { color: var(--muted); }

/* ---------- details + pass ---------- */
.details { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; padding: 20px 2px 0; }
.details h2 { margin: 0 0 2px; font-family: var(--condensed); font-weight: 400; font-size: 28px; letter-spacing: .02em; text-transform: uppercase; color: var(--cream); text-shadow: 2px 2px 0 var(--ink); }
.spaces {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 10px; border: 2px solid var(--coral); background: var(--teal-ink);
}
.spaces em { font-family: var(--condensed); font-style: normal; font-size: 16px; letter-spacing: .04em; color: var(--cream); }
.pass-card { display: flex; align-items: center; gap: 18px; padding: 12px 16px; border-radius: 14px; background: var(--cream); color: var(--ink); box-shadow: 0 0 0 2px var(--ink), 5px 5px 0 var(--ink); }
.pass-card .label { display: block; font-size: 12px; font-weight: 700; opacity: .7; }
.pass-card .code { white-space: nowrap; border: 0; background: none; padding: 2px 0; cursor: copy; color: var(--ink); font: 800 21px/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .14em; }
.pass-card .hint { display: block; font-size: 12px; opacity: .7; }
.expires { font-size: 12.5px; font-weight: 700; white-space: nowrap; color: var(--coral); }

/* ---------- lineup ---------- */
.lineup { margin-top: 38px; }
.section-head { display: flex; align-items: center; gap: 12px; margin: 0 2px 14px; }
.section-head h2 { margin: 0; font-family: var(--marker); font-weight: 400; font-size: clamp(28px, 4vw, 40px); color: var(--cream); text-shadow: 3px 3px 0 var(--ink); }
.perf-pill { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; background: var(--coral); color: #fff; padding: 6px 12px; border-radius: 10px; box-shadow: 0 0 0 2px var(--cream); }
.posters {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 18px; scrollbar-width: thin; scrollbar-color: var(--teal) transparent;
}
.poster { margin: 0; position: relative; scroll-snap-align: start; border-radius: 14px; overflow: hidden; border: 3px solid var(--cream); box-shadow: 0 0 0 2px var(--ink), 6px 6px 0 rgba(0, 0, 0, .4); background: var(--teal-deep); transition: transform .2s ease; }
.poster:hover { transform: translateY(-4px) rotate(-.6deg); }
.poster img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
/* Names are already on the posters; keep the caption for screen readers only. */
.poster figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; padding: 11px 16px; border-radius: 12px; background: var(--cream); color: var(--ink); font-weight: 700; box-shadow: 0 0 0 2px var(--ink), 4px 4px 0 var(--ink); max-width: calc(100% - 32px); }
.foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: center; text-align: center; color: #7f9696; font-size: 12px; padding: 18px 16px 24px; }
.foot b { color: var(--cream); }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .brand .wordmark { font-size: 22px; }
  .brand .live-word { font-size: 19px; }
  .tickets-link { display: none; }
  .page { padding: 0 0 28px; }
  .hero-meta { margin: 0 16px 12px; }
  .when { font-size: 17px; }
  .stage { border-radius: 0; border-left: 0; border-right: 0; aspect-ratio: auto; min-height: 560px; box-shadow: 0 0 0 0 transparent; background-position: center 18%; }
  .stage::before { background: linear-gradient(0deg, rgba(7, 28, 34, .97) 0%, rgba(7, 28, 34, .86) 55%, rgba(7, 28, 34, .35) 100%); }
  .stage.playing { min-height: 0; aspect-ratio: 16 / 9; }
  .panel { align-items: flex-end; padding: 22px 18px; }
  .perks { grid-template-columns: 1fr; }
  .volume, #pipBtn { display: none; }
  .details { padding: 18px 16px 0; }
  .pass-card { width: 100%; flex-wrap: wrap; gap: 6px 18px; }
  .lineup { margin-top: 30px; }
  .section-head { margin: 0 16px 12px; }
  .posters { grid-auto-columns: 68%; padding: 4px 16px 18px; }
}
@media (max-width: 760px) and (orientation: landscape) { .stage.playing { height: 100dvh; aspect-ratio: auto; } }
:fullscreen .stage, .stage:fullscreen { border-radius: 0; border: 0; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
/* The recovery form reuses .code-form; emails aren't codes */
#recoverInput { font: 600 15px/1.2 Inter, system-ui, sans-serif; letter-spacing: normal; text-transform: none; }
