/* Moment — marketing site styles.
   Mirrors the app's design tokens (Color+Moment.swift). No JS, no trackers.
   Layout: full-width alternating bands, 1100px content, product-site rhythm. */

:root {
  --bg-primary: #F7F2EB;
  --bg-secondary: #EEE8DE;
  --bg-tertiary: #E2DBCF;
  --border: #D0C6BA;
  --text-primary: #1C1712;
  --text-secondary: #3E362C;
  --text-tertiary: #6E6254;
  --text-quaternary: #8A7C6E;
  --terracotta: #8A3A2E;
  --terracotta-text: #6B281F;
  --terracotta-light: #F2D9D1;
  --sage: #4C7756;
  --sage-text: #2D6948;
  --lavender-text: #423580;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1C1712;
    --bg-secondary: #221E18;
    --bg-tertiary: #262018;
    --border: #2E2820;
    --text-primary: #F0E8DC;
    --text-secondary: #D0C6BA;
    --text-tertiary: #9E9286;
    --text-quaternary: #78685C;
    --terracotta: #C05A45;
    --terracotta-text: #E68A70;
    --terracotta-light: #38190F;
    --sage: #8BA888;
    --sage-text: #7ABE96;
    --lavender-text: #A89EE8;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.serif { font-family: "Fraunces", Georgia, "Times New Roman", serif; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 32px; }
.container.narrow { max-width: 720px; }

/* ============ Header ============ */
header { padding: 24px 0; }
header .container { display: flex; justify-content: space-between; align-items: center; }
.wordmark {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 26px;
  color: var(--terracotta);
  text-decoration: none;
}
nav { display: flex; align-items: center; gap: 24px; }
nav a {
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 15px;
}
nav a:hover { color: var(--text-primary); }
nav a.nav-cta {
  background: var(--terracotta);
  color: #fff;
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 600;
}
nav a.nav-cta:hover { opacity: 0.92; color: #fff; }

/* ============ Hero ============ */
.hero { padding: 72px 0 24px; text-align: center; }
.hero .eyebrow { margin-bottom: 18px; }
.hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(30px, 7vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 880px;
  margin: 0 auto;
}
.hero h1 em { color: var(--terracotta); font-style: normal; }
.hero .sub {
  margin: 22px auto 0;
  font-size: 20px;
  color: var(--text-tertiary);
  max-width: 560px;
}
.btn {
  display: inline-block;
  background: var(--terracotta);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  padding: 15px 32px;
  border-radius: 12px;
  border: none;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { opacity: 0.92; }
.btn-row { margin-top: 32px; display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; }
.btn-note { font-size: 14px; color: var(--text-quaternary); }

/* ============ Phone mockup ============ */
.phone-wrap { display: flex; justify-content: center; padding: 56px 0 0; }
.phone {
  width: 340px;
  border-radius: 48px;
  border: 10px solid var(--text-primary);
  background: var(--bg-primary);
  box-shadow: 0 40px 80px rgba(0,0,0,0.25);
  overflow: hidden;
  position: relative;
}
.phone .screen { padding: 26px 18px 30px; }
.phone .notch {
  width: 110px; height: 26px;
  background: var(--text-primary);
  border-radius: 14px;
  margin: 0 auto 18px;
}
.phone .screen-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 24px;
  margin-bottom: 4px;
}
.phone .screen-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--text-quaternary);
  margin: 14px 0 8px;
}

/* mini heatmap inside phone */
.mini-heat { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.mini-heat i {
  display: block; height: 13px; border-radius: 3px;
  background: var(--bg-tertiary);
}
.mini-heat i.h1 { background: color-mix(in srgb, var(--terracotta) 35%, transparent); }
.mini-heat i.h2 { background: color-mix(in srgb, var(--terracotta) 60%, transparent); }
.mini-heat i.h3 { background: color-mix(in srgb, var(--terracotta) 90%, transparent); }

/* ============ Bands & sections ============ */
.band { padding: 88px 0; }
.band.tint { background: var(--bg-secondary); }
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--terracotta);
}
.band h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  margin: 10px 0 14px;
  letter-spacing: -0.01em;
}
.band .lede { font-size: 18px; color: var(--text-tertiary); max-width: 560px; }

/* Alternating feature rows: text + visual */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.feature + .feature { margin-top: 96px; }
.feature.flip .feature-text { order: 2; }
.feature.flip .feature-visual { order: 1; }
@media (max-width: 820px) {
  .feature, .feature.flip .feature-text, .feature.flip .feature-visual {
    grid-template-columns: 1fr; order: initial;
  }
  .feature { gap: 32px; }
  .feature + .feature { margin-top: 64px; }
}

/* ============ Cards ============ */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.band.tint .card { background: var(--bg-primary); }

