/* ============================================================
   Base tokens
   ============================================================ */
:root {
  --ink:        #0c0a10;
  --ink-2:      #14111c;
  --ink-3:      #1d1928;
  --line:       #2e2840;
  --paper:      #f4f1ea;
  --paper-dim:  #b3aec2;
  --paper-mute: #7d7791;

  /* Brand yellow, straight off the poster */
  --brand:      #FFDA47;
  --brand-lift: #ffe68a;
  --brand-deep: #d9ab00;
  --on-brand:   #1a1300;

  --radius:     14px;
  --radius-sm:  9px;
  --shadow:     0 18px 48px rgba(0,0,0,.45);

  /* Geraldton, self-hosted. The rest of the stack only shows up if the
     font files fail to load — all geometric, so the layout holds. */
  --font-display: "Geraldton", "Jost", "Century Gothic", "Futura",
                  "Avenir Next", "Helvetica Neue", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
               Helvetica, Arial, sans-serif;

  --wrap: 1080px;
}

/* ------------------------------------------------------------
   Geraldton — the poster face, self-hosted from assets/fonts/.
   Converted from the OTF originals; same outlines, same kerning.
   If a file ever goes missing the stack below falls back to a
   geometric system face rather than breaking.
   ------------------------------------------------------------ */
@font-face {
  font-family: "Geraldton";
  src: url("../fonts/geraldton-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geraldton";
  src: url("../fonts/geraldton-black.woff2") format("woff2");
  font-weight: 800 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geraldton";
  src: url("../fonts/geraldton-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* A soft spotlight behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(62rem 42rem at 50% -13rem, rgba(255,218,71,.15), transparent 70%),
    radial-gradient(44rem 32rem at 86% 6%, rgba(217,171,0,.10), transparent 72%);
  z-index: 0;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

main { position: relative; z-index: 1; }

a { color: var(--brand); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.005em;
  line-height: 1.04;
  margin: 0;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.8rem, 7.4vw, 5.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.12rem; letter-spacing: 0; text-transform: none; }

p { margin: 0 0 1rem; }

.eyebrow {
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 .7rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

.muted { color: var(--paper-dim); }
.small { font-size: .88rem; }

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(12,10,16,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}
.wordmark {
  color: var(--paper);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 11px;
}
.monogram {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--on-brand);
  background: var(--brand);
  border-radius: 8px;
  padding: 9px 10px 8px;
  flex: none;
  box-shadow: 0 0 22px rgba(255,218,71,.28);
}
.wordmark .locale {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--paper-mute);
}
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  color: var(--paper-dim);
  text-decoration: none;
  font-size: .93rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
}
.nav a:hover { color: var(--paper); background: var(--ink-3); }
.nav a.btn-primary { color: var(--on-brand); }
.nav a.btn-primary:hover { color: var(--on-brand); background: var(--brand-lift); }
.nav a[aria-current="page"] { color: var(--paper); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--paper);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 1rem;
  cursor: pointer;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 19px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .93rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-lift); }
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--paper-mute); background: var(--ink-3); }
.btn-danger {
  background: transparent;
  color: #ff8080;
  border-color: rgba(255,128,128,.35);
}
.btn-danger:hover { background: rgba(255,128,128,.1); }
.btn-sm { padding: 7px 13px; font-size: .84rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ============================================================
   Hero — next show
   ============================================================ */
.hero { padding: clamp(48px, 9vw, 92px) 0 42px; position: relative; z-index: 1; }
.hero h1 { margin-bottom: 14px; }

/* A two-letter name is a mark, not a headline — let it fill the space. */
.hero h1.hero-mark {
  font-size: clamp(5.5rem, 19vw, 12.5rem);
  line-height: .88;
  letter-spacing: -0.005em;
  color: var(--brand);
  margin-bottom: 18px;
  /* pull the left bearing back so the mark optically lines up with the
     text above and below it */
  margin-left: -0.045em;
}
.hero .tagline {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--paper-dim);
  max-width: 46ch;
  margin-bottom: 30px;
}

.next-show {
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--ink-2), var(--ink));
  border-radius: var(--radius);
  padding: 26px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: center;
  box-shadow: var(--shadow);
}
.next-show .datechip { border-color: var(--brand); }

.datechip {
  flex: none;
  width: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
  padding: 10px 6px 12px;
  background: var(--ink);
}
.datechip .m {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
}
.datechip .d {
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1.05;
}
.datechip .y { font-size: .74rem; color: var(--paper-mute); }

.next-show h2 { margin-bottom: 8px; }
.next-show .meta { color: var(--paper-dim); margin-bottom: 16px; }
.next-show .actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ============================================================
   Sections + show list
   ============================================================ */
.section { padding: 52px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.shows { display: flex; flex-direction: column; gap: 14px; }

.show {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-2);
  transition: border-color .15s ease, transform .15s ease;
}
.show:hover { border-color: var(--paper-mute); transform: translateY(-1px); }
.show.past { opacity: .62; }
.show-body h3 { margin-bottom: 5px; font-size: 1.22rem; font-weight: 700; }
.show-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--paper-dim);
  font-size: .92rem;
}
.show-meta span { display: inline-flex; align-items: center; gap: 6px; }
.show-meta svg { width: 14px; height: 14px; flex: none; color: var(--paper-mute); }
.show-desc { color: var(--paper-dim); font-size: .93rem; margin: 9px 0 0; }
.show-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }

/* ------------------------------------------------------------
   Add-to-calendar menu
   ------------------------------------------------------------ */
.cal-menu { position: relative; display: inline-block; }
.cal-toggle svg { width: 15px; height: 15px; }

