/* ═══════════════ RESET + TOKENS ═══════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #ffffff;
  --bg-soft:   #fafbfc;
  --bg-2:      #f5f6f8;
  --bg-3:      #eef0f3;
  --border:    #e2e5ea;
  --border-2:  #d0d5dd;
  --muted:     #8a96a6;
  --subtle:    #6b7a8d;
  --text:      #2d3748;
  --bright:    #0f172a;
  --green:     #16a34a;
  --green-2:   #15803d;
  --green-bg:  #f0fdf4;
  --green-b:   #bbf7d0;
  --yellow:    #d97706;
  --yellow-bg: #fffbeb;
  --yellow-b:  #fde68a;
  --blue:      #2563eb;
  --blue-bg:   #eff6ff;
  --blue-b:    #bfdbfe;
  --purple:    #7c3aed;
  --purple-bg: #f5f3ff;
  --purple-b:  #ddd6fe;
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.04), 0 1px 4px rgba(15,23,42,0.04);
  --shadow:    0 1px 3px rgba(15,23,42,0.06), 0 8px 24px rgba(15,23,42,0.06);
  --shadow-lg: 0 12px 36px rgba(15,23,42,0.08), 0 4px 12px rgba(15,23,42,0.05);
  --shadow-xl: 0 24px 80px rgba(15,23,42,0.12), 0 8px 24px rgba(15,23,42,0.06);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: 'Geist', -apple-system, 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -200px, var(--green-bg) 0%, transparent 60%),
    radial-gradient(900px 500px at -100px 400px, var(--purple-bg) 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
.mono { font-family: 'Geist Mono', monospace; font-variant-numeric: tabular-nums; }
.accent { color: var(--green); }
.dim { color: var(--muted); }
.small { font-size: 12px; }
.purple-text { color: var(--purple); }
.blue-accent { color: var(--blue); }

/* ═══════════════ NAV ═══════════════ */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(226, 229, 234, 0.6);
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  font-size: 16px;
  color: var(--bright);
  letter-spacing: -0.3px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--green-bg);
  border: 1px solid var(--green-b);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}
.brand-mark.small { width: 26px; height: 26px; border-radius: 7px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  color: var(--subtle);
  transition: color 120ms;
}
.nav-links a:hover { color: var(--bright); }

.nav-cta {
  background: var(--green);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 9px;
  font-weight: 500;
  transition: opacity 120ms;
}
.nav-cta:hover { opacity: 0.92; }

/* ═══════════════ HERO ═══════════════ */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 80px 28px 100px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-bg);
  border: 1px solid var(--green-b);
  color: var(--green-2);
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

.hero h1 {
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 1.05;
  letter-spacing: -1.6px;
  color: var(--bright);
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 18px;
  line-height: 1.65;
  color: var(--subtle);
  margin-bottom: 36px;
  max-width: 540px;
}
.hero-sub .mono {
  background: var(--bg-2);
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 14px;
  color: var(--text);
  border: 1px solid var(--border);
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.btn-primary, .btn-ghost {
  font-family: 'Geist Mono', monospace;
  font-size: 14px;
  padding: 14px 26px;
  border-radius: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 100ms, opacity 100ms, background 100ms;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.25);
}
.btn-primary:hover { transform: translateY(-1px); opacity: 0.94; }

.btn-ghost {
  background: transparent;
  color: var(--bright);
  border-color: var(--border-2);
}
.btn-ghost:hover { background: var(--bg-2); }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}

/* ═══════════════ HERO ART (popup demo) ═══════════════ */
.hero-art {
  display: flex;
  justify-content: center;
  align-items: center;
}

.popup-demo {
  width: 380px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
}
.popup-demo.small-demo {
  width: 320px;
  align-self: center;
}

.demo-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 0 16px;
  height: 40px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.demo-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  color: var(--bright);
  font-weight: 500;
}
.demo-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
}
.demo-dot.blue-dot { background: var(--blue); }

