/* Saturn Awards member screenings
   Type: Big Shoulders Display (marquee lettering, dates, headings) + Public Sans (reading).
   The one bold element is the ticket stub; everything around it stays quiet. */

:root {
  --ink: #1e1b3a;          /* Saturn night */
  --ink-soft: #4a4766;
  --ink-faint: #7b7894;
  --paper: #f4f3f8;
  --surface: #ffffff;
  --line: #dcdae6;
  --brass: #a9772a;        /* the ring */
  --brass-text: #85591a;
  --brass-wash: #f6ecd9;
  --violet: #4f3f86;
  --open: #2c6b5b;
  --open-wash: #e2f1ec;
  --full: #9e2b2f;
  --full-wash: #f8e4e4;
  --focus: #3b6fd8;

  --display: "Big Shoulders Display", "Oswald", "Arial Narrow", sans-serif;
  --text: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.889rem;
  --step-0: 1.125rem;      /* 18px reading size: many members read on tablets */
  --step-1: 1.333rem;
  --step-2: 1.777rem;
  --step-3: 2.369rem;
  --step-4: 3.157rem;
  --step-5: 4.209rem;

  --radius-s: 6px;
  --radius-m: 10px;
  --measure: 68ch;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ecebf5;
    --ink-soft: #c2c0d6;
    --ink-faint: #9592ad;
    --paper: #15132a;
    --surface: #1e1b3a;
    --line: #34305a;
    --brass: #d3a456;
    --brass-text: #e0b56c;
    --brass-wash: #2f2740;
    --violet: #a99be0;
    --open: #6fc7ad;
    --open-wash: #183631;
    --full: #f08a8d;
    --full-wash: #3a1d2a;
    --focus: #8fb1ff;
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--text);
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

a { color: var(--violet); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0 0 0.4em;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-0); margin: 0 0 0.3em; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 12px; top: 12px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }
.prose { max-width: var(--measure); }
.prose p, .prose li { line-height: 1.7; }
.muted { color: var(--ink-soft); }
.small { font-size: var(--step--1); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Masthead ─────────────────────────────────────────── */

.masthead { background: var(--surface); border-bottom: 1px solid var(--line); }
.masthead .wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding-block: 14px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand svg { width: 46px; height: 46px; flex: none; }
.brand-name { font: 800 1.7rem/0.9 var(--display); letter-spacing: 0.02em; display: block; }
.brand-sub { font-size: 0.82rem; color: var(--ink-soft); display: block; margin-top: 3px; }

.nav { display: flex; gap: 4px 6px; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: var(--radius-s); font-weight: 500; }
.nav a:hover { background: var(--paper); }
.nav a[aria-current="page"] { color: var(--brass-text); box-shadow: inset 0 -2px 0 var(--brass); border-radius: 0; }
.nav form { margin: 0; }
.nav a.btn { color: var(--fg); padding: 5px 14px; border-radius: var(--radius-s); }
.nav a.btn:hover { background: var(--bg); }

.notice { background: var(--brass-wash); color: var(--ink); border-bottom: 1px solid var(--line); }
.notice .wrap { padding-block: 10px; }

main { padding-block: clamp(28px, 5vw, 56px) 72px; min-height: 60vh; }

/* ── Footer ───────────────────────────────────────────── */

.footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font-size: var(--step--1); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; padding-block: 28px; }
.footer a { color: inherit; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ── Page heads ───────────────────────────────────────── */

.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--ink-soft); max-width: 60ch; }
.crumbs { font-size: var(--step--1); margin-bottom: 10px; color: var(--ink-soft); }
.crumbs a { color: inherit; }

/* ── Buttons & forms ──────────────────────────────────── */

.btn {
  --bg: var(--ink); --fg: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px;
  border: 2px solid var(--bg); border-radius: var(--radius-s);
  background: var(--bg); color: var(--fg);
  font: 600 1rem/1.2 var(--text); text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.12); }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }
