/* ── Reset & Variables ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #09090b;
  --surface:      #18181b;
  --surface2:     #27272a;
  --border:       rgba(63,63,70,0.5);
  --primary:      #4f46e5;
  --primary-h:    #6366f1;
  --primary-glow: rgba(79,70,229,0.22);
  --text:         #ffffff;
  --muted:        #a1a1aa;
  --faint:        #52525b;
  --emerald:      #34d399;
  --orange:       #f97316;
  --radius:       16px;
  --radius-sm:    10px;
  --nav-h:        64px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; }

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }

/* ── Nav ───────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 80px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  background: rgba(9,9,11,0.85);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.3px;
}
.nav-brand img { width: 32px; height: 32px; border-radius: 8px; }

.nav-right { display: flex; align-items: center; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:active { transform: scale(0.97); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--faint); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 0 var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-h);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

/* ── Section layout ────────────────────────────────────────────────────── */
section {
  padding: clamp(80px, 10vw, 120px) clamp(24px, 5vw, 80px);
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-h);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
#hero {
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + 60px);
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 1200px;
  position: relative;
  overflow: visible;
}

.hero-bg-glow {
  position: fixed;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse at top, rgba(79,70,229,0.14) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.hero-left {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(79,70,229,0.12);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 999px;
  font-size: 13px;
  color: var(--primary-h);
  font-weight: 500;
  margin-bottom: 28px;
}

.hero-h1 {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin-bottom: 24px;
}

.hero-h1 .gradient {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 40%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-ctas .btn-primary { padding: 13px 26px; font-size: 15px; }
.hero-ctas .btn-ghost   { padding: 13px 22px; font-size: 15px; }

.hero-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-note .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); }

/* ── Popup mock ────────────────────────────────────────────────────────── */
.hero-right {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.popup-wrapper {
  position: relative;
  animation: float 4s ease-in-out infinite;
}
.popup-wrapper::before {
  content: '';
  position: absolute;
  inset: -24px;
  background: radial-gradient(ellipse, var(--primary-glow), transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%       { transform: translateY(-12px) rotate(-2deg); }
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.08); }
}

.popup-mock {
  width: 280px;
  background: #111113;
  border: 1px solid rgba(63,63,70,0.7);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) inset;
  transform: rotate(-2deg);
  font-size: 11px;
}

.mock-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(63,63,70,0.5);
}
.mock-mascot {
  width: 22px; height: 22px;
  background: var(--primary);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mock-mascot svg { width: 14px; height: 14px; }
.mock-app-name { font-weight: 700; font-size: 12px; }
.mock-status-running { font-size: 10px; color: #34d399; font-weight: 600; display: block; margin-top: 1px; }

.mock-nav {
  display: flex;
  border-bottom: 1px solid rgba(63,63,70,0.5);
}
.mock-tab {
  flex: 1;
  padding: 6px 4px;
  text-align: center;
  font-size: 9px;
  color: var(--faint);
  font-weight: 500;
}
.mock-tab.active {
  color: #818cf8;
  border-bottom: 2px solid #4f46e5;
}

.mock-main { padding: 8px; display: flex; flex-direction: column; gap: 6px; }

.mock-card {
  background: var(--surface);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mock-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mock-session-label { font-size: 8px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.1em; }
.mock-timer { font-size: 20px; font-weight: 700; font-family: monospace; letter-spacing: -0.5px; margin-top: 2px; }
.mock-off-btn {
  font-size: 9px;
  padding: 3px 8px;
  background: var(--surface2);
  border-radius: 999px;
  color: var(--faint);
}
.mock-track { height: 4px; background: var(--surface2); border-radius: 2px; overflow: hidden; }
.mock-fill { height: 100%; background: var(--primary); border-radius: 2px; width: 52%; }
.mock-hint { font-size: 9px; color: var(--faint); }
.mock-total { font-size: 9px; color: var(--faint); }
.mock-total strong { color: var(--muted); }

.mock-stats { display: flex; gap: 6px; }
.mock-stat-card {
  flex: 1;
  background: var(--surface);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mock-stat-emoji { font-size: 14px; }
.mock-stat-val { font-size: 13px; font-weight: 700; line-height: 1; }
.mock-stat-label { font-size: 8px; color: var(--faint); margin-top: 1px; }
.mock-breaks-val { font-size: 13px; font-weight: 700; }
.mock-breaks-val span { font-size: 9px; color: var(--faint); font-weight: 400; }

/* ── Features ──────────────────────────────────────────────────────────── */
#features {
  padding-top: 0;
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 32px var(--primary-glow), 0 16px 40px rgba(0,0,0,0.3);
  border-color: rgba(99,102,241,0.4);
}

.feature-icon {
  font-size: 28px;
  margin-bottom: 14px;
  display: block;
}
.feature-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}
.feature-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

/* ── How it works ──────────────────────────────────────────────────────── */
#how {
  padding-top: 0;
}
.how-header { margin-bottom: 56px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 22px;
  left: calc(16.6% + 12px);
  right: calc(16.6% + 12px);
  height: 1px;
  background: linear-gradient(to right, var(--primary), transparent 45%, transparent 55%, var(--primary));
  opacity: 0.3;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px;
}
.step-num {
  width: 44px;
  height: 44px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 8px rgba(79,70,229,0.12);
}
.step-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
}
.step-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

/* ── CTA ───────────────────────────────────────────────────────────────── */
#cta {
  padding-top: 0;
}
.cta-box {
  background: linear-gradient(135deg, rgba(79,70,229,0.15) 0%, rgba(99,102,241,0.08) 100%);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 24px;
  padding: clamp(48px, 6vw, 80px) clamp(32px, 5vw, 80px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  top: -80px; left: 50%; transform: translateX(-50%);
  width: 400px; height: 200px;
  background: radial-gradient(ellipse, rgba(79,70,229,0.25), transparent 70%);
  pointer-events: none;
}
.cta-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}
.cta-sub {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 36px;
}
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-buttons .btn-primary { padding: 14px 30px; font-size: 16px; }
.cta-buttons .btn-ghost   { padding: 14px 24px; font-size: 16px; }

/* ── Footer ────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px clamp(24px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: gap;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}
.footer-brand img { width: 24px; height: 24px; border-radius: 6px; }
.footer-copy {
  font-size: 13px;
  color: var(--faint);
}
.footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer-link {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.15s;
}
.footer-link:hover { color: var(--text); }

/* ── Reveal animation ──────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.feature-card.reveal { transition-delay: calc(var(--i, 0) * 80ms); }
.feature-card:nth-child(1) { --i: 0; }
.feature-card:nth-child(2) { --i: 1; }
.feature-card:nth-child(3) { --i: 2; }
.feature-card:nth-child(4) { --i: 3; }
.feature-card:nth-child(5) { --i: 4; }
.feature-card:nth-child(6) { --i: 5; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  #hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 48px;
    padding-top: calc(var(--nav-h) + 48px);
  }
  .hero-right { align-self: center; }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps { grid-template-columns: 1fr; gap: 40px; }
  .steps::before { display: none; }
  .step { align-items: flex-start; text-align: left; flex-direction: row; gap: 20px; }
  .step-num { flex-shrink: 0; margin-bottom: 0; }
}

@media (max-width: 600px) {
  .nav-right .btn-ghost { display: none; }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .popup-mock { width: 240px; }
  .mock-timer { font-size: 16px; }
}
