/* ============================================================
   SIP Calculator — style.css
   Premium SaaS design system. Vanilla CSS, no frameworks.
   ============================================================ */

/* ---------- 1. Design Tokens ---------- */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --accent: #0F172A;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --success: #10B981;
  --danger: #EF4444;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 25px 60px -15px rgba(37, 99, 235, 0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 50%, #1E40AF 100%);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.4);
  --nav-h: 72px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #0B1120;
  --card: #111A2E;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: #1E293B;
  --glass: rgba(17, 26, 46, 0.72);
  --glass-border: rgba(255, 255, 255, 0.06);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}
img, svg { display: inline-block; vertical-align: middle; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: 1rem; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 3. Loading Screen ---------- */
.loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loading-screen.hidden { opacity: 0; visibility: hidden; }
.loading-logo { font-size: 1.5rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.loading-bar { width: 180px; height: 4px; background: var(--border); border-radius: 999px; overflow: hidden; }
.loading-bar-fill { width: 40%; height: 100%; background: var(--gradient); border-radius: 999px; animation: loadslide 1s ease-in-out infinite; }
@keyframes loadslide { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }
.loading-text { font-size: 0.85rem; color: var(--text-muted); }

/* ---------- 4. Scroll Progress / Back to Top ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--gradient); z-index: 1200; transition: width 0.1s linear; }
.back-to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 900;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: var(--transition);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); }
.back-to-top svg { width: 20px; height: 20px; }

/* ---------- 5. Navbar ---------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: var(--glass);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.navbar.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.navbar-inner { max-width: 1200px; margin: 0 auto; height: 100%; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.navbar-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; }
.navbar-logo-icon, .footer-brand-logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.navbar-links { display: flex; align-items: center; gap: 4px; }
.navbar-link { padding: 8px 14px; border-radius: 999px; font-size: 0.95rem; font-weight: 500; color: var(--text-secondary); transition: var(--transition); }
.navbar-link:hover { color: var(--text-primary); background: rgba(37, 99, 235, 0.08); }
.navbar-link.active { color: var(--primary); background: rgba(37, 99, 235, 0.1); font-weight: 600; }
.navbar-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); border: 1px solid var(--border); transition: var(--transition); }
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); transform: rotate(20deg); }
.navbar-cta {
  padding: 10px 20px; border-radius: 999px; background: var(--gradient); color: #fff;
  font-weight: 600; font-size: 0.9rem; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: var(--transition);
}
.navbar-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(37, 99, 235, 0.45); }
.mobile-menu-btn { display: none; color: var(--text-primary); width: 44px; height: 44px; align-items: center; justify-content: center; }

/* Mobile menu */
.mobile-menu-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(4px); z-index: 1100; opacity: 0; visibility: hidden; transition: var(--transition); }
.mobile-menu-overlay.open { opacity: 1; visibility: visible; }
.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1150;
  width: min(320px, 85vw); background: var(--card);
  padding: 24px; transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); border-radius: 10px; }
