:root {
  --bg: #FFF5F3;
  --surface: #FFFFFF;
  --card: #FBE7E6;
  --text: #2B0A0E;
  --muted: #7A5A5C;
  --accent: #8C1127;
  --on-accent: #FFF6F4;
  --blush: #E27D93;
  --cell: rgba(43, 10, 14, 0.07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1B0A0D;
    --surface: #251013;
    --card: #33161A;
    --text: #F3E3E5;
    --muted: #C2A7AC;
    --accent: #9B1B33;
    --on-accent: #FFEDF0;
    --blush: #FF8FA3;
    --cell: rgba(243, 227, 229, 0.08);
  }
}

html[data-theme="light"] {
  --bg: #FFF5F3;
  --surface: #FFFFFF;
  --card: #FBE7E6;
  --text: #2B0A0E;
  --muted: #7A5A5C;
  --accent: #8C1127;
  --on-accent: #FFF6F4;
  --blush: #E27D93;
  --cell: rgba(43, 10, 14, 0.07);
}

html[data-theme="dark"] {
  --bg: #1B0A0D;
  --surface: #251013;
  --card: #33161A;
  --text: #F3E3E5;
  --muted: #C2A7AC;
  --accent: #9B1B33;
  --on-accent: #FFEDF0;
  --blush: #FF8FA3;
  --cell: rgba(243, 227, 229, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
}

main { max-width: 680px; margin: 0 auto; padding: 84px 24px 40px; }

/* theme cherry, top right */
.theme-cherry {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--blush);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transition: transform 0.6s cubic-bezier(0.34, 1.4, 0.5, 1);
  z-index: 10;
}
.theme-cherry svg { width: 24px; height: 24px; fill: currentColor; }

/* hero */
.hero { text-align: center; margin-bottom: 64px; }
.hero img {
  width: 128px;
  height: 128px;
  border-radius: 30px;
  animation: settle 0.8s cubic-bezier(0.34, 1.3, 0.5, 1) both;
}
h1 { font-size: 2.3rem; font-weight: 600; letter-spacing: -0.5px; margin-top: 18px; }
.tagline { color: var(--muted); margin-top: 6px; font-size: 1.08rem; }

.cta {
  display: inline-block;
  margin-top: 26px;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  padding: 13px 32px;
  border-radius: 999px;
  font-weight: 500;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}
.cta:hover { transform: translateY(-2px) scale(1.03); }
.cta-sub { display: block; margin-top: 14px; color: var(--muted); font-size: 0.85rem; letter-spacing: 0.4px; }

/* the live phone mock */
.phone {
  width: min(360px, 100%);
  margin: 0 auto;
  background: var(--surface);
  border-radius: 38px;
  padding: 26px 24px 30px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
  animation: settle 0.9s 0.15s cubic-bezier(0.34, 1.3, 0.5, 1) both;
}
.app-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 1px;
  margin-bottom: 22px;
}
.total-wrap { text-align: center; }
.total {
  font-size: 2.9rem;
  font-weight: 300;
  letter-spacing: -1px;
  line-height: 1.1;
  display: inline-block;
}
.total.pop { animation: pop 0.35s ease; }
.of-target { color: var(--muted); font-size: 0.82rem; }

.line {
  width: 78%;
  height: 5px;
  margin: 14px auto 10px;
  background: var(--cell);
  border-radius: 999px;
  overflow: hidden;
}
.line .fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.7s cubic-bezier(0.3, 0.9, 0.3, 1);
}
.line .fill.over { background: var(--blush); }
.status { text-align: center; color: var(--muted); font-size: 0.85rem; margin-bottom: 24px; }

.month-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.sq {
  aspect-ratio: 1;
  border-radius: 7px;
  background: var(--cell);
  cursor: pointer;
  border: none;
  padding: 0;
  animation: fadeup 0.45s both;
  transition: transform 0.15s ease, background 0.3s ease;
}
.sq:hover { transform: scale(1.12); }
.sq.future { opacity: 0.35; cursor: default; }
.sq.future:hover { transform: none; }
.sq.l1 { background: color-mix(in srgb, var(--accent) 32%, transparent); }
.sq.l2 { background: color-mix(in srgb, var(--accent) 58%, transparent); }
.sq.l3 { background: var(--accent); }
.sq.over { background: var(--blush); }
.sq.selected { box-shadow: inset 0 0 0 2px var(--blush); }
.sq.over.selected { box-shadow: inset 0 0 0 2px var(--accent); }
.sq.today { box-shadow: inset 0 0 0 1.5px var(--accent); }

.grid-caption {
  height: 22px;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 10px;
}

.demo-cherry-wrap { text-align: center; margin-top: 14px; }
.demo-cherry {
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--blush);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
.demo-cherry:active { transform: scale(0.9); }
.demo-cherry svg { width: 28px; height: 28px; fill: currentColor; }
.demo-cherry.pop { animation: pop 0.35s ease; }

.phone-hint {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 22px;
}

/* sections */
section { margin: 72px 0; }
h2 {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 18px;
}
p { margin-bottom: 12px; }
.quiet { color: var(--muted); }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}
.feature {
  background: var(--card);
  border-radius: 18px;
  padding: 18px 20px;
  transition: transform 0.15s ease;
}
.feature:hover { transform: translateY(-3px); }
.feature h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: 0.88rem; margin: 0; }

.policy-card {
  background: var(--card);
  border-radius: 20px;
  padding: 26px 28px;
}

a { color: var(--blush); text-decoration: none; }
a:hover { text-decoration: underline; }

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}
.back:hover { color: var(--blush); text-decoration: none; }

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 40px 0 16px;
}
footer .links { margin-bottom: 8px; }
footer .links a { margin: 0 10px; }

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
@keyframes fadeup {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes settle {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
