/* Khaos Karnival — worn ticket styles. Blood, black, tarnished silver. */

:root {
  --bg: #050203;
  --bg-mid: #120406;
  --ticket: #14080a;
  --ticket-2: #1a0c0e;
  --gold: #8a7340;          /* minor brass accent only */
  --gold-bright: #c4a35a;
  --gold-dim: #5a4a22;
  --bone: #d8d0c4;
  --bone-dim: #9a9084;
  --crimson: #9b1020;
  --crimson-deep: #5a080e;
  --blood: #6a0008;
  --silver: #c8c8c8;
  --silver-bright: #eeebe6;
  --silver-dim: #7a7a7a;
  --purple: #5a2038;
  --purple-glow: #8a3a58;
  --ink: #070304;
  --shadow: rgba(0, 0, 0, 0.8);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

body {
  font-family: "Oswald", "Trebuchet MS", sans-serif;
  background: var(--bg);
  color: var(--bone);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Atmosphere ---------- */

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(120, 0, 10, 0.55), transparent 58%),
    radial-gradient(ellipse 40% 40% at 10% 85%, rgba(50, 0, 8, 0.45), transparent 55%),
    radial-gradient(ellipse 40% 40% at 90% 80%, rgba(80, 0, 10, 0.35), transparent 55%),
    repeating-linear-gradient(
      90deg,
      #070204 0 18px,
      #0b0305 18px 36px
    );
}

.atmosphere .spotlight {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 42% at 50% 18%, rgba(160, 0, 12, 0.32), transparent 70%),
    radial-gradient(ellipse 24% 28% at 50% 30%, rgba(200, 20, 20, 0.18), transparent 70%);
  mix-blend-mode: screen;
}

.atmosphere .vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, #000 100%);
}

.atmosphere .fog {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(to top, rgba(8, 0, 2, 0.92), transparent);
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* String lights */
.lights {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 18px 4vw 0;
  height: 54px;
}

.lights .wire {
  position: absolute;
  top: 28px;
  left: 2vw;
  right: 2vw;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2a1010 8%, #3a1818 92%, transparent);
  opacity: 0.75;
}

.bulb {
  width: 14px;
  height: 18px;
  border-radius: 50% 50% 45% 45%;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 14px currentColor, 0 0 28px currentColor;
  animation: bulb-flicker 4.4s infinite;
}

.bulb::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 6px;
  height: 6px;
  background: #2a1a14;
  transform: translateX(-50%);
  border-radius: 1px;
}