.btn-brass { --bg: var(--brass); --fg: #1b1306; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-faint); filter: none; }
.btn-danger { --bg: var(--full); --fg: #fff; }
.btn-small { min-height: 36px; padding: 5px 12px; font-size: 0.9rem; }
.btn-link { background: none; border: 0; color: var(--violet); padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.field { margin-bottom: 18px; }
.field label, .label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: var(--step--1); color: var(--ink-soft); margin: 4px 0 0; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel],
input[type=search], input[type=date], input[type=time], input[type=url], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1px solid var(--ink-faint); border-radius: var(--radius-s);
  background: var(--surface); color: var(--ink); font: inherit;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--full); }
.field-error { color: var(--full); font-size: var(--step--1); margin: 6px 0 0; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--violet); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 20px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px 20px 4px; margin: 0 0 22px; }
legend { font-weight: 700; padding: 0 6px; }

.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--ink-faint); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); }
.stepper button { width: 52px; border: 0; background: var(--paper); color: var(--ink); font-size: 1.5rem; cursor: pointer; }
.stepper button:disabled { color: var(--ink-faint); cursor: not-allowed; }
.stepper input { width: 64px; border: 0; border-radius: 0; text-align: center; font: 700 1.6rem var(--display); min-height: 52px; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── Flash messages ───────────────────────────────────── */

.flash { border-radius: var(--radius-m); padding: 14px 18px; margin-bottom: 22px; border: 1px solid var(--line); background: var(--surface); }
.flash-success { border-color: var(--open); background: var(--open-wash); }
.flash-error { border-color: var(--full); background: var(--full-wash); }
.flash-info { border-color: var(--brass); background: var(--brass-wash); }
.flash p:last-child { margin: 0; }

/* ── Panels ───────────────────────────────────────────── */

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: clamp(18px, 3vw, 28px); margin-bottom: 24px; }
.panel h2, .panel h3 { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h2, .panel-head h3 { margin: 0; }

/* ── The ticket stub ──────────────────────────────────── */

.tickets { display: grid; gap: 14px; }

.ticket {
  --notch: 11px;
  position: relative;
  display: grid; grid-template-columns: 7.2rem 1fr auto; align-items: stretch;
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius-m);
  text-decoration: none;
  /* Two punched notches where stub meets ticket */
  -webkit-mask: radial-gradient(circle var(--notch) at 7.2rem 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at 7.2rem 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle var(--notch) at 7.2rem 0, #0000 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at 7.2rem 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  filter: drop-shadow(0 1px 0 var(--line)) drop-shadow(0 0 0.5px var(--ink-faint));
}
a.ticket:hover .ticket-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }

.ticket-stub {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 14px 8px;
  border-right: 2px dashed var(--line);
  background: var(--brass-wash);
  text-align: center;
}
.ticket-month { font: 700 1rem/1 var(--display); letter-spacing: 0.08em; color: var(--brass-text); }
.ticket-day { font: 800 3.4rem/0.9 var(--display); }
.ticket-dow { font-size: 0.85rem; color: var(--ink-soft); margin-top: 2px; }

.ticket-body { padding: 16px 20px; min-width: 0; }
.ticket-title { font: 700 var(--step-2)/1.05 var(--display); margin: 0 0 6px; }
.ticket-meta { color: var(--ink-soft); margin: 0; }
.ticket-meta strong { color: var(--ink); font-weight: 600; }

.ticket-side { padding: 16px 20px 16px 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 8px; text-align: right; }

