/* === Tokens === */
:root {
  --cedar: #2d5a3d;
  --cedar-mid: #4a8c65;
  --cedar-light: #e8f0eb;
  --cedar-dark: #1e3d2a;
  --warm: #f5f0e8;
  --warm-dark: #e8dfd0;
  --bg: #faf9f7;
  --card: #ffffff;
  --text: #2c2c2c;
  --text-light: #6b6b6b;
  --text-faint: #999;
  --accent: #c4915e;
  --accent-light: #f5ebe0;
  --border: #ebe8e3;
  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { line-height: 1.25; }

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

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--cedar);
  color: #fff;
}
.btn-primary:hover { background: var(--cedar-dark); }

.btn-secondary {
  background: var(--cedar-light);
  color: var(--cedar);
}
.btn-secondary:hover { background: #d6e8db; }

.btn-lg { padding: 14px 32px; font-size: 16px; }

/* === Nav === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 249, 247, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s ease;
}
.nav.scrolled {
  background: rgba(250, 249, 247, 0.95);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--cedar);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo .tree { font-size: 22px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links .nav-cta {
  background: var(--cedar);
  color: #fff;
  padding: 8px 20px;
  border-radius: var(--r-sm);
}
.nav-links .nav-cta:hover { background: var(--cedar-dark); }

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  margin-left: auto;
}

/* === Hero === */
.hero {
  padding: 140px 0 80px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  font-family: Georgia, 'Times New Roman', serif;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Terminal visual */
.hero-visual {
  max-width: 680px;
  margin: 56px auto 0;
}

.terminal {
  background: #1e1e2e;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.terminal-bar {
  background: #2a2a3c;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.terminal-title {
  margin-left: 8px;
  font-size: 12px;
  color: #888;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}
.terminal-body {
  padding: 20px 24px;
  overflow-x: auto;
}
.terminal-body pre {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #cdd6f4;
  white-space: pre;
}
.terminal-body .dim { color: #585b70; }
.terminal-body .file { color: #89b4fa; }
.terminal-body .comment { color: #585b70; }
.terminal-body .highlight { color: #f9e2af; font-weight: 600; }
.terminal-body .faded { color: #7f849c; }
.terminal-body .new { color: #a6e3a1; }
.terminal-body .synced { color: #a6e3a1; font-size: 12px; }
.terminal-body .hash { color: #f9e2af; }

/* === Sections === */
section {
  padding: 100px 0;
}

section h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  font-family: Georgia, 'Times New Roman', serif;
}

.section-sub {
  font-size: 17px;
  color: var(--text-light);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 48px;
}

/* === Problem === */
.problem {
  background: var(--warm);
}

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

.problem-card {
  background: var(--card);
  border-radius: var(--r);
  padding: 32px 28px;
  border: 1px solid var(--border);
}
.problem-icon {
  font-size: 28px;
  margin-bottom: 16px;
}
.problem-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
}
.problem-card p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.65;
}

.problem-resolve {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--cedar);
  margin-top: 48px;
}

/* === How It Works === */
.steps {
  max-width: 640px;
  margin: 48px auto 0;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.step {
  display: flex;
  gap: 24px;
}

.step-number {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: var(--cedar);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin-top: 2px;
}

.step-content h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.step-content p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.65;
}

/* Connectors */
.connector-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.connector {
  background: var(--warm);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-light);
}

/* Sync visual */
.sync-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.device {
  background: var(--cedar-light);
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--cedar);
}
.device.server {
  background: var(--cedar);
  color: #fff;
}
.sync-arrows {
  font-size: 18px;
  color: var(--text-faint);
}

/* AI demo */
.ai-demo {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-bubble {
  padding: 14px 18px;
  border-radius: var(--r);
  font-size: 14px;
  line-height: 1.6;
}
.ai-bubble.user {
  background: var(--cedar);
  color: #fff;
  align-self: flex-end;
  max-width: 80%;
  border-bottom-right-radius: 4px;
}
.ai-bubble.assistant {
  background: var(--warm);
  color: var(--text);
  align-self: flex-start;
  max-width: 90%;
  border-bottom-left-radius: 4px;
}

.data-note {
  text-align: center;
  font-size: 14px;
  color: var(--text-faint);
  margin-top: 48px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* === Stories === */
.stories {
  background: var(--warm);
}

.story {
  max-width: 640px;
  margin: 0 auto 56px;
}
.story:last-child { margin-bottom: 0; }

.story h3 {
  font-size: 22px;
  margin-bottom: 16px;
  text-align: left;
  font-family: Georgia, 'Times New Roman', serif;
}
.story p {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.75;
  margin-bottom: 12px;
}
.story em {
  color: var(--text);
}
.story-takeaway {
  font-size: 14px;
  color: var(--cedar);
  font-weight: 500;
  font-style: italic;
  border-left: 3px solid var(--cedar-mid);
  padding-left: 16px;
  margin-top: 16px;
}

/* === Architecture === */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.arch-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px 28px;
}
.arch-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  text-align: left;
}
.arch-card p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.65;
}
.arch-card code {
  background: var(--warm);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--accent);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* === Pricing === */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 36px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border-color: var(--cedar);
  box-shadow: 0 0 0 1px var(--cedar);
  position: relative;
}
.price-card.featured::before {
  content: 'Most popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cedar);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
}

.price-tier {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.price-amount {
  font-size: 40px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  font-family: Georgia, 'Times New Roman', serif;
}
.price-amount span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-light);
}
.price-desc {
  font-size: 14px;
  color: var(--text-faint);
  margin-bottom: 24px;
}

.price-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
  flex: 1;
}
.price-card li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
}
.price-card li:last-child { border-bottom: none; }
.price-card li::before {
  content: '✓ ';
  color: var(--cedar-mid);
  font-weight: 600;
}

.price-card .btn { width: 100%; text-align: center; }

.pricing-note {
  text-align: center;
  font-size: 14px;
  color: var(--text-faint);
  margin-top: 32px;
}

/* === Get Started === */
.get-started {
  background: var(--cedar-dark);
  color: #fff;
  text-align: center;
}
.get-started h2 {
  color: #fff;
}

.start-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin: 40px auto 40px;
  text-align: left;
}
.start-step {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  color: rgba(255,255,255,0.85);
}
.start-step span {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.download-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.download-buttons .btn-primary {
  background: #fff;
  color: var(--cedar);
}
.download-buttons .btn-primary:hover {
  background: var(--cedar-light);
}

.start-note {
  margin-top: 20px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}

/* === Footer === */
.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--cedar);
  margin-bottom: 12px;
}
.footer-quote {
  font-size: 14px;
  color: var(--text-faint);
  font-style: italic;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-light);
  padding: 4px 0;
}
.footer-col a:hover { color: var(--text); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
}
.footer-bottom p {
  font-size: 13px;
  color: var(--text-faint);
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--card);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    gap: 12px;
  }
  .nav-links.open .nav-cta {
    text-align: center;
  }
  .nav-mobile-toggle { display: block; }

  .hero { padding: 120px 0 60px; }
  .hero h1 { font-size: 32px; }

  .problem-grid { grid-template-columns: 1fr; }
  .arch-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .step { flex-direction: column; gap: 12px; }
  .sync-visual { flex-direction: column; gap: 8px; }
  .sync-arrows { transform: rotate(90deg); }

  .download-buttons { flex-direction: column; align-items: center; }
  .download-buttons .btn { width: 100%; max-width: 300px; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 16px; }
  section { padding: 64px 0; }
  section h2 { font-size: 26px; }

  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 280px; text-align: center; }
}