.bulb.red { color: #e22; background: #ff4040; }
.bulb.silver { color: #d8d8d8; background: #f0f0f0; animation-duration: 5.1s; animation-delay: -1.2s; }
.bulb.dead {
  color: #2a1515;
  background: #1a0c0c;
  box-shadow: none;
  animation: none;
  opacity: 0.4;
  filter: grayscale(0.8);
}
.bulb.sputter {
  animation: bulb-sputter 2.8s infinite;
}

@keyframes bulb-flicker {
  0%, 8%, 11%, 100% { opacity: 1; filter: brightness(1); }
  9%, 10% { opacity: 0.45; filter: brightness(0.6); }
  72%, 74% { opacity: 0.7; }
  73% { opacity: 1; }
}

@keyframes bulb-sputter {
  0%, 6%, 9%, 18%, 22%, 100% { opacity: 1; filter: brightness(1.1); }
  7%, 8% { opacity: 0.15; filter: brightness(0.3); }
  19%, 21% { opacity: 0.35; filter: brightness(0.5); }
  40%, 41% { opacity: 0.2; filter: brightness(0.4); }
  55% { opacity: 1; }
}

/* ---------- Stage / typography ---------- */

.stage {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 20px 48px;
  gap: 22px;
}

.eyebrow {
  margin: 0;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--silver);
  text-shadow: 0 0 18px rgba(160, 0, 10, 0.45);
}

.eyebrow.flicker {
  animation: title-flicker 7s infinite;
}

@keyframes title-flicker {
  0%, 18%, 22%, 26%, 54%, 58%, 100% { opacity: 1; }
  20%, 24%, 56% { opacity: 0.55; }
}

/* ---------- Ticket ---------- */

.ticket {
  --hole: 9px;
  width: min(940px, 100%);
  background:
    url("assets/scratches.svg"),
    radial-gradient(ellipse at 18% 0%, rgba(120, 0, 10, 0.32), transparent 44%),
    radial-gradient(ellipse at 82% 100%, rgba(70, 0, 8, 0.4), transparent 48%),
    repeating-linear-gradient(
      135deg,
      transparent 0 10px,
      rgba(255, 255, 255, 0.018) 10px 11px
    ),
    linear-gradient(180deg, #1c0d10, #12080a 40%, #0a0506);
  color: var(--bone);
  position: relative;
  isolation: isolate;
  box-shadow:
    0 0 0 1px rgba(180, 180, 180, 0.32),
    0 0 0 5px #0a0405,
    0 0 0 6px rgba(110, 0, 10, 0.85),
    0 28px 70px rgba(0, 0, 0, 0.85),
    0 0 80px rgba(110, 0, 10, 0.28);
  /* Scalloped short edges (ticket torn from a roll) */
  -webkit-mask-image:
    radial-gradient(circle at 0 50%, transparent var(--hole), #000 calc(var(--hole) + 0.6px)),
    radial-gradient(circle at 100% 50%, transparent var(--hole), #000 calc(var(--hole) + 0.6px));
  -webkit-mask-size: 100% 26px;
  -webkit-mask-position: 0 13px, 0 13px;
  -webkit-mask-repeat: repeat-y;
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(circle at 0 50%, transparent var(--hole), #000 calc(var(--hole) + 0.6px)),
    radial-gradient(circle at 100% 50%, transparent var(--hole), #000 calc(var(--hole) + 0.6px));
  mask-size: 100% 26px;
  mask-position: 0 13px, 0 13px;
  mask-repeat: repeat-y;
  mask-composite: intersect;
}

.ticket::before {
  /* Inner engraved frame */
  content: "";
  position: absolute;
  inset: 10px 16px;
  border: 1px solid rgba(180, 180, 180, 0.28);
  box-shadow: inset 0 0 0 4px rgba(10, 4, 5, 0.5), inset 0 0 0 5px rgba(110, 0, 10, 0.45);
  pointer-events: none;
  z-index: 3;
}

.ticket-head,
.ticket-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 36px 10px;
}

.ticket-head {
  padding-top: 22px;
}

.ornament {
  color: var(--silver);
  font-size: 1.1rem;
  text-shadow: 0 0 10px rgba(140, 0, 10, 0.45);
  flex: 0 0 auto;
}

.ornament.spike {
  width: 18px;
  height: 28px;
  flex: 0 0 18px;
  background: linear-gradient(180deg, #ddd 0%, #888 60%, #4a1010 100%);
  clip-path: polygon(50% 0, 86% 38%, 70% 38%, 70% 100%, 30% 100%, 30% 38%, 14% 38%);
  box-shadow: 0 0 8px rgba(120, 0, 0, 0.5);
  opacity: 0.85;
}

.brand {
  text-align: center;
  flex: 1;
}

.presented,
.tag {
  margin: 0;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 0.66rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--bone-dim);
}

.brand h1 {
  margin: 4px 0 2px;
  font-family: "New Rocker", "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(1.85rem, 5.2vw, 3.2rem);
  letter-spacing: 0.06em;
  line-height: 1.05;
  text-transform: uppercase;
  background: linear-gradient(180deg, #f4f1ea 0%, #c8c8c8 42%, #7a7a7a 78%, #4a2020 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.85)) drop-shadow(0 0 16px rgba(140, 0, 10, 0.45));
  animation: title-flicker 8.5s infinite;
}

/* ---------- Halves ---------- */

.ticket-body {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  min-height: 460px;
  padding: 8px 28px 8px;
}

.half {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  padding: 28px 22px 24px;
  border-radius: 2px;
  overflow: hidden;
  transition: transform 0.28s ease, background 0.28s ease, filter 0.28s ease;
  outline: none;
}

.half:focus-visible {
  box-shadow: inset 0 0 0 2px var(--gold-bright), 0 0 0 2px rgba(240, 211, 122, 0.55);
}

.half .side-label {
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 8px;
}

.half h2 {
  margin: 0;
  line-height: 0.95;
  text-transform: uppercase;
}

.half .blurb {
  margin: 12px 0 0;
  max-width: 28ch;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--bone-dim);
  hyphens: manual;
  overflow-wrap: break-word;
}

.half .cta {
  margin-top: 16px;
  font-family: "Oswald", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
}

/* Easy Street — cleaner, street style */
.half.easy {
  background:
    linear-gradient(180deg, rgba(40, 28, 22, 0.18) 0%, rgba(20, 12, 10, 0.08) 100%);
}

.half.easy h2 {
  font-family: "Oswald", "Trebuchet MS", sans-serif;
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.45rem);
  letter-spacing: 0.16em;
  color: var(--bone);
  text-shadow: 0 1px 0 #000, 0 0 18px rgba(200, 200, 200, 0.15);
  border-top: 2px solid var(--silver-dim);
  border-bottom: 2px solid var(--silver-dim);
  padding: 8px 6px;
}

.half.easy::before {
  /* faint street lines */
  content: "";
  position: absolute;
  inset: 18% 16%;
  border: 1px dashed rgba(180, 180, 180, 0.16);
  pointer-events: none;
}

/* Adventure Time — wicked carnival */
.half.adventure {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(120, 0, 12, 0.22) 0 14px,
      rgba(0, 0, 0, 0.28) 14px 28px
    ),
    linear-gradient(180deg, rgba(80, 0, 10, 0.35), rgba(10, 0, 2, 0.2) 70%);
}

.half.adventure h2 {
  font-family: "New Rocker", "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(1.55rem, 3.3vw, 2.25rem);
  letter-spacing: 0.04em;
  color: #e8d0c0;
  text-shadow:
    0 2px 0 #2a0004,
    0 0 14px rgba(160, 0, 10, 0.7),
    0 0 28px rgba(120, 0, 8, 0.4);
}

.half.adventure .cta {
  color: #e08088;
}

.ticket:hover .half,
.ticket:focus-within .half {
  filter: brightness(0.72);
}

.ticket .half:hover,
.ticket .half:focus-visible {
  filter: brightness(1.08);
  transform: scale(1.03);
  z-index: 4;
}

.half.easy:hover,
.half.easy:focus-visible {
  background: linear-gradient(180deg, rgba(180, 180, 180, 0.1), rgba(40, 20, 16, 0.06));
  box-shadow: 0 0 40px rgba(180, 180, 180, 0.1);
}

.half.adventure:hover,
.half.adventure:focus-visible {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(140, 0, 12, 0.3) 0 14px,
      rgba(20, 0, 4, 0.28) 14px 28px
    ),
    linear-gradient(180deg, rgba(120, 0, 16, 0.35), transparent 70%);
  box-shadow: 0 0 40px rgba(140, 0, 10, 0.4);
}

/* Center perforation */
.perf {
  position: relative;
  width: 28px;
  justify-self: center;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 7px,
      rgba(232, 220, 192, 0.28) 7px 10px
    );
  background-position: center;
  background-size: 2px 100%;
  background-repeat: no-repeat;
}

.perf .notch {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 22px;
  background: radial-gradient(circle at 50% 50%, #070406 70%, #12080c 100%);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.18);
  pointer-events: none;
}

.perf .notch.start { top: -12px; }
.perf .notch.end { bottom: -12px; }

/* ---------- Footer / stamp ---------- */

.ticket-foot {
  padding: 8px 36px 22px;
  align-items: flex-end;
}

.serial,
.fine {
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.78rem;
  color: var(--bone-dim);
  letter-spacing: 0.06em;
}

.fine {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
  max-width: 28ch;
}

.stamp {
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--crimson);
  border: 2px solid var(--crimson);
  border-radius: 50%;
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: rotate(-12deg);
  box-shadow:
    0 0 0 3px rgba(22, 12, 16, 1),
    0 0 0 5px rgba(196, 30, 58, 0.75);
  text-shadow: 0 0 8px rgba(196, 30, 58, 0.5);
  background: radial-gradient(circle, rgba(196, 30, 58, 0.12), transparent 65%);
  opacity: 0.92;
  flex: 0 0 auto;
  margin-bottom: -6px;
}

/* ---------- Placeholder pages ---------- */

.inner-page .ticket {
  width: min(560px, 100%);
  padding: 36px 40px 32px;
  text-align: center;
  -webkit-mask-size: 100% 26px;
  mask-size: 100% 26px;
}

.inner-page .ticket::before {
  inset: 10px 16px;
}

.inner-card h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  margin: 8px 0 6px;
}