.mobile-menu-close:hover { background: rgba(37, 99, 235, 0.08); color: var(--primary); }
.mobile-menu-links { margin-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.mobile-menu-link { padding: 14px 16px; border-radius: 12px; font-weight: 600; color: var(--text-secondary); transition: var(--transition); }
.mobile-menu-link:hover, .mobile-menu-link.active { background: rgba(37, 99, 235, 0.08); color: var(--primary); }

/* ---------- 6. Hero ---------- */
.hero { position: relative; padding: calc(var(--nav-h) + 72px) 24px 140px; overflow: hidden; }
.hero-particles { position: absolute; inset: 0; pointer-events: none; }
.hero-particles span {
  position: absolute; display: block; border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35), rgba(37, 99, 235, 0));
  animation: floatP 12s ease-in-out infinite;
}
@keyframes floatP { 0%, 100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-40px) translateX(20px); } }
.hero-inner { position: relative; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  color: var(--primary); background: rgba(37, 99, 235, 0.1); border: 1px solid rgba(37, 99, 235, 0.2);
  margin-bottom: 20px;
}
.hero-title { font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1.08; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 20px; }
.hero-title .gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-subtitle { font-size: 1.15rem; color: var(--text-secondary); max-width: 540px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: 1rem; transition: var(--transition); }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(37, 99, 235, 0.5); }
.btn-secondary { background: var(--card); color: var(--text-primary); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-3px); }
.hero-visual { position: relative; min-height: 420px; }
.hero-card {
  position: absolute; background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md); padding: 20px 24px; box-shadow: var(--shadow-md);
  animation: floatCard 6s ease-in-out infinite;
}
.hero-card:nth-child(2) { animation-delay: 1.5s; }
.hero-card:nth-child(3) { animation-delay: 3s; }
@keyframes floatCard { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.hero-card-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.hero-card-value { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); }
.hero-card-value.green { color: var(--success); }
.hero-card-1 { top: 6%; left: 4%; }
.hero-card-2 { top: 38%; right: 0; }
.hero-card-3 { bottom: 6%; left: 14%; }
.hero-ring {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 300px; height: 300px; border-radius: 50%;
  background: conic-gradient(var(--primary) 0% 68%, var(--border) 68% 100%);
  display: flex; align-items: center; justify-content: center;
}
.hero-ring::before { content: ""; position: absolute; inset: 22px; border-radius: 50%; background: var(--bg); }
.hero-ring-text { position: relative; text-align: center; }
.hero-ring-text strong { display: block; font-size: 1.6rem; font-weight: 800; }
.hero-ring-text span { font-size: 0.8rem; color: var(--text-muted); }
.hero-wave { position: absolute; bottom: -1px; left: 0; right: 0; line-height: 0; }
.hero-wave svg { width: 100%; height: 80px; display: block; }

/* ---------- 7. Sections ---------- */
.section { padding: 96px 24px; }
.section-alt { background: color-mix(in srgb, var(--card) 55%, var(--bg)); }
[data-theme="dark"] .section-alt { background: rgba(255, 255, 255, 0.015); }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
  font-size: 0.8rem; font-weight: 700; color: var(--primary);
  background: rgba(37, 99, 235, 0.1); border: 1px solid rgba(37, 99, 235, 0.18);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.section-desc { color: var(--text-secondary); font-size: 1.05rem; }
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.12s; }
.reveal-delay-3 { transition-delay: 0.19s; }
.reveal-delay-4 { transition-delay: 0.26s; }
.reveal-delay-5 { transition-delay: 0.33s; }
.reveal-delay-6 { transition-delay: 0.4s; }

