:root {
  /* Palette mirrors the iOS app (DesignSystem/Theme.swift) */
  --cream: #fbf7ef;   /* app background */
  --ink: #3d3a44;     /* app text */
  --mint: #a7d8c5;    /* high energy / primary accent */
  --butter: #f7da7f;  /* "just start" */
  --peach: #f6d6a8;   /* medium energy */
  --lavender: #bfc9f2;/* UI accents */
  --blush: #f4b6c2;   /* low energy / streaks */
  --sky: #bfe3f2;     /* morning habits */
  --mauve: #e8b7d4;   /* relationships */

  --surface: #ffffff;
  --border: rgba(61, 58, 68, 0.12);
  --radius: 18px;
  --maxw: 980px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(61,58,68,0.3); }
a:hover { text-decoration-color: var(--ink); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(251, 247, 239, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
}
.brand .mark {
  width: 30px; height: 30px;
  display: block;
}
.nav a { color: rgba(61,58,68,0.65); margin-left: 22px; font-size: 0.95rem; text-decoration: none; }
.nav a:hover { color: var(--ink); }

/* Hero — SkyWash backdrop, same sky→cream fade as the App Store screenshots */
.hero {
  padding: 72px 0 56px;
  background: linear-gradient(180deg, rgba(191,227,242,0.55) 0%, rgba(221,238,246,0.35) 34%, var(--cream) 82%);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  line-height: 1.12;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}
.hero .tagline { font-size: 1.18rem; color: rgba(61,58,68,0.75); max-width: 620px; margin: 0 0 28px; }
.highlight {
  background: rgba(247, 218, 127, 0.55); /* butter highlighter */
  padding: 0 0.18em;
  border-radius: 8px;
  white-space: nowrap;
}

/* Device frame — ported from appstore-screenshots/template.html (.device), scaled
   for the web. Pure CSS: the bezel is padding over a dark background, the screen
   is the img clipped by a slightly tighter radius. No frame image needed. */
.hero-phone { display: flex; justify-content: center; }
.device {
  width: 300px;
  padding: 9px;
  background: #26232B;
  border-radius: 46px;
  box-shadow:
    0 30px 60px rgba(61, 58, 68, 0.22),
    0 10px 22px rgba(61, 58, 68, 0.14);
}
.device img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 38px;
  background: var(--cream);
}

/* Mantra banner — mirrors the app's MantraBanner */
.mantra {
  max-width: 560px;
  margin: 0 0 30px;
  background: rgba(246, 214, 168, 0.4); /* peach tint */
  border: 1px solid rgba(246, 214, 168, 0.7);
  border-radius: 14px;
  padding: 12px 18px;
  font-style: italic;
  color: rgba(61,58,68,0.85);
}

/* Buttons */
.cta { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}
.btn-primary { background: var(--mint); color: var(--ink); border: 1px solid rgba(61,58,68,0.08); }
.btn-primary:hover { filter: brightness(0.97); }
.btn-ghost { border: 1px solid rgba(61,58,68,0.25); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: rgba(61,58,68,0.04); }

/* Features */
.features { padding: 40px 0 24px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
/* FocusCard look: pastel at 25% with a 50% border, like the app */
.card {
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid;
}
.card h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--ink); }
.card p { margin: 0; color: rgba(61,58,68,0.72); font-size: 0.96rem; }
.card .emoji { font-size: 1.6rem; display: block; margin-bottom: 12px; }

.card.mint     { background: rgba(167,216,197,0.25); border-color: rgba(167,216,197,0.6); }
.card.peach    { background: rgba(246,214,168,0.25); border-color: rgba(246,214,168,0.6); }
.card.sky      { background: rgba(191,227,242,0.25); border-color: rgba(191,227,242,0.6); }
.card.blush    { background: rgba(244,182,194,0.25); border-color: rgba(244,182,194,0.6); }
.card.lavender { background: rgba(191,201,242,0.25); border-color: rgba(191,201,242,0.6); }
.card.mauve    { background: rgba(232,183,212,0.25); border-color: rgba(232,183,212,0.6); }

/* Generic page content (privacy/support) */
.page { padding: 56px 0 80px; }
.page h1 { font-size: 2rem; margin: 0 0 8px; letter-spacing: -0.01em; }
.page .updated { color: rgba(61,58,68,0.55); font-size: 0.9rem; margin-bottom: 32px; }
.page h2 { font-size: 1.25rem; margin: 36px 0 10px; }
.page p, .page li { color: rgba(61,58,68,0.85); }
.page ul { padding-left: 20px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: rgba(61,58,68,0.6);
  font-size: 0.9rem;
}
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer a { color: rgba(61,58,68,0.6); margin-left: 18px; text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer a:first-child { margin-left: 0; }

/* Narrow screens: hero stacks and re-centers, phone drops below the CTA */
@media (max-width: 760px) {
  /* The brand + 4 nav links can't fit on one phone-width row, and this flex row
     doesn't wrap — so it was setting a ~510px minimum width on the whole document
     and clipping every section's right edge. Stack it into two rows instead. */
  .site-header .wrap {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .nav { display: flex; flex-wrap: wrap; justify-content: center; }
  .nav a { margin: 0 11px; }

  .hero { padding: 48px 0 40px; }
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero .tagline, .mantra { margin-left: auto; margin-right: auto; }
  .device { width: 260px; }
}

/* Grid items default to min-width:auto, which lets long content push the hero
   wider than the viewport. */
.hero-copy, .hero-phone { min-width: 0; }

/* --- Abuse report form (/p/<token>/report) --- */
.report-form { max-width: 560px; }
.report-form fieldset {
  border: 1px solid rgba(61,58,68,0.18);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 20px;
}
.report-form legend { padding: 0 8px; font-weight: 600; color: var(--ink); }
.report-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  cursor: pointer;
  font-size: 0.98rem;
}
/* Comfortable tap targets — this form gets used on a phone, often in a hurry. */
.report-option input { width: 20px; height: 20px; flex: none; accent-color: var(--ink); }
.report-details { display: block; }
.report-details span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.94rem;
  color: rgba(61,58,68,0.72);
}
.report-details textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.98rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(61,58,68,0.22);
  border-radius: 12px;
  resize: vertical;
}
.report-form button.btn { font: inherit; cursor: pointer; }
.report-error {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(244,182,194,0.28);
  border: 1px solid rgba(244,182,194,0.7);
  color: var(--ink);
}