.inner-card.easy-theme h1 {
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone);
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  display: inline-block;
  padding: 6px 4px;
}

.inner-card.adv-theme h1 {
  font-family: "New Rocker", "Times New Roman", serif;
  color: #f3d9a4;
  text-shadow: 0 2px 0 #4a0810, 0 0 16px rgba(196, 30, 58, 0.5);
}

.kicker {
  margin: 0;
  font-family: "Cinzel", serif;
  letter-spacing: 0.32em;
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--gold);
}

.coming {
  margin: 22px 0 8px;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 1.15rem;
  color: var(--bone);
}

.note {
  margin: 0 auto 28px;
  max-width: 36ch;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--bone-dim);
}

.back {
  display: inline-block;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid rgba(180, 180, 180, 0.45);
  padding: 10px 18px;
  transition: background 0.2s ease, color 0.2s ease;
}

.back:hover,
.back:focus-visible {
  background: rgba(180, 180, 180, 0.12);
  color: var(--gold-bright);
}

.inner-page.adventure-page .ticket {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(196, 30, 58, 0.1) 0 14px,
      rgba(0, 0, 0, 0.14) 14px 28px
    ),
    linear-gradient(180deg, #221018, #160e12);
}

.credit {
  margin: 8px 0 0;
  font-family: "Cinzel", serif;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(185, 171, 140, 0.7);
}

