/* ==========================================================================
   Folk Capital — Design System
   Apple-inspired: generous whitespace, restrained palette, large type.
   ========================================================================== */

:root {
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --bg-card: #ffffff;
  --navy: #0b1f3a;
  --navy-light: #142c52;
  --navy-dim: #1d3a66;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-invert: #f5f5f7;
  --accent: #b8863d;
  --accent-light: #d6ac6c;
  --accent-dark: #93692b;
  --border: #d2d2d7;
  --success: #1e7e34;
  --error: #c0392b;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(11,31,58,0.15);
  --max-width: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 96px 0; }
@media (max-width: 768px) {
  section { padding: 64px 0; }
}

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; margin: 0 0 16px; color: var(--text); }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.75rem); line-height: 1.1; }
h3 { font-size: 1.4rem; }
p { color: var(--text-secondary); font-size: 1.05rem; margin: 0 0 16px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 12px;
  display: block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 980px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--navy);
  color: #fff;
}
.btn-primary:hover { background: var(--navy-light); box-shadow: var(--shadow-sm); }
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: var(--accent-dark); box-shadow: var(--shadow-sm); }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--navy); }
.btn-block { width: 100%; }
.btn-lg { padding: 17px 34px; font-size: 1.1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Nav ---------- */
header.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251,251,253,0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-blocks {
  display: flex;
  gap: 2px;
}
.logo-blocks .block {
  width: 24px; height: 24px;
  border-radius: 3px;
  background: #111111;
  display: flex; align-items: center; justify-content: center;
  color: #ffffff;
  font-family: var(--font);
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a { color: var(--text); opacity: 0.8; }
.nav-links a:hover { opacity: 1; }
.nav-right { display: flex; align-items: center; gap: 16px; }

.lang-toggle {
  display: flex;
  background: var(--bg-alt);
  border-radius: 980px;
  padding: 3px;
  border: 1px solid var(--border);
}
.lang-toggle button {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 980px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
}
.lang-toggle button.active {
  background: var(--navy);
  color: #fff;
}

.nav-toggle-btn {
  display: none;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--navy);
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle-btn { display: block; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(circle at 20% 20%, var(--navy-dim), var(--navy) 60%);
  color: var(--text-invert);
  padding: 120px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 100%, rgba(184,134,61,0.25), transparent 55%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero p.lead {
  color: rgba(245,245,247,0.78);
  font-size: 1.25rem;
  max-width: 640px;
  margin: 0 auto 36px;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
}
.badge {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(245,245,247,0.9);
  padding: 8px 16px;
  border-radius: 980px;
  font-size: 0.82rem;
  font-weight: 500;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Lead Capture ---------- */
.lead-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-lg);
  color: var(--text);
  text-align: left;
  max-width: 760px;
  margin: 48px auto 0;
}
.lead-card h3 { margin-bottom: 4px; color: var(--text); }
.lead-card .lead-sub { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 20px; }
.lead-capture-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: start;
}
.lead-capture-form .field { margin-bottom: 0; }
.lead-capture-form .hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.lead-capture-form button { white-space: nowrap; }
@media (max-width: 780px) {
  .lead-capture-form { grid-template-columns: 1fr; }
}
.lead-status {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  min-height: 1.2em;
  margin-top: 4px;
}
.lead-status.pending { color: var(--text-secondary); }
.lead-status.success { color: var(--success); font-weight: 600; }
.lead-status.error { color: var(--error); font-weight: 600; }

.lead-card-compact {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  margin-top: 24px;
}
.lead-card-compact h3 { margin-bottom: 4px; }
.lead-card-compact .lead-sub { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 18px; }

/* ---------- Sections / Cards ---------- */
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}
.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card .icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  font-size: 22px;
}
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; }

.alt-bg { background: var(--bg-alt); }
.navy-bg { background: var(--navy); color: var(--text-invert); }
.navy-bg h2, .navy-bg h3 { color: #fff; }
.navy-bg p { color: rgba(245,245,247,0.75); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
}
.stat-block { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 32px; }
.stat { }
.stat .num { font-size: 2.2rem; font-weight: 700; color: var(--navy); display: block; }
.navy-bg .stat .num { color: var(--accent-light); }
.stat .label { font-size: 0.85rem; color: var(--text-secondary); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }
.step-num {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

/* ---------- Forms (shared: calculator + application) ---------- */
.panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 40px;
}
@media (max-width: 640px) { .panel { padding: 24px; } }

.field-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.field-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) {
  .field-row, .field-row.cols-3 { grid-template-columns: 1fr; }
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.field .hint { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="date"], select, textarea {
  font-family: var(--font);
  font-size: 0.98rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(11,31,58,0.08);
}
textarea { resize: vertical; min-height: 80px; }
fieldset {
  border: none;
  padding: 0;
  margin: 0 0 40px;
}
legend {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
  padding: 0;
  margin-bottom: 6px;
  width: 100%;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 12px;
}
.section-note { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 20px; }

.radio-group, .check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.radio-pill, .check-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  cursor: pointer;
}
.radio-pill input, .check-pill input { margin: 0; }

.disclosure-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 16px;
  line-height: 1.6;
}
.disclosure-box h4 { font-size: 0.95rem; color: var(--text); margin-bottom: 8px; }
.consent-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.88rem;
}
.consent-line input { margin-top: 4px; }

.warning-banner {
  background: #fff4e5;
  border: 1px solid #f0c987;
  color: #7a5416;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 0.88rem;
  margin-bottom: 32px;
}
.warning-banner strong { display: block; margin-bottom: 4px; }

.progress-track {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
}
.progress-track .dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}
.progress-track .dot.active { background: var(--accent); }

.result-box {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}
.result-box .amount { font-size: 2.6rem; font-weight: 700; color: var(--accent-light); }
.result-box .amount-label { font-size: 0.85rem; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.08em; }
.breakdown-table { width: 100%; margin-top: 24px; font-size: 0.88rem; }
.breakdown-table td { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
.breakdown-table td:last-child { text-align: right; font-weight: 600; }

/* ---------- Footer ---------- */
footer {
  background: var(--navy);
  color: rgba(245,245,247,0.7);
  padding: 56px 0 32px;
  font-size: 0.85rem;
}
footer .foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 720px) {
  footer .foot-grid { grid-template-columns: 1fr; }
}
footer h4 { color: #fff; font-size: 0.9rem; margin-bottom: 14px; }
footer a { opacity: 0.85; }
footer a:hover { opacity: 1; text-decoration: underline; }
footer .foot-links { display: flex; flex-direction: column; gap: 10px; }
footer .legal {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  line-height: 1.7;
  font-size: 0.78rem;
  opacity: 0.75;
}
footer .legal p { color: inherit; font-size: inherit; }

.placeholder-flag {
  color: #ffb454;
  font-weight: 700;
}

/* ---------- Print (application summary) ---------- */
@media print {
  header.site-nav, footer, .no-print { display: none !important; }
  body { background: #fff; }
  .panel { border: none; box-shadow: none; padding: 0; }
}
