/* ==========================================================================
   Place of Padel — Coming Soon

   Composition notes, so later edits don't undo the intent:
   - The hero is anchored bottom-left, not centred. The right of the frame is
     left as footage. A centred stack of logo, headline, icons and form is the
     shape every generated landing page takes; this deliberately isn't it.
   - Credentials are an honours board (numbered rows, brass hairlines), not a
     row of icon cards.
   - Bands step between grounds rather than sharing one flat colour, and the
     Instagram band inverts to cream because Instagram's embeds are white
     iframes we cannot restyle. Hosting them on cream beats fighting them.
   ========================================================================== */

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--ground-deep);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* Lime clears 11:1 on the dark grounds the page is mostly made of, and 1.33:1
   on a pale one, where it would be invisible. The invitation panel takes the
   dark ink instead. The brass bar has its own override further down, for the
   same reason. */
.last :where(a, button, input, [tabindex]):focus-visible {
  outline-color: var(--ink-oninvite);
}

:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--ring-focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  z-index: 10;
  top: 14px;
  left: 14px;
  padding: 12px 18px;
  background: var(--pop-brass);
  color: var(--pop-pine);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
}

[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   Scroll progress
   -------------------------------------------------------------------------- */
.progress {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--pop-lime);   /* position, not brand: see the roles in tokens.css */
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  /* One centred block and the scroll cue under it. The masthead row went with
     the masthead: the lockup it carried is the centred block now. */
  grid-template-rows: 1fr auto;
  justify-items: center;
  text-align: center;
  gap: var(--gap-step);
  padding: clamp(1.25rem, 3vw, 2.25rem) var(--gutter) clamp(1.25rem, 2.6vw, 2.25rem);
  padding-top: max(clamp(1.25rem, 3vw, 2.25rem), env(safe-area-inset-top));
  padding-bottom: max(clamp(1.25rem, 2.6vw, 2.25rem), env(safe-area-inset-bottom));
  color: var(--ink-bright);
  background: var(--ground-deep);
}

/* Taller than the hero and hung above it, so the parallax drift below never
   exposes an edge at either end of the range. */
.hero__video {
  position: absolute;
  z-index: -2;
  left: 0;
  right: 0;
  top: -10%;
  width: 100%;
  height: 120%;
  object-fit: cover;
}

/* A vignette now, not a directional wash. The type used to sit hard left, so
   the scrim was built to be heavy there and clear toward the top right. A
   centred composition has no quiet corner to clear into: the frame darkens
   from the middle outward instead, which holds cream type anywhere in it and
   still reads as footage rather than a flat panel. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    /* Heaviest exactly where the lockup sits, easing off into a ring where the
       footage still reads, then closing down again at the edges. A vignette
       that is lightest in the middle — the usual shape — would have put the
       brightest part of the frame directly behind the mark. */
    radial-gradient(58% 48% at 50% 40%,
      oklch(0.16 0.028 165 / 0.82) 0%,
      oklch(0.17 0.029 165 / 0.70) 48%,
      oklch(0.18 0.030 165 / 0.34) 80%,
      oklch(0.16 0.028 165 / 0.62) 100%),
    /* Bands top and bottom, where the eyebrow and the scroll cue sit against
       whatever the footage happens to be doing. */
    linear-gradient(to bottom,
      oklch(0.16 0.028 165 / 0.78) 0%,
      oklch(0.16 0.028 165 / 0.24) 18%,
      transparent 34%),
    linear-gradient(to top,
      oklch(0.16 0.028 165 / 0.86) 0%,
      oklch(0.16 0.028 165 / 0.34) 22%,
      transparent 44%);
}

/* The opening veil. Sits above the footage, the scrim and the grain, and below
   everything the visitor reads: the type walks up out of it while it clears.
   Static state is opacity 0 — with no motion there is simply no veil. */
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  background: var(--ground-deep);
}

.hero__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.05;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 170px 170px;
}

/* The kit's corner-frame element. Four ticks, not a full box: the frame is
   implied rather than drawn, which is what keeps it an accent. */
.hero__frame {
  position: absolute;
  z-index: -1;
  inset: clamp(10px, 1.6vw, 22px);
  pointer-events: none;
}
.hero__corner {
  position: absolute;
  width: clamp(16px, 2.2vw, 28px);
  height: clamp(16px, 2.2vw, 28px);
  border: 0 solid var(--rule-brass-firm);
}
.hero__corner--tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.hero__corner--tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.hero__corner--bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.hero__corner--br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