/* ---------- Mobile: stack the ticket ---------- */

@media (max-width: 700px) {
  .stage {
    padding: 52px 14px 16px;
    gap: 10px;
  }

  .ticket {
    --hole: 8px;
  }

  .ticket-head,
  .ticket-foot {
    padding-left: 24px;
    padding-right: 24px;
  }

  .ticket-head {
    flex-wrap: wrap;
    justify-content: center;
  }

  .ticket-body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 24px 1fr;
    min-height: 0;
    padding: 2px 20px 6px;
  }

  .perf {
    width: 100%;
    justify-self: stretch;
  }

  .half.easy {
    padding-bottom: 58px;
  }

  .half.adventure {
    padding-top: 58px;
  }

  .half {
    padding: 12px 12px 10px;
    min-height: 0;
  }

  .perf {
    width: auto;
    height: 24px;
    background:
      repeating-linear-gradient(
        to right,
        transparent 0 7px,
        rgba(232, 220, 192, 0.28) 7px 10px
      );
    background-position: center;
    background-size: 100% 2px;
    background-repeat: no-repeat;
  }

  /* A clean dashed line reads better than end-notches on the stacked ticket. */
  .perf .notch.start,
  .perf .notch.end {
    display: none;
  }

  .ticket-foot {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 6px;
    padding-top: 2px;
    padding-bottom: 8px;
  }

  .fine {
    text-align: center;
    max-width: none;
    width: 100%;
    order: 3;
  }

  .stamp {
    width: 58px;
    height: 58px;
    font-size: 0.58rem;
    order: 0;
    margin: 0 auto;
  }

  .serial {
    width: 100%;
    text-align: center;
  }

  .ticket:hover .half,
  .ticket:focus-within .half {
    filter: none;
  }

  .inner-page .ticket {
    padding: 28px 22px 26px;
  }
}

.ticket-head {
  padding-top: 22px;
  padding-bottom: 12px;
}

