@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Design Tokens ── */
:root {
  --brand:       #f97316;   /* orange-500 – FIRE */
  --brand-d:     #ea580c;
  --blue:        #2563eb;   /* blue-600 – interactive */
  --blue-d:      #1d4ed8;
  --success:     #16a34a;   /* green-600 */
  --bg:          #f8fafc;
  --surface:     #ffffff;
  --dark:        #0f172a;
  --dark2:       #1e293b;
  --text:        #0f172a;
  --muted:       #64748b;
  --border:      #e2e8f0;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   20px;
  --shadow-sm:   0 1px 4px rgba(0,0,0,.06);
  --shadow:      0 4px 24px rgba(0,0,0,.08);
  --shadow-lg:   0 12px 48px rgba(0,0,0,.14);
  --transition:  .18s ease;
  --font:        'Inter', system-ui, sans-serif;
  --max-w:       1120px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; }

/* ── Nav ── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 1.5rem;
}
.nav-logo {
  font-size: 1.25rem; font-weight: 800;
  color: var(--dark); white-space: nowrap;
  display: flex; align-items: center; gap: .4rem;
}
.nav-logo .fire-icon { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: .25rem; flex: 1; }
.nav-links a {
  font-size: .85rem; font-weight: 500; color: var(--muted);
  padding: .4rem .75rem; border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--dark); background: var(--bg); text-decoration: none; }
.nav-links a.active { color: var(--blue); background: #eff6ff; }

/* Currency selector */
.currency-btn {
  display: flex; align-items: center; gap: .4rem;
  padding: .4rem .85rem; border-radius: var(--radius-lg);
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: .85rem; font-weight: 600; color: var(--dark);
  transition: border-color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.currency-btn:hover { border-color: var(--blue); box-shadow: 0 0 0 3px #dbeafe; }
.currency-btn svg { width: 14px; height: 14px; color: var(--muted); }

.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; color: var(--dark); }

/* Currency Modal */
.currency-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(15,23,42,.45); backdrop-filter: blur(4px);
  align-items: flex-start; justify-content: center; padding-top: 72px;
}
.currency-modal-overlay.open { display: flex; }
.currency-modal {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); width: 360px; max-width: calc(100vw - 2rem);
  padding: 1.25rem;
}
.currency-modal h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.currency-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.currency-option {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem .75rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: .85rem; font-weight: 500; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  text-align: left;
}
.currency-option:hover { border-color: var(--blue); background: #eff6ff; }
.currency-option.selected { border-color: var(--blue); background: #eff6ff; color: var(--blue); }
.currency-option .sym { font-size: .8rem; color: var(--muted); }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, #1e3a5f 50%, #0c2340 100%);
  padding: 4rem 1.25rem 7rem;
  text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 60% 0%, rgba(249,115,22,.18) 0%, transparent 70%);
}
.hero-inner { position: relative; max-width: 700px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(249,115,22,.15); border: 1px solid rgba(249,115,22,.3);
  color: #fdba74; font-size: .78rem; font-weight: 600;
  padding: .3rem .85rem; border-radius: var(--radius-lg);
  margin-bottom: 1.25rem; letter-spacing: .04em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; line-height: 1.15; margin-bottom: 1rem; }
