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

:root {
  --bg:            #0a0c11; /* Deep Navy Night */
  --surface:       #10131a;
  --surface-alt:   #161a24;
  --border:        #202530;
  --text:          #f0ede4; /* Keeps original off-white for readability */
  --text-muted:    #68728a; /* Muted Slate Blue */
  --cream:         #f5f0e4;
  --accent:        #1C54D3; /* Your new Royal Blue */
  --accent-dim:    #1541a6; /* Darker variant for hover states */
  --accent-pale:   #0d1c3d; /* Low-light accent background */
  --terra-400:     #c4823a; /* Kept for contrast */
  --terra-500:     #996616;
  --terra-700:     #6b4510;
  --red:           #e05555;
  --radius:        12px;
  --radius-sm:     8px;
  --font:          'Inter', system-ui, sans-serif;
  --nav-h:         64px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  padding-top: var(--nav-h);
}

/* ── Layout ──────────────────────────────────────────────── */
.page-wrap { max-width: 680px; margin: 0 auto; padding: 0 20px 80px; }

/* ── Sticky Header ───────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(13, 17, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}
.logo-text {
  font-size: .85rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: -.01em;
}

.site-nav { display: flex; align-items: center; gap: 8px; }

.nav-link {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-link:hover { color: var(--text); border-color: var(--border); }

.nav-link--cta {
  background: var(--accent);
  color: var(--bg) !important;
  font-weight: 700;
  border-color: var(--accent);
}
.nav-link--cta:hover { background: var(--accent-dim); border-color: var(--accent-dim); }

/* ── Hero ────────────────────────────────────────────────── */
.hero { padding: 56px 0 32px; }
.hero-eyebrow {
  font-size: .75rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.hero-title {
  font-size: clamp(2rem, 6vw, 3rem); font-weight: 700;
  line-height: 1.1; margin-bottom: 16px; color: var(--cream);
}
.hero-sub { font-size: 1rem; color: var(--text-muted); max-width: 520px; }

/* ── Progress bar ────────────────────────────────────────── */
.progress-wrap {
  height: 3px; background: var(--surface-alt); border-radius: 99px;
  margin-bottom: 40px; overflow: hidden;
}
.progress-bar {
  height: 100%; width: 0; background: var(--accent);
  border-radius: 99px; transition: width .4s ease;
}

/* ── Form sections ───────────────────────────────────────── */
.form-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin-bottom: 16px;
}
.section-number {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
  display: block; margin-bottom: 6px;
}
.section-label  { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; color: var(--cream); }
.section-hint   { font-size: .875rem; color: var(--text-muted); margin-bottom: 20px; }

/* ── Select ──────────────────────────────────────────────── */
.select-wrapper { position: relative; }
.select-input {
  width: 100%; padding: 12px 40px 12px 14px; appearance: none;
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font); font-size: .95rem; cursor: pointer;
}
.select-input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.select-arrow {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%); pointer-events: none; color: var(--text-muted);
}
.select-meta { font-size: .8rem; color: var(--text-muted); margin-top: 8px; min-height: 1.2em; }

/* ── Slider ──────────────────────────────────────────────── */
.slider-row       { margin-bottom: 8px; }
.slider-row-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 8px;
}
.slider-row-label { font-size: .875rem; font-weight: 500; }
.slider-row-val   { font-size: .875rem; color: var(--accent); }
.slider-row-val .num  { font-weight: 700; }
.slider-row-val .unit { color: var(--text-muted); font-size: .8rem; margin-left: 2px; }

.slider-input {
  width: 100%; height: 6px; appearance: none;
  border-radius: 99px; cursor: pointer; outline: none;
}
.slider-input::-webkit-slider-thumb {
  appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  border: 2px solid var(--bg); box-shadow: 0 0 0 2px var(--accent-dim);
}
.slider-input::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 2px solid var(--bg);
}
.years-labels {
  display: flex; justify-content: space-between;
  font-size: .7rem; color: var(--text-muted); margin-top: 6px;
}

/* ── Number inputs ───────────────────────────────────────── */
.num-group   { display: grid; gap: 12px; }
.num-group--2 { grid-template-columns: 1fr 1fr; }
.num-field label {
  display: block; font-size: .8rem; font-weight: 500;
  color: var(--text-muted); margin-bottom: 6px;
}
.num-field-wrap { position: relative; }
.num-input {
  width: 100%; padding: 10px 52px 10px 14px;
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font); font-size: .95rem;
}
.num-input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.num-field-unit {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%); font-size: .75rem;
  color: var(--text-muted); pointer-events: none;
}