@media (max-width: 700px) {
  .ticket-head {
    padding-top: 16px;
    padding-bottom: 2px;
  }

  .brand h1 {
    font-size: clamp(1.55rem, 9vw, 2.2rem);
  }

  .half .blurb {
    font-size: 0.72rem;
    margin-top: 8px;
  }

  .half .cta {
    margin-top: 8px;
  }

  .lights {
    padding-top: 10px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bulb,
  .brand h1,
  .eyebrow.flicker,
  .half {
    animation: none;
    transition: none;
  }
}


/* ---------- Speaker toggle ---------- */

.speaker {
  position: fixed;
  top: 62px;
  right: 16px;
  z-index: 50;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(180, 180, 180, 0.45);
  background: rgba(16, 8, 10, 0.78);
  color: var(--gold);
  cursor: pointer;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.speaker[hidden] {
  display: none;
}

.speaker svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.speaker:hover,
.speaker:focus-visible {
  background: rgba(212, 175, 55, 0.16);
  color: var(--gold-bright);
  outline: none;
}

.speaker.is-missing {
  opacity: 0.55;
  cursor: default;
}

/* ---------- Ticket tear ---------- */

.ticket.is-tearing {
  visibility: hidden;
}

.tear-scene {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  overflow: visible;
}

.tear-piece {
  position: absolute;
  inset: 0;
  transform: translate(0, 0) rotate(0deg);
  transition:
    transform 1s cubic-bezier(0.18, 0.7, 0.25, 1),
    opacity 0.85s ease;
  will-change: transform, opacity;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.55));
}

.tear-piece .ticket {
  width: 100%;
  margin: 0;
}

.tear-scene.is-row.is-pulling .tear-piece.first { transform: translateX(-5px); }
.tear-scene.is-row.is-pulling .tear-piece.second { transform: translateX(5px); }
.tear-scene.is-stacked.is-pulling .tear-piece.first { transform: translateY(-5px); }
.tear-scene.is-stacked.is-pulling .tear-piece.second { transform: translateY(5px); }

.tear-scene.is-row.tear-easy.is-on .tear-piece.first.taken {
  transform: translate(-44%, -10%) rotate(-13deg);
}
.tear-scene.is-row.tear-easy.is-on .tear-piece.second.left-behind {
  transform: translate(20%, 30%) rotate(8deg);
  opacity: 0.12;
}
.tear-scene.is-row.tear-adventure.is-on .tear-piece.second.taken {
  transform: translate(44%, -10%) rotate(13deg);
}
.tear-scene.is-row.tear-adventure.is-on .tear-piece.first.left-behind {
  transform: translate(-20%, 30%) rotate(-8deg);
  opacity: 0.12;
}

.tear-scene.is-stacked.tear-easy.is-on .tear-piece.first.taken {
  transform: translate(-3%, -16%) rotate(-5deg);
}
.tear-scene.is-stacked.tear-easy.is-on .tear-piece.second.left-behind {
  transform: translate(3%, 14%) rotate(4deg);
  opacity: 0.2;
}
.tear-scene.is-stacked.tear-adventure.is-on .tear-piece.second.taken {
  transform: translate(3%, 16%) rotate(5deg);
}
.tear-scene.is-stacked.tear-adventure.is-on .tear-piece.first.left-behind {
  transform: translate(-3%, -14%) rotate(-4deg);
  opacity: 0.2;
}

@media (max-width: 700px) {
  .speaker {
    top: 52px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tear-piece {
    transition: opacity 0.2s ease;
  }
}


/* ---------- KK logo on the ticket spine ---------- */

.perf {
  overflow: visible;
}

.kk-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: max-content;
  height: 400px;
  pointer-events: none;
  z-index: 5;
  filter:
    drop-shadow(0 0 16px rgba(140, 0, 8, 0.55))
    drop-shadow(0 8px 22px rgba(0, 0, 0, 0.65));
}

.kk-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58%;
  height: 58%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(150, 0, 10, 0.7), rgba(80, 0, 6, 0.2) 55%, transparent 72%);
  filter: blur(18px);
  z-index: -1;
  pointer-events: none;
}

