/* The page's own layout: the column, its blocks, the sound control and the contact form.
   Builds on tokens.css and bundle.css. Does not target #logo or #sky: logo.css and sky.css own those. */

html{
  background: var(--plate);
  color-scheme: dark;
  /* The logo's halo is a wide disc that overflows its box: never let it widen the page. */
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* html's clip goes to the viewport; body's then stays on body, so the overflow is cut, not scrollable. */
body{ margin: 0; min-height: 100vh; min-height: 100svh; overflow-x: clip; }

/* The column: centred, over the sky, and a stacking context above it. */
.site-column{
  position: relative; z-index: 1;
  box-sizing: border-box;
  width: min(100% - 48px, 720px);
  min-height: 100vh; min-height: 100svh;
  margin-inline: auto;
  padding-block: var(--space-16) var(--space-12);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}

/* Noscript fallback inside #logo: the stacked lockup at three pixels a cell, never wider than the column. */
.site-logo-fallback{ display: block; width: min(100%, 639px); height: auto; margin-inline: auto; }

/* Band: as wide as the wordmark. logo.js sets --logo-w; before it runs, the column is the limit. */
.site-band{
  width: min(100%, var(--logo-w, 100%));
  margin: var(--space-4) auto 0;
  flex: none;
}
.site-tagline{ margin: var(--space-4) 0 0; }

/* The page's one heading, the brand name, for assistive technology; the logo shows it. */
.site-visually-hidden{
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* The lead follows the tagline with the section gap the headline used to open. */
.site-lead{
  max-width: 34rem;
  margin: var(--space-12) auto 0;
  font: 400 20px/1.6 var(--font-sans); letter-spacing: -.01em;
  color: var(--ink-muted);
}

/* Sound control: fixed top right, a chip on a <button>. */
.site-sound{
  position: fixed; top: var(--space-4); right: var(--space-4); z-index: 2;
  margin: 0; -webkit-appearance: none; appearance: none;
  cursor: pointer; text-align: center;
  transition: color 150ms steps(2), background-color 150ms steps(2), border-color 150ms steps(2);
}
.site-sound:not(.pl-chip--on){ background: var(--plate); }
.site-sound.is-beat:not(.pl-chip--on){ border-color: var(--accent); }
.site-sound:focus{ outline: none; }
.site-sound:focus-visible{ outline: var(--cell) solid var(--accent); outline-offset: var(--cell); }

/* The invitation to play sound (main.js shows it at load and lets it go once sound starts, by any route).
   The page's one primary action at that moment, so the primary button, spectrum foot and all; fixed at the
   bottom centre in reach of the thumb, clear of the iPhone home bar, never wider than the column, 48px tall.
   It arrives by filling in and leaves by eroding, tail (amber) end first, in six whole steps (brand book,
   Motion: a dither or pixel line arriving takes 600ms to 1.2s); the clip reaches 32px past the button so its
   foot, focus ring and glow go with it. The transform is static: only the clip steps. */
.site-sound-prompt{
  position: fixed; z-index: 3;
  left: 50%; bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  box-sizing: border-box; min-width: 192px; max-width: min(100vw - 48px, 720px);
  margin: 0;
  animation: prompt-arrive 600ms steps(6, end) both;
}
.site-sound-prompt[hidden]{ display: none; }
.site-sound-prompt.is-leaving{ pointer-events: none; animation: prompt-leave 600ms steps(6, end) forwards; }
/* On a phone held sideways the column fills the short screen and the foot would sit on the lead, so the prompt
   takes the top left corner instead, mirroring the chip: above the logo, which starts 64px down. */
@media (max-height: 500px){
  .site-sound-prompt{
    top: calc(var(--space-4) + env(safe-area-inset-top, 0px)); bottom: auto;
    left: calc(var(--space-4) + env(safe-area-inset-left, 0px)); transform: none;
  }
}
@keyframes prompt-arrive{
  from{ clip-path: inset(-32px 100% -32px -32px); }
  to{ clip-path: inset(-32px -32px -32px -32px); }
}
@keyframes prompt-leave{
  from{ clip-path: inset(-32px -32px -32px -32px); }
  to{ clip-path: inset(-32px -32px -32px 100%); }
}

/* Contact form: left-aligned inside the lead's measure. */
.site-form, .site-sent{
  box-sizing: border-box;
  width: 100%; max-width: 34rem;
  margin: var(--space-12) auto 0;
  text-align: left;
}
.site-form{ position: relative; }
/* The form's title is centred over the fields, on one line or, on phones, two. */
.site-form-title{ display: block; margin: 0; text-align: center; }
.site-field{ margin-top: var(--space-6); }
.site-field + .site-field{ margin-top: var(--space-6); }

/* Four rows of 24px, 10px padding and the 2px border: 120px, fifteen pitches. */
.site-idea{
  height: 120px; min-height: 120px;
  padding: 10px var(--space-4);
  font-size: 16px; line-height: 24px;
  resize: vertical;
}

.site-actions{ margin-top: var(--space-8); }
.site-send[aria-disabled="true"]{ cursor: progress; }

.site-status{ margin: 0; }
.site-status:not(:empty){ margin-top: var(--space-4); color: var(--alert); }
.site-status:focus{ outline: none; }
.site-privacy{ margin: var(--space-4) 0 0; }
.site-nojs{ margin: var(--space-6) 0 0; font: 400 16px/1.625 var(--font-sans); letter-spacing: -.01em; color: var(--ink); }

/* Honeypot: kept in the layout for bots that skip display:none, but off-screen and inert to people. */
.site-hp{
  position: absolute; left: -10000px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
  opacity: 0; pointer-events: none;
}

/* Sent state, which replaces the form. */
.site-sent:focus{ outline: none; }
.site-sent .pl-label--lg{ margin: 0; }
.site-sent-line{ margin: var(--space-4) 0 0; font: 400 16px/1.625 var(--font-sans); letter-spacing: -.01em; color: var(--ink); }

/* Footer: the legal line in fine print. */
.site-footer{
  position: relative; z-index: 1;
  box-sizing: border-box;
  width: min(100% - 48px, 720px);
  margin-inline: auto;
  padding-block: 0 var(--space-6);
  text-align: center;
}
.site-legal{
  max-width: 34rem; margin: 0 auto;
  font: 400 11px/1.6 var(--font-sans);
  color: var(--ink-subtle);
}

@media (prefers-reduced-motion: reduce){
  .site-sound{ transition: none; }
  .site-sound-prompt, .site-sound-prompt.is-leaving{ animation: none; }
}