/* --------------------------------------------------------------------------
   The lockup, and what sits around it
   -------------------------------------------------------------------------- */
.hero__body {
  align-self: center;
  width: min(100%, 54rem);
  display: grid;
  justify-items: center;
}

/* What and where, above the mark. Hairlines either side rather than the
   bracket pair the rest of the page uses: brackets read as a caption on a
   label, and this line is the first thing in the frame. */
.hero__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 22px);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  font-weight: var(--fw-semibold);
  color: var(--pop-brass);
  margin-bottom: clamp(1.5rem, 4vh, 2.75rem);
  /* The tracking on the last letter would otherwise pull the line off centre
     against the rule that follows it. */
  text-indent: var(--ls-label);
}
.hero__eyebrow::before,
.hero__eyebrow::after {
  content: "";
  width: clamp(24px, 6vw, 84px);
  height: 1px;
  background: var(--rule-brass-firm);
  flex: none;
}
/* Each rule draws outward from the type it belongs to. */
.hero__eyebrow::before { transform-origin: right center; }
.hero__eyebrow::after  { transform-origin: left center; }

.hero__brand {
  display: grid;
  justify-items: center;
  /* The scrim handles the frame as a whole, but the footage runs through
     bright interiors as well as dark ones, and on a pale frame a cream mark
     has nothing to sit against. This is a soft pad tied to the mark itself,
     so the protection travels with it at every size. */
  background: radial-gradient(62% 64% at 50% 44%,
    oklch(0.13 0.024 165 / 0.55) 0%,
    oklch(0.13 0.024 165 / 0.30) 55%,
    transparent 76%);
}

/* Sized from the viewport height, not its width: this is the tallest thing in
   a frame that must also fit a headline and the waitlist without a scroll. */
.hero__logo {
  height: clamp(128px, 27svh, 268px);
  width: auto;
  max-width: min(100%, 62vw);
  object-fit: contain;
}

/* The kit's tagline, set the way the kit sets it: Montserrat SemiBold, all
   caps, tracked wide. It belongs to the lockup, so it takes cream rather than
   the brass every other small line on the page uses — brass here would read as
   another label instead of part of the mark. */
.hero__tagline {
  margin-top: clamp(0.875rem, 2.2vh, 1.5rem);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--ink-bright);
  opacity: 0.86;
  text-shadow: 0 1px 16px oklch(0.14 0.025 165 / 0.9);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  /* Its own size, not --fs-hero. It was cut to 2.75rem when a hook line sat
     under it carrying the actual claim; the claim is the headline now and
     there is no second voice to share the frame with, so it takes the weight
     back. Still under the lockup's scale, which stays the centrepiece.
     The chapters keep --fs-hero untouched. */
  font-size: clamp(1.85rem, 4.3vw, 3.5rem);
  margin-top: clamp(1.5rem, 4.5vh, 3rem);
  line-height: var(--lh-hero);
  letter-spacing: var(--ls-hero);
  text-transform: uppercase;
  color: var(--ink-bright);
  text-shadow: 0 1px 20px oklch(0.14 0.025 165 / 0.85);
}
/* Each line rises inside its own clip mask on load */
.line { display: block; overflow: hidden; }
.line__in { display: block; }

.hero__say {
  margin-top: clamp(1rem, 2.2vh, 1.5rem);
  max-width: var(--measure);
}
.hero__hook {
  text-shadow: 0 1px 16px oklch(0.14 0.025 165 / 0.85);
  font-size: var(--fs-lede);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.01em;
  color: var(--ink-bright);
}
.hero__lede {
  margin-top: var(--gap-hair);
  color: var(--ink-body);
  text-shadow: 0 1px 16px oklch(0.14 0.025 165 / 0.85);
}

/* The waitlist reads as an RSVP line: a ruled field and a brass action, rather
   than a boxed form. */
