/* moonsays.app landing (L70). Tokens from design/DESIGN-SYSTEM.md ("Kil"). */

@font-face { font-family: "Rubik"; font-weight: 400; font-display: swap; src: url("fonts/rubik-400.woff2") format("woff2"); }
@font-face { font-family: "Rubik"; font-weight: 500; font-display: swap; src: url("fonts/rubik-500.woff2") format("woff2"); }
@font-face { font-family: "Rubik"; font-weight: 700; font-display: swap; src: url("fonts/rubik-700.woff2") format("woff2"); }

:root {
  --surface: #F6DCCB;
  --card: #FFF6EF;
  --container: #FBEADF;
  --groove: #F1D6C5;
  --pressed: #E9C9B6;
  --ink: #1B2340;
  --ink2: #6A4C40;
  --outline: #8D8296;
  --divider: #EBCFBD;
  --primary: #2D4BC2;
  --on-primary: #FFFFFF;
  --primary-container: #DCE2FB;
  --on-primary-container: #14246B;
  --error: #B3261E;
  --lip: rgba(20, 36, 107, 0.28);
  --sh1: 0 1px 2px rgba(91, 52, 33, 0.08), 0 3px 10px rgba(91, 52, 33, 0.07);
  --sh2: 0 2px 4px rgba(91, 52, 33, 0.08), 0 12px 28px rgba(91, 52, 33, 0.12);
  --inset: inset 0 2px 5px rgba(91, 52, 33, 0.16), inset 0 -1px 0 rgba(255, 255, 255, 0.55);
  --moon-shade: rgba(110, 66, 46, 0.62);
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.05, 0.7, 0.1, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #15192B;
    --card: #1E2338;
    --container: #232941;
    --groove: #2A314C;
    --pressed: #333B59;
    --ink: #F4ECE6;
    --ink2: #BDB8C7;
    --outline: #8B8799;
    --divider: #353C5A;
    --primary: #A9B8FF;
    --on-primary: #0E1A5C;
    --primary-container: #2D3F99;
    --on-primary-container: #DCE2FB;
    --error: #F2B8B5;
    --lip: rgba(0, 0, 0, 0.35);
    --sh1: 0 1px 2px rgba(0, 0, 0, 0.35);
    --sh2: 0 6px 20px rgba(0, 0, 0, 0.4);
    --inset: inset 0 2px 5px rgba(0, 0, 0, 0.35);
    --moon-shade: rgba(10, 13, 28, 0.72);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/1.5 "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--primary); }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1080px; margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 16px 4px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.125rem; min-height: 48px; }
.brand img { width: 32px; height: 32px; border-radius: 9px; box-shadow: var(--sh1); }
.pill {
  display: inline-flex; align-items: center; min-height: 32px; padding: 6px 12px;
  border-radius: 999px; background: var(--primary-container); color: var(--on-primary-container);
  font-size: 0.8125rem; font-weight: 500; white-space: nowrap;
}

main { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- hero ---------- */
.hero { display: grid; gap: 18px; padding: 4px 0 32px; }
.moon { margin: 0; display: grid; justify-items: center; gap: 10px; }
/* The Moon sits in a groove, like in the app's score ring. */
.moon-ring {
  width: min(40vw, 156px); aspect-ratio: 1; padding: 14px; border-radius: 50%;
  background: var(--groove); box-shadow: var(--inset);
  animation: rise 900ms var(--ease-out) both;
}
.moon-disc { position: relative; width: 100%; aspect-ratio: 1; filter: drop-shadow(0 6px 10px rgba(91, 52, 33, 0.28)); }
.moon-disc img { width: 100%; height: 100%; clip-path: circle(49.4%); }
.moon-disc svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.moon-caption { font-size: 0.8125rem; font-weight: 500; color: var(--ink2); text-align: center; }

.hero-text { display: grid; gap: 12px; text-align: center; }
h1 span { display: inline-block; }
h1 { font-size: clamp(2rem, 9vw, 3.5rem); line-height: 1.06; letter-spacing: -0.02em; text-wrap: balance; }
.lede { font-size: 1.0625rem; line-height: 1.5; color: var(--ink2); font-weight: 500; text-wrap: pretty; max-width: 34rem; margin: 0 auto; }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: 24px; box-shadow: var(--sh1); padding: 20px; }

/* ---------- waitlist ---------- */
.join { display: grid; gap: 12px; scroll-margin-top: 16px; }
.join form { display: grid; gap: 12px; }
.join-title { font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.01em; }
.join-sub { color: var(--ink2); font-size: 0.9375rem; }
.field-label { font-size: 0.875rem; font-weight: 500; padding: 0; margin-top: 4px; }
.field {
  width: 100%; min-height: 52px; padding: 14px 18px;
  border: 0; border-radius: 18px; background: var(--groove); box-shadow: var(--inset);
  color: var(--ink); font: inherit; font-size: 1rem; /* 16px keeps iOS from zooming */
  outline: none; transition: box-shadow 150ms var(--ease);
}
.field::placeholder { color: var(--ink2); opacity: 0.7; }
.field:focus-visible { box-shadow: var(--inset), 0 0 0 2px var(--primary); }
.field[aria-invalid="true"] { box-shadow: var(--inset), 0 0 0 2px var(--error); }
.field-error { color: var(--error); font-size: 0.875rem; font-weight: 500; }

.countries { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip { position: relative; display: block; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 12px;
  border-radius: 999px; background: var(--container); box-shadow: var(--sh1);
  font-weight: 500; font-size: 0.9375rem; text-align: center;
  transition: background 150ms var(--ease), color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.chip input:checked + span { background: var(--primary); color: var(--on-primary); box-shadow: 0 3px 0 var(--lip); }
.chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

.consent { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 0.875rem; line-height: 1.45; color: var(--ink2); margin-top: 4px; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--primary); cursor: pointer; }
.consent a { font-weight: 500; }

.trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 14px 24px;
  border: 0; border-radius: 999px; background: var(--primary); color: var(--on-primary);
  font: inherit; font-size: 1.0625rem; font-weight: 700; text-decoration: none; cursor: pointer;
  box-shadow: 0 3px 0 var(--lip); margin-top: 6px;
  transition: transform 100ms var(--ease), box-shadow 100ms var(--ease), opacity 150ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(2px) scale(0.99); box-shadow: 0 1px 0 var(--lip); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.btn-ghost { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--outline); margin-top: 20px; }
.btn-ghost:active { box-shadow: inset 0 0 0 1.5px var(--outline); }

.form-status { font-size: 0.875rem; font-weight: 500; color: var(--error); min-height: 0; }
.form-status:empty { display: none; }
.markets { font-size: 0.8125rem; color: var(--ink2); text-align: center; }

.done { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 12px 0 4px; outline: none; animation: rise 500ms var(--ease-out) both; }
.done img { width: 72px; height: 72px; clip-path: circle(49.4%); }

/* ---------- sections ---------- */
.section { padding: 28px 0; border-top: 1px solid var(--divider); }
.section > h2 { font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.005em; margin-bottom: 16px; }

.cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; }
.cats li { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 0.8125rem; font-weight: 500; line-height: 1.25; }
.cats img { width: 100%; max-width: 88px; aspect-ratio: 1; border-radius: 22px; background: var(--card); box-shadow: var(--sh1); padding: 6px; }