.hero h1 span { color: var(--brand); }
.hero p { font-size: 1.1rem; color: #94a3b8; max-width: 540px; margin: 0 auto; }

/* ── Calculator Card (overlaps hero) ── */
.calc-lift { margin-top: -4rem; position: relative; z-index: 10; padding: 0 1.25rem 3rem; }

.calc-card {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); max-width: var(--max-w); margin: 0 auto;
  overflow: hidden;
}
.calc-card-header {
  padding: 1.5rem 2rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem;
}
.calc-card-header h2 { font-size: 1.05rem; font-weight: 700; }
.calc-card-body { display: grid; grid-template-columns: 1fr 1fr; }
.calc-form-col { padding: 2rem; border-right: 1px solid var(--border); }
.calc-results-col { padding: 2rem; background: #fafbfc; }
.calc-chart-row { padding: 0 2rem 2rem; border-top: 1px solid var(--border); }

/* Non-home calculators */
.page-wrap { max-width: var(--max-w); margin: 2.5rem auto; padding: 0 1.25rem; }
.page-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.page-card-header { padding: 2rem 2rem 1.5rem; border-bottom: 1px solid var(--border); }
.page-card-header h1 { font-size: 1.6rem; font-weight: 800; }
.page-card-header p { color: var(--muted); margin-top: .35rem; }
.page-card-body { display: grid; grid-template-columns: 1fr 1fr; }
.page-form-col { padding: 2rem; border-right: 1px solid var(--border); }
.page-results-col { padding: 2rem; background: #fafbfc; }
.page-chart-row { padding: 0 2rem 2rem; border-top: 1px solid var(--border); }

/* ── Form elements ── */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block; font-size: .8rem; font-weight: 600;
  color: var(--muted); margin-bottom: .35rem; letter-spacing: .03em; text-transform: uppercase;
}
.input-wrap { position: relative; display: flex; align-items: center; }
.input-prefix {
  position: absolute; left: .85rem;
  font-size: .9rem; font-weight: 600; color: var(--muted);
  pointer-events: none; z-index: 1;
}
.input-wrap input {
  width: 100%; padding: .7rem .85rem .7rem 2.5rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: var(--font); background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  color: var(--text);
}
.input-wrap input.no-prefix { padding-left: .85rem; }
.input-wrap input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px #dbeafe; }
.input-suffix {
  position: absolute; right: .85rem;
  font-size: .85rem; color: var(--muted); pointer-events: none;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.btn-calc {
  width: 100%; padding: .85rem 1.5rem; margin-top: 1.25rem;
  background: var(--blue); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 1rem; font-weight: 700;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-calc:hover { background: var(--blue-d); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,.3); }
.btn-calc:active { transform: translateY(0); }

/* ── Results Panel ── */
.results-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; text-align: center; color: var(--muted); padding: 2rem 1rem;
}
.results-empty .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: .4; }
.results-empty p { font-size: .9rem; }

