/* second habit — site styles
   Palette mirrors the app: neumorphic light surfaces, purple→blue action
   gradient, the green of the logo dot, and the dark glass of the timer. */

:root {
  --bg: #e9ecf2;
  --surface: #f1f3f8;
  --surface-2: #e2e6ee;
  --ink: #23262e;
  --ink-2: #4b5060;
  --sub: #7a8194;
  --line: rgba(35, 38, 46, 0.08);
  --violet: #7c5cff;
  --blue: #4f7dff;
  --green: #5dc48f;
  --green-deep: #3fae78;
  --glass: #16181d;
  --glass-2: #26243f;
  --shadow-out: 14px 14px 32px rgba(163, 170, 190, 0.45), -12px -12px 28px rgba(255, 255, 255, 0.9);
  --shadow-in: inset 6px 6px 14px rgba(163, 170, 190, 0.45), inset -6px -6px 14px rgba(255, 255, 255, 0.9);
  --r-lg: 32px;
  --r-md: 22px;
  --r-sm: 14px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; border-radius: 8px; }

h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2.6rem, 6.4vw, 4.8rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }

/* ---------- Ambient background blobs (sparse) ---------- */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
}
.ambient span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55;
  animation: drift 26s ease-in-out infinite alternate;
}
.ambient .a1 { width: 52vw; height: 52vw; left: -18vw; top: -10vh; background: #c9c0ff; }
.ambient .a2 { width: 46vw; height: 46vw; right: -16vw; top: 30vh; background: #bcd3ff; animation-delay: -9s; }
.ambient .a3 { width: 40vw; height: 40vw; left: 20vw; bottom: -18vh; background: #c6efdc; animation-delay: -17s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, -4vh, 0) scale(1.08); }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(233, 236, 242, 0.7);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; display: inline-flex; align-items: baseline; }
.logo span { font-weight: 400; margin-left: 0.3ch; }
.logo i { display: inline-block; width: 0.32em; height: 0.32em; background: var(--green); border-radius: 3px; margin-left: 0.18em; transform: translateY(-0.02em); }
.nav-links { display: flex; align-items: center; gap: 28px; font-weight: 600; font-size: 0.98rem; }
.nav-links a:not(.btn) { color: var(--ink-2); transition: color 0.2s; }
.nav-links a:not(.btn):hover { color: var(--ink); }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  color: #fff; background: linear-gradient(100deg, var(--violet), var(--blue));
  box-shadow: 8px 8px 22px rgba(124, 92, 255, 0.28), -6px -6px 18px rgba(255, 255, 255, 0.7);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  border: 0; cursor: pointer; font-family: inherit;
}
.btn:hover { transform: translateY(-2px); box-shadow: 10px 12px 28px rgba(124, 92, 255, 0.34), -6px -6px 18px rgba(255, 255, 255, 0.7); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-in); }
.btn.ghost {
  color: var(--ink); background: var(--surface);
  box-shadow: var(--shadow-out);
}
.btn.ghost:hover { box-shadow: 10px 10px 26px rgba(163, 170, 190, 0.5), -10px -10px 24px rgba(255, 255, 255, 0.95); }
.btn.small { padding: 10px 18px; font-size: 0.92rem; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Surfaces ---------- */
.card {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-out);
}
.inset { background: var(--surface-2); border-radius: var(--r-md); box-shadow: var(--shadow-in); }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

.hero-copy .kicker { color: var(--sub); font-weight: 600; margin-bottom: 18px; font-size: 1.02rem; }
.hero-copy h1 .line { display: block; overflow: hidden; }
.hero-copy h1 .line > span { display: block; transform: translateY(110%); animation: rise 0.9s var(--ease) forwards; }
.hero-copy h1 .line:nth-child(2) > span { animation-delay: 0.1s; }
.hero-copy h1 .line:nth-child(3) > span { animation-delay: 0.2s; color: var(--green-deep); }
@keyframes rise { to { transform: translateY(0); } }

.hero-copy .lede { margin: 26px 0 32px; font-size: 1.15rem; color: var(--ink-2); max-width: 46ch; opacity: 0; animation: fade 0.8s 0.45s var(--ease) forwards; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; opacity: 0; animation: fade 0.8s 0.6s var(--ease) forwards; }
.hero-cta .price { color: var(--sub); font-weight: 600; font-size: 0.95rem; }
@keyframes fade { to { opacity: 1; } }

/* The memorable thing: a habit card whose 60-day map fills in live. */
.demo { padding: 28px; position: relative; opacity: 0; transform: translateY(24px) scale(0.98); animation: cardIn 1s 0.35s var(--ease) forwards; }
@keyframes cardIn { to { opacity: 1; transform: none; } }
.demo-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.lamp {
  width: 84px; height: 84px; border-radius: 50%; flex: none; position: relative; overflow: hidden;
  background: radial-gradient(circle at 40% 30%, var(--glass-2), var(--glass) 70%);
  box-shadow: 0 0 0 5px var(--surface), 0 0 0 7px rgba(93, 196, 143, 0.5), var(--shadow-out);
}
.lamp b {
  position: absolute; border-radius: 50%; filter: blur(4px);
  background: radial-gradient(circle at 35% 35%, #7fe0b8, #43a8c4);
  animation: rise-blob 7s ease-in-out infinite;
}
.lamp b:nth-child(1) { width: 38px; height: 44px; left: 22px; bottom: -14px; }
.lamp b:nth-child(2) { width: 16px; height: 16px; left: 50px; bottom: 6px; animation-delay: -2.4s; animation-duration: 9s; }
.lamp b:nth-child(3) { width: 10px; height: 10px; left: 30px; bottom: 30px; animation-delay: -5s; animation-duration: 11s; }
@keyframes rise-blob {
  0%   { transform: translateY(0) scale(1, 1); }
  35%  { transform: translateY(-34px) scale(0.92, 1.12); }
  55%  { transform: translateY(-50px) scale(1.06, 0.94); }
  80%  { transform: translateY(-18px) scale(0.96, 1.05); }
  100% { transform: translateY(0) scale(1, 1); }
}
.demo-title { font-weight: 800; font-size: 1.25rem; }
.demo-sub { color: var(--sub); font-size: 0.95rem; font-weight: 600; }
.demo-sub b { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }

.grid60 { display: grid; grid-template-columns: repeat(10, 1fr); gap: 7px; padding: 16px; }
.grid60 i {
  aspect-ratio: 1; border-radius: 6px; background: var(--surface); box-shadow: var(--shadow-in);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.grid60 i.on { background: var(--green); box-shadow: 0 2px 6px rgba(93, 196, 143, 0.35); transform: scale(1.02); }

.demo-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; gap: 12px; flex-wrap: wrap; }
.slots { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.95rem; color: var(--ink-2); }
.slots .dots { display: inline-flex; gap: 6px; }
.slots .dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-2); box-shadow: var(--shadow-in); transition: background 0.4s, transform 0.4s var(--ease); }
.slots .dots i.on { background: linear-gradient(135deg, var(--violet), var(--blue)); box-shadow: none; }
.slots .dots i.new { animation: pop 0.6s var(--ease); }
@keyframes pop { 0% { transform: scale(0.4); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.badge {
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 0.9rem;
  background: rgba(93, 196, 143, 0.18); color: var(--green-deep);
  opacity: 0; transform: translateY(6px); transition: opacity 0.4s, transform 0.4s var(--ease);
}
.badge.show { opacity: 1; transform: none; }

/* ---------- Sections ---------- */
section { padding: clamp(56px, 8vw, 112px) 0; }
.section-head { max-width: 62ch; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { margin-top: 16px; color: var(--ink-2); font-size: 1.1rem; }

/* Reveal on scroll — one class, one motion */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

/* Thesis */
.thesis .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (max-width: 900px) { .thesis .wrap { grid-template-columns: 1fr; } }
.thesis blockquote { margin: 0; font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; line-height: 1.3; letter-spacing: -0.015em; }
.thesis blockquote em { font-style: normal; color: var(--green-deep); }
.thesis .body { color: var(--ink-2); font-size: 1.08rem; }
.thesis .body p + p { margin-top: 16px; }

/* Steps — this content really is a sequence */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 30px; display: flex; flex-direction: column; gap: 16px; }
.step .num { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--violet), var(--blue)); }
.step p { color: var(--ink-2); }
.step .mini { margin-top: auto; display: flex; gap: 8px; align-items: center; }
.step .mini i { width: 14px; height: 14px; border-radius: 50%; background: var(--surface-2); box-shadow: var(--shadow-in); transition: background 0.4s var(--ease); }
.step.in .mini i:nth-child(-n+3) { background: linear-gradient(135deg, var(--violet), var(--blue)); box-shadow: none; }
.step[data-step="3"].in .mini i:nth-child(4) { background: var(--green); box-shadow: none; transition-delay: 0.6s; }
.step .mini .ring { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--green); background: none; box-shadow: none; }