/* ---------- 8. Calculator ---------- */
.calculator-wrapper {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 32px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-lg);
}
.calc-field { margin-bottom: 28px; }
.calc-label { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 0.95rem; margin-bottom: 10px; }
.calc-label .calc-value-badge { color: var(--primary); font-weight: 700; background: rgba(37, 99, 235, 0.1); padding: 4px 12px; border-radius: 999px; font-size: 0.9rem; }
.calc-input {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--bg); color: var(--text-primary);
  transition: var(--transition);
}
.calc-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12); outline: none; }
.calc-input.invalid { border-color: var(--danger); }
.calc-error { color: var(--danger); font-size: 0.82rem; margin-top: 6px; min-height: 1.1em; }
.calc-slider { width: 100%; margin-top: 12px; accent-color: var(--primary); height: 6px; cursor: pointer; }
.calc-buttons { display: flex; gap: 12px; margin-top: 8px; }
.calc-buttons .btn { flex: 1; }
.calc-results { display: flex; flex-direction: column; gap: 20px; }
.result-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.result-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 20px; transition: var(--transition); }
.result-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.result-card-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 6px; }
.result-card-value { font-size: 1.35rem; font-weight: 800; }
.result-card.highlight { background: var(--gradient); border: none; color: #fff; }
.result-card.highlight .result-card-label { color: rgba(255, 255, 255, 0.8); }
.charts-row { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 14px; }
.chart-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; position: relative; height: 320px; display: flex; flex-direction: column; }
.chart-box canvas { flex: 1 1 auto; min-height: 0; width: 100% !important; }
.chart-box h3 { font-size: 0.85rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; text-align: center; }
.calc-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.tool-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  border: 1px solid var(--border); color: var(--text-secondary); background: var(--card);
  transition: var(--transition);
}
.tool-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.tool-btn svg { width: 15px; height: 15px; }
.recent-calcs { background: var(--bg); border: 1px dashed var(--border); border-radius: var(--radius-md); padding: 16px 20px; }
.recent-calcs h3 { font-size: 0.85rem; font-weight: 700; margin-bottom: 10px; color: var(--text-secondary); }
.recent-calcs ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.recent-calcs li { font-size: 0.85rem; color: var(--text-secondary); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.recent-calcs li strong { color: var(--primary); }
.recent-empty { color: var(--text-muted); font-size: 0.85rem; }

/* ---------- 9. Cards Grids (Benefits / Features) ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 32px 28px;
  box-shadow: var(--shadow-sm); transition: var(--transition);
  position: relative; overflow: hidden;
}
.feature-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient); opacity: 0; transition: var(--transition); }
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(37, 99, 235, 0.3); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: 18px;
  background: rgba(37, 99, 235, 0.1); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.feature-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* ---------- 10. SEO Content Block ---------- */
.content-block { max-width: 820px; margin: 0 auto; }
.content-block h3 { font-size: 1.35rem; font-weight: 700; margin: 32px 0 12px; }
.content-block p { color: var(--text-secondary); margin-bottom: 16px; font-size: 1.02rem; line-height: 1.75; }
.content-block ul { margin: 0 0 16px 22px; color: var(--text-secondary); }
.content-block li { margin-bottom: 8px; }
.formula-box {
  background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm); padding: 20px 24px; margin: 20px 0;
  font-size: 1rem; color: var(--text-primary);
}

/* ---------- 11. How SIP Works / Steps ---------- */
.steps-container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 28px 24px; text-align: center; box-shadow: var(--shadow-sm); transition: var(--transition); }
.step-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.step-number {
  width: 48px; height: 48px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.15rem; box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}
.step-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.step-desc { color: var(--text-secondary); font-size: 0.9rem; }