.insight-card { border-color: color-mix(in srgb, var(--lavender-text) 35%, transparent); }
.insight-card .insight-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em;
  color: var(--lavender-text); margin-bottom: 8px;
}
.insight-card.sage-card { border-color: color-mix(in srgb, var(--sage) 40%, transparent); }
.insight-card.sage-card .insight-eyebrow { color: var(--sage-text); }
.insight-card.terra-card { border-color: color-mix(in srgb, var(--terracotta) 35%, transparent); }
.insight-card.terra-card .insight-eyebrow { color: var(--terracotta-text); }
.insight-card .headline {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600; font-size: 19px; margin-bottom: 6px;
}
.insight-card .body { font-size: 15px; color: var(--text-tertiary); }
.card-stack { display: grid; gap: 14px; }

/* Loop steps */
.steps { display: grid; gap: 0; }
.step {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 18px 0;
}
.step + .step { border-top: 1px solid var(--border); }
.step .num {
  font-family: "Fraunces", Georgia, serif;
  color: var(--terracotta);
  font-weight: 600; font-size: 22px;
  min-width: 26px; line-height: 1.4;
}
.step b { font-weight: 650; font-size: 17px; }
.step p { color: var(--text-tertiary); font-size: 16px; }

/* Privacy grid */
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}
@media (max-width: 820px) { .privacy-grid { grid-template-columns: 1fr; } }
.privacy-grid .card h3 { font-size: 17px; margin-bottom: 6px; }
.privacy-grid .card p { font-size: 15px; color: var(--text-tertiary); }
.privacy-grid .card .glyph { font-size: 22px; margin-bottom: 10px; display: block; color: var(--terracotta); }

/* Pricing */
.price-cards {
  display: grid; gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 340px));
  justify-content: center;
  margin-top: 44px;
}
@media (max-width: 720px) { .price-cards { grid-template-columns: 1fr; } }
.price-card { padding: 28px; text-align: left; }
.price-card .plan { font-size: 14px; font-weight: 700; letter-spacing: 0.05em; color: var(--text-quaternary); text-transform: uppercase; }
.price-card .amount { font-size: 38px; font-weight: 800; margin-top: 8px; }
.price-card .amount span { font-size: 16px; font-weight: 400; color: var(--text-quaternary); }
.price-card .detail { font-size: 15px; color: var(--text-tertiary); margin-top: 6px; }
.badge {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
  color: var(--terracotta-text);
  background: var(--terracotta-light);
  border-radius: 6px;
  padding: 4px 10px;
  margin-left: 10px;
  vertical-align: middle;
}

/* Email form */
form.notify {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin: 28px auto 0; max-width: 520px;
}
form.notify input[type="email"] {
  flex: 1; min-width: 240px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 16px;
  color: var(--text-primary);
}
form.notify input[type="email"]::placeholder { color: var(--text-quaternary); }

/* Centered band content */
.band.center { text-align: center; }
.band.center .lede { margin: 0 auto; }

/* ============ Prose pages ============ */
.prose h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600; font-size: 38px; margin: 44px 0 8px;
}
.prose .updated { color: var(--text-quaternary); font-size: 14px; margin-bottom: 30px; }
.prose h2 { font-size: 20px; font-weight: 700; margin: 32px 0 8px; }
.prose p, .prose li { color: var(--text-secondary); font-size: 16.5px; }
.prose ul { padding-left: 22px; margin: 8px 0; }
.prose a { color: var(--terracotta); }
.prose .pull {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--terracotta);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 20px 0;
  font-size: 17px;
}

/* ============ Footer ============ */
footer {
  border-top: 1px solid var(--border);
  margin-top: 0;
  padding: 40px 0 56px;
  font-size: 14px;
  color: var(--text-quaternary);
}
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
footer a { color: var(--text-tertiary); text-decoration: none; margin-right: 18px; }
footer a:hover { color: var(--text-primary); }

/* ============ v2 additions ============ */

/* Vertical CTA stack (hero) */
.btn-col { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* Home-style year heat grid mock */
.year-grid {
  display: grid;
  grid-template-columns: repeat(26, 1fr);
  gap: 3px;
  margin-top: 24px;
}
.year-grid i { display: block; aspect-ratio: 1; border-radius: 2px; background: var(--bg-tertiary); }
.year-grid i.s1 { background: color-mix(in srgb, var(--sage) 30%, transparent); }
.year-grid i.s2 { background: color-mix(in srgb, var(--sage) 55%, transparent); }
.year-grid i.s3 { background: color-mix(in srgb, var(--sage) 85%, transparent); }
.year-caption { font-size: 13px; color: var(--text-quaternary); margin-top: 8px; }

/* Contact form */
form.contact { display: grid; gap: 12px; max-width: 520px; margin-top: 16px; }
form.contact input[type="email"], form.contact textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 16px;
  color: var(--text-primary);
  font-family: inherit;
  width: 100%;
}
form.contact textarea { min-height: 120px; resize: vertical; }
form.contact input::placeholder, form.contact textarea::placeholder { color: var(--text-quaternary); }
form.contact .btn { justify-self: start; }

