/* The public pages (index.html, contact.html, submit.html, the two surveys), in the game's colours and its Anton headings:
   the "sticker" look of style.css. Every colour is a theme token (themes.js); the values here are the
   default theme's, used until the site's chosen theme is applied. */
@font-face { font-family: "Anton"; src: url("fonts/Anton-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  --paper: #fff3e0;
  --card: #ffffff;
  --sunk: #fdf7ee;
  --ink: #17121f;
  --edge: #17121f;
  --muted: #6b6275;
  --line-soft: #ddd0b8;
  --accent: #ff5d73;
  --accent-text: #cc2a4a;
  --on-accent: #ffffff;
  --on-square: #ffffff;
  --bad: #e03a3a;
  --c1: #ff5d73;
  --c2: #ff9f1c;
  --c3: #2ec4b6;
  --c4: #8b5cf6;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.05rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent-text); }
h1, h2, h3, .kicker, .tag, .button, .no, .ask, .chip {
  font-family: "Anton", "Oswald", "Arial Narrow", sans-serif;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* The big title, like the audience screen's intro: crayon confetti on the paper */
.hero {
  min-height: min(92vh, 760px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 16px;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 8% 14%, var(--c1) 0 9px, transparent 10px),
    radial-gradient(circle at 92% 10%, var(--c3) 0 11px, transparent 12px),
    radial-gradient(circle at 20% 6%, var(--c4) 0 7px, transparent 8px),
    radial-gradient(circle at 80% 26%, var(--c2) 0 8px, transparent 9px),
    radial-gradient(circle at 12% 80%, var(--c2) 0 8px, transparent 9px),
    radial-gradient(circle at 88% 84%, var(--c4) 0 9px, transparent 10px),
    radial-gradient(circle at 70% 6%, var(--c1) 0 6px, transparent 7px);
  border-bottom: 4px solid var(--edge);
}
.hero-inner { max-width: 760px; }
.kicker { margin: 0; letter-spacing: 0.35em; font-size: clamp(0.9rem, 2.4vw, 1.2rem); }
.hero h1 {
  margin: 0.1em 0 0;
  color: var(--accent);
  font-size: clamp(4rem, 17vw, 10rem);
  line-height: 0.95;
  -webkit-text-stroke: 0.025em var(--edge);
  text-shadow: 3px 3px 0 var(--edge), 6px 6px 0 var(--edge), 9px 9px 0 var(--edge);
}
.tag { margin: 0.6rem 0 1.4rem; letter-spacing: 0.3em; font-size: clamp(1rem, 3vw, 1.5rem); }
/* "Coming soon": a tilted sticker under the tagline, until the first show is booked */
.soon {
  display: inline-block;
  margin: 0 0 1.4rem;
  padding: 0.2em 0.9em;
  font-family: "Anton", "Oswald", "Arial Narrow", sans-serif;
  font-size: clamp(1.3rem, 4vw, 2rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-square);
  background: var(--c3);
  border: 3px solid var(--edge);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--edge);
  text-shadow: 2px 2px 0 var(--edge);
  transform: rotate(-3deg);
}
.lede.soon-text { margin-top: -1rem; }
.lede { margin: 0 auto 2rem; max-width: 36rem; font-size: clamp(1.05rem, 2.4vw, 1.25rem); }
.cta { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }

.button {
  display: inline-block;
  padding: 0.65em 1.4em;
  border: 3px solid var(--edge);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--edge);
  text-decoration: none;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  transition: transform 0.15s, box-shadow 0.15s;
}
.button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--edge); }
.button.primary { background: var(--accent); color: var(--on-accent); }
.button:focus-visible, .footer a:focus-visible { outline: 3px solid var(--c3); outline-offset: 3px; }

main section.wrap { padding-top: 4.5rem; padding-bottom: 4.5rem; }
h2 { margin: 0 0 1.5rem; font-size: clamp(2rem, 6vw, 3rem); line-height: 1.1; }

