/* Moonbud's website: one stylesheet for every page. The look is the app's "Dusk":
   soft purple and teal, content floating on glass over the Atmosphere (DESIGN.md). */

:root {
  --page: #ebe8fb;
  --ink: #1d1a33;
  --muted: #454259;
  --line: rgba(29, 26, 51, 0.1);
  --accent: #6a48e0;
  --accent-fill: #6a48e0;
  --on-accent: #ffffff;
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.8);
  --glass-edge: rgba(255, 255, 255, 0.78);
  --shadow: 0 10px 34px rgba(40, 30, 110, 0.08);
  --blob1: #b2a8ff; /* periwinkle */
  --blob2: #93dfe2; /* teal */
  --blob3: #d6bcf7; /* lilac */
  --blob4: #a9cdff; /* sky */
  --blob5: #f5c6df; /* blush */
  --shot-shadow: 0 24px 60px rgba(40, 30, 110, 0.22);
  --rounded: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #141130;
    --ink: #eeecf8;
    --muted: rgba(255, 255, 255, 0.78);
    --line: rgba(255, 255, 255, 0.12);
    --accent: #b3a2ff;
    --accent-fill: #b3a2ff;
    --on-accent: #17142b;
    --glass: rgba(28, 24, 56, 0.55);
    --glass-strong: rgba(28, 24, 56, 0.82);
    --glass-edge: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 34px rgba(0, 0, 0, 0.28);
    --blob1: #4f4594;
    --blob2: #417087;
    --blob3: #66518d;
    --blob4: #495e94;
    --blob5: #7a577c;
    --shot-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
}
html, body { overflow-x: clip; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--rounded);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }

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

/* The Atmosphere: soft color fields drifting over the page color, with a little grain. */
.atmosphere {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: var(--page);
}
.atmosphere i {
  position: absolute; aspect-ratio: 1; border-radius: 50%;
  width: max(70vw, 70vh);
  opacity: 0.95;
  will-change: transform;
}
.atmosphere i:nth-child(1) { left: -22%; top: -24%; background: radial-gradient(circle, var(--blob1) 0%, transparent 68%); animation: drift1 38s ease-in-out infinite alternate; }
.atmosphere i:nth-child(2) { right: -26%; top: -14%; background: radial-gradient(circle, var(--blob2) 0%, transparent 68%); animation: drift2 44s ease-in-out infinite alternate; }
.atmosphere i:nth-child(3) { left: -12%; bottom: -36%; background: radial-gradient(circle, var(--blob3) 0%, transparent 68%); animation: drift3 50s ease-in-out infinite alternate; }
.atmosphere i:nth-child(4) { right: -20%; bottom: -30%; background: radial-gradient(circle, var(--blob4) 0%, transparent 68%); animation: drift1 56s ease-in-out infinite alternate-reverse; }
.atmosphere i:nth-child(5) { left: 22%; top: 18%; width: max(52vw, 52vh); background: radial-gradient(circle, var(--blob5) 0%, transparent 68%); opacity: 0.6; animation: drift2 62s ease-in-out infinite alternate-reverse; }
.atmosphere::after {
  content: ""; position: absolute; inset: 0; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift1 { from { transform: translate(0, 0) scale(1); } to { transform: translate(14vw, 10vh) scale(1.06); } }
@keyframes drift2 { from { transform: translate(0, 0) scale(1.04); } to { transform: translate(-12vw, 12vh) scale(0.97); } }
@keyframes drift3 { from { transform: translate(0, 0) scale(0.98); } to { transform: translate(10vw, -14vh) scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .atmosphere i { animation: none; } }

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: var(--shadow);
}

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

/* Header */
.top { padding-top: max(14px, env(safe-area-inset-top)); }
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 14px; border-radius: 999px;
}
.lockup {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink); text-decoration: none;
}
.lockup svg { width: 30px; height: 30px; flex: none; }
.wordmark {
  font-family: var(--rounded); font-weight: 600; font-size: 1.45rem;
  letter-spacing: -0.03em; line-height: 1;
}
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  color: var(--ink); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover { background: var(--glass-strong); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
@media (max-width: 560px) {
  .nav .wide { display: none; }
  .nav a { padding: 8px 10px; }
}
@media (max-width: 440px) {
  .nav .wider { display: none; }
}

/* Buttons and badges */
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.soon {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px 12px 16px; border-radius: 999px;
  background: var(--accent-fill); color: var(--on-accent);
  font-weight: 600; font-size: 1rem; line-height: 1.2;
}
.soon svg { width: 22px; height: 22px; flex: none; }
.soon small { display: block; font-weight: 500; font-size: 0.75rem; opacity: 0.85; }
.ghost {
  display: inline-flex; align-items: center; padding: 12px 18px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600;
}
.ghost:hover { background: var(--glass-strong); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 40px; align-items: center; padding-block: 56px 40px;
}
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
}
.hero h1 { font-size: clamp(2.5rem, 6.2vw, 4.4rem); margin: 12px 0 18px; }
.hero .lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 34em; margin-bottom: 28px; }
.platforms { margin-top: 18px; font-size: 0.92rem; color: var(--muted); }

