:root {
  color-scheme: dark;
  --ink: #101c1d;
  --cream: #f4eddf;
  --gold: #d8b879;
  --muted: #c5c4b8;
  --line: rgba(216, 184, 121, 0.32);
  --curtain-travel: 5000ms;
  --writing-reveal: 600ms;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--ink);
  color: var(--cream);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 280px; }

body { position: relative; min-height: 100vh; margin: 0; isolation: isolate; }

button, textarea { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }

::selection { background: var(--gold); color: var(--ink); }

.intro-pending, .intro-playing { background: #000; }

.intro-pending body, .intro-playing body { overflow: hidden; }

.intro-pending .page, .intro-playing .page { visibility: hidden; opacity: 0; }

.intro-pending .theatre { visibility: hidden; }

.intro-playing .theatre { filter: brightness(0.12); }

.intro-opening .theatre { filter: brightness(1); transition: filter var(--curtain-travel) ease; }

.intro {
  position: fixed;
  z-index: 10;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}

.curtain-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background-color: #410b12;
  background-image: url("assets/closed-curtain.png");
  background-size: 200% 100%;
  background-repeat: no-repeat;
  filter: brightness(0.5);
  will-change: transform;
  transition: transform var(--curtain-travel) cubic-bezier(0.45, 0, 0.2, 1);
}

.curtain-panel-left { left: 0; background-position: left center; }
.curtain-panel-right { right: 0; background-position: right center; }

.intro-opening .curtain-panel-left { transform: translateX(-100%); }
.intro-opening .curtain-panel-right { transform: translateX(100%); }

.spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 250ms ease-out;
}

.spotlight::before, .spotlight::after { content: ""; position: absolute; inset: 0; }

.spotlight::before {
  background: conic-gradient(from 119deg at 8% -7%, transparent 0deg, rgba(255, 235, 188, 0.05) 4deg, rgba(255, 235, 188, 0.2) 18deg, rgba(255, 235, 188, 0.3) 30deg, rgba(255, 235, 188, 0.05) 48deg, transparent 52deg);
  filter: blur(12px);
}

.spotlight::after {
  background: radial-gradient(ellipse 28% 43% at 47% 55%, rgba(255, 239, 201, 0.38), rgba(255, 231, 176, 0.15) 48%, transparent 74%);
}

.spotlight-right { transform: scaleX(-1); }

.intro-light-one .spotlight-left, .intro-light-two .spotlight-right { opacity: 1; }

.intro-opening .spotlight { opacity: 0; transition: opacity 600ms ease 4400ms; }