/* How it works: five numbered cards */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) { .steps { grid-template-columns: repeat(6, 1fr); } .steps li { grid-column: span 2; } .steps li:nth-child(4) { grid-column: 2 / span 2; } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(5, 1fr); } .steps li, .steps li:nth-child(4) { grid-column: auto; } }
.steps li {
  position: relative;
  padding: 1.4rem 1.2rem 1.2rem;
  background: var(--card);
  border: 3px solid var(--edge);
  border-radius: 16px;
  box-shadow: 5px 5px 0 var(--edge);
}
.no {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 2px solid var(--edge);
  background: var(--c1);
  color: var(--on-square);
  font-size: 1.2rem;
}
/* Each step's number in the next crayon colour */
.steps li:nth-child(4n+2) .no { background: var(--c2); }
.steps li:nth-child(4n+3) .no { background: var(--c3); }
.steps li:nth-child(4n+4) .no { background: var(--c4); }
.steps h3 { margin: 0.7rem 0 0.4rem; font-size: 1.45rem; line-height: 1.15; }
.steps p { margin: 0; }
.example {
  margin-top: 0.9rem;
  padding: 0.7rem 0.8rem;
  background: var(--sunk);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-size: 0.95rem;
}
.ask { color: var(--muted); letter-spacing: 0.1em; margin-right: 0.3rem; }
.chip {
  display: inline-block;
  padding: 0.05em 0.7em;
  border: 2px solid var(--edge);
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  letter-spacing: 0.05em;
}
.example .scene { display: block; margin-top: 0.5rem; }
.example .scene b { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

/* Write the next show: the prompt form, and its QR code for phones */
.prompts {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: center;
  border-top: 2px solid var(--line-soft);
}
.prompts-text p { margin: 0 0 1rem; max-width: 34rem; }
.prompts-text .button { margin-top: 0.6rem; }
.prompts code { white-space: nowrap; color: var(--accent-text); font-size: 0.95em; background: var(--card); padding: 0.05em 0.35em; border-radius: 4px; }
.qr { margin: 0; text-align: center; }
.qr img { display: block; width: 220px; height: 220px; background: #fff; padding: 10px; border: 3px solid var(--edge); border-radius: 14px; box-shadow: 5px 5px 0 var(--edge); }
.qr figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.9rem; }

/* Connect a screen: the code from the host page, then the audience screen joins that show */
.screen { border-top: 2px solid var(--line-soft); }
.screen h2 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); margin-bottom: 0.8rem; }
.screen > p { margin: 0 0 1rem; max-width: 40rem; }
.join { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: stretch; }
.join input {
  width: 9.5em; padding: 0.5em 0.7em; border: 3px solid var(--edge); border-radius: 12px; background: var(--card); color: var(--ink);
  font: 1.3rem/1.2 "Anton", "Arial Narrow", sans-serif; letter-spacing: 0.25em; text-transform: uppercase;
}
.join input::placeholder { color: var(--muted); opacity: 0.6; }
.join input:focus { outline: 3px solid var(--c3); outline-offset: 2px; }
.join .button { cursor: pointer; font-family: "Anton", "Arial Narrow", sans-serif; }
.screen > p.screen-more { margin: 0.9rem 0 0; font-size: 0.95rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  border-top: 2px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.9rem;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent-text); }
.footer-credits { flex-basis: 100%; margin: 0; font-size: 0.8rem; line-height: 1.5; }

/* Get in touch: a band on the front page leading to the contact form */
.contact-band { border-top: 2px solid var(--line-soft); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.contact-band h2 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); margin: 0 0 0.3rem; }
.contact-band p { margin: 0; max-width: 38rem; }

