/* Mooiva landing page. Static, no build step.
   A dark studio: black page, one orange accent, system type. The only playful
   colour is inside the phone. The phone itself lives in css/phone.css. */

:root {
  --orange: #FF7A1A;
  --ink: #F5F5F7;
  --soft: #A1A1A6;
  --muted: #86868B;
  --line: rgba(255, 255, 255, 0.1);
  --panel: #0C0C0D;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --pad: clamp(20px, 5vw, 72px);
  --max: 1120px;
  --bar: 68px;
}

* { box-sizing: border-box; }
html { background: #000; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: #000; color: var(--ink);
  font-family: var(--font); font-size: 18px; line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Pills ---------- */
.pill {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent;
  background: var(--orange); color: #000;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1; white-space: nowrap;
  cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.pill:hover { background: #FF9240; }
.pill:active { transform: scale(0.98); }
.pill--small { height: 38px; padding: 0 17px; font-size: 14.5px; }
.pill i { font-style: normal; }
.pill--large { height: 58px; padding: 0 32px; font-size: 18px; }
.pill--quiet { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16); color: var(--ink); }
.pill--quiet:hover { background: rgba(255, 255, 255, 0.12); }
.pill[disabled] { cursor: default; opacity: 0.6; }
.pill--store, .pill--store:hover { background: transparent; border-color: rgba(255, 255, 255, 0.16); color: var(--soft); font-weight: 500; opacity: 1; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20; height: var(--bar);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
}
.wordmark { font-size: 27px; font-weight: 700; letter-spacing: -0.045em; line-height: 1; color: #fff; }
.topbar__actions { display: flex; align-items: center; gap: 10px; }

/* ---------- The pinned stage ---------- */
.tour { position: relative; height: 590vh; }
/* Studio light: warm from the top left corner, a little cool on the right. */
.tour::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 130vh; pointer-events: none;
  background:
    radial-gradient(60vw 70vh at 0% 0%, rgba(255, 122, 26, 0.13), rgba(255, 122, 26, 0.035) 45%, transparent 72%),
    radial-gradient(55vw 70vh at 100% 55%, rgba(96, 132, 255, 0.075), transparent 70%);
}
.stage {
  --ph: min(70vh, 720px);
  --u: calc(var(--ph) / 628);
  --pw: calc(300 * var(--u));
  --rest: calc(var(--bar) + (100vh - var(--bar) - var(--ph)) / 2 - 30px);
  /* Where the phone sits before any script runs: the hero pose. */
  --x: min(21vw, 320px); --y: 14px; --sc: 1.1;
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
}
.rig {
  position: absolute; left: 50%; top: var(--rest);
  width: var(--pw); height: var(--ph); margin-left: calc(var(--pw) / -2);
  transform: translate3d(var(--x), var(--y), 0);
}
/* The CSS phone scales itself; a 3D canvas takes the scale as a number instead. */
.rig > .phone-wrap, .rig > .phone-reflect, .rig > .glow { transform: scale(var(--sc)); }
.rig > .phone-reflect { transform: translateY(calc((var(--sc) - 1) * var(--ph))) scale(var(--sc)) scaleY(-1); }
.glow {
  position: absolute; left: 50%; top: 46%; width: 330%; height: 120%; margin: -60% 0 0 -165%;
  background:
    radial-gradient(closest-side, rgba(255, 122, 26, 0.2), rgba(255, 122, 26, 0.06) 50%, transparent 78%),
    radial-gradient(closest-side, rgba(120, 150, 255, 0.14), transparent 62%);
  pointer-events: none;
}
.rig canvas {
  --floor: 66%; --fade: 1;
  position: absolute; left: -100%; top: -12%; width: 300%; height: 170%; display: block;
  opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
  /* Everything under the floor line is the reflection: dimmed, then gone. */
  -webkit-mask-image: linear-gradient(to bottom, #000 var(--floor), rgba(0, 0, 0, 0.36) var(--floor), rgba(0, 0, 0, 0.1) calc(var(--floor) + 8% * var(--fade)), transparent calc(var(--floor) + 19% * var(--fade)));
  mask-image: linear-gradient(to bottom, #000 var(--floor), rgba(0, 0, 0, 0.36) var(--floor), rgba(0, 0, 0, 0.1) calc(var(--floor) + 8% * var(--fade)), transparent calc(var(--floor) + 19% * var(--fade)));
}
.rig.is-3d canvas { opacity: 1; }
.rig.is-3d > .phone-wrap, .rig.is-3d > .phone-reflect { visibility: hidden; }

/* ---------- Hero ---------- */
.hero {
  position: absolute; z-index: 2;
  left: max(var(--pad), calc(50% - 600px)); top: 50%;
  width: min(700px, 50vw);
  transform: translate3d(0, calc(-50% + var(--hero-y, 0px)), 0);
  opacity: var(--hero-o, 1);
}
.hero h1 {
  font-size: clamp(38px, 4.35vw, 66px); font-weight: 500; line-height: 1.03; letter-spacing: -0.035em; color: #fff;
}
.hero h1 .dim {
  background: linear-gradient(92deg, #55555A 0%, #8E8E93 45%, #D8D8DC 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.08em; /* keeps the comma and descenders inside the clip */
}
.hero__sub { margin-top: 26px; max-width: 30em; font-size: clamp(17px, 1.45vw, 21px); line-height: 1.45; color: var(--soft); }
.hero .signup { margin-top: 34px; max-width: 430px; }

/* Email field with the button inside it */
.field {
  display: flex; align-items: center; height: 58px; padding: 5px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.16);
  transition: border-color 0.2s, background 0.2s;
}
.field:focus-within { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.09); }
.field.is-invalid { border-color: #FF6B6B; }
.field input {
  flex: 1; min-width: 0; height: 100%; padding: 0 12px 0 20px;
  background: transparent; border: 0; outline: 0; color: #fff; font-size: 17px; border-radius: 999px;
}
.field input::placeholder { color: var(--muted); }
/* The browser's autofill paints its own background. Delaying that paint for ever keeps the field
   see-through, so it looks the same in the hero and in the pop-up, whatever is behind it. */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field input:-webkit-autofill:active,
.field input:autofill {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  -webkit-box-shadow: none;
  box-shadow: none;
  background-color: transparent !important;
  background-clip: text;
  transition: background-color 99999s ease-out 0s, color 99999s ease-out 0s;
}
.field .pill { height: 46px; padding: 0 26px; flex: none; }
.signup__status { font-size: 14px; line-height: 1.4; color: #FF8A8A; margin-top: 12px; padding-left: 21px; }
.signup__status:empty { display: none; }
.signup__status.is-info { color: var(--soft); }
.signup__note { font-size: 13.5px; line-height: 1.4; color: var(--muted); margin-top: 12px; padding-left: 21px; }
.signup.is-done .field, .signup.is-done .signup__note { display: none; }
.signup.is-done .signup__status { color: #fff; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; padding-left: 0; margin-top: 0; }

/* ---------- Tour captions ---------- */
.cap {
  position: absolute; left: calc(50% + 3vw); top: 50%;
  width: min(460px, 40vw);
  transform: translate3d(0, calc(-50% + 34px), 0);
  opacity: 0; visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}
/* The old text is gone before the new one arrives. */
.cap.is-on {
  opacity: 1; visibility: visible; transform: translate3d(0, -50%, 0);
  transition: opacity 0.6s ease 0.24s, transform 0.9s cubic-bezier(0.16, 0.8, 0.2, 1) 0.24s, visibility 0s;
}
.label { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--muted); }
.cap h2 { font-size: clamp(34px, 3.9vw, 58px); font-weight: 600; line-height: 1.04; letter-spacing: -0.04em; color: #fff; margin: 12px 0 18px; }
.cap p:not(.label) { font-size: clamp(17px, 1.4vw, 20px); color: var(--soft); max-width: 27em; }

/* ---------- Sections ---------- */
.block { max-width: var(--max); margin: 0 auto; padding: clamp(88px, 12vw, 170px) var(--pad); }
.block h2 { font-size: clamp(34px, 4.8vw, 66px); font-weight: 600; line-height: 1.04; letter-spacing: -0.04em; color: #fff; max-width: 13em; margin-top: 12px; }
.block .text { font-size: clamp(17px, 1.5vw, 21px); color: var(--soft); max-width: 30em; margin-top: 22px; }

.mooiva { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.portrait {
  aspect-ratio: 4 / 5; border-radius: 36px; border: 1px solid var(--line);
  background: radial-gradient(120% 90% at 30% 0%, #1A1A1D, #0A0A0B 60%);
  display: flex; align-items: flex-end; justify-content: center; padding: 26px;
  font-size: 15px; font-weight: 600; color: var(--muted);
}

.rules__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(40px, 5vw, 64px); }
.rule { background: var(--panel); border: 1px solid var(--line); border-radius: 30px; padding: clamp(24px, 2.6vw, 34px); min-height: 230px; display: flex; flex-direction: column; justify-content: flex-end; }
.rule h3 { font-size: 23px; font-weight: 600; line-height: 1.15; letter-spacing: -0.025em; color: #fff; }
.rule p { font-size: 16.5px; color: var(--soft); margin-top: 10px; }

.web { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.topics { background: var(--panel); border: 1px solid var(--line); border-radius: 30px; padding: 8px 28px; }
.topics li { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; font-size: 17px; font-weight: 500; }
.topics li + li { border-top: 1px solid var(--line); }
.topics li span:last-child { color: var(--muted); font-weight: 400; }

.join { text-align: center; }
.join h2, .join .text { margin-left: auto; margin-right: auto; }
.join .pill--large { margin-top: 40px; }
.stores { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 56px; }

.footer {
  max-width: var(--max); margin: 0 auto; padding: 30px var(--pad) 44px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  border-top: 1px solid var(--line);
}
.footer .wordmark { font-size: 22px; }
.footer__links { display: flex; gap: 26px; font-size: 14.5px; font-weight: 500; color: var(--soft); }
.footer__links a:hover { color: #fff; }

/* ---------- Waiting list dialog ---------- */
.modal {
  border: 0; padding: 0; background: transparent; color: var(--ink);
  width: min(500px, calc(100vw - 28px)); max-width: none; overflow: visible;
}
.modal::backdrop { background: rgba(0, 0, 0, 0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.modal[open] { animation: modal 0.32s cubic-bezier(0.16, 0.8, 0.2, 1); }
@keyframes modal { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal__panel { position: relative; background: #131314; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 34px; padding: clamp(26px, 6vw, 42px); }
.modal__close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); border: 0; color: var(--soft); font-size: 22px; line-height: 1; cursor: pointer;
}
.modal__close:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.modal h2 { font-size: clamp(28px, 6vw, 38px); font-weight: 600; line-height: 1.06; letter-spacing: -0.04em; color: #fff; margin: 6px 44px 26px 0; }

/* ---------- Narrow screens: text first, phone below; in the tour, phone above the text ---------- */
@media (max-width: 860px) {
  :root { --bar: 60px; }
  body { font-size: 17px; }
  .wordmark { font-size: 24px; }
  .topbar__actions { gap: 8px; }
  .pill--small { height: 36px; padding: 0 14px; font-size: 14px; }
  .pill--small i { display: none; }
  .stage {
    --ph: min(58svh, 560px);
    --rest: calc(var(--bar) + 6px);
    --x: 0px; --y: 330px; --sc: 1.12;
  }
  .hero { left: var(--pad); right: var(--pad); top: calc(var(--bar) + 22px); width: auto; text-align: center; transform: translate3d(0, var(--hero-y, 0px), 0); }
  .hero h1 { font-size: clamp(32px, 9.4vw, 44px); }
  .hero__sub { margin-top: 14px; font-size: 16.5px; margin-left: auto; margin-right: auto; }
  .hero .signup { margin: 22px auto 0; }
  .field { height: 54px; }
  .field .pill { height: 42px; padding: 0 22px; }
  .signup__note, .signup__status { padding-left: 0; }
  .modal .signup__note, .modal .signup__status { padding-left: 21px; }
  .cap { left: var(--pad); right: var(--pad); width: auto; top: calc(var(--rest) + var(--ph) + 26px); transform: translate3d(0, 26px, 0); }
  .cap.is-on { transform: none; }
  .cap h2 { font-size: clamp(28px, 8vw, 36px); margin: 6px 0 10px; }
  .cap p:not(.label) { font-size: 16.5px; }
  .label { font-size: 14.5px; }
  .phone-reflect {
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent 16%);
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent 16%);
  }
  .rig canvas { --fade: 0.3; }
  .mooiva, .web { grid-template-columns: 1fr; }
  .portrait { max-width: 280px; }
  .rules__list { grid-template-columns: 1fr; }
  .rule { min-height: 0; }
  .footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 860px) and (max-height: 700px) {
  .hero h1 { font-size: 30px; }
  .hero__sub { font-size: 15.5px; }
  .cap p:not(.label) { font-size: 15.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cap, .cap.is-on, .pill, .rig canvas { transition: none; }
  .modal[open] { animation: none; }
}