/* FAQ separation on the support page */
.faq-head {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.faq-head .eyebrow { margin-bottom: 4px; }

/* Mobile fixes */
.nav-links { display: flex; gap: 24px; align-items: center; }
@media (max-width: 640px) {
  /* Mobile header: one row — wordmark left, section links right. The
     header CTA is hidden; the hero's big Join-the-beta is right below. */
  nav a.nav-cta { display: none; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 15px; }

  /* Hero: smaller type, looser leading, more whitespace */
  .hero { padding: 32px 0 12px; }
  .hero .eyebrow { font-size: 11px; letter-spacing: 0.06em; }
  .hero h1 { font-size: clamp(26px, 7.5vw, 38px); line-height: 1.16; }
  .hero .sub { font-size: 17px; margin-top: 14px; }
  .phone-wrap { padding-top: 36px; }
}
.hero h1 { overflow-wrap: break-word; }

/* Breathing room before the footer on prose pages */
.prose { padding-bottom: 72px; }

/* ============ Home-screen phone mock ============ */
.phone-wrap { gap: 32px; flex-wrap: wrap; align-items: flex-start; }

.mock-topline {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px;
}
.mock-topline .mock-wordmark {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600; font-size: 20px; color: var(--terracotta);
}
.mock-topline .mock-date { font-size: 12px; color: var(--text-quaternary); }

.ring-wrap { display: grid; place-items: center; margin: 6px 0 16px; }
.ring {
  width: 120px; height: 120px; border-radius: 50%;
  background: conic-gradient(var(--sage) 0 72%, var(--bg-tertiary) 72% 100%);
  display: grid; place-items: center;
}
.ring .ring-hole {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--bg-primary);
  display: grid; place-items: center; text-align: center;
}
.ring .score { font-size: 30px; font-weight: 800; line-height: 1; }
.ring-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--text-secondary); text-align: center; margin-top: 8px;
}

.mock-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.mock-card + .mock-card { margin-top: 12px; }
.mock-card .mock-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--terracotta); margin-bottom: 6px;
}
.mock-card .mock-line { font-size: 14px; color: var(--text-secondary); }
.mock-btn {
  display: block; text-align: center;
  background: var(--terracotta); color: #fff;
  font-size: 13px; font-weight: 600;
  border-radius: 10px; padding: 9px 0; margin-top: 10px;
}
.todo { display: flex; align-items: center; gap: 9px; padding: 6px 0; }
.todo + .todo { border-top: 1px solid var(--border); }
.todo .tick {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--border);
  display: grid; place-items: center;
  font-size: 11px; color: #fff; flex: none;
}
.todo.done .tick { background: var(--sage); border-color: var(--sage); }
.todo span { font-size: 13.5px; color: var(--text-primary); }
.todo.done span { color: var(--text-tertiary); text-decoration: line-through; }
.todo .habit-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; margin-left: auto; }

/* Never let the nav CTA wrap */
nav a.nav-cta { white-space: nowrap; }
@media (max-width: 420px) { nav a.nav-cta { padding: 8px 14px; font-size: 14px; } }

/* Equal-height phone frames */
.phone-wrap { align-items: stretch; }
.phone { display: flex; flex-direction: column; }
.phone .screen { flex: 1; display: flex; flex-direction: column; }
.phone .screen > :last-child { margin-bottom: 0; }

/* Mini bar chart (Patterns mock filler) */
.mini-bars { display: grid; gap: 8px; padding: 2px 0; }
.mini-bar { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; }
.mini-bar label { font-size: 11px; color: var(--text-tertiary); }
.mini-bar .track { background: var(--bg-tertiary); border-radius: 4px; height: 10px; }
.mini-bar .fill { background: var(--terracotta); border-radius: 4px; height: 10px; }

/* Attachment control on contact forms */
.attach-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.attach-btn {
  display: inline-block;
  font-size: 14px; font-weight: 600;
  color: var(--terracotta);
  background: none;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
}
.attach-btn:hover { border-color: var(--terracotta); }
.attach-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 100%;
}
.attach-chip[hidden] { display: none; }
.attach-chip .attach-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px;
}
.attach-chip .attach-remove {
  border: none; background: var(--bg-tertiary);
  color: var(--text-tertiary);
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 13px; line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
}
.attach-chip .attach-remove:hover { color: var(--text-primary); }
.attach-hint { font-size: 12px; color: var(--text-quaternary); }
form.contact .attach-chip { justify-self: start; }
form.contact .attach-row { justify-self: start; }

/* Buttons inside prose pages: .prose a was overriding the button's
   white text -> terracotta-on-terracotta (invisible). */
.prose a.btn { color: #fff; }