.rsvp {
  margin-top: clamp(1.5rem, 3.5vh, 2.5rem);
  max-width: 34rem;
  width: 100%;
}
.rsvp__label {
  display: block;
  margin-bottom: 16px;
  /* Every other label on the page is a caption. This one is the ask, so it is
     the one that steps up out of --fs-label. */
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--pop-brass);
}
.rsvp__row {
  display: flex;
  align-items: center;
  gap: var(--gap-tight);
}
.rsvp__input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 60px;
  padding: 16px 18px;
  font: inherit;
  font-size: 1.0625rem;
  color: var(--ink-bright);
  /* A wash of its own so the placeholder holds contrast over any frame of the
     footage, not just the dark ones. */
  background: oklch(0.19 0.030 165 / 0.55);
  border: 0;
  border-bottom: 1px solid var(--rule-brass-firm);
  border-radius: 2px 2px 0 0;
}
.rsvp__input::placeholder { color: var(--ink-muted); }
.rsvp__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 16px 30px;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pop-pine);
  background: var(--pop-brass);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out-quart);
}
.rsvp__btn svg { transition: transform var(--dur-base) var(--ease-out); }
@media (hover: hover) {
  .rsvp__btn:hover { background: var(--accent-deep); }
  .rsvp__btn:hover svg { transform: translateX(3px); }
}

.rsvp__done {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(1.5rem, 3.5vh, 2.5rem);
  max-width: 34rem;
  width: 100%;
  padding: 16px 20px;
  color: var(--ink-bright);
  background: oklch(0.19 0.030 165 / 0.6);
  border-bottom: 1px solid var(--rule-brass-firm);
}
.rsvp__done svg { flex: none; color: var(--pop-brass); }

/* min-height, not padding: it measured 43.2px, which is under the 44px touch
   floor PRODUCT.md sets for phones. Nothing else about it changes. */
.hero__more {
  min-height: 44px;
  justify-self: center;
  align-self: end;
  text-shadow: 0 1px 12px oklch(0.17 0.028 165 / 0.9);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color var(--dur-base) var(--ease-out);
}
.hero__more svg { transition: transform var(--dur-base) var(--ease-out); }
@media (hover: hover) {
  .hero__more:hover { color: var(--pop-brass); }
  .hero__more:hover svg { transform: translateY(3px); }
}

/* --------------------------------------------------------------------------
   Bands
   -------------------------------------------------------------------------- */
.band { padding-block: var(--band-y); }
.band--deep  { background: var(--ground-deep); }
/* The lifted ground, one step up the forest scale. It carries the updates band
   so the page does not run a single value from the club to the footer. */
.band--mid   { background: var(--ground-mid); }

.band__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band__head { margin-bottom: var(--gap-wide); }
.band__head--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--gap-close);
  flex-wrap: wrap;
}
/* The kit's bracket element, wrapping every small label. The empty alt text in
   the content shorthand keeps screen readers from announcing the brackets. */
.band__label::before,
.rsvp__label::before { content: "[" / ""; margin-right: 0.7em; }
.band__label::after,
.rsvp__label::after  { content: "]" / ""; margin-left: 0.7em; }

.band__label {
  margin-bottom: 14px;
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--pop-brass);
}

.band__title {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-section);
  line-height: var(--lh-tight);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-bright);
  max-width: 18ch;
}

/* --------------------------------------------------------------------------
   The club — numbered credentials with the kit's graphic elements
   -------------------------------------------------------------------------- */
.club { position: relative; isolation: isolate; }

/* The kit's string-dot texture, at the strength its own guidance implies:
   present, never noticed. */
.club__strings {
  position: absolute;
  inset: -8% 0;
  z-index: -1;
  opacity: 0.5;
  background-image: radial-gradient(var(--tint-sage) 1.1px, transparent 1.2px);
  background-size: 34px 34px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
}

/* Circle badge: the kit's own lockup of the mark inside a ring. */
.crest {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(74px, 8vw, 104px);
  aspect-ratio: 1;
  flex: none;
  color: var(--rule-brass-firm);
}
.crest__ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.crest__mark { width: 44%; height: auto; opacity: 0.92; }

/* The honours board's markup went away in the chapter rework: its three
   credentials each became a chapter with the render that proves it. The
   styles went with it rather than sitting here waiting for a caller. */

/* The plate index that lived here became the scroll-driven gallery in
   css/chapters.css: full-viewport plates, no captions, no controls. */


/* --------------------------------------------------------------------------
   Latest updates

   The band used to invert to cream so the white Instagram iframes had somewhere
   to sit. Each embed now carries its own cream mount instead, which puts the
   white card on the page as a deliberate object rather than as the reason the
   whole section changed colour. The band keeps the forest ground.
   -------------------------------------------------------------------------- */