.steps { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 16px; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.num {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary-container); color: var(--on-primary-container); font-weight: 700;
}
.steps h3 { font-size: 1.0625rem; line-height: 1.3; margin: 0 0 2px; }
.steps p { color: var(--ink2); font-size: 0.9375rem; }

.example { display: grid; gap: 14px; max-width: 420px; }
.example-tag { justify-self: start; font-size: 0.75rem; font-weight: 500; color: var(--ink2); background: var(--groove); border-radius: 999px; padding: 2px 10px; }
.example-row { display: flex; align-items: center; gap: 16px; }
.ring {
  flex: none; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%;
  background: conic-gradient(var(--primary) 0 84%, var(--groove) 84% 100%);
  transform: scaleX(-1); /* fills counter-clockwise, like the app */
}
.ring::before { content: ""; grid-area: 1 / 1; width: 64px; height: 64px; border-radius: 50%; background: var(--card); box-shadow: var(--inset); }
.ring span { grid-area: 1 / 1; transform: scaleX(-1); font-size: 1.625rem; font-weight: 700; z-index: 1; }
.example-cat { font-size: 0.875rem; color: var(--ink2); font-weight: 500; }
.example-day { font-size: 1.375rem; font-weight: 700; line-height: 1.2; }
.example-score { font-weight: 500; }
.window { display: grid; gap: 6px; }
.window-label { font-size: 0.8125rem; font-weight: 500; color: var(--ink2); }
/* Groove with the cobalt window inside it, as on the result screen. */
.window-pill {
  display: block; padding: 6px; border-radius: 999px; background: var(--groove); box-shadow: var(--inset);
}
.window-pill span {
  display: block; margin: 0 14% 0 12%; padding: 8px 10px; border-radius: 999px;
  background: var(--primary); color: var(--on-primary); box-shadow: 0 3px 0 var(--lip);
  font-weight: 700; text-align: center; white-space: nowrap;
}
.example-why { font-weight: 500; }

.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 40rem; }
.facts li { padding-left: 18px; position: relative; color: var(--ink2); }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.facts strong { color: var(--ink); font-weight: 500; }
.trust .btn-ghost { max-width: 420px; }

/* ---------- footer ---------- */
.foot {
  max-width: 1080px; margin: 0 auto; padding: 24px 16px max(32px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--divider); display: grid; gap: 10px; font-size: 0.875rem; color: var(--ink2);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
.disclaimer { color: var(--ink); }

@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }

/* ---------- wider screens ---------- */
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 420px; grid-template-areas: "moon join" "text join";
    align-items: start; column-gap: 56px; padding: 32px 0 56px;
  }
  .moon { grid-area: moon; justify-items: start; }
  .moon-ring { width: 240px; padding: 22px; }
  .moon-caption { text-align: left; }
  .hero-text { grid-area: text; text-align: left; }
  .lede { margin: 0; }
  .join { grid-area: join; position: sticky; top: 24px; padding: 28px; box-shadow: var(--sh2); }
  .cats { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .how { display: grid; grid-template-columns: 1fr 420px; column-gap: 56px; align-items: start; }
  .how > h2 { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
