/* BL0CK+SW1TCH splash page layout. Load after tokens/tokens.css and tokens/components.css.

   Colours, fonts, tracking and the lockup, headline, label and chip classes come from the brand
   kit. The kit defines no web layout, so the parts below marked NEW are proposals: the spacing
   scale, hairlines between rows, buttons, the email field, hover and focus states, running text
   on dark, and the narrow-screen tagline. Everything else restates the business card at screen
   sizes. */

:root {
  color-scheme: dark;

  --u: clamp(34px, 5.6vw, 56px);               /* the headline size; the kit's small sizes are ratios of it */

  /* Space. One value for each job, used everywhere that job comes up. */
  --gutter: clamp(24px, 6.3vw, 64px);          /* page side margin: 64 / 1008, as on the card */
  --gap-section: clamp(88px, 12vw, 144px);     /* from the end of one section to the next headline */
  --gap-head: clamp(28px, 4.2vw, 48px);        /* from a headline to the section's content */
  --gap-action: clamp(24px, 3.4vw, 32px);      /* from a section's text to its button or link */
  --row-pad: clamp(20px, 2.6vw, 26px);         /* above and below the content of a row */
  --tap-pad: 15px;                             /* padding that brings a one-line control to 48 px */

  /* Type. */
  --size-small: max(12px, calc(var(--u) * var(--bs-ratio-small)));   /* label, action, button: the kit's ratio */
  --size-name: max(15px, calc(var(--u) * 20 / 56));                  /* names inside rows */
  --size-fine: clamp(12px, calc(var(--u) * 14 / 56), 14px);          /* labels inside rows */

  /* NEW: hairline. The text colour at 13% over the surface. The first line is for old browsers. */
  --line: #2F3133;
  --line: color-mix(in srgb, var(--bs-text) 13%, var(--bs-surface));
}
/* On the narrowest phones the headline shrinks so its longest line (<1>N T<0>UCH) fits. */
@media (max-width: 380px) {
  :root { --u: 8.9vw; }
}

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

html { background: var(--bs-surface); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bs-surface); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Hero: the front of the card, sized to fill exactly the first screen.

   Before any scrolling a visitor sees the whole pitch and nothing cut in half: the lockup, the
   chips, one sentence, the button to the guide, and a cue that more is below. To make that hold
   on any screen, the photo's size follows the screen's height as well as its width. ---------- */

:root {
  --screen: 100vh;
  --hero-reserve: 250px;                       /* the height the sentence, button and cue need under the photo */
}
@supports (height: 100svh) {
  :root { --screen: 100svh; }                  /* the screen's height while the browser's bars are showing */
}
@media (min-width: 761px) {
  :root { --hero-reserve: 290px; }
}

.hero {
  /* The screen less any system bars. Capped, so a very tall window still shows what follows. */
  --view-h: min(calc(var(--screen) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)), 1000px);
  /* 1.75 is the photo's width over its height. 166vw keeps both chips inside a phone's width
     while the photo crops evenly from its two sides. */
  --photo-w: clamp(520px, min(166vw, calc((var(--view-h) - var(--hero-reserve)) * 1.75)), 1280px);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: var(--view-h);
  overflow: hidden;
}
.hero-art {
  position: relative;
  flex: none;
  width: var(--photo-w);
}
/* max-width: none protects the photo's size from any img { max-width: 100% } a host page adds. */
.hero-photo {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
}
/* The photo's lit floor fades out at the bottom so it does not end in a hard line. Wherever the
   photo can be narrower than the screen, its side edges fade out too, so no seam shows. */