/* Pricing — two columns, equal weight */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
.plan { padding: 34px; display: flex; flex-direction: column; }
.plan-name { font-weight: 800; font-size: 1.35rem; }
.plan-price { margin-top: 6px; color: var(--sub); font-weight: 600; }
.plan-price strong { color: var(--ink); font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.plan ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.plan li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.plan li::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; margin-top: 3px;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M5 10.5l3.2 3L15 7'/%3E%3C/svg%3E") center/14px no-repeat; }
.plan.full li::before { background-color: var(--violet); }
.plan .note { margin-top: 26px; padding: 16px 18px; font-size: 0.95rem; color: var(--ink-2); }
.plan .note strong { color: var(--ink); }
.plan .cta { margin-top: 26px; }

/* Local-first */
.local .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (max-width: 900px) { .local .wrap { grid-template-columns: 1fr; } }
.phone {
  width: min(320px, 100%); margin: 0 auto; aspect-ratio: 9 / 18.5; border-radius: 44px; padding: 14px;
  background: var(--glass); box-shadow: 0 30px 60px rgba(35, 38, 46, 0.25);
}
.phone .screen { width: 100%; height: 100%; border-radius: 32px; background: var(--bg); padding: 22px 18px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.phone .row { height: 52px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-out); display: flex; align-items: center; padding: 0 16px; gap: 10px; font-size: 0.8rem; font-weight: 700; color: var(--ink-2); }
.phone .row i { width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.phone .lock { margin-top: auto; align-self: center; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow-out); }
.phone .lock svg { width: 24px; height: 24px; stroke: var(--green-deep); }
.local ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; color: var(--ink-2); font-size: 1.05rem; }
.local li { display: flex; gap: 12px; }
.local li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-top: 11px; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-weight: 700; font-size: 1.12rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; color: var(--violet); font-weight: 800; transition: transform 0.35s var(--ease); background: var(--surface); box-shadow: var(--shadow-out); }
.faq details[open] summary .plus { transform: rotate(45deg); }
.faq .answer { color: var(--ink-2); padding: 0 0 22px; max-width: 64ch; }
.faq .answer p + p { margin-top: 10px; }