@media (max-width: 640px) {
  .ticket { grid-template-columns: 5.4rem 1fr;
    -webkit-mask: radial-gradient(circle var(--notch) at 5.4rem 0, #0000 98%, #000) top / 100% 51% no-repeat,
                  radial-gradient(circle var(--notch) at 5.4rem 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
            mask: radial-gradient(circle var(--notch) at 5.4rem 0, #0000 98%, #000) top / 100% 51% no-repeat,
                  radial-gradient(circle var(--notch) at 5.4rem 100%, #0000 98%, #000) bottom / 100% 51% no-repeat; }
  .ticket-day { font-size: 2.6rem; }
  .ticket-side { grid-column: 2; align-items: flex-start; text-align: left; padding: 0 20px 16px; }
}

/* Seat meter */
.seats { font-size: var(--step--1); font-weight: 600; white-space: nowrap; }
.seats-open { color: var(--open); }
.seats-low { color: var(--brass-text); }
.seats-full { color: var(--full); }
.meter { width: 9rem; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--ink-soft); }

.tag { display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); background: var(--surface); white-space: nowrap; }
.tag-open { color: var(--open); border-color: currentColor; background: var(--open-wash); }
.tag-closed, .tag-full { color: var(--full); border-color: currentColor; background: var(--full-wash); }
.tag-final { color: var(--violet); border-color: currentColor; }
.tag-draft { border-style: dashed; }
.tag-yours { color: #1b1306; background: var(--brass); border-color: var(--brass); }

/* ── Show listing ─────────────────────────────────────── */

.show-block { display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 28px; padding-block: 32px; border-top: 1px solid var(--line); }
.show-block:first-of-type { border-top: 0; padding-top: 0; }
.poster { aspect-ratio: 2 / 3; width: 100%; object-fit: cover; border-radius: var(--radius-s); background: var(--brass-wash); display: block; }
.poster-blank { display: grid; place-items: center; color: var(--brass-text); }
.poster-blank svg { width: 45%; opacity: 0.7; }
.show-head h2 { margin-bottom: 4px; }
.show-facts { display: flex; gap: 6px 18px; flex-wrap: wrap; color: var(--ink-soft); margin-bottom: 12px; font-size: var(--step--1); }
.show-desc { max-width: var(--measure); }
.show-desc p:last-child { margin-bottom: 18px; }
@media (max-width: 720px) {
  .show-block { grid-template-columns: 1fr; gap: 16px; }
  .show-block .poster { max-width: 180px; }
}

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.filters a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; background: var(--surface); font-size: 0.95rem; }
.filters a[aria-current="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── Home ─────────────────────────────────────────────── */

.marquee { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; margin-bottom: 56px; }
.marquee h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); line-height: 0.92; margin-bottom: 18px; }
.marquee .lede { font-size: var(--step-1); color: var(--ink-soft); max-width: 34ch; }
.marquee-next h2 { font-size: var(--step-1); font-family: var(--text); font-weight: 600; color: var(--ink-soft); margin-bottom: 12px; }
@media (max-width: 860px) { .marquee { grid-template-columns: 1fr; } }

.planet { width: 100%; max-width: 380px; display: block; margin-top: 24px; color: var(--brass); }
@media (prefers-reduced-motion: no-preference) {
  .planet .ring { transform-origin: 50% 50%; animation: tilt 1.6s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes tilt { from { transform: rotate(-14deg) scaleX(0.82); opacity: 0; } to { transform: none; opacity: 1; } }
}

.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px 40px; }
.columns h3 { font-size: var(--step-1); }

/* ── Booking ──────────────────────────────────────────── */

.booking { display: grid; grid-template-columns: 1fr minmax(300px, 400px); gap: 40px; align-items: start; }
@media (max-width: 900px) { .booking { grid-template-columns: 1fr; } }
.booking .poster { max-width: 240px; margin-bottom: 20px; }
.reserve-card { position: sticky; top: 20px; }
.reserve-card .when { font: 700 var(--step-2)/1.05 var(--display); margin-bottom: 4px; }
.date-pick { display: grid; gap: 8px; margin-bottom: 18px; }
.date-pick a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none; color: var(--ink); background: var(--surface); }
.date-pick a[aria-current="true"] { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--brass); }

.confirm-stub { text-align: center; }
.confirm-stub .ticket { max-width: 640px; margin: 26px auto; text-align: left; }

