/* Briefly waitlist — video teaser (light-only: the footage is B&W ink on white).
   Brand: crimson #C9184A on warm near-black #1F1818 ink, Fraunces + Geist.
   No gradients, no glassmorphism; pills allowed; motion on transform/opacity only. */

:root {
  color-scheme: light;

  --ink: #1F1818;
  --ink-soft: #4B3C3C;
  --muted: #7E6A6A; /* darkest "muted" that still reads muted: ~4.9:1 on white (AA) */
  --crimson: #C9184A;
  --crimson-hover: #A01039;
  --border: #E3DBDB;
  --border-strong: #C9BFBF;
  --focus-ring: hsl(343 79% 44% / 0.25);
  --card-shadow: 0 12px 40px rgba(31, 24, 24, 0.16);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: #FFFFFF; /* must match the video's white ground — the blend IS the design */
  color: var(--ink);
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- masthead banner: text, not a link ---------- */
.banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  text-align: center;
  padding: 22px 0 12px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.03em;
  color: var(--ink);
  cursor: default;
  user-select: none;
  pointer-events: none;
}

/* ---------- stage: video blended into the white page ---------- */
.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 96px 20px 48px;
}

.video-wrap {
  position: absolute;
  left: 50%;
  top: calc(50% + 24px); /* content-box center — .stage padding is 96px top / 48px bottom */
  transform: translate(-50%, -50%);
  width: min(560px, 100vw);
  aspect-ratio: 1;
  pointer-events: none;
}

/* Rectangular white feather over the video's outer edge — softens the square
   boundary without dimming the artwork (the footage's white isn't pure #FFF). */
.video-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 36px 28px #FFFFFF;
}

.bg-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  /* Desktop: feather the edges into the page so the video reads as artwork
     drawn on the page, not a cropped media box. */
  -webkit-mask-image: radial-gradient(ellipse at center, #000 48%, transparent 70%);
  mask-image: radial-gradient(ellipse at center, #000 48%, transparent 70%);
}

/* ---------- the white box ---------- */
.card {
  position: relative;
  z-index: 2;
  width: min(360px, 100%);
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  padding: 30px 28px 26px;
  text-align: center;
  animation: rise 360ms var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mark {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 38px;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.status {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 9px 0 0;
}

/* ---------- form ---------- */
#waitlist-form { margin-top: 20px; text-align: left; }

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 5px;
}

#email {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 12px;
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 16px; /* not smaller — iOS Safari auto-zooms on focus below 16px */
  color: var(--ink);
  background: #FFFFFF;
  min-height: 44px;
}

#email:focus {
  outline: 2px solid var(--focus-ring);
  border-color: var(--crimson);
}

#email[aria-invalid="true"] { border-color: var(--crimson); }

.tip {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
  margin: 7px 0 0;
}

.form-error {
  font-size: 13px;
  color: var(--crimson);
  margin: 8px 0 0;
}

/* The alert region stays in the DOM permanently (screen readers miss alerts
   that enter the tree as they fire); collapse it while empty. */
.form-error:empty { margin: 0; }

/* honeypot: off-screen, not display:none (bots check for that) */
.hp {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cta {
  width: 100%;
  margin-top: 16px;
  background: var(--crimson);
  color: #FFFFFF;
  border: none;
  border-radius: 9999px;
  padding: 14px 0;
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  transition: transform 120ms var(--ease); /* brand rule: animate transform/opacity only */
}

.cta:hover { background: var(--crimson-hover); }
.cta:active { transform: scale(0.98); }
.cta:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; }
.cta[disabled] { opacity: 0.7; cursor: default; }

/* ---------- thank-you state (in-place swap; video keeps looping) ---------- */
.thanks { animation: rise 360ms var(--ease) both; }

.doodle { display: block; margin: 16px auto 2px; }

.thanks-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 25px;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 8px 0 0;
}

.thanks-title em { color: var(--crimson); font-style: normal; }

.thanks-title:focus { outline: none; }

.thanks-body {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 8px 0 0;
}

.ig {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 18px;
  background: var(--crimson);
  color: #FFFFFF;
  border-radius: 9999px;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  transition: transform 120ms var(--ease); /* brand rule: animate transform/opacity only */
}

.ig:hover { background: var(--crimson-hover); }
.ig:active { transform: scale(0.98); }
.ig:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; }

/* ---------- small screens: animation on top, card anchored low ----------
   Centering both would hide the loop behind the card (they're the same
   size on a phone), so the video sits under the banner at full strength
   and the card docks toward the bottom. */
@media (max-width: 640px) {
  .stage {
    place-items: end center;
    padding: 84px 20px 24px;
  }
  .video-wrap {
    top: 84px;
    transform: translateX(-50%);
    width: min(100vw, 440px);
  }
  .bg-video {
    opacity: 1;
    -webkit-mask-image: none;
    mask-image: none; /* the ::after white feather handles the edges */
  }
}

@media (max-width: 420px) {
  .banner { font-size: 22px; padding-top: 18px; }
  .card { padding: 26px 22px 22px; }
  .mark { font-size: 34px; }
}

/* ---------- reduced motion: no entrance motion (video paused via JS) ---------- */
@media (prefers-reduced-motion: reduce) {
  .card, .thanks { animation: none; }
  .cta, .ig { transition: none; }
}
