/* ==========================================================================
   SmartTrader.io — Global Stylesheet
   Vanilla CSS. No frameworks.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --primary: #2A7FFF;
  --primary-strong: #1B62D6;
  --primary-soft: rgba(42, 127, 255, 0.10);
  --primary-glow: rgba(42, 127, 255, 0.35);

  --bg: #F5F7FB;
  --surface: #FFFFFF;
  --surface-2: #EDF1F8;
  --text: #101B2E;
  --text-muted: #56677F;
  --border: #E2E8F2;
  --success: #0E9F6E;
  --danger: #E02D3C;

  --shadow-sm: 0 1px 2px rgba(16, 27, 46, 0.06), 0 1px 3px rgba(16, 27, 46, 0.08);
  --shadow-md: 0 6px 18px rgba(16, 27, 46, 0.08);
  --shadow-lg: 0 16px 40px rgba(16, 27, 46, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;

  --container: 1140px;
  --header-h: 72px;
}

[data-theme="dark"] {
  --bg: #0B1220;
  --surface: #121C31;
  --surface-2: #182642;
  --text: #EAF0F9;
  --text-muted: #94A5C0;
  --border: #223353;
  --primary-soft: rgba(42, 127, 255, 0.16);
  --success: #2FBF8B;
  --danger: #F26D78;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 22px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.muted { color: var(--text-muted); }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand .brand-mark { flex: 0 0 auto; }
.brand .tld { color: var(--primary); }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.main-nav a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }

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

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.theme-toggle:hover { transform: rotate(15deg); background: var(--surface-2); }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px var(--primary-glow);
}
.btn-primary:hover { background: var(--primary-strong); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface-2); }

.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 7vw, 84px);
  /* Fixed dark band — identical in light and dark themes */
  background:
    radial-gradient(1000px 460px at 88% -12%, rgba(42, 127, 255, 0.22), transparent 62%),
    radial-gradient(760px 420px at -8% 112%, rgba(42, 127, 255, 0.14), transparent 58%),
    linear-gradient(180deg, #0A1426 0%, #081020 100%);
  color: #EAF0F9;
  border-bottom: 1px solid rgba(42, 127, 255, 0.18);
}
.hero h1 { color: #F4F8FF; }
.hero .accent { color: #5B9DFF; }
.hero .eyebrow { background: rgba(42, 127, 255, 0.16); color: #7FB2FF; }
.hero .btn-ghost { color: #EAF0F9; border-color: #26385E; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-bottom: 34px;
}
.hero-badges .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #B9C7DE;
}
.hero-badges .badge svg { color: #5B9DFF; flex: 0 0 auto; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.55; }
}

.hero .lede {
  font-size: 1.13rem;
  color: #A7B6CE;
  max-width: 34rem;
  margin-bottom: 28px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
}
.hero-stat .value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  color: #F4F8FF;
}
.hero-stat .label {
  font-size: 0.82rem;
  color: #8FA2BF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-panel {
  background: linear-gradient(180deg, #0F1B33 0%, #0C1628 100%);
  border: 1px solid #1E3054;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(42, 127, 255, 0.08);
  padding: 22px 22px 16px;
}
.hero-panel .panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}
.hero-panel .ticker {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: #8FA2BF;
}
.hero-panel .panel-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.5rem;
  color: #F4F8FF;
  line-height: 1.2;
}
.hero-panel .quote {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #35D399;
  background: rgba(53, 211, 153, 0.12);
  border: 1px solid rgba(53, 211, 153, 0.25);
  border-radius: 999px;
  padding: 4px 12px;
}
.hero-panel canvas { width: 100%; height: 200px; }
.hero-panel .panel-chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.hero-panel .chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #1E3054;
  border-radius: var(--radius-sm);
  padding: 12px;
}
.hero-panel .chip strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.83rem;
  color: #EAF0F9;
  margin-bottom: 4px;
}
.hero-panel .chip strong svg { color: #5B9DFF; flex: 0 0 auto; }
.hero-panel .chip span { font-size: 0.76rem; color: #8FA2BF; line-height: 1.45; display: block; }
.hero-panel .panel-foot {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #64789A;
  padding-top: 12px;
  border-top: 1px dashed #1E3054;
  margin-top: 14px;
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }

.section-head { max-width: 44rem; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}

.card .card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 16px;
}
.card p { color: var(--text-muted); margin-bottom: 0; }

/* ---------- Calculator tabs ---------- */
.calc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}
.calc-tab {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.calc-tab:hover { color: var(--text); border-color: var(--primary); }
.calc-tab[aria-selected="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.calc-panel { display: none; }
.calc-panel.is-active { display: block; animation: panel-in 0.35s ease; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.calc-form { padding: clamp(24px, 4vw, 40px); }
.calc-form h3 { margin-bottom: 4px; }
.calc-form .calc-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 24px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.field .hint { font-weight: 400; color: var(--text-muted); font-size: 0.82rem; }

.input-wrap { position: relative; }
.input-wrap .affix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  pointer-events: none;
}
.input-wrap .prefix { left: 14px; }
.input-wrap .suffix { right: 14px; }

.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.field textarea { font-family: var(--font-body); resize: vertical; min-height: 130px; }
.field select { font-family: var(--font-body); cursor: pointer; }
.input-wrap.has-prefix input { padding-left: 34px; }
.input-wrap.has-suffix input { padding-right: 38px; }

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.field input.is-invalid, .field textarea.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(224, 45, 60, 0.10);
}

.field-error {
  display: none;
  color: var(--danger);
  font-size: 0.84rem;
  margin-top: 6px;
}
.field-error.is-visible { display: block; animation: shake 0.3s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.calc-actions { display: flex; gap: 12px; margin-top: 26px; }

/* Results side */
.calc-results {
  background: var(--surface-2);
  border-left: 1px solid var(--border);
  padding: clamp(24px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.calc-results h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}
.result-row:last-of-type { border-bottom: none; }
.result-row .result-label { color: var(--text-muted); font-size: 0.93rem; }
.result-row .result-value {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.result-row .result-value.highlight { color: var(--primary); font-size: 1.55rem; }
.result-row .result-value.positive { color: var(--success); }

.result-value.is-updated { animation: result-pop 0.5s ease; }
@keyframes result-pop {
  0% { transform: scale(0.92); opacity: 0.4; }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); opacity: 1; }
}

.results-empty {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
  padding: 24px 12px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
}

.chart-wrap { margin-top: 22px; }
.chart-wrap canvas {
  width: 100%;
  height: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.chart-legend {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.chart-legend .key { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .swatch { width: 12px; height: 12px; border-radius: 3px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin-inline: auto; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-family: var(--font-display);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--primary);
  transition: transform 0.25s ease;
  flex: 0 0 auto;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 22px 18px; color: var(--text-muted); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-strong) 100%);
  border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 64px);
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.85); max-width: 36rem; margin: 0 auto 26px; }
.cta-band .btn {
  background: #fff;
  color: var(--primary-strong);
}
.cta-band .btn:hover { background: #EAF1FF; }

/* ---------- Featured calculator cards ---------- */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.feature-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.feature-card .icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-bottom: 16px;
  color: #fff;
}
.icon-tile.tint-blue   { background: linear-gradient(135deg, #2A7FFF, #1B62D6); }
.icon-tile.tint-violet { background: linear-gradient(135deg, #8B5CF6, #6D3EE8); }
.icon-tile.tint-green  { background: linear-gradient(135deg, #10B981, #0A9469); }
.icon-tile.tint-amber  { background: linear-gradient(135deg, #F59E0B, #DB7E06); }
.feature-card h3 { font-size: 1.08rem; }
.feature-card > p { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 14px; }
.feature-card ul {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.feature-card li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 6px;
}
.feature-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}
.feature-card .card-link {
  margin-top: auto;
  font-weight: 600;
  font-size: 0.93rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.feature-card .card-link::after { content: "\2192"; transition: transform 0.2s ease; }
.feature-card:hover .card-link::after { transform: translateX(4px); }

/* ---------- Trust strip ---------- */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.trust-strip .trust-item {
  background: var(--surface);
  padding: 22px 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.trust-strip .trust-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
}
.trust-strip h3 { font-size: 0.98rem; margin-bottom: 2px; }
.trust-strip p { color: var(--text-muted); font-size: 0.87rem; margin: 0; }

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(28px, 5vw, 48px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  align-items: center;
}
.newsletter h2 { margin-bottom: 6px; }
.newsletter .muted { margin-bottom: 0; }
.newsletter-form { display: flex; gap: 10px; }
.newsletter-form .input-wrap { flex: 1; }
.newsletter-form input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.98rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.newsletter-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.newsletter-form input.is-invalid { border-color: var(--danger); }
.newsletter-note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 10px;
}
.newsletter .field-error { margin-top: 8px; }
.newsletter .form-success { margin: 12px 0 0; padding: 12px 16px; font-size: 0.9rem; }

/* ---------- Header CTA ---------- */
.header-cta { padding: 10px 20px; font-size: 0.9rem; }

/* ---------- Prose pages (legal, about) ---------- */
.page-hero {
  padding: clamp(48px, 7vw, 80px) 0 clamp(28px, 4vw, 44px);
  background: radial-gradient(800px 300px at 50% -20%, var(--primary-soft), transparent 70%);
}
.page-hero p { color: var(--text-muted); font-size: 1.08rem; max-width: 42rem; }

.prose {
  max-width: 780px;
  margin-inline: auto;
}
.prose h2 { margin-top: 2.2em; font-size: 1.45rem; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 1.3em; color: var(--text); }
.prose li { margin-bottom: 0.5em; }
.prose .updated {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ---------- About page ---------- */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.stat-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 22px;
  text-align: center;
}
.stat-band .value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary);
}
.stat-band .label { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Contact ---------- */
.contact-form-card {
  max-width: 640px;
  margin-inline: auto;
}
.contact-form-card:hover { transform: none; box-shadow: var(--shadow-sm); }
.contact-form-title { font-size: 1.25rem; margin-bottom: 18px; }
.input-plain { font-family: var(--font-body) !important; }
.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-success {
  display: none;
  background: rgba(14, 159, 110, 0.10);
  border: 1px solid var(--success);
  color: var(--success);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  font-weight: 500;
}
.form-success.is-visible { display: block; animation: panel-in 0.35s ease; }

/* ---------- Screen-reader-only utility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 150;
  max-width: 560px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 20px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  animation: banner-in 0.4s ease;
}
@keyframes banner-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.cookie-banner p {
  flex: 1 1 280px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.cookie-banner p a { white-space: nowrap; }
.cookie-banner .cookie-actions { display: flex; gap: 10px; }
.cookie-banner .btn { padding: 10px 22px; font-size: 0.9rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
  margin-top: clamp(56px, 8vw, 96px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.footer-grid h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--text); font-size: 0.94rem; }
.footer-grid a:hover { color: var(--primary); }
.footer-about p { color: var(--text-muted); font-size: 0.94rem; max-width: 26rem; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
  margin-top: 22px;
  padding-top: 18px;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-panel { max-width: 560px; }
  .header-cta { display: none; }
  .newsletter { grid-template-columns: 1fr; }
  .calc-card { grid-template-columns: 1fr; }
  .calc-results { border-left: none; border-top: 1px solid var(--border); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }
  .main-nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 16px 18px; }
  .main-nav a { padding: 13px 14px; font-size: 1.02rem; }
}

@media (max-width: 520px) {
  .container { padding-inline: 18px; }
  .hero-panel .panel-chips { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form .btn { width: 100%; }
  .calc-actions { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .result-row { flex-direction: column; gap: 2px; align-items: flex-start; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .calc-actions, .hero-cta, .nav-toggle, .theme-toggle { display: none !important; }
  body { background: #fff; color: #000; }
}
