/* The front door — crawlcast.app (R100, R101). The show's own ink and parchment (tokens.css and
 * typography.css are copies of the show's, pinned by a test), not a marketing template: no
 * gradient blob, no centred hero. It is a static trailer for the show: the same page in every state
 * of the season, so nothing here changes after it is drawn and every image has its size (layout shift
 * 0, R64). This file is the frame, the bar and the buttons; the hero is `door_hero.css`, the pilot's
 * people, moments and screenshots `door_pilot.css`, and the last band `door_sections.css`.
 * From 1024 the frame fills the masthead's width in columns, never longer lines. */

[hidden] {
  display: none !important;
}

/* One gap between the page's sections: a phone's are 40 px apart, a desk's 56 and then 80. */
:root {
  --section-gap: var(--space-7);
}

@media (min-width: 64em) {
  :root {
    --section-gap: 5rem;
  }
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: var(--space-2);
  z-index: 30;
  padding: var(--space-2) var(--space-3);
  background: var(--parchment);
  color: var(--ink);
  font-size: var(--text-14);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  text-decoration: none;
  transform: translate3d(0, -200%, 0);
  transition: transform var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  transform: none;
}

/* --- the frame ------------------------------------------------------------------------------- */

.door-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.door-bar-in,
.door,
.door-foot {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* One line, kept on screen as the page scrolls: the way to the show is never a scroll away. */
.door-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  flex: none;
  background: var(--ink);
  border-bottom: 1px solid var(--rule);
}

.door-bar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-2);
}

/* A phone's bar is a step shorter (RP13): the hero's buttons are on the first screen under it. */
@media (max-width: 39.99em) {
  .door-bar-in {
    padding-block: var(--space-1);
  }
}

/* The brand's lockup (docs/assets, the owner 2026-10-21): the staircase mark and the wordmark, one
 * picture, as tall as the bar's button so the line holds one height. */
.wordmark {
  display: inline-flex;
  align-items: center;
  padding-block: var(--tap-lift-line);
  text-decoration: none;
}

.wordmark-lockup {
  display: block;
  align-self: center;
  width: auto;
  height: 28px;
}

@media (min-width: 64em) {
  .wordmark-lockup {
    height: 32px;
  }
}

.door {
  flex: 1 0 auto;
  /* The page's own width, for the hero's columns (`door_hero.css`, `cqw`). */
  container-type: inline-size;
  display: grid;
  align-content: start;
  padding-block: var(--space-5) var(--section-gap);
  row-gap: var(--section-gap);
}

@media (min-width: 40em) {
  .door {
    padding-block-start: var(--space-6);
  }
}

.door > * {
  min-width: 0;
}

.door-head {
  margin: 0 0 var(--space-3);
  color: var(--parchment);
}

/* The sentence under a section's head: why it is there, in the page's reading size. */
.door-intro {
  margin: 0 0 var(--space-5);
  max-inline-size: 44rem;
  color: var(--parchment-dim);
  font-size: var(--text-prose);
  line-height: 1.5;
}

.door-kicker {
  margin: 0 0 var(--space-2);
  color: var(--acid);
}

/* --- buttons --------------------------------------------------------------------------------- */

/* One button, `.door-btn`, in two ranks (M7, R101, R18): the secondary is an outline in parchment, the
 * primary an acid fill, both in the System's mono caps, in the bar, the hero, the Discord's band and
 * `/how`. A hand on either lifts it and brightens it, and a primary never dims: acid mixed with ink was
 * an olive, which read as the button going off. The rank is a set of three colours and their hover,
 * so a place that changes the rank changes only those. The hero's one primary is the waitlist's
 * (R122); its Discord and its show are outlines. A phone's button is a row. */
.door-btn,
.door-btn--secondary {
  --btn-fill: transparent;
  --btn-ink: var(--parchment);
  --btn-edge: var(--parchment-dim);
  --btn-fill-hover: color-mix(in srgb, var(--parchment) 14%, transparent);
  --btn-edge-hover: var(--parchment);
}

.door-btn--primary {
  --btn-fill: var(--acid);
  --btn-ink: var(--ink);
  --btn-edge: var(--acid);
  --btn-fill-hover: color-mix(in srgb, var(--acid) 82%, white);
  --btn-edge-hover: color-mix(in srgb, var(--acid) 82%, white);
}

.door-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 100%;
  min-block-size: 2.75rem;
  padding: 0 var(--space-4);
  border: 1px solid var(--btn-edge);
  background: var(--btn-fill);
  color: var(--btn-ink);
  font-family: var(--font-system);
  font-size: var(--text-14);
  font-weight: 600;
  letter-spacing: var(--track-caps);
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}

.door-btn:hover,
.door-btn:focus-visible {
  border-color: var(--btn-edge-hover);
  background: var(--btn-fill-hover);
  transform: translateY(-1px);
}

.door-btn:active {
  transform: none;
}

.door-btn:focus-visible {
  outline: 2px solid var(--parchment);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .door-btn {
    transition: none;
  }

  .door-btn:hover,
  .door-btn:focus-visible {
    transform: none;
  }
}

/* The masthead's way to the show: the same button, one size down, so the bar holds one line. */
.door-btn--compact {
  flex: 0 0 auto;
  min-block-size: 2.25rem;
  font-size: var(--text-12);
}

/* The Discord's hero button and the band's block are there only when config.js named an invite
 * (`html.has-discord`, set before first paint), so the first frame is the page's last. In the hero
 * the Discord stands under the waitlist and over the show's button (the owner, 2026-10-23: the
 * Discord is where people stay), with the rehearsal's note beside it. */
.door-also,
.door-seen {
  display: none;
  margin: 0;
}

html.has-discord .door-also,
html.has-rehearsal .door-seen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

.door-also-why {
  font-size: var(--text-14);
  line-height: var(--leading-chrome);
  color: var(--parchment-dim);
}

.band-join {
  display: none;
}

html.has-discord .band-join {
  display: grid;
}

/* The rehearsal's ways in (the bar's button, the hero's) are there only when config.js names it
 * (`html.has-rehearsal`, set before first paint, like the Discord's); the rules' two ways on are
 * Season 1's (`html.has-show`): pre-launch the show is offline (the owner, 2026-10-26). The bar's
 * button reads "Watch" on a phone and "Watch the rehearsal" from 768. */
html:not(.has-rehearsal) .door-watch,
html:not(.has-show) .how-on {
  display: none;
}

.door-watch-more {
  display: none;
}

@media (min-width: 48em) {
  .door-watch-more {
    display: inline;
  }
}

.door-discord,
.door-go {
  flex: 0 0 auto;
  justify-self: start;
  inline-size: 100%;
  max-inline-size: 100%;
  padding: 0 var(--space-5);
}

@media (min-width: 40em) {
  .door-btn {
    flex: 0 0 auto;
    padding: 0 var(--space-5);
    font-size: var(--text-16);
  }

  .door-btn--compact {
    padding: 0 var(--space-4);
    font-size: var(--text-12);
  }

  .door-discord,
  .door-go {
    inline-size: auto;
    /* One width for the two outline buttons, wider than either's label ("Watch the rehearsal" is the longer), so the notes beside them line up (RP5). */
    min-inline-size: 18rem;
  }
}
