:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #edf1f6;
  --border: #dde4ec;
  --text: #1b2026;
  --text-muted: #5d6773;
  --brand: #0e5e6f;
  --brand-dark: #0a4753;
  --brand-contrast: #ffffff;
  --brand-soft: #e1eef1;
  --accent: #d96c47;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(10, 20, 30, 0.07), 0 10px 28px rgba(10, 20, 30, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10141a;
    --surface: #181e26;
    --surface-2: #202834;
    --border: #2e3947;
    --text: #e7ebf0;
    --text-muted: #9aa5b1;
    --brand: #4aa3b5;
    --brand-dark: #37828f;
    --brand-soft: #14313a;
    --accent: #e08a63;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 10px 28px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }

.container { max-width: 1020px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo { font-weight: 800; font-size: 1.15rem; text-decoration: none; color: var(--text); letter-spacing: -0.01em; }
.logo span { color: var(--brand); }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { text-decoration: none; color: var(--text-muted); font-size: 0.95rem; font-weight: 500; }
.nav a:hover { color: var(--text); }
.nav a.nav-cta {
  background: var(--brand); color: var(--brand-contrast);
  padding: 8px 16px; border-radius: 8px;
}

/* Hero */
.hero { padding: 72px 0 56px; text-align: center; }
.hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.15; letter-spacing: -0.02em; max-width: 780px; margin: 0 auto; }
.hero .sub { max-width: 640px; margin: 18px auto 0; color: var(--text-muted); font-size: 1.12rem; }
.hero .cta-row { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.badge-row { margin-top: 26px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; color: var(--text-muted); font-size: 0.9rem; }
.badge-row span::before { content: "✓ "; color: var(--brand); font-weight: 700; }

/* Buttons */
.btn {
  display: inline-block; padding: 13px 26px; border: none; border-radius: 10px;
  background: var(--brand); color: var(--brand-contrast); font-weight: 650;
  text-decoration: none; cursor: pointer; font-size: 1rem;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn.secondary:hover { background: var(--brand-soft); }
.btn.small { padding: 9px 18px; font-size: 0.92rem; }

/* Sections */
section { padding: 56px 0; }
section.alt { background: var(--surface-2); }
.section-title { font-size: 1.7rem; letter-spacing: -0.01em; text-align: center; }
.section-sub { text-align: center; color: var(--text-muted); max-width: 620px; margin: 10px auto 0; }

/* Product grid */
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 36px; }
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px; display: flex; flex-direction: column; gap: 12px;
  position: relative;
}
.product-card.featured { border: 2px solid var(--accent); }
.product-card .flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 700;
  padding: 3px 12px; border-radius: 999px; white-space: nowrap;
}
.product-card h3 { font-size: 1.15rem; }
.product-card .price { font-size: 1.9rem; font-weight: 800; }
.product-card .price small { font-size: 0.95rem; color: var(--text-muted); font-weight: 500; }
.product-card ul { list-style: none; display: flex; flex-direction: column; gap: 7px; color: var(--text-muted); font-size: 0.93rem; flex: 1; }
.product-card ul li::before { content: "✓ "; color: var(--brand); font-weight: 700; }
.product-card .btn { text-align: center; }

/* Sample / preview */
.sample-box {
  margin-top: 32px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.sample-box .sample-head {
  padding: 12px 20px; background: var(--surface-2); border-bottom: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.sample-box .sample-body { padding: 26px 30px; max-height: 430px; overflow-y: auto; }
.sample-body h4 { margin: 18px 0 6px; }
.sample-body h4:first-child { margin-top: 0; }
.sample-body ol { margin-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.sample-body .kpi { background: var(--brand-soft); border-radius: 8px; padding: 10px 14px; margin-top: 14px; font-size: 0.92rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 36px; }
.step { text-align: center; padding: 0 8px; }
.step .num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand);
  color: var(--brand-contrast); font-weight: 800; display: flex; align-items: center;
  justify-content: center; margin: 0 auto 14px; font-size: 1.15rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: 0.94rem; }

/* About */
.about-box { display: flex; gap: 28px; align-items: flex-start; margin-top: 32px; flex-wrap: wrap; }
.about-box .card { flex: 1; min-width: 280px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px;
}

/* FAQ */
.faq { max-width: 720px; margin: 32px auto 0; display: flex; flex-direction: column; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin-top: 10px; color: var(--text-muted); }

/* Newsletter */
.newsletter { text-align: center; }
.newsletter form { margin-top: 22px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.newsletter input[type="email"] {
  padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); min-width: 260px;
}

/* Calculators */
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 36px; }
.calc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
}
.calc h3 { margin-bottom: 4px; }
.calc .desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }
.calc label { display: block; font-size: 0.86rem; font-weight: 600; margin: 10px 0 4px; }
.calc input, .calc select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg);
}
.calc .result {
  margin-top: 16px; background: var(--brand-soft); border-radius: 10px; padding: 14px 16px;
  font-size: 0.95rem; min-height: 52px;
}
.calc .result strong { font-size: 1.25rem; }

/* Article pages */
.article { max-width: 760px; margin: 0 auto; }
.article h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.2; letter-spacing: -0.02em; }
.article h2 { margin: 34px 0 10px; font-size: 1.35rem; }
.article h3 { margin: 24px 0 8px; font-size: 1.1rem; }
.article p, .article li { color: var(--text); }
.article ul, .article ol { margin: 10px 0 10px 24px; display: flex; flex-direction: column; gap: 6px; }
.article .lead { color: var(--text-muted); font-size: 1.1rem; margin-top: 12px; }
.article table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.93rem; }
.article th, .article td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.article th { background: var(--surface-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0 48px; color: var(--text-muted); font-size: 0.9rem; }
.site-footer .cols { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: var(--text-muted); }
.footnote { margin-top: 18px; font-size: 0.8rem; }

/* Toast for email-order fallback */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 12px 22px; border-radius: 10px;
  font-size: 0.92rem; box-shadow: var(--shadow); z-index: 50; max-width: 90vw;
}

@media (max-width: 640px) {
  .nav { gap: 14px; }
  .nav a:not(.nav-cta) { display: none; }
  .hero { padding: 48px 0 40px; }
}
