/* ===== Design Tokens ===== */
:root {
  --primary: #3D5220;
  --primary-dark: #2E3D1A;
  --primary-light: #D8E3C4;
  --foreground: #030213;
  --muted: #717182;
  --background: #ffffff;
  --surface: #f8f9fb;
  --border: rgba(0, 0, 0, 0.1);
  --radius: 0.625rem;
  --radius-lg: 0.875rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--foreground);
  background: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ===== Utility ===== */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--muted);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(61, 82, 32, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(61, 82, 32, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
}

.btn-lg {
  padding: 14px 36px;
  font-size: 1.0625rem;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(255, 255, 255, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header-logo {
  height: 36px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.header-nav a:hover {
  color: var(--foreground);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-actions .btn {
  padding: 8px 20px;
  font-size: 0.875rem;
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--foreground);
}

/* ===== Hero ===== */
.hero {
  padding: 160px 0 96px;
  background: linear-gradient(135deg, #f0f5ec 0%, #e6eed8 50%, #f8f9fb 100%);
  overflow: hidden;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 64px;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero h1 .accent {
  color: var(--primary);
}

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

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

.hero-visual {
  flex: 1;
  min-width: 0;
  position: relative;
}

.hero-mockup {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
  background: var(--background);
}

/* Placeholder for screenshot */
.hero-mockup-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.875rem;
  border: 1px solid var(--border);
}

.hero-mockup-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

/* ===== Features ===== */
.features {
  background: var(--background);
}

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

.feature-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--background);
  transition: box-shadow 0.25s, transform 0.25s;
}

.feature-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon img,
.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-icon.blue { background: #DBEAFE; }
.feature-icon.purple { background: #EDE9FE; }
.feature-icon.green { background: #D1FAE5; }
.feature-icon.orange { background: #FEF3C7; }
.feature-icon.pink { background: #FCE7F3; }
.feature-icon.teal { background: #CCFBF1; }

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ===== Screenshots / Preview ===== */
.preview {
  background: var(--surface);
}

.preview-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.preview-tab {
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.preview-tab:hover {
  color: var(--foreground);
  border-color: var(--primary);
}

.preview-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.preview-window {
  max-width: 960px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  background: var(--background);
}

.preview-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f1f3f5;
  border-bottom: 1px solid var(--border);
}

.preview-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.preview-dot.red { background: #FF5F57; }
.preview-dot.yellow { background: #FEBC2E; }
.preview-dot.green { background: #28C840; }

.preview-screen {
  display: none;
  aspect-ratio: 16 / 9;
  background: #f8f9fb;
}

.preview-screen.active {
  display: block;
}

.preview-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Benefits ===== */
.benefits {
  background: var(--background);
}

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

.benefit-card {
  text-align: center;
  padding: 40px 24px;
}

.benefit-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.benefit-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.benefit-card p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ===== Pricing ===== */
.pricing {
  background: var(--surface);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.pricing-card {
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--background);
  text-align: center;
  transition: box-shadow 0.25s;
}

.pricing-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(61, 82, 32, 0.12);
  position: relative;
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
}

.pricing-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.pricing-card .price-period {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.pricing-features {
  text-align: left;
  margin-bottom: 28px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.9375rem;
  color: var(--foreground);
}

.pricing-features li::before {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #D1FAE5;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.pricing-card .btn {
  width: 100%;
}

/* ===== FAQ ===== */
.faq {
  background: var(--background);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 1.0625rem;
  font-weight: 500;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 200px;
}

.faq-answer p {
  padding: 0 0 20px;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ===== CTA Section ===== */
.cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 80px 0;
}

.cta h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.cta p {
  font-size: 1.125rem;
  opacity: 0.85;
  margin-bottom: 36px;
}

.cta .btn-primary {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.cta .btn-primary:hover {
  background: #f0f5ec;
}

/* ===== Footer ===== */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 64px 0 32px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  max-width: 280px;
}

.footer-logo {
  height: 32px;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-col h4 {
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #e2e8f0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.8125rem;
}

/* ===== Mobile Nav Overlay ===== */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  z-index: 99;
  padding: 24px;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  display: block;
  padding: 14px 0;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--foreground);
  border-bottom: 1px solid var(--border);
}

.mobile-nav .btn {
  margin-top: 16px;
  width: 100%;
}

/* ===== Scroll Animation ===== */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }

  .section-title {
    font-size: 1.625rem;
  }

  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 40px;
  }

  /* Header */
  .header-nav,
  .header-actions {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  /* Hero */
  .hero {
    padding: 120px 0 64px;
  }

  .hero-inner {
    flex-direction: column;
    gap: 40px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-desc {
    font-size: 1.0625rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

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

  /* Benefits */
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .benefit-card {
    padding: 24px 16px;
  }

  /* Preview tabs */
  .preview-tabs {
    gap: 4px;
  }

  .preview-tab {
    padding: 8px 14px;
    font-size: 0.8125rem;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 32px;
  }

  .footer-links {
    flex-direction: column;
    gap: 32px;
  }

  /* CTA */
  .cta h2 {
    font-size: 1.625rem;
  }
}

/* ===== Mobile App Download Section ===== */
.mobile-app { background: var(--primary-light); }
.mobile-app-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  align-items: center;
}
.mobile-app-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.mobile-app-subtitle {
  font-size: 1.125rem;
  color: var(--muted);
  margin-bottom: 24px;
}
.mobile-app-features {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}
.mobile-app-features li {
  position: relative;
  padding-left: 28px;
}
.mobile-app-features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.download-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 8px 32px rgba(61, 82, 32, 0.12);
}
.download-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.download-app-icon { width: 56px; height: 56px; border-radius: 14px; }
.download-card h3 { font-size: 1.25rem; margin: 4px 0 0; }

.download-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
}
.download-badge.dev { background: #fef3c7; color: #92400e; }

.download-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0 0 20px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.download-meta div { text-align: center; }
.download-meta dt { font-size: 0.75rem; color: var(--muted); margin-bottom: 4px; }
.download-meta dd { font-size: 0.9375rem; font-weight: 600; margin: 0; }

.release-notes {
  margin-bottom: 20px;
  font-size: 0.875rem;
  color: var(--muted);
}
.release-notes summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--foreground);
}
.release-notes p { margin-top: 8px; white-space: pre-line; }

.download-btn { width: 100%; margin-bottom: 12px; }
.install-guide {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.download-error {
  font-size: 0.8125rem;
  color: #b91c1c;
  margin: 8px 0 0;
}

@media (max-width: 768px) {
  .mobile-app-inner { grid-template-columns: 1fr; gap: 40px; }
  .mobile-app-title { font-size: 1.625rem; }
  .download-card { padding: 24px; }
}

/* ===== Dev Download Page ===== */
body.dev-download-page { background: #fafaf9; }
.dev-warning-banner {
  background: #fef3c7;
  color: #92400e;
  border-bottom: 2px solid #f59e0b;
  padding: 16px 24px;
  text-align: center;
  font-size: 0.9375rem;
}
.dev-warning-banner strong {
  display: inline-block;
  margin-right: 8px;
  color: #78350f;
}
.dev-warning-banner a {
  color: #92400e;
  text-decoration: underline;
  margin-left: 12px;
}
.dev-download-main { padding: 48px 24px; max-width: 560px; }
.dev-download-header { text-align: center; margin-bottom: 32px; }
.dev-download-logo { height: 40px; margin: 0 auto; }
.dev-download-header h1 {
  margin-top: 16px;
  font-size: 1.625rem;
  font-weight: 700;
}