.hero-photo {
  --fade-down: linear-gradient(to bottom, #000 89%, transparent);
  --fade-sides: linear-gradient(#000, #000);
  -webkit-mask-image: var(--fade-down), var(--fade-sides);
  mask-image: var(--fade-down), var(--fade-sides);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
@media (min-width: 641px) {
  .hero-photo { --fade-sides: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent); }
}
.hero .bs-lockup {
  position: absolute;
  left: 0;
  right: 0;
  top: 9%;                                  /* 52 / 576, as on the card */
  /* 62 / 1008 of the photo width, as on the card, and never wider than the screen allows */
  font-size: clamp(20px, min(6.15vw, calc(var(--photo-w) * 0.0615)), 78px);
}
.hero .bs-wordmark { font-size: inherit; font-weight: 700; }
.hero .bs-tagline > span { white-space: nowrap; }

/* NEW: below 440 px the one-line tagline would be under 10 px, so it breaks into two larger lines.
   Wider than that, two lines would grow tall enough to touch the chips. */
@media (max-width: 440px) {
  .hero .bs-lockup { top: 7%; }
  .hero .bs-lockup > .bs-tagline {
    font-size: 0.5em;
    line-height: 1.5;
    white-space: normal;
    text-align: center;
  }
  .hero .bs-tagline > span { display: block; }
}

/* ---------- NEW: running text, in the kit's body face ---------- */

.prose {
  max-width: 36em;
  font-family: var(--bs-font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0;
  text-transform: none;
  text-wrap: pretty;
  color: var(--bs-text-secondary);
}
.prose + .prose { margin-top: 1em; }

.pitch, .hero-cta, .panel {
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* Under the photo: the sentence, the button, and a cue at the bottom edge. Any height the screen
   has to spare goes one part above the sentence and two parts above the cue, so the sentence
   stays near the photo. The two empty boxes below are those parts. */
.hero::before, .hero::after { content: ''; }
.hero::before { order: 1; flex: 1 1 0; }
.pitch, .hero-cta { order: 2; }
.hero::after { order: 3; flex: 2 1 0; }
.scroll-cue { order: 4; }

.pitch { padding-top: 8px; }
.pitch p {
  max-width: 27em;
  margin: 0 auto;
  font-family: var(--bs-font-body);
  font-weight: 400;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.5;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
  text-wrap: balance;
  color: var(--bs-text-soft);
}
.hero-cta { margin-top: clamp(24px, 3vw, 32px); }
.hero-cta .button { font-size: clamp(12px, 1.25vw, 16px); }
@media (max-width: 379px) {
  .if-room { display: none; }
}
/* NEW: the kit's chevrons turned to point down. Tapping them moves to the next section. */
.scroll-cue {
  padding: 18px 24px 20px;
  line-height: 1;
  text-decoration: none;
}
.scroll-cue .bs-chevrons {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0.12em;
  margin-right: -0.12em;
  transform: rotate(90deg);
}

main { padding-top: clamp(48px, 7vw, 88px); }

/* ---------- Panels: one section each, all on the card's left margin ---------- */

.panel {
  max-width: 1008px;
  margin: 0 auto;
  padding-bottom: var(--gap-section);
  /* Where a link lands on a section, leave air above its headline and clear any system bar. */
  scroll-margin-top: calc(clamp(32px, 6vw, 72px) + env(safe-area-inset-top, 0px));
}
.panel .bs-headline { font-size: var(--u); font-weight: 700; }
.panel .bs-label, .panel .bs-action, .button { font-size: var(--size-small); }
.panel .bs-label { line-height: 1.5; }
.panel .bs-name { font-size: var(--size-name); font-weight: 700; line-height: 1.2; }
.bs-headline + .bs-label { margin-top: clamp(14px, calc(var(--u) * 20 / 56), 20px); }

/* Player Guide: the back of the card. Text on the left, chip on the right. */
.guide {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}
.guide-text {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.guide .button { margin-top: var(--gap-action); }
.guide .scan { margin-top: 28px; }
.guide .bs-chip { flex: none; width: clamp(250px, 32vw, 371px); }

/* The QR code is for reading on a phone from a bigger screen. On a phone it has no use. */
@media (max-width: 760px) {
  .guide .bs-chip, .guide .scan { display: none; }
}

/* ---------- NEW: button ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  min-height: 48px;
  padding: 1.15em calc(1.5em - var(--bs-track-action)) 1.1em 1.5em;
  border: 2px solid var(--bs-text);
  border-radius: 4px;
  background: transparent;
  color: var(--bs-text);
  font-family: var(--bs-font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: var(--bs-track-action);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.button:hover { background: var(--bs-text); color: var(--bs-surface); }
.button:hover .bs-chevrons { color: inherit; }   /* the green is for dark backgrounds only */
.button:focus-visible, .signup input:focus-visible, .scroll-cue:focus-visible, .world summary:focus-visible {
  outline: 2px solid var(--bs-text);
  outline-offset: 4px;
}

/* ---------- NEW: rows. A short label on the left, its content on the right, a hairline between.
   How it plays, Six worlds and the footer all use this one grid. ---------- */

.rows {
  margin-top: var(--gap-head);
  border-bottom: 1px solid var(--line);
}
.row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 10px 32px;
  align-items: baseline;
  padding: var(--row-pad) 0;
  border-top: 1px solid var(--line);
}
.panel .row .bs-label { font-size: var(--size-fine); }
@media (max-width: 760px) {
  .row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Homeworlds: each world's full text opens under its name ---------- */

/* The names carry their own padding as tap area, so the list gives the same amount back and
   the row keeps the padding every other row has. */
.worlds { margin: calc(-1 * var(--tap-pad)) 0; }
.world summary {
  display: block;
  padding: var(--tap-pad) 0;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* The row sits on an inner element because some browsers will not lay out a summary as a row. */
.world-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.world summary::-webkit-details-marker { display: none; }
.world[open] summary { padding-bottom: 10px; }
.world > .prose:last-child { padding-bottom: var(--tap-pad); }

/* A plus that closes to a minus. Drawn from two bars so it stays crisp at any size. */
.toggle {
  position: relative;
  flex: none;
  align-self: center;
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: var(--bs-text-muted);
}
.toggle::before, .toggle::after {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 2px;
  background: currentColor;
}
.toggle::after { transform: rotate(90deg); }
.world[open] .toggle::after { transform: none; }
.world summary:hover .toggle, .world[open] .toggle { color: var(--bs-text); }

/* ---------- NEW: email sign-up ---------- */

.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 640px;
  margin-top: var(--gap-action);
}
.signup input {
  flex: 1 1 260px;
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  -webkit-appearance: none;
  appearance: none;
  border: 2px solid var(--bs-text-muted);
  border-radius: 4px;
  background: var(--bs-surface-sunken);
  color: var(--bs-text);
  font-family: var(--bs-font-body);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0;
  text-transform: none;
}
.signup input::placeholder { color: var(--bs-text-muted); opacity: 1; }
.signup input:focus { border-color: var(--bs-text); }
.signup .button { flex: none; min-height: 52px; padding-top: 0; padding-bottom: 0; }
/* On a phone the button takes the full width, so the field and button make one block. */
@media (max-width: 560px) {
  .signup .button { flex: 1 1 100%; }
}
.signup-status { margin-top: 16px; }
.signup-status:empty { display: none; }

/* ---------- Footer: coming soon and credit, as two more rows ---------- */

.credit { padding-bottom: clamp(56px, 8vw, 96px); }
.credit .rows { margin-top: 0; border-bottom: 0; }
.credit ul { display: grid; gap: 10px; }
.credit a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.25em; }

/* ---------- Motion: small, and off for anyone who asks for less ---------- */

@media (prefers-reduced-motion: no-preference) {
  .button { transition: background-color 120ms, color 120ms; }
  .toggle { transition: color 120ms; }
  .toggle::after, .scroll-cue .bs-chevrons { transition: transform 180ms ease-out; }
  .scroll-cue:hover .bs-chevrons { transform: rotate(90deg) translateX(3px); }
  html { scroll-behavior: smooth; }

  /* The world text slides open where the browser can animate to an automatic height. */
  @supports (interpolate-size: allow-keywords) {
    .world { interpolate-size: allow-keywords; }
    .world::details-content {
      block-size: 0;
      overflow: clip;
      transition: block-size 220ms ease-out, content-visibility 220ms allow-discrete;
    }
    .world[open]::details-content { block-size: auto; }
  }
}
