/* Space Diner Theatre fan site.
   Five greys, no more: paper white, light graphite, mid graphite,
   dark graphite, ink black. Line does the work; no colour in the
   interface, no drop shadows. Heroes are the drawings at full
   strength; backdrops are the drawings faded back under a wash of
   paper white to roughly a quarter to a third of their contrast. */

:root {
  --paper: #f4f0e6;
  --light: #d9d4c8;
  --mid: #8b867c;
  --dark: #3d3a35;
  --ink: #16140f;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06rem;
  line-height: 1.55;
}

img { max-width: 100%; }

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--dark); }

/* -- Masthead ---------------------------------------------------- */

.masthead { padding: 0.9rem 1rem 0.7rem; }

.title-band { display: block; width: 100%; height: auto; }

.nav {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem;
  padding: 0.55rem 0 0.1rem;
  border-top: 3px double var(--ink);
  margin-top: 0.7rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.92rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.nav a { text-decoration: none; }
.nav a[aria-current="page"] { border-bottom: 2px solid var(--ink); }

/* -- Hero --------------------------------------------------------- */

.hero { margin: 0; overflow: hidden; view-transition-name: hero; }
.hero img { display: block; width: 100%; height: auto; }
.title-band { view-transition-name: titleband; }

/* -- Layout ------------------------------------------------------- */

.wrap { max-width: 62rem; margin: 0 auto; padding: 1.2rem 1rem 2.5rem; }
.narrow { max-width: 40rem; }

.kicker {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--dark); margin: 0 0 0.4rem;
}

h1, h2 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 700; line-height: 1.2; margin: 0 0 0.7rem;
}
h1 { font-size: clamp(1.45rem, 6vw, 1.9rem); }
h2 { font-size: 1.2rem; margin-top: 0; }

.premise { font-size: clamp(1.18rem, 4.6vw, 1.34rem); line-height: 1.45; }

.rule { border: 0; border-top: 3px double var(--ink); margin: 1.6rem 0; }
.rule-hatch {
  height: 10px; border: 0; margin: 1.6rem 0;
  background: repeating-linear-gradient(
    -45deg, var(--mid) 0 1px, transparent 1px 5px);
  opacity: 0.55;
}

/* -- Panels ------------------------------------------------------- */

.panels { display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
@media (min-width: 44rem) {
  .panels { grid-template-columns: 1fr 1fr; }
  .panels .panel-wide { grid-column: 1 / -1; }
}

.panel {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: 0.9rem 1rem 1rem;
}
.panel img.art { display: block; width: 100%; height: auto; margin-bottom: 0.7rem; }
.panel h3 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem; letter-spacing: 0.05em; text-transform: uppercase;
  margin: 0 0 0.35rem;
}
.panel p { margin: 0.3rem 0; }
.panel .date {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.92rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--dark);
}
.panel .status { color: var(--dark); font-style: normal; }

/* -- Backdrop sections -------------------------------------------- */
/* The art sits large behind the content, faded back under a wash of
   paper white. Atmosphere only: everything readable sits in panels
   or type above the wash. */

.backdrop-wrap { position: relative; overflow: hidden; }
.backdrop-art {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.backdrop-wash {
  position: absolute; inset: 0;
  background: var(--paper); opacity: 0.68;
}
.backdrop-content { position: relative; }

/* -- Adult notice strip ------------------------------------------- */

.notice {
  border-top: 3px double var(--ink);
  padding: 0.6rem 1rem 0.7rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem; letter-spacing: 0.04em;
  text-align: center;
}

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

.footer {
  border-top: 3px double var(--ink);
  margin-top: 2.2rem; padding: 1rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem;
}
.footer .notice-line {
  flex-basis: 100%; text-transform: none; letter-spacing: 0.04em;
  font-size: 0.85rem; text-align: left;
}

/* -- Admin door ------------------------------------------------------
   The planning surface, branded to the same system: panels, drawn
   rules, ink-black actions. A working tool first -- flat, fast,
   nothing decorative between the planner and the record. */

.admin-form { display: grid; gap: 0.9rem; margin-top: 1rem; }
.admin-form label {
  display: grid; gap: 0.3rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.admin-form input, .admin-form select {
  font: inherit; letter-spacing: normal; text-transform: none;
  padding: 0.55rem 0.6rem;
  background: #fffdf8; color: var(--ink);
  border: 2px solid var(--ink); border-radius: 0;
}
.admin-form button, .inline-form button {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--ink); color: var(--paper);
  border: 2px solid var(--ink); padding: 0.6rem 1rem; cursor: pointer;
  justify-self: start;
}
.admin-form button:hover, .inline-form button:hover { background: var(--dark); }

.inline-form { display: inline; }
.inline-form button { padding: 0.3rem 0.7rem; font-size: 0.82rem; }
.admin-who { color: var(--dark); text-transform: none; letter-spacing: 0.02em; }

.form-error {
  border: 2px solid var(--ink); padding: 0.6rem 0.8rem;
  background: var(--light); font-weight: 700;
}
.form-saved {
  border: 2px solid var(--ink); padding: 0.6rem 0.8rem;
  background: var(--paper); font-weight: 700;
}

.plan-table { width: 100%; border-collapse: collapse; background: var(--paper); }
.plan-table th, .plan-table td {
  border: 1px solid var(--mid); padding: 0.45rem 0.6rem; text-align: left;
}
.plan-table th {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase;
  border-bottom: 3px double var(--ink);
}

/* -- Motion layer ----------------------------------------------------
   The concept (CONCEPT.md in the build record): the drawings move
   the way the show is built -- heroes drift on scroll, panels step
   through as they enter, backdrop washes settle deeper as text
   takes over, and page turns read as board turns. All declarative
   CSS: scroll-driven and view-timeline animations plus the
   cross-document View Transitions API. No JavaScript. Browsers
   without support get the static site; reduced motion gets none
   of it. */

@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.28s; }

@media (prefers-reduced-motion: no-preference) {

  @supports (animation-timeline: scroll()) {
    .hero img {
      animation: hero-drift linear both;
      animation-timeline: scroll(root);
      animation-range: 0 80vh;
    }
  }
  @keyframes hero-drift {
    from { transform: scale(1.09) translateY(-1.6%); }
    to   { transform: scale(1.09) translateY(1.6%); }
  }

  @supports (animation-timeline: view()) {
    .panel {
      animation: panel-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    .backdrop-wash {
      animation: wash-settle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 55%;
    }
  }
  @keyframes panel-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes wash-settle {
    from { opacity: 0.64; }
    to   { opacity: 0.76; }
  }
}
