/* Moonkeel marketing page. Tokens mirror the app's src/styles.css (warm off-white / near-black). */
:root {
  color-scheme: light;
  --bg: #f7f4ef;
  --surface: #fffdfa;
  --surface-2: #f0ece5;
  --ink: #1f1d1a;
  --ink-2: #5b5750;
  --muted: #6f6a62;
  --line: #e6e1d8;
  --input-border: #8f897f;
  --accent: #1f1d1a;
  --accent-ink: #fffdfa;
  --good: #0f7a3a;
  --good-bg: #e3f3e8;
  --bad: #b3261e;
  --bad-bg: #fbe5e3;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(31, 29, 26, 0.04), 0 4px 16px rgba(31, 29, 26, 0.05);
  --shadow-lg: 0 2px 4px rgba(31, 29, 26, 0.06), 0 18px 48px rgba(31, 29, 26, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #161513;
    --surface: #211f1c;
    --surface-2: #2b2925;
    --ink: #f5f1ea;
    --ink-2: #c4beb3;
    --muted: #a39d92;
    --line: #34312c;
    --input-border: #757067;
    --accent: #f5f1ea;
    --accent-ink: #161513;
    --good: #4cc47a;
    --good-bg: #183324;
    --bad: #f08a80;
    --bad-bg: #3a1d1a;
    --shadow: none;
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn { transition: transform 0.12s ease, opacity 0.12s ease; }
  .btn:active { transform: scale(0.98); }
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--accent); color: var(--accent-ink);
  padding: 12px 16px; border-radius: var(--radius-sm); text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%; max-width: 1040px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

/* Header */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px; padding-top: env(safe-area-inset-top, 0px);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
}
.logo { border-radius: 9px; box-shadow: 0 0 0 1px var(--line); }
.textlink {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
  color: var(--ink-2); font-size: 16px; font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border: 0; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-ink);
  font-size: 17px; font-weight: 650; text-decoration: none; cursor: pointer;
}
.btn:disabled { opacity: 0.6; cursor: default; }
.btn.block { width: 100%; }

/* Hero */
.hero { display: grid; gap: 28px; padding-top: 12px; padding-bottom: 48px; }
.eyebrow { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.eyebrow a { display: inline-flex; align-items: center; min-height: 44px; }
h1 {
  font-size: clamp(34px, 10vw, 56px); line-height: 1.05;
  font-weight: 700; letter-spacing: -0.03em; text-wrap: balance;
}
.lead { margin-top: 16px; font-size: 19px; line-height: 1.45; color: var(--ink-2); max-width: 34em; }
.cta-row { margin-top: 24px; display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.cta-row .btn { width: 100%; }
.beta { color: var(--muted); font-size: 15px; text-align: center; }
.hero-shot { justify-self: center; width: min(250px, 66vw); }
.hero-shot img {
  border-radius: 30px; border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  background: var(--surface);
}

/* Sections */
.sec { padding-top: 48px; padding-bottom: 8px; }
.band { margin-top: 48px; padding: 40px 0; background: var(--surface-2); }
h2 { font-size: clamp(25px, 6.5vw, 34px); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
h3 { font-size: 18px; line-height: 1.25; font-weight: 650; }
.sec-lead { margin-top: 10px; color: var(--ink-2); max-width: 36em; }
.prose { margin-top: 16px; display: grid; gap: 14px; max-width: 38em; color: var(--ink-2); }
.prose strong { color: var(--ink); }

.chips { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 16px; font-weight: 600; font-size: 16px;
}

/* Feature cards */
.features { margin-top: 20px; display: grid; gap: 12px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.card p { margin-top: 6px; color: var(--ink-2); font-size: 16px; }

/* Screenshots */
.phones {
  margin: 24px -16px 0; padding: 4px 16px 16px;
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding: 0 16px; -webkit-overflow-scrolling: touch;
}
.phones li { flex: 0 0 min(240px, 66vw); scroll-snap-align: start; }
.phones img, .details img {
  width: 100%; border-radius: 26px; border: 1px solid var(--line);
  box-shadow: var(--shadow); background: var(--surface);
}
.details img { border-radius: var(--radius); }
figcaption { margin-top: 10px; font-size: 15px; color: var(--muted); text-align: center; }
.details { margin-top: 20px; display: grid; gap: 28px; justify-items: center; }
.details figure { width: min(100%, 360px); }

/* Form */
.invite {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 18px;
}
.form { margin-top: 20px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
label { font-weight: 600; font-size: 16px; }
.opt { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font-size: 16px;
  background: var(--bg); border: 1.5px solid var(--input-border); border-radius: var(--radius-sm);
}
textarea { resize: vertical; min-height: 96px; }
select { appearance: auto; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 0; font-size: 16px; border-radius: var(--radius-sm); }
.status:empty { display: none; }
.status.ok, .status.err { padding: 14px 16px; font-weight: 600; }
.status.ok { background: var(--good-bg); color: var(--good); }
.status.err { background: var(--bad-bg); color: var(--bad); }
.fine { color: var(--muted); font-size: 14px; line-height: 1.45; }
.note-sec { padding-top: 24px; max-width: 640px; }

/* Legal page */
.page-h { font-size: clamp(30px, 8vw, 44px); padding-top: 8px; }
.legal { margin-top: 20px; gap: 12px; }
.legal h2 { font-size: 20px; margin-top: 16px; color: var(--ink); }

/* Footer */
.foot { margin-top: 48px; border-top: 1px solid var(--line); padding: 24px 0 calc(32px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 15px; }
.foot .wrap { display: grid; gap: 8px; }
.foot ul { display: flex; flex-wrap: wrap; gap: 0 20px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }

/* Wider screens */
@media (min-width: 640px) {
  body { font-size: 18px; }
  .features { grid-template-columns: 1fr 1fr; }
  .card.wide { grid-column: 1 / -1; }
  .cta-row { flex-direction: row; align-items: center; gap: 18px; }
  .cta-row .btn { width: auto; }
  .beta { text-align: left; }
  .phones { margin: 28px 0 0; padding: 4px 0 16px; overflow: visible; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .phones li { flex: none; }
  .details { grid-template-columns: 1fr 1fr; align-items: center; gap: 28px; }
  .invite { padding: 32px; max-width: 640px; margin: 0 auto; }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 56px; padding-top: 32px; padding-bottom: 72px; }
  .hero-shot { width: min(300px, 100%); }
  .features { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .card.wide { grid-column: auto; }
  .sec { padding-top: 72px; }
  .band { margin-top: 72px; padding: 64px 0; }
  .foot .wrap { grid-template-columns: 1fr auto; align-items: center; }
}
