/* ═══════════════════════════════════════════════════════════
   Missa — landing page
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg:        #f5f0e6;
  --bg-2:      #f1ebe1;
  --ink:       #1c1a17;
  --ink-soft:  #6b655c;
  --accent:    #000000;
  --accent-d:  #2e2a25;
  --gold:      #b08534;
  --line:      rgba(28, 26, 23, 0.12);
  --error:     #b3261e;
  --ok:        #2f7d4f;

  --display: "Geologica", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body:    "Geologica", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius:    22px;
  --radius-sm: 12px;

  --transition: 600ms;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ═══ Split hero ═════════════════════════════════════════════
   Left: brand pinned top, copy + waitlist pinned bottom.
   Right: full-height rotating media panel. */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  min-height: 100vh;
}

.hero__left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(28px, 3.5vw, 48px) clamp(24px, 4vw, 64px);
  background-image:
    radial-gradient(90% 70% at 0% 0%, #fffdf9 0%, var(--bg) 60%);
}

.hero__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 540px;
  width: 100%;
}

/* ── Brand (top-left) ────────────────────────────────────── */
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  align-self: flex-start;
}
.brand__logo {
  display: block;
  height: 30px;
  width: auto;
}

/* ── Rotating copy ───────────────────────────────────────── */
.hero__copy {
  width: 100%;
  will-change: opacity, transform;
}
.hero__copy.is-out {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.hero__copy.is-in {
  animation: fadeSlideUp var(--transition) cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
}

.headline {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.2rem, 4.4vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  text-wrap: balance;
}

.subheadline {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
  margin: 0;
  max-width: 460px;
  text-wrap: balance;
}

/* ── Shuffle button ──────────────────────────────────────── */
.shuffle {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.shuffle:hover {
  color: var(--ink);
  border-color: rgba(28, 26, 23, 0.28);
  background: rgba(255, 255, 255, 0.6);
}
.shuffle:active { transform: scale(0.97); }
.shuffle__icon { width: 16px; height: 16px; transition: transform 0.5s ease; }
.shuffle.is-spinning .shuffle__icon { transform: rotate(360deg); }

/* ── Waitlist ────────────────────────────────────────────── */
.waitlist {
  width: 100%;
  max-width: 460px;
  margin-top: 30px;
}
.waitlist__inner { min-height: 56px; }

.form-row {
  display: flex;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 8px;
  box-shadow: 0 1px 2px rgba(28, 26, 23, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-row:focus-within {
  border-color: rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.07);
}

.form-row input[type="email"] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 0 12px;
}
.form-row input[type="email"]::placeholder { color: #a8a298; }
.form-row input[type="email"].input-error { color: var(--error); }

/* Honeypot — invisible to humans */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-row button[type="submit"] {
  flex: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
}
.form-row button[type="submit"]:hover { background: var(--accent-d); }
.form-row button[type="submit"]:active { transform: scale(0.98); }
.form-row button[type="submit"]:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-loading { display: none; }
button.is-loading .btn-text { display: none; }
button.is-loading .btn-loading { display: inline; }

.form-message {
  margin: 12px 2px 0;
  font-size: 0.9rem;
}
.form-message.error { color: var(--error); }
.form-message.success { color: var(--ok); }

/* Success state (replaces the form) */
.success-state {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  animation: fadeSlideUp 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.success-state .checkmark {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 999px;
  background: rgba(47, 125, 79, 0.12);
  color: var(--ok);
  font-size: 1.3rem;
}
.success-state p { margin: 0; font-weight: 500; color: var(--ink); }

.waitlist__note {
  margin: 16px 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ── Legal row (bottom-left) ─────────────────────────────── */
.hero__legal {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 30px 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.hero__legal a { text-decoration: none; transition: color 0.2s; }
.hero__legal a:hover { color: var(--ink); }
.hero__legal-sep { opacity: 0.5; }

/* ═══ Right media panel (rotating video) ═════════════════════ */
.hero__right {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: clamp(16px, 2vw, 28px);
  margin-left: 0;
  padding: clamp(28px, 4vw, 64px);
  border-radius: var(--radius);
  background:
    radial-gradient(55% 45% at 73% 29%, rgba(233, 219, 201, 0.78), rgba(233, 219, 201, 0) 60%),
    radial-gradient(95% 85% at 103% 102%, rgba(30, 19, 10, 0.94), rgba(30, 19, 10, 0) 70%),
    radial-gradient(120% 85% at 36% 114%, rgba(122, 84, 48, 0.85), rgba(122, 84, 48, 0) 60%),
    linear-gradient(150deg, #ceb9a6 0%, #b88f66 40%, #7c5733 70%, #301f10 100%);
}

/* Phone shell — the video sits in the screen cutout, the frame PNG
   (transparent screen) overlays it. No hover tilt/zoom by design. */
.hero-media {
  position: relative;
  height: 100%;
  max-height: 720px;
  aspect-ratio: 1226 / 2534;
}
.hero-media__frame {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 26px 42px rgba(28, 26, 23, 0.34));
}

.hero-media__video {
  position: absolute;
  top: 1.5%; left: 4%; right: 4%; bottom: 1.5%;
  width: 92%; height: 97%;
  object-fit: cover;
  display: block;
  border-radius: 15%/7%;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.hero-media:not(.is-empty) .hero-media__video { opacity: 1; }
.hero-media.is-swapping .hero-media__video { opacity: 0; }

/* Placeholder shown until a real clip is dropped in */
.hero-media__placeholder {
  position: absolute;
  top: 1.5%; left: 4%; right: 4%; bottom: 1.5%;
  border-radius: 3% / 1.5%;
  padding: 0 10%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background:
    radial-gradient(90% 70% at 30% 25%, rgba(0, 0, 0, 0.07), transparent 60%),
    radial-gradient(100% 80% at 75% 80%, rgba(176, 133, 52, 0.14), transparent 55%),
    var(--bg-2);
  color: var(--ink-soft);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.hero-media.is-empty .hero-media__placeholder { opacity: 1; }

.hero-media__glyph { font-size: 1.6rem; color: var(--gold); }
.hero-media__theme {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  text-transform: capitalize;
}
.hero-media__hint {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

/* ═══ Responsive ═════════════════════════════════════════════ */

/* ── Mobile: video first. Tight logo on top, the video panel as the hero,
   then a smaller title/sentence — all on the first screen. Sign-up + the
   rest flow below the fold. (Desktop two-column layout is untouched.) ── */
@media (max-width: 900px) {
  .hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  /* Promote brand + intro out of .hero__left so they reorder around the
     video (.hero__right) within one column. */
  .hero__left { display: contents; }
  .brand       { order: 1; align-self: flex-start; padding: 14px 20px 2px; }
  .hero__right { order: 2; }
  .hero__intro { order: 3; }

  /* The video panel — first prominent element, sized so the title/sentence
     still land above the fold. */
  .hero__right {
    margin: 0 16px;
    padding: 12px;
    border-radius: var(--radius);
  }
  .hero-media {
    height: 56vh;
    height: 56dvh;
    max-height: none;
  }

  /* Copy sits under the video: smaller + tight to stay above the fold. */
  .hero__intro {
    max-width: none;
    padding: 16px 22px 36px;
  }
  .eyebrow     { margin-bottom: 12px; }
  .headline    { font-size: clamp(1.5rem, 6.4vw, 2.05rem); margin-bottom: 10px; }
  .subheadline { font-size: 0.98rem; max-width: none; }
  .shuffle     { margin-top: 18px; }
  .waitlist    { margin-top: 24px; max-width: none; }
  .hero__legal { margin-top: 22px; }
}

@media (max-width: 560px) {
  .form-row {
    flex-direction: column;
    border-radius: var(--radius-sm);
    padding: 8px;
  }
  .form-row input[type="email"] { padding: 10px 12px; }
  .form-row button[type="submit"] { width: 100%; padding: 13px; }
  .form-row:focus-within { box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.07); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
