/* The landing page's shared styles: the reset, the pixel title, the phone, the
   one button, and the form it reveals. design/layout.css sets the custom
   properties below and places things; design/scripts/prepare.py joins the two
   into design/page/style.css. The form's markup comes from the build
   (site/form.html). Sizes sit on a 4/8 px grid. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
@font-face {
  font-family: "Press Start 2P";
  src: url("/assets/fonts/PressStart2P-Regular.ttf") format("truetype");
  font-display: block;
}
/* GAME over HOME. Only whole multiples of the font's 8 px design size, so
   every design pixel is a whole number of screen pixels. */
.title {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-weight: 400;
  line-height: 1.25;
  text-transform: uppercase;
  -webkit-font-smoothing: none;
  font-smooth: never;
}
.title span { display: block; }

.dates { margin: 0; font-size: 14px; line-height: 20px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dates b { font-weight: 600; color: var(--fg); }

/* The phone: a drawn body around the recording, nothing else. */
.phone {
  position: relative;
  width: var(--phone-w);
  aspect-ratio: 360 / 740;
  padding: var(--bezel);
  border-radius: calc(var(--phone-w) * 0.15);
  background: var(--body);
  box-shadow: var(--phone-shadow);
}
.phone video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--phone-w) * 0.15 - var(--bezel));
  background: #0d091c;
}

/* The one button, and the form that replaces it. */
/* The box keeps the revealed form's height from the start, so pressing the
   button moves nothing else on the page. */
.ask { display: grid; justify-items: var(--ask-align, start); align-content: start; min-height: 112px; }
.remind, .go {
  height: 52px;
  margin: 0;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-fg);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: scale 300ms cubic-bezier(.34, 1.56, .64, 1);
}
.remind:active, .go:active { scale: 0.95; transition-duration: 0ms; }
.remind:focus-visible, .go:focus-visible, .email input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.go:disabled { opacity: 0.6; }

.signup {
  display: grid;
  gap: 12px;
  width: min(100%, 420px);
  margin: 0;
  transition: opacity 400ms cubic-bezier(.22, 1, .36, 1), translate 400ms cubic-bezier(.22, 1, .36, 1);
}
@starting-style { .signup { opacity: 0; translate: 0 8px; } }
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  height: 60px;
  padding: 4px;
  border-radius: 999px;
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--line);
}
.email { display: block; min-width: 0; }
.email input {
  display: block;
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 8px 0 20px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 17px;
}
/* The email field shows focus by darkening the pill's 1 px line to the muted
   ink (a plain solid line, no colored ring, no gradient: owner ruling to drop
   the outline around the email field). */
.email input:focus-visible { outline: none; }
.row:has(input:focus-visible) { box-shadow: inset 0 0 0 1px var(--muted); }
.email input::placeholder { color: var(--muted); opacity: 1; }
.go { height: 52px; padding: 0 22px; }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 0 4px;
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
  text-align: left;
}
.consent input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--btn); }
.consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.form-error { margin: 0; min-height: 0; font-size: 13px; line-height: 18px; color: var(--error); }
.form-error:empty { display: none; }
.thanks { outline: none; }
.thanks p { margin: 0; color: var(--muted); font-size: 15px; line-height: 22px; }
.thanks .thanks-big { color: var(--fg); font-size: 20px; line-height: 28px; font-weight: 600; margin-bottom: 4px; }
mark.draft {
  display: inline-block;
  margin-right: 4px;
  padding: 0 4px;
  border-radius: 2px;
  background: #ffd84d;
  color: #1a1400;
  font-size: 10px;
  line-height: 14px;
  font-weight: 700;
  text-transform: uppercase;
  vertical-align: 1px;
}
@media (prefers-reduced-motion: reduce) {
  .remind, .go, .signup { transition: none; }
}

/* The FAQ below the hero (markup from the build: section.faq, h2, then one
   .qa per question with its h3 and p). Plain text in the page's own colors;
   it never shows on the first screen. */
.faq { max-width: 640px; margin: 0 auto; padding: 96px 24px 80px; }
.faq h2 { margin: 0 0 16px; font-size: 13px; line-height: 20px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.faq .qa { padding: 20px 0; border-top: 1px solid var(--line); }
.faq h3 { margin: 0 0 4px; font-size: 16px; line-height: 24px; font-weight: 600; }
.faq p { margin: 0; font-size: 15px; line-height: 22px; color: var(--muted); }
/* The links to the privacy and terms pages, below the FAQ (markup from the build: footer.legal). */
.legal { max-width: 640px; margin: 0 auto; padding: 0 24px 48px; display: flex; gap: 24px; font-size: 13px; line-height: 20px; }
.legal a { color: var(--muted); }

/* The landing page's layout: a white page, the copy centered in its own
   column, the phone beside it on a desktop and under it on a phone, running
   past the fold the way monogram.ai's phone does. */
:root {
  --bg: #ffffff;
  --fg: #1f1f1f;
  --muted: #737373;
  --btn: #000000;
  --btn-fg: #ffffff;
  --field: #f5f5f5;
  --line: #00000014;
  --focus: #6d6dff;
  --error: #d4183d;
  --body: #f0efeb;
  --bezel: 8px;
  --phone-w: 288px;
  --phone-shadow: 0 0 0 1px #0000000f, 0 40px 80px -24px #00000040, 0 16px 28px -10px #00000021;
  --ask-align: center;
}
.hero { min-height: 100svh; padding: 64px 24px 0; overflow: hidden; }
.copy { display: grid; justify-items: center; gap: 16px; text-align: center; }
.title { font-size: 40px; }
.dates { margin-top: 4px; }
.ask { margin-top: 12px; width: 100%; }
.thanks { text-align: center; }
.stage { display: flex; justify-content: center; margin-top: 48px; }
/* The pixel title on whole pixels: centering puts it at a half or quarter
   pixel when the page (a desktop's width less its scrollbar, or a phone's) or
   its column has an odd width, and the pixel font blurs. The title's width is
   a whole even number (whole glyphs of a multiple of 8 px), so its left edge
   has the fraction of the hero's left edge plus half the column's width; the
   title moves by that fraction's rounding, at most half a pixel. body and the
   column are inline-size containers only so that cqw reads their widths. */
@property --hero-left { syntax: "<length>"; inherits: true; initial-value: 0px; }
body { container-type: inline-size; }
.copy { container-type: inline-size; }
.title { position: relative; left: calc(round(var(--hero-left) + 50cqw, 1px) - var(--hero-left) - 50cqw); }

@media (min-width: 960px) {
  :root { --phone-w: 368px; --bezel: 10px; --hero-max: 1000px; }
  .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    max-width: var(--hero-max);
    margin: 0 auto;
    /* Where the auto margins put the hero, read against body's width. */
    --hero-left: max(0px, (100cqw - var(--hero-max)) / 2);
    padding: 48px 24px;
  }
  .title { font-size: 64px; }
  .copy { gap: 20px; }
  /* The title's top on a whole pixel: the copy is centered beside the phone,
     so a row of fractional height (the phone's, on a short window) or of odd
     height puts it at a fraction. The copy fills the row and centers its own
     content, so cqh reads the row's height; the content's height is a whole
     even number (its sizes sit on the 4/8 px grid), so the title's top has
     the fraction of half the row's height, and the title moves by that
     fraction's rounding, at most half a pixel. */
  .copy { align-self: stretch; align-content: center; container-type: size; }
  .title { top: calc(round(50cqh, 1px) - 50cqh); }
  .ask { margin-top: 16px; }
  .stage { margin-top: 0; }
}