/* The contact page */
.contact-head { padding-top: 1.2rem; padding-bottom: 0.4rem; }
.contact-head .home { color: var(--accent); text-shadow: 2px 2px 0 var(--edge); text-decoration: none; font: 1.3rem "Anton", "Arial Narrow", sans-serif; letter-spacing: 0.04em; text-transform: uppercase; }
.contact { max-width: 720px; padding-top: 1.5rem; padding-bottom: 3rem; }
.contact h1 { margin: 0 0 0.6rem; font-size: clamp(2.4rem, 8vw, 3.6rem); line-height: 1.05; }
.contact-lede { margin: 0 0 2rem; font-size: 1.1rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; margin-bottom: 0.35rem; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.65em 0.8em; border: 2px solid var(--edge); border-radius: 10px;
  background: var(--card); color: var(--ink); font: inherit;
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--c3); outline-offset: 1px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile { min-height: 0; margin: 0.4rem 0 0.8rem; }
.contact-status { min-height: 1.4em; margin: 0 0 0.8rem; color: var(--muted); }
.contact-status.bad { color: var(--bad); }
#contact-send { cursor: pointer; }
#contact-send:disabled { opacity: 0.6; cursor: wait; }
.contact-done { padding: 1.5rem; background: var(--card); border: 3px solid var(--edge); border-radius: 16px; box-shadow: 5px 5px 0 var(--edge); }
.contact-done h2 { font-size: 2rem; margin-bottom: 0.6rem; }
.contact-done p { margin: 0 0 1.2rem; }
.contact-done:focus { outline: none; }

/* Not the live site (index.html adds it): like the host page's banner */
.env-banner {
  padding: 0.35rem 1rem; text-align: center; font-size: 0.9rem; color: #111;
  background: repeating-linear-gradient(-45deg, #ffb020 0 14px, #ffc451 14px 28px);
}
.env-banner b { text-transform: uppercase; letter-spacing: 0.08em; }
.env-banner.local { background: repeating-linear-gradient(-45deg, #9ad0ff 0 14px, #b8ddff 14px 28px); }

@media (max-width: 680px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .prompts { grid-template-columns: 1fr; }
  .qr { display: none; } /* on a phone, the button is the way in */
  main section.wrap { padding-top: 3rem; padding-bottom: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}

/* Send us a prompt (submit.html): help lines, the cast choice, what the audience will be asked */
.field-help { margin: 0.35rem 0 0; font-size: 0.9rem; color: var(--muted); }
.optional { font-weight: 400; color: var(--muted); font-size: 0.9em; }
.contact code { white-space: nowrap; color: var(--accent-text); font-size: 0.95em; background: var(--card); padding: 0.05em 0.35em; border-radius: 4px; }
.ask-preview { display: block; margin-top: 0.3rem; color: var(--accent-text); }
fieldset.cast { border: 0; padding: 0; margin: 0 0 1.1rem; }
fieldset.cast legend { padding: 0; margin-bottom: 0.2rem; font-weight: 600; }
fieldset.cast .field-help { margin: 0 0 0.6rem; }
fieldset.cast label {
  display: inline-flex; align-items: center; gap: 0.45rem; margin: 0 0.5rem 0.5rem 0; padding: 0.5em 0.9em;
  border: 2px solid var(--line-soft); border-radius: 999px; background: var(--card); cursor: pointer; font-weight: 600; white-space: nowrap;
}
fieldset.cast label:has(input:checked) { border-color: var(--edge); background: var(--accent); color: var(--on-accent); }
fieldset.cast input { accent-color: var(--edge); margin: 0; }
.contact-done .button + .button { margin-left: 0.5rem; }

/* The surveys (performer-survey.html, audience-survey.html; survey.js): questions as pill groups like
   submit.html's cast choice, with longer answers allowed to wrap */
.survey .required { color: var(--bad); }
.survey fieldset.survey-choices { margin-bottom: 1.5rem; }
.survey fieldset.survey-choices legend { margin-bottom: 0.5rem; }
.survey fieldset.survey-choices label { white-space: normal; max-width: 100%; }
.survey fieldset.survey-choices input { width: auto; padding: 0; flex: none; } /* not .field input's full width */
.survey fieldset.rating label { min-width: 3.2rem; justify-content: center; }
.survey .rating-ends { display: flex; justify-content: space-between; gap: 1rem; max-width: 22rem; margin: 0.1rem 0 0; font-size: 0.9rem; color: var(--muted); }
.survey .field textarea { min-height: 6rem; }
.survey fieldset.survey-you { border: 2px solid var(--line-soft); border-radius: 12px; padding: 1rem 1.1rem 0.2rem; margin: 0.5rem 0 1.2rem; }
.survey fieldset.survey-you legend { padding: 0 0.4rem; font-weight: 600; }
.survey fieldset.survey-you .field-help { margin: 0 0 0.8rem; }