.demo-controls {
  display: inline-flex;
  align-items: stretch;
  height: 100%;
}
.demo-time {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
}
.demo-x {
  width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--subtle);
  font-size: 12px;
  cursor: pointer;
}

.demo-morning-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.demo-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--bright);
}
.demo-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.demo-streak {
  background: var(--yellow-bg);
  border: 1px solid var(--yellow-b);
  color: var(--yellow);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
}

.demo-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demo-yday {
  background: var(--purple-bg);
  border: 1px solid var(--purple-b);
  border-left: 3px solid var(--purple);
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
}
.demo-yday-head {
  display: flex; justify-content: space-between;
  font-size: 10px; letter-spacing: 1.5px; font-weight: 500;
  margin-bottom: 6px;
}
.demo-yday-text {
  font-size: 13px;
  line-height: 1.55;
}
.demo-yday-text code {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  background: var(--purple-bg);
  color: var(--purple);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--purple-b);
}

.demo-mood-row {
  display: flex; justify-content: space-between;
  padding: 11px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 11px;
}

.demo-health {
  display: flex; gap: 6px;
}
.demo-chip {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 6px;
  display: flex; flex-direction: column;
  align-items: center; gap: 5px;
  font-size: 9px;
  color: var(--muted);
  text-align: center;
}
.demo-chip:first-child { font-size: 18px; }
.demo-chip span { font-size: 9px; line-height: 1.3; }

.demo-actions {
  padding: 0 16px 16px;
  display: flex; gap: 8px;
}
.demo-btn-ghost, .demo-btn-main, .demo-btn-small, .demo-btn-small-ok {
  flex: 1;
  padding: 11px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  border: 1px solid var(--border-2);
  cursor: pointer;
  font-family: inherit;
}
.demo-btn-ghost { background: transparent; color: var(--muted); }
.demo-btn-main {
  background: var(--green); color: #fff; border: none;
  flex: 2;
}
.demo-btn-small { background: var(--bg-2); color: var(--muted); padding: 8px; }
.demo-btn-small-ok {
  background: var(--blue-bg);
  border-color: var(--blue-b);
  color: var(--blue);
  padding: 8px;
}

/* reminder demo */
.demo-reminder {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 16px 14px;
}
.reminder-circle {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--blue-bg);
  border: 1px solid var(--blue-b);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}
.demo-reminder-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--bright);
  margin-bottom: 4px;
}

/* ═══════════════ FEATURES ═══════════════ */
.features {
  max-width: 1180px;
  margin: 0 auto;
  padding: 80px 28px;
}

.section-eyebrow {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--green);
  margin-bottom: 16px;
  font-weight: 500;
}

.features h2, .how h2, .download h2 {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--bright);
  font-weight: 600;
  margin-bottom: 56px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 200ms, box-shadow 200ms, border-color 200ms;
}
.feat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-2);
}

.feat-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}
.feat-icon.green  { background: var(--green-bg);  border: 1px solid var(--green-b); }
.feat-icon.yellow { background: var(--yellow-bg); border: 1px solid var(--yellow-b); }
.feat-icon.blue   { background: var(--blue-bg);   border: 1px solid var(--blue-b); }
.feat-icon.purple { background: var(--purple-bg); border: 1px solid var(--purple-b); }

.feat h3 {
  font-size: 17px;
  letter-spacing: -0.3px;
  color: var(--bright);
  font-weight: 600;
  margin-bottom: 8px;
}

.feat p {
  font-size: 14.5px;
  color: var(--subtle);
  line-height: 1.6;
}

/* ═══════════════ HOW ═══════════════ */
.how {
  max-width: 1180px;
  margin: 0 auto;
  padding: 60px 28px 80px;
}

.how-row {
  display: grid;
  grid-template-columns: 1fr 360px 1fr;
  gap: 56px;
  align-items: center;
}