/* The kit's court-line texture, answering the club band's string dots. Faint
   enough to read as ruling rather than pattern. */
.social { position: relative; isolation: isolate; }
.social__court {
  position: absolute;
  inset: -10% 0;
  z-index: -1;
  opacity: 0.4;
  background-image:
    repeating-linear-gradient(45deg,  var(--tint-sage-soft) 0 1px, transparent 1px 54px),
    repeating-linear-gradient(-45deg, var(--tint-sage-soft) 0 1px, transparent 1px 54px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}

/* The handles sit in the section head, where following is the action being
   asked for. The footer keeps its own pair for anyone who scrolls past. */
.social__handles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-tight);
}
.social__handle {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  /* The floor, not the padding, is what guarantees the target. The narrow-screen
     rule below tightens the padding so both pills sit on one row, and without
     this that took them to 38px on a phone: under the 44px this project sets
     itself, on the one band where the only things to tap are these two. */
  min-height: 44px;
  padding: 0.7em 1.15em;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  color: var(--ink-body);
  border: 1px solid var(--rule-brass);
  border-radius: var(--radius-pill);
  transition: color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              background-color var(--dur-base) var(--ease-out);
}
@media (hover: hover) {
  .social__handle:hover {
    color: var(--ink-bright);
    border-color: var(--rule-brass-firm);
    background: oklch(0.95 0.01 92 / 0.06);
  }
}

/* On a narrow screen the pair wraps to two stacked rows and pushes the first
   card most of a screen down. Tightened just enough that both sit on one. */
@media (max-width: 620px) {
  .social__handles { gap: var(--gap-hair); }
  .social__handle {
    padding: 0.6em 0.85em;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
  }
}

/* Three reel embeds stacked vertically ran to 1737px on a 390px screen, 43% of
   the whole page. Below the width where they fit side by side they become a
   swipe strip instead: same three posts, a fifth of the scroll. The peek of the
   next card is the affordance, so it needs no arrows or dots of its own. */
.feed__embeds {
  display: flex;
  align-items: flex-start;
  gap: clamp(0.875rem, 3vw, 1.25rem);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* The embeds resize as they render, and scroll anchoring compensates by
     nudging the strip's offset, which left it opening on the second card.
     Turning anchoring off in this one container keeps it starting at the first. */
  overflow-anchor: none;
  /* Room for the focus ring and the mounts' shadow, which the scroll container
     would otherwise clip. */
  padding-block: 4px 10px;
}
.feed__embeds::-webkit-scrollbar { display: none; }

/* The mount. A cream plate with a brass edge, sized by the strip; the embed
   inside it is stripped of the chrome embed.js writes so the mount is the only
   frame on screen. */
.feed__card {
  flex: 0 0 min(440px, 84vw);
  max-width: min(440px, 84vw);
  scroll-snap-align: start;
  padding: 10px;
  background: var(--pop-cream);
  border: 1px solid var(--rule-brass-firm);
  border-radius: var(--radius-sm);
  box-shadow: 0 22px 44px -30px oklch(0.12 0.02 165 / 0.9);
}

@media (min-width: 1080px) {
  .feed__embeds {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
    overflow: visible;
    scroll-snap-type: none;
  }
  .feed__card {
    flex: initial;
    max-width: none;
  }
}

/* embed.js writes inline width/min-width/margin/border onto the injected
   element after it measures, so every override here needs the same weight. */
.feed__embeds .instagram-media {
  display: block !important;
  min-width: 0 !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Shown only if embed.js is blocked or fails; the blockquote is otherwise
   replaced wholesale, so this never double-renders. */
.feed__fallback {
  display: block;
  padding: 22px 18px;
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  text-align: center;
  color: var(--ink-onlight);
  border: 1px solid var(--rule-onlight);
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.foot {
  position: relative;
  background: var(--ground-deep);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--rule-brass);
}
/* The kit's pin chevron, sitting on the seam as a full stop for the page. */
.foot__pin {
  position: absolute;
  top: 0;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%) rotate(45deg);
  /* Half of it sits in the panel above, so it takes that ground, not this one. */
  background: var(--ground-invite);
  border: 1px solid var(--rule-brass-firm);
}
.foot__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-close) var(--gap-wide);
  flex-wrap: wrap;
}
.foot__mark { height: 42px; width: auto; opacity: 0.9; }
.foot__where { margin-right: auto; }
.foot__line {
  font-family: var(--font-display);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-bright);
}
.foot__sub {
  margin-top: 4px;
  font-size: var(--fs-small);
  color: var(--ink-muted);
}
.foot__social { display: flex; flex-wrap: wrap; gap: var(--gap-close); }
.foot__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;           /* comfortable target without a visible box */
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--ink-body);
  transition: color var(--dur-base) var(--ease-out);
}
.foot__link svg { flex: none; color: var(--pop-brass); }
@media (hover: hover) {
  .foot__link:hover { color: var(--pop-brass); }
}