.results-panel { display: none; }
.results-panel.show { display: block; animation: fadeSlideIn .3s ease; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1.25rem; }
.kpi-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 1rem;
}
.kpi-card.primary { border-color: var(--blue); background: #eff6ff; }
.kpi-card.success { border-color: var(--success); background: #f0fdf4; }
.kpi-card.fire    { border-color: var(--brand);   background: #fff7ed; }
.kpi-label { font-size: .7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .3rem; }
.kpi-value { font-size: 1.35rem; font-weight: 800; color: var(--dark); line-height: 1.2; }
.kpi-card.primary .kpi-value { color: var(--blue); }
.kpi-card.success .kpi-value { color: var(--success); }
.kpi-card.fire    .kpi-value { color: var(--brand); }

.status-banner {
  border-radius: var(--radius-sm); padding: .85rem 1rem;
  font-size: .9rem; font-weight: 600; margin-bottom: 1rem;
  display: flex; align-items: center; gap: .5rem;
}
.status-banner.achieved { background: #f0fdf4; color: #166534; border: 1.5px solid #bbf7d0; }
.status-banner.needed   { background: #fff7ed; color: #9a3412; border: 1.5px solid #fed7aa; }

.result-rows { display: flex; flex-direction: column; gap: .5rem; }
.result-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .6rem .5rem; border-bottom: 1px solid var(--border);
  font-size: .88rem;
}
.result-row:last-child { border-bottom: none; }
.result-row .label { color: var(--muted); }
.result-row .val   { font-weight: 700; color: var(--dark); }

.disclaimer { font-size: .72rem; color: #94a3b8; margin-top: 1rem; text-align: center; }

/* ── Chart ── */
.chart-wrap { position: relative; height: 260px; margin-top: 1.5rem; }
.chart-title { font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .75rem; text-transform: uppercase; letter-spacing: .04em; }

/* ── Content sections ── */
.content-section { max-width: var(--max-w); margin: 0 auto; padding: 3rem 1.25rem; }
.content-section h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 1.5rem; }
.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.content-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.content-card .cc-icon { font-size: 1.75rem; margin-bottom: .75rem; }
.content-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.content-card p  { font-size: .88rem; color: var(--muted); line-height: 1.6; }

.explainer { max-width: 760px; }
.explainer h2 { font-size: 1.4rem; font-weight: 800; margin: 2rem 0 .75rem; }
.explainer h3 { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.explainer p  { color: #334155; line-height: 1.75; margin-bottom: .9rem; }
.explainer ul { list-style: disc; padding-left: 1.4rem; margin-bottom: .9rem; }
.explainer li { color: #334155; margin-bottom: .35rem; font-size: .95rem; line-height: 1.65; }

.calc-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-top: 1rem; }
.calc-link-card {
  background: var(--surface); border-radius: var(--radius); border: 1.5px solid var(--border);
  padding: 1.25rem; box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: block; color: var(--text);
}
.calc-link-card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.calc-link-card .icon { font-size: 1.5rem; margin-bottom: .5rem; }
.calc-link-card h3 { font-size: .9rem; font-weight: 700; margin-bottom: .2rem; }
.calc-link-card p  { font-size: .78rem; color: var(--muted); }

/* ── Footer ── */
.site-footer { background: var(--dark); color: #94a3b8; margin-top: 4rem; }
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem;
}
.footer-brand .logo { font-size: 1.15rem; font-weight: 800; color: #fff; margin-bottom: .6rem; }
.footer-brand p { font-size: .82rem; max-width: 240px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .85rem; }
.footer-col ul li { margin-bottom: .45rem; }
.footer-col a { font-size: .83rem; color: #94a3b8; transition: color var(--transition); }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  max-width: var(--max-w); margin: 0 auto;
  padding: 1.25rem; font-size: .78rem; color: #475569;
  display: flex; justify-content: space-between; align-items: center;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .calc-card-body, .page-card-body { grid-template-columns: 1fr; }
  .calc-form-col, .page-form-col { border-right: none; border-bottom: 1px solid var(--border); }
  .calc-results-col, .page-results-col { background: var(--surface); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 1rem; gap: .25rem; z-index: 300; }
  .nav-toggle { display: block; }
  .hero { padding: 2.5rem 1rem 6rem; }
  .hero h1 { font-size: 1.9rem; }
  .calc-lift { padding: 0 .75rem 2rem; }
  .calc-form-col, .calc-results-col, .page-form-col, .page-results-col { padding: 1.25rem; }
  .calc-chart-row, .page-chart-row { padding: 0 1.25rem 1.5rem; }
  .calc-card-header { padding: 1rem 1.25rem; }
  .form-row { grid-template-columns: 1fr; }
  .result-kpi-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; gap: .4rem; text-align: center; }
}

/* ── SEO Content ── */
.seo-section { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem 4rem; }
.seo-section h2 { font-size: 1.55rem; font-weight: 800; margin: 2.5rem 0 .85rem; color: var(--dark); }
.seo-section h3 { font-size: 1.1rem; font-weight: 700; margin: 2rem 0 .6rem; color: var(--dark2); }
.seo-section h4 { font-size: .97rem; font-weight: 700; margin: 1.5rem 0 .4rem; }
.seo-section p  { color: #334155; line-height: 1.8; margin-bottom: 1rem; font-size: .96rem; }
.seo-section ul, .seo-section ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.seo-section li { color: #334155; margin-bottom: .4rem; line-height: 1.75; font-size: .95rem; }
.seo-section strong { color: var(--dark); }

.table-wrap { overflow-x: auto; margin: 1.75rem 0; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.seo-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.seo-table thead th { background: var(--dark); color: #fff; padding: .8rem 1rem; text-align: left; font-weight: 600; white-space: nowrap; }
.seo-table thead th:first-child { border-radius: var(--radius) 0 0 0; }
.seo-table thead th:last-child  { border-radius: 0 var(--radius) 0 0; }
.seo-table tbody td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); color: #334155; }
.seo-table tbody tr:last-child td { border-bottom: none; }
.seo-table tbody tr:nth-child(even) td { background: #f8fafc; }
.seo-table tbody td strong { color: var(--dark); }
.seo-table .highlight td { background: #eff6ff !important; font-weight: 600; color: var(--blue); }

.callout { border-radius: var(--radius-sm); padding: 1.1rem 1.25rem; margin: 1.75rem 0; }
.callout.blue  { background: #eff6ff; border-left: 4px solid var(--blue); }
.callout.amber { background: #fff7ed; border-left: 4px solid var(--brand); }
.callout.green { background: #f0fdf4; border-left: 4px solid var(--success); }
.callout p { margin: 0; color: #334155; font-size: .92rem; line-height: 1.7; }
.callout strong { color: var(--dark); }

.faq-list { margin: 1rem 0; }
.faq-item { border-bottom: 1px solid var(--border); padding: 1.1rem 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-weight: 700; font-size: .97rem; color: var(--dark); margin-bottom: .45rem; }
.faq-a { color: #475569; font-size: .9rem; line-height: 1.75; }

.two-col-list { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 2rem; }
@media (max-width: 600px) { .two-col-list { grid-template-columns: 1fr; } }