.how-step h3 {
  font-size: 18px;
  color: var(--bright);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.step-num {
  font-size: 13px;
  color: var(--green);
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.step-desc {
  font-size: 15px;
  color: var(--subtle);
  line-height: 1.6;
}

.how-caption {
  padding: 22px 16px 18px;
  text-align: left;
}
.how-caption .step-num { color: var(--blue); }
.how-caption h3 {
  font-size: 16px;
  color: var(--bright);
  margin-bottom: 8px;
}
.how-caption p {
  font-size: 13.5px;
  color: var(--subtle);
}

/* ═══════════════ DOWNLOAD ═══════════════ */
.download {
  max-width: 980px;
  margin: 0 auto;
  padding: 60px 28px 100px;
  text-align: center;
}
.download .section-eyebrow { margin: 0 auto 16px; display: block; }
.download h2 { margin-bottom: 14px; }

.download-sub {
  font-size: 16px;
  color: var(--subtle);
  margin-bottom: 40px;
}

.download-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.dl-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform 200ms, box-shadow 200ms, border-color 200ms;
}
.dl-card:hover {
  transform: translateY(-2px);
  border-color: var(--green-b);
  box-shadow: var(--shadow);
}

.dl-os {
  font-size: 38px;
  line-height: 1;
}
.dl-info { flex: 1; }
.dl-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--bright);
}
.dl-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.dl-arrow {
  font-size: 20px;
  color: var(--green);
  transition: transform 160ms;
}
.dl-card:hover .dl-arrow { transform: translateX(4px); }

.download-note {
  font-size: 12px;
  color: var(--muted);
}
.download-note a {
  color: var(--green);
  text-decoration: underline;
}

/* ═══════════════ FOOTER ═══════════════ */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 32px 28px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Geist Mono', monospace;
  font-weight: 500;
  color: var(--bright);
}
.footer-meta {
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-meta a { color: var(--green); }

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 56px;
    padding: 56px 24px 72px;
  }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .how-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .popup-demo.small-demo { margin: 0 auto; }
}

@media (max-width: 600px) {
  .nav { padding: 14px 18px; }
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .features-grid, .download-cards { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-ghost { justify-content: center; }
}

/* ═══════════════ DARK MODE ═══════════════ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0e1116;
    --bg-soft:   #11151b;
    --bg-2:      #161a22;
    --bg-3:      #1c2230;
    --border:    #232a36;
    --border-2:  #303949;
    --muted:     #6b7a8d;
    --subtle:    #8a96a8;
    --text:      #c8d4e0;
    --bright:    #f1f5f9;
    --green:     #34d399;
    --green-2:   #4ade80;
    --green-bg:  rgba(52,211,153,0.08);
    --green-b:   rgba(52,211,153,0.22);
    --yellow:    #fbbf24;
    --yellow-bg: rgba(251,191,36,0.08);
    --yellow-b:  rgba(251,191,36,0.22);
    --blue:      #60a5fa;
    --blue-bg:   rgba(96,165,250,0.08);
    --blue-b:    rgba(96,165,250,0.22);
    --purple:    #a78bfa;
    --purple-bg: rgba(167,139,250,0.08);
    --purple-b:  rgba(167,139,250,0.22);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow:    0 1px 3px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 36px rgba(0,0,0,0.55);
    --shadow-xl: 0 24px 80px rgba(0,0,0,0.6);
  }
  body {
    background:
      radial-gradient(1200px 600px at 80% -200px, rgba(52,211,153,0.07) 0%, transparent 60%),
      radial-gradient(900px 500px at -100px 400px, rgba(167,139,250,0.05) 0%, transparent 60%),
      var(--bg);
  }
  .nav-wrap {
    background: rgba(14,17,22,0.7);
    border-bottom-color: rgba(35,42,54,0.6);
  }
  .nav-cta { color: #0a1a10 !important; }
  .demo-btn-main { color: #0a1a10; }
}