.kk-k {
  display: block;
  height: 100%;
  width: auto;
}

.kk-k img {
  display: block;
  height: 100%;
  width: auto;
}

@media (min-width: 701px) {
  .half {
    padding-top: 28px;
    padding-bottom: 28px;
  }
  .half.easy {
    padding-right: 150px;
    align-items: flex-start;
    text-align: left;
  }
  .half.adventure {
    padding-left: 150px;
    align-items: flex-end;
    text-align: right;
  }
  .half.easy .blurb,
  .half.adventure .blurb {
    margin-left: 0;
    margin-right: 0;
  }
  .half.adventure .blurb,
  .half.adventure .fine {
    text-align: right;
  }
  .half.easy::before {
    right: 28%;
    left: 8%;
  }
  .half.adventure::before {
    left: 28%;
    right: 8%;
  }
}

.ticket-disclaimer {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 2px 36px 16px;
  text-align: center;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  line-height: 1.45;
  color: var(--bone-dim);
  text-transform: uppercase;
}

.rating {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 11px 5px;
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 700;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  line-height: 1.25;
  text-transform: uppercase;
  border: 2px solid;
  border-radius: 2px;
}

.half.easy .rating {
  color: var(--silver-bright);
  border-color: var(--silver-dim);
  background: rgba(180, 180, 180, 0.08);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.3);
}

.half.adventure .rating {
  color: #f0c0c4;
  border-color: #8a1018;
  background: rgba(110, 0, 10, 0.35);
  box-shadow: 0 0 16px rgba(110, 0, 8, 0.35);
  text-shadow: 0 0 8px rgba(140, 0, 10, 0.55);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  padding: 7px 14px 6px;
}

/* Inner pages */

.kk-logo-mark {
  display: block;
  width: min(220px, 70%);
  height: auto;
  margin: 0 auto 14px;
}

.page-rating {
  display: inline-block;
  margin: 10px 0 0;
  padding: 6px 12px 5px;
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--silver-bright);
  border: 2px solid var(--silver-dim);
  background: rgba(180, 180, 180, 0.08);
}

.page-rating.is-adult {
  color: #f3c2c6;
  border-color: var(--crimson);
  background: rgba(196, 30, 58, 0.16);
  text-shadow: 0 0 8px rgba(196, 30, 58, 0.45);
}

/* ---------- Age check ---------- */

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(ellipse at center, rgba(40, 8, 14, 0.7), rgba(4, 1, 2, 0.92));
  backdrop-filter: blur(5px);
}

.age-gate[hidden] {
  display: none;
}

.age-gate-card {
  width: min(520px, 100%);
  text-align: center;
  padding: 32px 28px 28px;
  color: var(--bone);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(196, 30, 58, 0.16), transparent 50%),
    linear-gradient(180deg, #221018, #160e12);
  box-shadow:
    0 0 0 1px rgba(180, 180, 180, 0.45),
    0 0 0 5px #120c10,
    0 0 0 6px rgba(196, 30, 58, 0.65),
    0 28px 70px rgba(0, 0, 0, 0.75);
}

.age-gate-logo {
  display: block;
  width: min(200px, 70%);
  height: auto;
  margin: 0 auto 12px;
}

.age-gate-kicker {
  margin: 0;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.age-gate-card h2 {
  margin: 8px 0 12px;
  font-family: "New Rocker", "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  color: #f3d9a4;
  text-shadow: 0 2px 0 #4a0810, 0 0 16px rgba(196, 30, 58, 0.5);
}

.age-gate-card p#age-gate-body {
  margin: 0 auto 18px;
  max-width: 42ch;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--bone);
}

.age-gate-checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 auto 16px;
  max-width: 36ch;
  text-align: left;
}

.age-gate-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(196, 163, 90, 0.45);
  border-radius: 2px;
  background: rgba(18, 8, 10, 0.72);
  color: var(--bone);
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.4;
  cursor: pointer;
}

.age-gate-check input[type="checkbox"] {
  appearance: auto;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: #c4a35a;
}