/* The band is a title card now: its three credentials became the chapters that
   follow it, so what is left is the label, the crest and one line of setup. */
.club__lede {
  font-size: var(--fs-lede);
  line-height: var(--lh-body);
  color: var(--ink-body);
  max-width: var(--measure);
  margin-top: var(--gap-step);
}

/* --------------------------------------------------------------------------
   Motion

   Moved to css/motion.css — the reveal choreography, the scroll timelines and
   the parallax keyframes all live there now, together with the chapter engine
   they are growing into. Nothing about them changed in the move.
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   Wide and tall

   The opposite failure to the narrow rules below, and the easier one to miss.
   Every size in the hero is a clamp whose ceiling is reached around 1440, so a
   27-inch monitor gets exactly the composition a laptop gets, floating in twice
   the frame: at 2560x1440 the lockup was 268px, 19% of the viewport height,
   against 30% on a 900px laptop. It read as a small page on a big screen
   rather than a big page.

   Gated on height as well as width, so an ultrawide short monitor (2560x1080)
   does not get a composition it has no room for.
   -------------------------------------------------------------------------- */
@media (min-width: 1800px) and (min-height: 1000px) {
  .hero__logo { height: clamp(268px, 24svh, 360px); }
  .hero__title { font-size: clamp(3.5rem, 3.4vw, 4.75rem); }
  .hero__body { width: min(100%, 64rem); }
  /* The lede is deliberately NOT widened with the body. A wide headline over a
     narrow column is the shape that reads; matching them makes the supporting
     line compete, and at 54ch it broke "cool-down" across two lines. */
}

/* --------------------------------------------------------------------------
   Narrow
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .band__title { max-width: 24ch; }
}

@media (max-width: 620px) {
  .hero { gap: var(--gap-close); }
  .hero__body { width: 100%; }
  /* The full line does not fit beside two rules on a phone, and the rules are
     what goes: the words are the content. */
  .hero__eyebrow {
    flex-direction: column;
    gap: 7px;
    letter-spacing: 0.18em;
    text-indent: 0.18em;
    margin-bottom: clamp(1rem, 3vh, 2rem);
  }
  .hero__eyebrow::before,
  .hero__eyebrow::after,
  .hero__dot { display: none; }
  .hero__tagline { letter-spacing: 0.24em; text-indent: 0.24em; }

  /* 891px of hero in an 844px viewport put the scroll cue under the fold. The
     mark gives up the height, since it is the one element sized from it. */
  .hero__logo { height: clamp(108px, 23svh, 190px); }
  .hero__title { margin-top: clamp(1rem, 3vh, 2rem); }

  /* Field over action, both full width: side by side leaves neither enough
     room to be tapped comfortably. */
  .rsvp__row { flex-direction: column; align-items: stretch; }
  .rsvp__btn { justify-content: center; }

  .crest { display: none; }   /* the head is tight enough on a phone */


  .foot__inner { justify-content: flex-start; }
  .foot__where { margin-right: 0; }
}

/* Short viewports: the hero still has to deliver headline and waitlist without
   a scroll, so the scroll cue is the first thing to go. */
@media (max-height: 620px) and (min-width: 621px) {
  .hero__more { display: none; }
  .hero__lede { display: none; }
}

/* The lockup is sized from the viewport height, so a short frame shrinks it
   before anything else has to go. Below these heights the supporting copy
   follows, in the order it can be spared.

   621-760px tall is the band the hero kept falling through: too tall for the
   short-viewport rules to fire, too short for the composition as laid out. On a
   360x640 Android, which is squarely inside the audience this page is built
   for, the Join button sat 17px under the fold and the scroll cue 81px under
   it. Nothing that carries a fact is hidden to fix it: the rhythm tightens, and
   the mark gives up the height it is sized from. */