.shots { position: relative; display: flex; justify-content: center; min-height: 0; }
.phone {
  display: block; width: min(300px, 70vw); height: auto; aspect-ratio: 603 / 1311;
  border-radius: 38px; box-shadow: var(--shot-shadow);
  border: 1px solid var(--glass-edge);
}
.phone img { width: 100%; height: 100%; border-radius: inherit; display: block; }
.shots .back {
  position: absolute; width: min(260px, 60vw); transform: translate(46%, 9%) rotate(5deg);
  opacity: 0.98; z-index: 0;
}
.shots .front { position: relative; z-index: 1; transform: translateX(-14%) rotate(-2deg); }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 36px; gap: 36px; }
  .shots .front { transform: translateX(-16%) rotate(-2deg); }
  .shots .back { width: min(230px, 54vw); transform: translate(30%, 8%) rotate(5deg); }
}

/* Sections */
section { padding-block: 56px; }
.head { max-width: 40em; margin-bottom: 28px; }
.head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-top: 8px; }
.head p { color: var(--muted); margin-top: 12px; font-size: 1.08rem; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; padding: 0; margin: 0; list-style: none; }
.steps li { border-radius: 26px; padding: 22px; counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; margin-bottom: 14px;
  background: var(--accent-fill); color: var(--on-accent);
  font-family: var(--rounded); font-weight: 700;
}
.steps h3 { font-size: 1.2rem; margin-bottom: 6px; }
.steps p { color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center;
}
.split.flip > .shots { order: -1; }
.split .shots .phone { width: min(300px, 72vw); }
@media (max-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .split.flip > .shots { order: 0; }
}

.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; color: var(--muted); }
.ticks li strong { color: var(--ink); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-fill)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.5L13 6.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}
@media (prefers-color-scheme: dark) {
  .ticks li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.5L13 6.4' fill='none' stroke='%2317142b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.card { border-radius: 26px; padding: 24px; }
.card h3 { font-size: 1.2rem; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.card h3 .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.card p { color: var(--muted); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { border-radius: 28px; padding: 28px; display: flex; flex-direction: column; gap: 6px; }
.plan h3 { font-size: 1.5rem; }
.plan .price { font-family: var(--rounded); font-size: 1.15rem; font-weight: 600; }
.plan .price b { font-size: 2.2rem; letter-spacing: -0.02em; }
.plan .sub { color: var(--muted); font-size: 0.95rem; }
.plan.pro { background: var(--glass-strong); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.plan .ticks { margin-top: 14px; }
.tag {
  align-self: flex-start; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent);
}
.fine { margin-top: 18px; font-size: 0.86rem; color: var(--muted); max-width: 52em; }
@media (max-width: 760px) { .plans { grid-template-columns: minmax(0, 1fr); } }

/* Privacy band */
.promise { border-radius: 32px; padding: clamp(24px, 4vw, 44px); }
.promise .grid { margin-top: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 20px; }
.promise .grid > div h3 { font-size: 1.1rem; margin-bottom: 6px; }
.promise .grid > div p { color: var(--muted); }

.closing { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; padding-block: 72px; }
.closing svg.big { width: 88px; height: 88px; }
.closing h1, .closing h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.closing p { color: var(--muted); max-width: 32em; }

/* Footer */
footer { padding-block: 28px max(36px, env(safe-area-inset-bottom)); }
.foot {
  border-radius: 28px; padding: 22px 24px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  font-size: 0.92rem; color: var(--muted);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--ink); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot .made a { color: var(--accent); font-weight: 600; }

/* Policy and support pages */
.doc { max-width: 760px; margin: 32px auto 0; border-radius: 32px; padding: clamp(22px, 5vw, 52px); background: var(--glass-strong); }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.doc .updated { color: var(--muted); margin-top: 8px; font-size: 0.95rem; }
.doc h2 { font-size: 1.35rem; margin: 36px 0 10px; }
.doc h3 { font-size: 1.08rem; margin: 22px 0 6px; }
.doc p, .doc li { color: var(--ink); }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 10px 0 0; display: grid; gap: 8px; }
.doc .summary {
  margin-top: 22px; padding: 18px 20px; border-radius: 20px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.doc details { border-top: 1px solid var(--line); padding: 14px 0; }
.doc details:last-of-type { border-bottom: 1px solid var(--line); }
.doc summary { cursor: pointer; font-weight: 600; font-family: var(--rounded); font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary::after { content: "+"; color: var(--accent); font-weight: 700; font-size: 1.2rem; line-height: 1; }
.doc details[open] summary::after { content: "\2212"; }
.doc details > :not(summary) { margin-top: 10px; color: var(--muted); }
.doc details ul { color: var(--muted); }
.doc code { font-size: 0.9em; }