.intro-blackout { position: absolute; inset: 0; background: #000; transition: opacity 250ms ease-out; }
.intro-light-one .intro-blackout { opacity: 0; }

.skip-intro {
  position: absolute;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  min-height: 44px;
  min-width: 110px;
  padding: 11px 17px;
  border: 1px solid rgba(244, 237, 223, 0.55);
  border-radius: 2px;
  background: rgba(9, 15, 15, 0.85);
  color: var(--cream);
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
  opacity: 0;
  transition: opacity 180ms ease, background-color 180ms ease;
}

.skip-intro span { margin-left: 10px; }
.intro-skip-visible .skip-intro, .skip-intro:focus-visible { opacity: 1; }
.skip-intro:hover { background: #162425; }

.intro-revealing .page { animation: writing-appears var(--writing-reveal) ease-out both; }

.theatre {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-color: var(--ink);
  background-image:
    linear-gradient(180deg, rgba(6, 15, 17, 0.3), rgba(6, 15, 17, 0.05) 25%, rgba(6, 15, 17, 0.3) 100%),
    radial-gradient(ellipse at 50% 46%, rgba(8, 19, 20, 0.58) 0%, rgba(8, 19, 20, 0.4) 40%, rgba(8, 19, 20, 0.08) 75%),
    url("assets/theatre-background.png");
  background-size: cover;
  background-position: center;
}

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.masthead {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: clamp(108px, 14vh, 145px) clamp(24px, 4.6vw, 80px) 16px;
  text-align: center;
}

.identity p, .edition, .footer p { margin: 0; }

.name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.identity .role {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  letter-spacing: 0.045em;
}

.role span { padding: 0 4px; color: var(--gold); }

.edition {
  display: none;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  font-size: 10px;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--gold);
}

.edition span { width: 26px; height: 1px; background: currentColor; }

main {
  display: grid;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.hero {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 26px clamp(24px, 4vw, 68px) 64px;
  text-align: center;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 30px;
  color: var(--gold);
}

.ornament span { width: 48px; height: 1px; background: var(--line); }

.ornament i { width: 5px; height: 5px; border: 1px solid currentColor; transform: rotate(45deg); }

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 5.5vw, 80px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.045em;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(2, 10, 11, 0.36);
}

.headline { display: block; }

h1 em {
  display: block;
  margin-top: 12px;
  font-size: 0.86em;
  font-weight: 400;
  line-height: 1.16;
  color: var(--gold);
}

.explanation {
  max-width: 560px;
  margin: 32px auto 0;
  color: #dfdfd5;
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: 0.01em;
}

.explanation p { margin: 0; }

.explanation .aside {
  margin-top: 11px;
  color: var(--cream);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 17px;
}

.contact { margin-top: 34px; }

.ticket {
  display: inline-flex;
  align-items: stretch;
  justify-content: center;
  min-height: 58px;
  max-width: 100%;
  position: relative;
  background: linear-gradient(105deg, #ead2a0, #d8b779);
  color: #182223;
  border: 1px solid #efdcb7;
  border-radius: 2px;
  box-shadow: 0 3px 0 #8a6e41, 0 9px 30px rgba(0, 0, 0, 0.2), inset 0 0 0 4px rgba(16, 28, 29, 0.08);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ticket > span:first-child { display: grid; align-content: center; padding: 16px 26px; }

.ticket .ticket-arrow {
  display: grid;
  align-content: center;
  justify-content: center;
  width: 57px;
  flex-shrink: 0;
  border-left: 1px dashed rgba(24, 34, 35, 0.34);
  font-family: Arial, sans-serif;
  font-size: 23px;
  font-weight: 400;
}

.ticket:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #8a6e41, 0 12px 34px rgba(0, 0, 0, 0.27), inset 0 0 0 4px rgba(16, 28, 29, 0.08);
}

.ticket:active { transform: translateY(1px); }

:focus-visible { outline: 2px solid var(--cream); outline-offset: 6px; }

.contact-help {
  margin: 18px auto 0;
  max-width: 340px;
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.015em;
  color: var(--muted);
}

.note-panel, .no-script-note {
  width: 100%;
  max-width: 560px;
  margin: 30px auto 0;
  padding: 23px 25px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(11, 25, 27, 0.94);
  text-align: left;
}

.note-heading { display: flex; align-items: center; gap: 18px; }

.note-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.note-dash { flex: 1; height: 1px; background: var(--line); }

.note-instructions, .no-script-note p {
  margin: 11px 0 15px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

textarea {
  display: block;
  width: 100%;
  min-height: 112px;
  padding: 13px 14px;
  resize: vertical;
  border: 1px solid rgba(216, 184, 121, 0.3);
  border-radius: 2px;
  background: #132629;
  color: var(--cream);
  font-size: 16px;
  line-height: 1.6;
}

.note-actions { display: flex; align-items: center; gap: 15px; margin-top: 16px; }

.note-actions button {
  flex-shrink: 0;
  min-height: 44px;
  padding: 10px 17px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  background: transparent;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms ease;
}

.note-actions button:hover { background: rgba(216, 184, 121, 0.1); }

.copy-status { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.no-script-note blockquote { margin: 0; font-size: 15px; line-height: 1.7; }

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 24px 27px;
  color: #b8b8aa;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.footer p { line-height: 1.6; }

.footer-rule { height: 1px; width: 42px; background: var(--line); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes writing-appears {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 700px) {
  .theatre { background-size: 100% 100%; }
  .masthead { padding-top: 95px; padding-bottom: 10px; }
  .name { font-size: 23px; }
  .identity .role { max-width: 245px; margin-left: auto; margin-right: auto; font-size: 10px; line-height: 1.8; letter-spacing: 0; }
  .role span { padding: 0 2px; }
  .edition { display: none; }
  .hero { padding-top: 27px; padding-bottom: 42px; }
  .ornament { margin-bottom: 25px; }
  h1 { font-size: clamp(40px, 7.7vw, 54px); line-height: 1.1; }
  h1 em { margin: 17px auto 0; max-width: 490px; font-size: 0.91em; line-height: 1.15; }
  .explanation { max-width: 390px; margin-top: 27px; font-size: 14px; line-height: 1.8; }
  .explanation .aside { margin-top: 12px; font-size: 16px; }
  .contact { margin-top: 28px; }
  .contact-help { max-width: 280px; margin-top: 17px; }
  .note-panel, .no-script-note { padding: 20px; }
  .note-actions { align-items: flex-start; }
  .footer { padding-bottom: 22px; font-size: 9px; }
}

@media (max-width: 360px) {
  .masthead { padding-left: 20px; padding-right: 20px; }
  .hero { padding-left: 20px; padding-right: 20px; }
  h1 { font-size: 39px; }
  .ticket > span:first-child { padding-right: 19px; padding-left: 19px; }
  .ticket .ticket-arrow { width: 47px; }
  .note-actions { flex-direction: column; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
  .intro-pending .page, .intro-playing .page { visibility: visible; opacity: 1; }
  .intro-pending .theatre, .intro-playing .theatre { visibility: visible; filter: none; }
  .intro-pending body, .intro-playing body { overflow: visible; }
  .intro-revealing .page { animation: none; }
  .ticket, .note-actions button { transition: none; }
  .ticket:hover, .ticket:active { transform: none; }
}