/* ---------- 12. Comparison Table ---------- */
.comparison-table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); box-shadow: var(--shadow-sm); background: var(--card); }
.comparison-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.comparison-table th { background: var(--gradient); color: #fff; text-align: left; padding: 16px 20px; font-size: 0.95rem; }
.comparison-table td { padding: 14px 20px; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 0.95rem; }
.comparison-table td:first-child { font-weight: 600; color: var(--text-primary); }
.comparison-table tr:hover td { background: rgba(37, 99, 235, 0.04); }
.comparison-table td.check { color: var(--success); font-weight: 600; }
.comparison-table td.cross { color: var(--danger); }

/* ---------- 13. Tips ---------- */
.tips-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.tip-card { display: flex; gap: 18px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm); transition: var(--transition); }
.tip-card:hover { transform: translateX(6px); border-color: rgba(37, 99, 235, 0.35); }
.tip-number { flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; background: rgba(37, 99, 235, 0.1); color: var(--primary); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tip-content h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.tip-content p { color: var(--text-secondary); font-size: 0.92rem; }

/* ---------- 14. FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; transition: var(--transition); }
.faq-item.open { border-color: rgba(37, 99, 235, 0.4); box-shadow: var(--shadow-md); }
.faq-question {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 24px; text-align: left; font-weight: 600; font-size: 1rem; color: var(--text-primary);
}
.faq-question svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-muted); transition: transform 0.3s ease; }
.faq-item.open .faq-question svg { transform: rotate(180deg); color: var(--primary); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-answer p { padding: 0 24px 20px; color: var(--text-secondary); font-size: 0.95rem; }

/* ---------- 15. Testimonials ---------- */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 28px; box-shadow: var(--shadow-sm); transition: var(--transition); display: flex; flex-direction: column; }
.testimonial-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.testimonial-stars { display: flex; gap: 3px; margin-bottom: 14px; }
.testimonial-stars svg { width: 16px; height: 16px; fill: #F59E0B; }
.testimonial-text { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 20px; flex: 1; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--gradient); color: #fff; font-weight: 700; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; }
.testimonial-name { font-weight: 700; font-size: 0.95rem; }
.testimonial-role { color: var(--text-muted); font-size: 0.82rem; }

/* ---------- 16. Statistics ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px 24px; text-align: center; box-shadow: var(--shadow-sm); transition: var(--transition); }
.stat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.stat-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; background: rgba(37, 99, 235, 0.1); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.stat-value { font-size: 2.2rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: var(--text-secondary); font-weight: 500; margin-top: 4px; }

/* ---------- 17. CTA ---------- */
.cta-section { position: relative; padding: 110px 24px; overflow: hidden; text-align: center; }
.cta-bg { position: absolute; inset: 0; background: var(--gradient); }
.cta-bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 20%, rgba(255,255,255,0.18), transparent 50%),
              radial-gradient(ellipse at 80% 80%, rgba(255,255,255,0.12), transparent 50%);
}
.cta-inner { position: relative; max-width: 720px; margin: 0 auto; color: #fff; }
.cta-title { font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px; }
.cta-desc { color: rgba(255, 255, 255, 0.88); font-size: 1.1rem; margin-bottom: 32px; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 34px; border-radius: 999px; background: #fff; color: var(--primary);
  font-weight: 700; font-size: 1.05rem; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}
.cta-btn:hover { transform: translateY(-4px) scale(1.02); }

/* ---------- 18. Footer ---------- */
.footer { background: var(--accent); color: #CBD5E1; padding: 72px 24px 32px; }
[data-theme="dark"] .footer { background: #060B16; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr; gap: 40px; margin-bottom: 48px; }
.footer-brand-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.footer-brand-desc { font-size: 0.9rem; color: #94A3B8; margin-bottom: 18px; }
.footer-social { display: flex; gap: 10px; }
.footer-social-link { width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); display: flex; align-items: center; justify-content: center; color: #94A3B8; transition: var(--transition); }
.footer-social-link:hover { background: var(--primary); color: #fff; transform: translateY(-3px); }
.footer-social-link svg { width: 17px; height: 17px; }
.footer-column-title { color: #fff; font-size: 0.95rem; font-weight: 700; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-link { color: #94A3B8; font-size: 0.9rem; transition: var(--transition); }
.footer-link:hover { color: #fff; transform: translateX(4px); }
.footer-newsletter-text { font-size: 0.88rem; color: #94A3B8; margin-bottom: 14px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.05); color: #fff; font-size: 0.88rem; }
.newsletter-input::placeholder { color: #64748B; }
.newsletter-btn { padding: 11px 18px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 600; font-size: 0.88rem; transition: var(--transition); }
.newsletter-btn:hover { background: var(--primary-dark); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-copyright { font-size: 0.85rem; color: #64748B; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-link { font-size: 0.85rem; color: #94A3B8; transition: var(--transition); }
.footer-bottom-link:hover { color: #fff; }

/* ---------- 19. Cookie Banner ---------- */
.cookie-banner {
  position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 140%);
  z-index: 1300; width: min(560px, calc(100vw - 32px));
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 20px 24px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.cookie-banner.visible { transform: translate(-50%, 0); }
.cookie-banner p { flex: 1; min-width: 220px; font-size: 0.88rem; color: var(--text-secondary); }
.cookie-banner p a { color: var(--primary); font-weight: 600; }
.cookie-banner .btn { padding: 9px 20px; font-size: 0.88rem; }

/* ---------- 20. Inner Pages ---------- */
.page-main, .about-page, .contact-page, .legal-page, .faq-page { padding: calc(var(--nav-h) + 64px) 24px 96px; max-width: 1100px; margin: 0 auto; }
.page-title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.page-subtitle { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 48px; max-width: 640px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 56px; align-items: center; margin-bottom: 56px; }
.about-content h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; margin-bottom: 20px; letter-spacing: -0.02em; }
.about-content p { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.75; }
.about-image { display: flex; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-md); }
.about-mission { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius-md); padding: 32px 36px; box-shadow: var(--shadow-sm); }
.about-mission h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; }
.about-mission p { color: var(--text-secondary); line-height: 1.75; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 32px; }
.contact-info-card, .contact-form-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-md); }
.contact-info-item { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.contact-info-icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; background: rgba(37, 99, 235, 0.1); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.contact-info-text h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 2px; }
.contact-info-text p { color: var(--text-secondary); font-size: 0.92rem; }
.contact-form-group { margin-bottom: 20px; }
.contact-form-label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; }
.contact-form-input { width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--bg); color: var(--text-primary); transition: var(--transition); }
.contact-form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12); outline: none; }
.contact-form-textarea { min-height: 140px; resize: vertical; }
.contact-form-submit { width: 100%; padding: 14px; border-radius: var(--radius-sm); background: var(--gradient); color: #fff; font-weight: 700; font-size: 1rem; transition: var(--transition); box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35); }
.contact-form-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(37, 99, 235, 0.45); }
.form-success { margin-top: 14px; color: var(--success); font-weight: 600; font-size: 0.92rem; }

/* Legal pages */
.legal-page { max-width: 820px; }
.legal-page h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
.legal-updated { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 40px; }
.legal-page h2 { font-size: 1.35rem; font-weight: 700; margin: 36px 0 12px; }
.legal-page p, .legal-page li { color: var(--text-secondary); line-height: 1.75; margin-bottom: 14px; }
.legal-page ul { margin-left: 22px; }
.legal-page a { color: var(--primary); font-weight: 600; }

/* 404 */
.error-page { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: calc(var(--nav-h) + 40px) 24px 80px; }
.error-code { font-size: clamp(5rem, 18vw, 9rem); font-weight: 800; line-height: 1; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page h1 { font-size: 1.6rem; font-weight: 800; margin: 12px 0 10px; }
.error-page p { color: var(--text-secondary); margin-bottom: 28px; max-width: 440px; }

/* ---------- 21. Toast ---------- */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translate(-50%, 20px);
  background: var(--accent); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transition: var(--transition); z-index: 1400;
}
.toast.visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- 22. Print ---------- */
@media print {
  .navbar, .footer, .hero, .back-to-top, .scroll-progress, .cookie-banner, .calc-tools,
  .section:not(#calculator), .cta-section, .mobile-menu, .mobile-menu-overlay, .loading-screen { display: none !important; }
  body { background: #fff; }
  .calculator-wrapper { box-shadow: none; border: 1px solid #ccc; grid-template-columns: 1fr; }
}

/* ---------- 23. Responsive ---------- */
@media (max-width: 1100px) {
  .cards-grid, .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-container, .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .calculator-wrapper { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .navbar-links, .navbar-cta { display: none; }
  .mobile-menu-btn { display: flex; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-image { display: none; }
  .charts-row { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .section { padding: 72px 20px; }
}
@media (max-width: 560px) {
  .cards-grid, .testimonials-grid, .steps-container, .stats-grid, .result-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .calculator-wrapper { padding: 24px 18px; }
  .hero { padding-top: calc(var(--nav-h) + 44px); padding-bottom: 100px; }
  .hero-actions .btn { width: 100%; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