@media (max-height: 760px) {
  .hero__logo { height: clamp(112px, 22svh, 200px); }
  .hero { gap: var(--gap-tight); }
  .hero__eyebrow { margin-bottom: clamp(0.625rem, 1.8vh, 1.25rem); }
  .hero__title { margin-top: clamp(0.625rem, 1.8vh, 1.25rem); }
  .hero__say { margin-top: clamp(0.5rem, 1.2vh, 1rem); }
  .rsvp { margin-top: clamp(0.875rem, 2.2vh, 1.5rem); }
}

/* Below 700 the tagline goes, and it goes before the lede does. It is the line
   that carries brand rather than fact; the lede is where the ceilings, the
   lounge and the warm-up rooms are named, and on the screen where a visitor
   has the least room, the facts are what they came for. */
@media (max-height: 700px) {
  .hero__logo { height: clamp(104px, 18svh, 160px); }
  .hero__tagline { display: none; }
}

@media (max-height: 620px) {
  .hero__logo { height: clamp(96px, 17svh, 150px); }
  .hero__lede { display: none; }
}

/* Landscape phones. Dropping two elements was not enough: measured on an
   844x390 handset the hero still stood 461px tall in a 390px viewport and cut
   the waitlist button off 16px below the fold. The display type is what does
   not fit, so on a short viewport it is sized from the height rather than the
   width, and the stack binds tighter. --fs-hero itself is left alone so every
   other viewport keeps the setting it ships with. */
@media (max-height: 480px) and (min-width: 621px) {
  .hero__title { font-size: clamp(1.25rem, 6svh, 2rem); margin-top: var(--gap-tight); }
  .hero { gap: var(--gap-tight); }
  .hero__logo { height: clamp(72px, 26svh, 132px); }
  .hero__eyebrow { margin-bottom: var(--gap-tight); }
  .hero__tagline { display: none; }
  .hero__say { margin-block: 0; }
  .rsvp { margin-top: var(--gap-tight); }
}

/* --------------------------------------------------------------------------
   Pressed

   Every control had a resting, hover and focus state; none had an active one.
   On a touch screen that is the only feedback there is, since hover never
   happens: without it a tap on the waitlist button is silent until the form
   swaps out. One shared rule rather than four, so a new control inherits it.
   -------------------------------------------------------------------------- */

:where(.rsvp__btn, .joinbar__btn, .hero__more):active {
  transform: translateY(var(--press));
}

/* The two solid buttons also take a step down in brightness, which reads as
   pressure on a filled surface where a 1px move barely registers. */
.rsvp__btn:active,
.joinbar__btn:active {
  filter: brightness(0.94);
}