/* Final CTA */
.final { text-align: center; }
.final .card { padding: clamp(40px, 6vw, 72px) 28px; max-width: 820px; margin: 0 auto; }
.final h2 { margin-bottom: 14px; }
.final p { color: var(--ink-2); font-size: 1.1rem; max-width: 48ch; margin: 0 auto 28px; }

/* Footer */
footer { padding: 40px 0 56px; color: var(--sub); font-size: 0.95rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 28px; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 22px; font-weight: 600; }
footer a:hover { color: var(--ink); }

/* Legal pages */
.legal { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 100px); }
.legal .doc { max-width: 720px; margin: 0 auto; }
.legal .meta { color: var(--sub); font-weight: 600; margin-top: 12px; }
.legal h2 { font-size: 1.35rem; margin-top: 44px; margin-bottom: 12px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; margin: 12px 0; display: grid; gap: 8px; }
.legal .callout { margin-top: 28px; padding: 20px 22px; font-weight: 600; color: var(--ink); }
.legal a { color: var(--violet); font-weight: 600; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ambient span, .lamp b { animation: none; }
  .hero-copy h1 .line > span, .hero-copy .lede, .hero-cta, .demo { animation: none; opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .grid60 i, .slots .dots i, .badge, .btn, .faq summary .plus { transition: none; }
}