.age-gate-check:focus-within {
  border-color: var(--gold-bright, #c4a35a);
  box-shadow: 0 0 0 2px rgba(196, 163, 90, 0.45);
}

.age-gate-terms-link {
  color: var(--gold-bright, #c4a35a);
  text-decoration: underline;
}

.age-gate-terms-link:hover,
.age-gate-terms-link:focus-visible {
  color: #fff6dc;
  outline: none;
}

.age-gate-error {
  margin: 0 auto 14px;
  max-width: 36ch;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #e8b4b4;
}

.age-gate-error[hidden] {
  display: none;
}

.age-yes:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.age-yes:disabled:hover,
.age-yes:disabled:focus-visible {
  background: rgba(196, 30, 58, 0.28);
  color: #f3d9a4;
}

.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.age-gate-actions button {
  font-family: "Oswald", sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 2px;
  transition: background 0.2s ease, color 0.2s ease, filter 0.2s ease;
}

.age-yes {
  color: #f3d9a4;
  background: rgba(196, 30, 58, 0.28);
  border: 1px solid var(--crimson);
}

.age-yes:hover,
.age-yes:focus-visible {
  background: rgba(196, 30, 58, 0.48);
  color: #fff;
  outline: none;
}

.age-no {
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(180, 180, 180, 0.45);
}

.age-no:hover,
.age-no:focus-visible {
  background: rgba(180, 180, 180, 0.12);
  color: var(--gold-bright);
  outline: none;
}

body.is-gated {
  overflow: hidden;
}

@media (max-width: 700px) {
  .kk-logo {
    top: 50%;
    transform: translate(-50%, -50%);
    flex-direction: column;
    gap: 0;
    height: auto;
  }

  .kk-k,
  .kk-k img {
    height: 128px;
    width: auto;
  }

  .ticket-disclaimer {
    padding: 4px 20px 14px;
    font-size: 0.58rem;
  }

  .rating {
    font-size: 0.58rem;
    margin-top: 10px;
    padding: 5px 8px 4px;
  }

  .half.adventure .rating {
    font-size: 0.7rem;
    padding: 6px 12px 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .age-gate-actions button {
    transition: none;
  }
}


/* ---------- Terms of Use page ---------- */

.terms-page .builder-stage {
  width: min(760px, 100%);
}

.terms-doc {
  margin: 8px 0 0;
  padding: 28px 26px 32px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(196, 30, 58, 0.12), transparent 50%),
    linear-gradient(180deg, #221018, #12080c);
  border: 1px solid rgba(180, 180, 180, 0.28);
  box-shadow:
    0 0 0 1px #120c10,
    0 18px 40px rgba(0, 0, 0, 0.55);
}

.terms-doc h2 {
  margin: 22px 0 8px;
  font-family: "Oswald", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-bright, #c4a35a);
}

.terms-doc h2:first-child {
  margin-top: 0;
}

.terms-doc p {
  margin: 0 0 12px;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--bone);
}

.terms-updated {
  margin: 18px 0 0;
  font-family: "Cinzel", "Times New Roman", serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone-dim);
}

/* ---------- Worn paper, splatters, grit ---------- */

.ticket-grime {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("assets/scratches.svg");
  background-size: 280px 280px;
  opacity: 0.28;
  mix-blend-mode: multiply;
  border-radius: inherit;
}

.splatter {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: multiply;
}

.splatter.s1 {
  width: 52px;
  top: 8px;
  left: 18px;
  transform: rotate(-12deg);
}

.splatter.s2 {
  width: 88px;
  right: 22px;
  top: 42%;
  transform: rotate(18deg);
  opacity: 0.4;
}

.splatter.s3 {
  width: 44px;
  right: 48px;
  bottom: 10px;
  transform: rotate(160deg);
  opacity: 0.5;
}

.half .cta {
  color: var(--silver);
}

.kicker {
  color: var(--silver) !important;
}

.credit {
  color: rgba(160, 150, 140, 0.7);
}

@media (max-width: 700px) {
  .ticket-body {
    min-height: 0;
  }

  .half.easy {
    padding-bottom: 148px;
  }

  .half.adventure {
    padding-top: 148px;
  }

  .splatter.s2 {
    width: 64px;
    top: auto;
    bottom: 22%;
  }
}


/* ---------- Stage curtains + world canvas ---------- */

.khaos-world {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.khaos-world canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: auto;
}

body.has-world .atmosphere {
  background: transparent;
  z-index: 1;
}
body.has-world .stage {
  z-index: 3;
}

.khaos-curtain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.khaos-curtain.is-covering {
  z-index: 25;
}

.curtain-valance {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  height: 58px;
  z-index: 3;
  background:
    repeating-linear-gradient(
      90deg,
      #5a0a14 0 16px,
      #3a040c 16px 20px,
      #6a101c 20px 34px,
      #2a0208 34px 40px
    ),
    linear-gradient(180deg, #3a0408, #1a0004);
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.65),
    inset 0 -8px 16px rgba(0, 0, 0, 0.45);
  border-bottom: 5px solid #8a7340;
  -webkit-mask-image: radial-gradient(ellipse 18px 14px at 18px 100%, transparent 16px, #000 17px);
  mask-image: radial-gradient(ellipse 18px 14px at 18px 100%, transparent 16px, #000 17px);
  -webkit-mask-size: 36px 72px;
  mask-size: 36px 72px;
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
}
.curtain-valance::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 5px;
  background: linear-gradient(90deg, #5a4a22, #c4a35a 20%, #8a7340 50%, #ddd 55%, #8a7340 60%, #5a4a22);
  box-shadow: 0 0 10px rgba(196, 163, 90, 0.35);
}

.curtain-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 54%;
  background:
    repeating-linear-gradient(
      90deg,
      #4a0610 0 22px,
      #2e0309 22px 28px,
      #5c0c18 28px 48px,
      #1a0105 48px 56px,
      #52101a 56px 72px
    );
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.55),
    inset 0 0 24px rgba(80, 0, 10, 0.4),
    0 0 40px rgba(0, 0, 0, 0.4);
  transition: transform 1.3s cubic-bezier(0.66, 0.05, 0.35, 1);
  will-change: transform;
}
.curtain-panel.left { left: 0; }
.curtain-panel.right { right: 0; left: auto; }

.curtain-panel .curtain-trim {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16px;
  background: linear-gradient(
    180deg,
    #e8e0d0 0%,
    #8a7340 18%,
    #c4a35a 45%,
    #6a5a30 70%,
    #c8c8c8 85%,
    #5a4a22 100%
  );
  box-shadow: 0 0 12px rgba(196, 163, 90, 0.45);
}
.curtain-panel.left .curtain-trim { right: 0; }
.curtain-panel.right .curtain-trim { left: 0; }

.curtain-panel .curtain-tassel {
  position: absolute;
  top: 38%;
  width: 10px;
  height: 90px;
  background: linear-gradient(#c4a35a, #5a4a22);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 10px rgba(0, 0, 0, 0.4);
}
.curtain-panel.left .curtain-tassel { right: 3px; }
.curtain-panel.right .curtain-tassel { left: 3px; }

.khaos-curtain.is-closed .curtain-panel.left { transform: translateX(0); }
.khaos-curtain.is-closed .curtain-panel.right { transform: translateX(0); }
.khaos-curtain.is-mid .curtain-panel.left { transform: translateX(-40%); }
.khaos-curtain.is-mid .curtain-panel.right { transform: translateX(40%); }
.khaos-curtain.is-open .curtain-panel.left { transform: translateX(-100%); }
.khaos-curtain.is-open .curtain-panel.right { transform: translateX(100%); }

@media (prefers-reduced-motion: reduce) {
  .curtain-panel {
    transition: none;
  }
}

/* Main-site links under the opening ticket (Nov 25, 2026) */
.site-links {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin: 10px auto 0;
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 0.85rem;
}
.site-links a {
  color: #e9dcc6;
  opacity: 0.82;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-links a:hover,
.site-links a:focus-visible { opacity: 1; color: #fff; }
body.has-world .site-links,
body.builder-page .site-links { display: none; }