/* ── Toggle ──────────────────────────────────────────────── */
.toggle-row { display: flex; gap: 10px; margin-top: 4px; }
.toggle-btn {
  flex: 1; padding: 10px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-alt);
  color: var(--text-muted); font-family: var(--font); font-size: .9rem;
  font-weight: 500; cursor: pointer; transition: all .2s;
}
.toggle-btn.active {
  background: var(--accent); color: var(--bg);
  border-color: var(--accent); font-weight: 700;
}
.soil-test-msg {
  margin-top: 14px; padding: 12px 16px;
  background: var(--accent-pale); border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm); font-size: .875rem;
  color: var(--accent); display: none;
}
.soil-test-msg.visible { display: block; }

/* ── Submit ──────────────────────────────────────────────── */
.submit-section {
  text-align: center;
  border: none !important;
  background: transparent !important;
  padding: 8px 0 !important;
}
.btn-calculate {
  display: inline-block; padding: 16px 48px;
  background: var(--accent); color: var(--bg);
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: background .2s, transform .1s;
  letter-spacing: .02em;
}
.btn-calculate:hover  { background: var(--accent-dim); }
.btn-calculate:active { transform: scale(.98); }
.submit-hint { font-size: .8rem; color: var(--red); margin-top: 10px; min-height: 1.2em; }

/* ── Results ─────────────────────────────────────────────── */
.results-panel { margin-top: 32px; }
.results-header { margin-bottom: 24px; }
.results-header-eyebrow {
  font-size: .75rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 6px;
}
.results-header-title { font-size: 1.6rem; font-weight: 700; color: var(--cream); }

.result-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 12px;
}
.result-block-eyebrow {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted);
  display: block; margin-bottom: 4px;
}
.result-block-title { font-size: 1rem; font-weight: 600; margin-bottom: 16px; }
.result-block-desc  { font-size: .85rem; color: var(--text-muted); margin-top: 12px; }

.loss-row {
  display: flex; justify-content: space-between;
  align-items: center; padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.loss-row:last-of-type { border-bottom: none; }
.loss-row-label  { font-size: .875rem; color: var(--text-muted); }
.loss-annual     { font-size: .8rem; color: var(--text-muted); }
.loss-cumul      { font-size: 1rem; font-weight: 700; color: var(--terra-400); }

.total-block {
  background: var(--surface-alt);
  border: 2px solid var(--terra-500);
  border-radius: var(--radius); padding: 24px; margin-bottom: 12px;
}
.total-block-label  { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.total-block-annual { font-size: 1rem; color: var(--text-muted); margin-top: 6px; }
.total-block-cumul  { font-size: 2.2rem; font-weight: 700; color: var(--terra-400); margin-top: 4px; line-height: 1.1; }
.total-block-years  { font-size: .85rem; color: var(--text-muted); margin-top: 4px; }

.cta-block {
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  border-radius: var(--radius); padding: 28px; text-align: center; margin-bottom: 12px;
}
.cta-block-text { font-size: 1.1rem; font-weight: 700; color: var(--bg); margin-bottom: 8px; }
.cta-block-sub  { font-size: .875rem; color: rgba(0,0,0,.55); margin-bottom: 18px; }
.btn-cta {
  display: inline-block; padding: 13px 34px;
  background: var(--bg); color: var(--accent);
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: .9rem; font-weight: 700;
  cursor: pointer; text-decoration: none; transition: opacity .2s;
}
.btn-cta:hover { opacity: .85; }

.btn-reset {
  display: block; width: 100%; padding: 12px;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-muted);
  font-family: var(--font); font-size: .9rem; cursor: pointer;
  transition: border-color .2s, color .2s; margin-top: 8px;
}
.btn-reset:hover { border-color: var(--text-muted); color: var(--text); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border); padding: 32px;
  text-align: center; font-size: .75rem;
  color: var(--text-muted); line-height: 1.9;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .site-header { padding: 0 16px; }
  .logo-text   { display: none; }
  .num-group--2 { grid-template-columns: 1fr; }
  .total-block-cumul { font-size: 1.6rem; }
}

/* ── FAQ Section ─────────────────────────────────────────── */
.faq-section {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.faq-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 20px;
}
.faq-section details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 10px;
  background: var(--surface);
}
.faq-section details[open] { border-color: var(--accent-dim); }
.faq-section summary {
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-section summary::after       { content: '+'; color: var(--accent); font-size: 1.1rem; font-weight: 700; }
.faq-section details[open] summary::after { content: '−'; }
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section details p {
  font-size: .875rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.7;
}
.faq-section details a { color: var(--accent); }