@media (prefers-reduced-motion: reduce) {
  :where(.rsvp__btn, .joinbar__btn, .hero__more):active {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Waitlist errors

   These exist because reportValidity() does not. It draws a native bubble on
   desktop and draws nothing at all on iOS Safari, so on the device most of
   this page's visitors use, a bad address produced silence: tap, nothing.

   The node is created by js/waitlist.js and lives inside the form, so it is
   announced politely and sits where the mistake is.
   -------------------------------------------------------------------------- */

.rsvp__error {
  font-size: var(--fs-small);
  line-height: var(--lh-body);
  color: var(--alert-ondark);
  margin-top: var(--gap-tight);
  max-width: var(--measure);
}

/* On brass the alert steps down in lightness to clear AA on that ground. */
.joinbar .rsvp__error {
  color: var(--alert-onbrass);
  font-weight: var(--fw-medium);
  margin-top: var(--gap-hair);
}

/* Sending. The button says nothing new, it just stops looking available. */
[aria-busy="true"] {
  opacity: 0.72;
  cursor: progress;
}

.rsvp__btn:disabled,
.joinbar__btn:disabled { pointer-events: none; }

/* --------------------------------------------------------------------------
   The last ask

   The one panel on the page that inverts, and it inverts here rather than
   under the Instagram embeds, where the old cream band spent the effect on
   third-party iframes. This is the moment the page is built for: someone who
   has scrolled the whole narrative, arriving at the ask. The ground lifts to
   the kit's mist tint and the panel reads as what the brief asks the page to
   be, "a members' card slid across a table" — and the footer closing back to
   pine underneath it makes the card an object rather than a change of mind.

   Centred, unlike the hero: this one is a full stop, not a landing, and there
   is no footage behind it to leave room for.
   -------------------------------------------------------------------------- */

.last {
  position: relative;
  isolation: isolate;
  background: var(--ground-invite);
  color: var(--ink-oninvite);
  padding-block: var(--band-y);
  /* The seam between the forest above and the panel is where the card's edge
     is; at --rule-brass's alpha it registered as nothing. */
  border-top: 1px solid var(--rule-brass-firm);
}

/* The kit's court ruling again, in the panel's own ink. The two bands above
   carry it in sage on forest; carrying it here in pine on mist is what makes
   the panel read as the same stationery inverted, rather than as a hole cut in
   the page. */
.last::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.42;
  background-image:
    repeating-linear-gradient(45deg,  var(--rule-oninvite) 0 1px, transparent 1px 54px),
    repeating-linear-gradient(-45deg, var(--rule-oninvite) 0 1px, transparent 1px 54px);
  -webkit-mask-image: radial-gradient(72% 62% at 50% 50%, transparent 0%, #000 100%);
          mask-image: radial-gradient(72% 62% at 50% 50%, transparent 0%, #000 100%);
}

/* Brass at its page lightness is ~2:1 on mist. The label steps down in
   lightness and keeps the hue, so it is the same accent, not a second one. */
.last .band__label,
.last .rsvp__label { color: var(--accent-onlight); }

/* The field, on a pale ground: a lifted wash rather than the dark one it
   carries over the footage. */
.last .rsvp__input {
  color: var(--ink-oninvite);
  background: oklch(0.975 0.010 148 / 0.72);
  border-bottom: 1px solid var(--rule-oninvite-firm);
}
.last .rsvp__input::placeholder { color: var(--ink-oninvite-quiet); }

/* Forest, not brass. Brass on mist is light-on-light and the button would
   dissolve into the panel; the deep green is the strongest thing that can
   happen on this ground, which is what the page's one closing action wants. */
.last .rsvp__btn {
  color: var(--pop-cream);
  background: var(--ground-mid);
}
.last .rsvp__done {
  color: var(--ink-oninvite);
  background: oklch(0.975 0.010 148 / 0.65);
  border-bottom: 1px solid var(--rule-oninvite-firm);
}
.last .rsvp__done svg { color: var(--accent-onlight); }
@media (hover: hover) {
  .last .rsvp__btn:hover { background: var(--ground-deep); }
}

.last__inner {
  display: grid;
  justify-items: center;
  text-align: center;
}

.last__title {
  font-family: var(--font-display);
  font-size: var(--fs-section);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  font-weight: var(--fw-regular);
  color: var(--ink-oninvite);
  margin: var(--gap-tight) 0 var(--gap-step);
}

.last__form {
  width: min(100%, 34rem);
}

/* Centred here, where the hero's is left-aligned under its headline. */
.last__inner .rsvp__done { justify-content: center; }

.last__terms {
  font-size: var(--fs-small);
  line-height: var(--lh-body);
  color: var(--ink-oninvite-quiet);
  max-width: 46ch;
  margin-top: var(--gap-step);
}

@media (max-width: 620px) {
  .last__form { width: 100%; }
}

/* --------------------------------------------------------------------------
   The honeypot

   A field named `company`, which is what an undiscriminating bot fills in
   because the name is common. Taken out of the layout, out of the tab order
   and out of the accessibility tree, so nobody who should be filling this form
   can reach it. The server treats a filled one as a bot and returns success
   without storing anything, because telling a bot it failed just teaches it.

   Not display:none: some bots skip fields that are display:none precisely
   because they know the trick.
   -------------------------------------------------------------------------- */

.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* The submit label is a span so the sending state can change the words rather
   than only dimming the button. On a slow connection a dimmed button with the
   same label says nothing at all. */
.rsvp__btn-label { display: inline-block; }

[aria-busy="true"] .rsvp__btn-label::after {
  content: "…";
}


/* --------------------------------------------------------------------------
   The field marks itself

   --alert-ondark measures 1.01:1 against brass: a hue difference with no
   lightness difference, which a red-green colour blind visitor cannot see. So
   the message is never the only signal and its colour is never the only cue.
   The field carries the alert on its own rule, and the message is a sentence
   that was not there before.
   -------------------------------------------------------------------------- */

.rsvp__input[aria-invalid="true"] {
  border-bottom-color: var(--alert-ondark);
}

.joinbar__input[aria-invalid="true"] {
  border-color: var(--alert-onbrass);
}
