/* The join pages (SPEC §4.5). Redesigned 2026-11-02 from Jon's design, and again
   2026-11-06 from the approved Figma ("Landing Pages V2"): no black frame, the
   logo at the top centre (the full logo wide, the speech bubble alone on phones),
   the content in a lightly blurred, outlined card, the footer in flow at the
   bottom. At any size, the card stops 16px short of the logo and the footer;
   past that its whole content scrolls as one, inside the outline, and fades at
   the bottom while there is more below (join.js marks when it is clipped).
   Jon's review 2026-11-06 — the first build scrolled only the headline. */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("/assets/dm-sans.woff2") format("woff2-variations"),
       url("/assets/dm-sans.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --white: #ffffff;
  --black: #000000;
  --overlay: rgba(0, 0, 0, 0.5);
  --divider: rgba(255, 255, 255, 0.2);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --card-width: 534px;
  --card-pad: 24px;
  --card-gap: 64px;
  --card-border: rgba(255, 255, 255, 0.2);
  --card-fill: rgba(255, 255, 255, 0.01);
  --card-blur: 6px;
  --page-top: 56px;
  --page-bottom: 56px;
  --page-gutter: clamp(24px, 10.625vw, 153px);
  --stack-gap: 16px;
  --fade: 48px;
  --checkbox-size: 28px;
  --checkbox-border: 4px;
  --checkbox-radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  display: flow-root;
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-variation-settings: "opsz" 14;
  font-optical-sizing: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.3;
}
a { color: inherit; }
img { display: block; }
h1, p, hr { margin: 0; }

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: var(--black);
}
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 71% 50%;               /* the phone booth */
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
}

/* Logo, card, footer in one fixed-height column. The card takes the space
   between the other two, sits centred in it, and can grow only until it is
   16px from each. The floor keeps a very short window (a phone held sideways)
   usable: the page scrolls instead. */
.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1440px;
  height: 100vh;
  height: 100dvh;
  min-height: 600px;
  margin: 0 auto;
  padding:
    max(var(--page-top), env(safe-area-inset-top, 0px))
    max(var(--page-gutter), env(safe-area-inset-right, 0px))
    max(var(--page-bottom), env(safe-area-inset-bottom, 0px))
    max(var(--page-gutter), env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}

.logo { align-self: center; flex: 0 0 auto; }
.logo img { width: 272px; height: auto; }

.card {
  align-self: flex-start;
  margin-block: auto;
  width: var(--card-width);
  max-width: 100%;
  min-height: 0;
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0.5px solid var(--card-border);
  border-radius: 24px;
  background: var(--card-fill);
  -webkit-backdrop-filter: blur(var(--card-blur));
  backdrop-filter: blur(var(--card-blur));
}
/* The scrolling layer: the padding lives here, so scrolled content runs to
   the outline (a hard clip at the top, as in the Figma), and the fade masks
   the content only, never the outline or the blur. */
.card__body {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: var(--card-pad);
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}
.card__body::-webkit-scrollbar { display: none; }
.card__body > * { flex: 0 0 auto; }
.card__body.is-clipped {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade)), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade)), transparent);
}

/* The home page (/) keeps its column: wordmark and tagline, centred. */
.content {
  width: 517px;
  max-width: 100%;
  margin-block: auto;
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.brand { display: flex; flex-direction: column; gap: 16px; }
.brand__logo { width: 100%; height: auto; aspect-ratio: 273 / 62; }
.brand__headline {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -1.15px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
/* The paragraph under the headline (2026-11-06), naming the school where there is one. */
.brand__lede {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.15px;
  line-height: 1.3;
  opacity: 0.7;
}

.divider {
  border: 0;
  border-top: 1px solid var(--divider);
  height: 0;
  width: 100%;
}

.signup { display: flex; flex-direction: column; gap: 20px; }

.consent {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.consent__box {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: var(--checkbox-size);
  height: var(--checkbox-size);
  margin: 0;
  border: var(--checkbox-border) solid var(--white);
  border-radius: var(--checkbox-radius);
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background-color 120ms ease, box-shadow 160ms ease;
}
.consent__box::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 28%;
  height: 50%;
  border: solid var(--black);
  border-width: 0 3px 3px 0;
  transform: translate(-50%, -55%) rotate(45deg);
  opacity: 0;
}
.consent__box:checked { background: var(--white); }
.consent__box:checked::after { opacity: 1; }
.consent__box:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}
.consent__text {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.15px;
  line-height: 1.3;
}
.consent__text a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-position: from-font;
  text-decoration-skip-ink: none;
}

/* Tapped the button without agreeing. */
.consent.is-nudged { animation: consent-shake 420ms ease; }
.consent.is-nudged .consent__box { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5); }
@keyframes consent-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-5px); }
  40%       { transform: translateX(5px); }
  60%       { transform: translateX(-3px); }
  80%       { transform: translateX(3px); }
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 63px;
  padding: 16px 40px;
  border-radius: 64px;
  background: var(--white);
  color: var(--black);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.15px;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, opacity 120ms ease;
}
.cta:hover { opacity: 0.94; }
.cta:active { transform: scale(0.985); }
.cta:focus-visible { outline: 3px solid rgba(255, 255, 255, 0.6); outline-offset: 3px; }

.fine-print {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  opacity: 0.7;
}

.footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.footer__link {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.15px;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}
.footer__link:hover { text-decoration: underline; }
.footer__star { width: 14.393px; height: 13px; }

/* The home page (/): wordmark and tagline only, centred on the photo. */
.hero--home .hero__inner { height: auto; min-height: 100vh; min-height: 100dvh; }
.hero--home .content { text-align: center; }
.hero--home .brand__headline { font-weight: 500; }

@media (max-width: 767px) {
  :root {
    --checkbox-border: 3px;
    --card-pad: 16px;
    --card-gap: 40px;
    --page-top: 40px;
    --page-bottom: 32px;
    --page-gutter: 16px;
  }
  /* The photo runs past the bottom, so the booth sits lower and stays out of
     the card's way (Figma: 123% tall, top-anchored). */
  .hero__photo { height: 123%; object-position: 80% 50%; }

  .logo img { width: 76px; }
  .card { width: 100%; }

  .brand__headline { font-size: 31.14px; letter-spacing: -1px; }
  .brand__lede { font-size: 16px; }
  .signup { gap: 24px; }
  .consent { gap: 12px; align-items: flex-start; }
  .consent__text { font-size: 14px; font-weight: 400; letter-spacing: 0; }
  .cta { min-height: 0; font-size: 16px; }

  .hero--home .brand__headline { font-size: 32px; letter-spacing: -1.16px; }
}

@media (prefers-reduced-motion: reduce) {
  .consent.is-nudged { animation: none; }
  .cta { transition: none; }
}