/* ── Tables (admin & account) ─────────────────────────── */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 600; color: var(--ink-soft); font-size: 0.88rem; background: var(--paper); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.is-cancelled td { color: var(--ink-faint); text-decoration: line-through; }
tr.is-checked td:first-child { box-shadow: inset 4px 0 0 var(--open); }
td form { margin: 0; display: inline; }
.empty { padding: 36px 20px; text-align: center; color: var(--ink-soft); }

/* ── Admin shell ──────────────────────────────────────── */

.admin-body .masthead { background: var(--ink); color: var(--paper); border: 0; }
.admin-body .brand, .admin-body .nav a { color: var(--paper); }
.admin-body .brand-sub { color: color-mix(in srgb, var(--paper) 70%, transparent); }
.admin-body .nav a:hover { background: color-mix(in srgb, var(--paper) 12%, transparent); }
.admin-body .nav a[aria-current="page"] { color: var(--brass); box-shadow: inset 0 -2px 0 var(--brass); }
.admin-body .nav .btn-link { color: var(--paper); text-decoration: none; padding: 8px 12px; }
@media (prefers-color-scheme: dark) { .admin-body .masthead { background: #0d0c1c; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 18px; }
.stat b { display: block; font: 800 2.4rem/1 var(--display); }
.stat span { color: var(--ink-soft); font-size: var(--step--1); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 18px; }
.toolbar .field { margin: 0; }
.toolbar input[type=search] { min-width: 260px; }

.split { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } }

.lookup { position: relative; }
.lookup-results { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--ink-faint); border-radius: var(--radius-s); margin: 4px 0 0; padding: 4px; list-style: none; max-height: 280px; overflow: auto; }
.lookup-results button { width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 4px; font: inherit; color: var(--ink); cursor: pointer; }
.lookup-results button:hover, .lookup-results button:focus { background: var(--paper); }

.date-rows { display: grid; gap: 10px; margin-bottom: 12px; }
.date-row { display: grid; grid-template-columns: 1fr 1fr 1fr 110px 44px; gap: 10px; align-items: end; }
.date-row .field { margin: 0; }
@media (max-width: 720px) { .date-row { grid-template-columns: 1fr 1fr; } }

dialog { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 24px; max-width: min(460px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgb(20 18 40 / 0.55); }

/* ── Print (guest list for the door) ──────────────────── */

@media print {
  .masthead, .footer, .no-print, .notice { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  main { padding: 0; }
  .table-wrap { border: 0; }
  th { background: #eee; }
}

.h3 { font-size: var(--step-2); }
.highlights { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px; }
.highlights figure { margin: 0; }
.highlights figcaption { font-size: var(--step--1); margin-top: 6px; color: var(--ink-soft); }
.schedule-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { font-weight: 600; cursor: pointer; font-size: var(--step-1); font-family: var(--text); }
.faq details p { margin: 10px 0 0; max-width: var(--measure); }
.contact-grid { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -5000px; }
.tier { border-top: 4px solid var(--brass); }
.panel > :last-child, .panel > form:last-child > :last-child { margin-bottom: 0; }

.admin-body .masthead .wrap { flex-wrap: nowrap; }
.admin-body .nav { gap: 2px; font-size: 0.95rem; justify-content: flex-end; }
.admin-body .nav a { padding: 8px 10px; }
@media (max-width: 1100px) { .admin-body .masthead .wrap { flex-wrap: wrap; } }

/* Grid children may shrink below their content (wide tables scroll inside .table-wrap instead) */
.split > *, .booking > *, .contact-grid > *, .marquee > *, .show-block > * { min-width: 0; }

@media (max-width: 700px) {
  .masthead .wrap { gap: 10px; padding-block: 10px 6px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .nav a, .nav form { flex: none; }
  .admin-body .masthead .wrap { flex-wrap: wrap; }
  .admin-body .nav { justify-content: flex-start; }
  h1 { font-size: var(--step-3); }
}
fieldset { min-width: 0; } .date-row > *, .grid-2 > *, .grid-3 > * { min-width: 0; }