.cal-items {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;            /* above the sticky header */
  min-width: 210px;
  max-width: min(260px, 80vw);
  padding: 6px;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cal-items[hidden] { display: none !important; }

.cal-items a,
.cal-items button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 11px;
  border: none;
  border-radius: 7px;
  background: none;
  color: var(--paper);
  font: inherit;
  font-size: .9rem;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.cal-items a:hover,
.cal-items button:hover,
.cal-items a:focus-visible,
.cal-items button:focus-visible {
  background: rgba(255, 255, 255, .07);
  color: var(--brand);
  outline: none;
}
.cal-hint { color: var(--paper-mute); font-size: .76rem; }

/* On a narrow screen the menu opens from the left edge of the card
   instead of hanging off the right side of the screen. */
@media (max-width: 760px) {
  .cal-items { right: auto; left: 0; }
}

details.parking {
  margin-top: 9px;
  font-size: .88rem;
}
details.parking > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--paper-mute);
  font-weight: 600;
  padding: 3px 0;
}
details.parking > summary::-webkit-details-marker { display: none; }
details.parking > summary:hover { color: var(--brand); }
details.parking > summary svg { width: 14px; height: 14px; }
details.parking > summary::after { content: " ▸"; font-size: .8em; }
details.parking[open] > summary::after { content: " ▾"; }
details.parking > p {
  margin: 4px 0 0;
  color: var(--paper-dim);
  max-width: 62ch;
  line-height: 1.55;
}

.next-parking {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 14px 0 0;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--ink-3);
  border: 1px solid var(--line);
  color: var(--paper-dim);
  font-size: .9rem;
  line-height: 1.55;
  max-width: 60ch;
}
.next-parking svg { width: 15px; height: 15px; flex: none; margin-top: 3px; color: var(--brand); }
.next-parking b { color: var(--paper); font-weight: 700; }

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--paper-dim);
}

details.archive { margin-top: 12px; }
details.archive > summary {
  cursor: pointer;
  color: var(--paper-dim);
  font-weight: 600;
  padding: 12px 0;
  list-style: none;
}
details.archive > summary::-webkit-details-marker { display: none; }
details.archive > summary::before { content: "▸ "; color: var(--brand); }
details.archive[open] > summary::before { content: "▾ "; }

/* ============================================================
   Cast
   ============================================================ */
.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}
.cast-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-2);
  overflow: hidden;
  text-align: left;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.cast-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.cast-photo {
  aspect-ratio: 1 / 1;
  background: var(--ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--brand);
}
.cast-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cast-card .cast-name { padding: 14px 16px 4px; font-weight: 700; }
.cast-card .cast-role {
  padding: 0 16px 16px;
  color: var(--paper-mute);
  font-size: .85rem;
}

/* ============================================================
   Cards / forms
   ============================================================ */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-2);
  padding: 24px;
}
.stack > .card + .card { margin-top: 16px; }
.grid-2 > .card, .grid-3 > .card { margin-top: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; }

.field { margin-bottom: 15px; }
.field label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin-bottom: 6px;
}
.field .hint { font-size: .8rem; color: var(--paper-mute); margin-top: 5px; }

input[type="text"], input[type="email"], input[type="url"],
input[type="date"], input[type="time"], input[type="tel"],
textarea, select {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  font-family: inherit;
  font-size: .97rem;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: transparent;
}
textarea { min-height: 110px; resize: vertical; }

.checkline { display: flex; align-items: center; gap: 9px; }
.checkline input { width: 17px; height: 17px; accent-color: var(--brand); }
.checkline label { margin: 0; text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--paper); }

.notice {
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  font-size: .93rem;
  margin-bottom: 16px;
  border: 1px solid;
}
.notice-ok   { background: rgba(80,220,150,.09); border-color: rgba(80,220,150,.35); color: #8ff0c0; }
.notice-bad  { background: rgba(255,110,110,.09); border-color: rgba(255,110,110,.35); color: #ffadad; }
.notice-info { background: rgba(255,194,75,.08); border-color: rgba(255,194,75,.3); color: #ffdb96; }
.notice[hidden] { display: none !important; }

/* ============================================================
   Modal
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6,5,9,.78);
  backdrop-filter: blur(4px);
}
.modal[hidden] { display: none !important; }
.modal-panel {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  max-width: 520px;
  width: 100%;
  padding: 28px;
  box-shadow: var(--shadow);
  max-height: 86vh;
  overflow-y: auto;
}
.modal-close {
  float: right;
  background: none;
  border: none;
  color: var(--paper-mute);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 60px;
  padding: 40px 0 56px;
  color: var(--paper-mute);
  font-size: .9rem;
  position: relative;
  z-index: 1;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--paper-dim); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============================================================
   Admin
   ============================================================ */
.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.admin-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--ink-2);
}
.admin-row + .admin-row { margin-top: 10px; }
.admin-row .when { font-weight: 700; white-space: nowrap; }
.admin-row .acts { display: flex; gap: 8px; }
.pill {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--paper-mute);
}
.pill.live { color: #8ff0c0; border-color: rgba(80,220,150,.4); }

.spinner {
  display: inline-block;
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: var(--paper);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  height: 86px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--ink-2), var(--ink-3), var(--ink-2));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.skeleton + .skeleton { margin-top: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 760px) {
  .nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink-2);
    border-bottom: 1px solid var(--line);
    padding: 8px;
  }
  .nav[hidden] { display: none; }
  .nav a { padding: 12px; }
  .nav .btn { margin-top: 6px; }
  .nav-toggle { display: block; }

  .next-show { grid-template-columns: 1fr; gap: 18px; }
  .show { grid-template-columns: auto 1fr; }
  .show-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .grid-2 { grid-template-columns: 1fr; }
  .admin-row { grid-template-columns: 1fr; }
  .admin-row .acts { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
