/* Self-hosted fonts - no Google Fonts dependency */
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans-latin-300-normal.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans-latin-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dm-sans-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Serif Display';
  src: url('/fonts/dm-serif-display-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0f172a;
  --blue: #3b9eda;
  --blue-light: #e2f0fb;
  --blue-hover: #2a8bc9;
  --white: #ffffff;
  --off-white: #f8fafc;
  --gray-light: #f1f5f9;
  --gray-mid: #94a3b8;
  --gray-dark: #475569;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.10);
  --font: 'DM Sans', sans-serif;
  --font-serif: 'DM Serif Display', serif;
  --transition: 0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); font-size: 16px; color: var(--text); background: var(--white); line-height: 1.75; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-hover); }
img { max-width: 100%; display: block; }
ul[role="list"] { list-style: none; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* NAVBAR */
.navbar { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.nav-logo-dot { color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-link { padding: 6px 14px; border-radius: 6px; color: var(--gray-dark); font-size: 0.92rem; font-weight: 500; transition: background var(--transition), color var(--transition); text-decoration: none; }
.nav-link:hover, .nav-link.active { background: var(--gray-light); color: var(--navy); }
.nav-cta { display: inline-flex; align-items: center; gap: 7px; margin-left: 8px; padding: 9px 18px; background: var(--navy); color: var(--white); border-radius: 8px; font-size: 1rem; font-weight: 500; text-decoration: none; transition: background var(--transition), transform var(--transition); }
.nav-cta:hover { background: var(--blue); color: var(--white); transform: translateY(-1px); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--navy); padding: 4px; }

/* HERO */
.hero { padding: 80px 24px 60px; text-align: center; background: var(--white); border-bottom: 1px solid var(--border); }
.hero-label { display: inline-flex; align-items: center; gap: 8px; background: var(--blue-light); color: var(--blue); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 14px; border-radius: 100px; margin-bottom: 24px; }
.hero h1 { font-family: var(--font-serif); font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.2; color: var(--navy); max-width: 720px; margin: 0 auto 20px; font-weight: 400; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero-sub { font-size: 1.1rem; color: var(--text-muted); max-width: 560px; margin: 0 auto 36px; font-weight: 400; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* BUTTONS */
.btn-primary { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; background: var(--navy); color: var(--white); border-radius: var(--radius); font-size: 1rem; font-weight: 500; text-decoration: none; transition: background var(--transition), transform var(--transition); }
.btn-primary:hover { background: var(--blue); color: var(--white); transform: translateY(-2px); }
.btn-secondary { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; background: transparent; color: var(--navy); border: 1.5px solid var(--border); border-radius: var(--radius); font-size: 1rem; font-weight: 500; text-decoration: none; transition: border-color var(--transition), background var(--transition), transform var(--transition); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); transform: translateY(-2px); }

/* SECTION COMMON */
.section-header { text-align: center; margin-bottom: 48px; }
.section-label { display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px; }
.section-header h2 { font-family: var(--font-serif); font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--navy); font-weight: 400; margin-bottom: 12px; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

/* CALC DEMO */
.calc-demo { padding: 72px 24px; background: var(--off-white); }
.calc-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); max-width: 480px; margin: 0 auto; overflow: hidden; }
.calc-card-header { background: var(--navy); padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; }
.calc-card-header p { color: rgba(255,255,255,0.7); font-size: 1rem; font-weight: 500; }
.calc-card-header span { color: var(--white); font-size: 1rem; font-weight: 600; }
.calc-body { padding: 28px 24px; }
.calc-field { margin-bottom: 20px; }
.calc-field label { display: block; font-size: 1rem; font-weight: 500; color: var(--gray-dark); margin-bottom: 8px; }
.calc-field input, .calc-field select { width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius); font-family: var(--font); font-size: 1rem; color: var(--text); background: var(--white); transition: border-color var(--transition); appearance: none; }
.calc-field input:focus, .calc-field select:focus { outline: none; border-color: var(--blue); }
.calc-result { background: var(--blue-light); border-radius: var(--radius); padding: 20px; margin-top: 8px; display: flex; align-items: center; justify-content: space-between; }
.calc-result-label { font-size: 1rem; color: var(--blue); font-weight: 500; }
.calc-result-amount { font-size: 1.8rem; font-weight: 600; color: var(--navy); font-family: var(--font-serif); }
.calc-cta-btn { display: block; width: 100%; margin-top: 20px; padding: 14px; background: var(--navy); color: var(--white); border: none; border-radius: var(--radius); font-family: var(--font); font-size: 1rem; font-weight: 500; cursor: pointer; text-align: center; transition: background var(--transition); text-decoration: none; }
.calc-cta-btn:hover { background: var(--blue); color: var(--white); }
.calc-courtesy { text-align: center; padding: 12px; border-top: 1px solid var(--border); font-size: 0.78rem; color: var(--gray-mid); }
.calc-courtesy a { color: var(--blue); font-weight: 500; }

/* HOW IT WORKS */
.how-it-works { padding: 80px 24px; background: var(--white); }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; max-width: 960px; margin: 0 auto; }
.step-card { text-align: center; padding: 32px 24px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--white); transition: box-shadow var(--transition), transform var(--transition); }
.step-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.step-icon { width: 52px; height: 52px; background: var(--blue-light); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.step-num { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); margin-bottom: 8px; }
.step-card h3 { font-size: 1rem; font-weight: 600; color: var(--navy); margin-bottom: 10px; }
.step-card p { font-size: 1rem; color: var(--text-muted); line-height: 1.6; }

/* STYLES PREVIEW */
.calc-styles-preview { padding: 80px 24px; background: var(--off-white); }
.styles-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; max-width: 900px; margin: 0 auto; }
@media (max-width: 640px) { .styles-grid { grid-template-columns: 1fr; } }
.style-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow var(--transition), transform var(--transition); text-decoration: none; color: inherit; display: block; }
.style-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); color: inherit; }
.style-card-preview { height: 130px; background: var(--navy); display: flex; align-items: center; justify-content: center; padding: 20px; }
.style-card-body { padding: 20px; }
.style-card-body h3 { font-size: 1rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.style-card-body p { font-size: 1rem; color: var(--text-muted); line-height: 1.5; }
.style-card-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 1rem; font-weight: 500; color: var(--blue); }

/* GET CALCULATOR CTA */
.get-calculator { padding: 80px 24px; background: var(--navy); text-align: center; }
.get-calculator h2 { font-family: var(--font-serif); font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--white); font-weight: 400; margin-bottom: 16px; }
.get-calculator p { color: rgba(255,255,255,0.65); font-size: 1rem; max-width: 480px; margin: 0 auto 36px; }
.get-calculator .btn-primary { background: var(--blue); font-size: 1rem; padding: 16px 32px; }
.get-calculator .btn-primary:hover { background: var(--white); color: var(--navy); }

/* FOOTER */
.site-footer { background: var(--off-white); border-top: 1px solid var(--border); padding-top: 56px; }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px 40px; display: flex; gap: 64px; flex-wrap: wrap; }
.footer-brand { flex: 1; min-width: 220px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 600; color: var(--navy); text-decoration: none; margin-bottom: 12px; }
.footer-dot { color: var(--blue); }
.footer-tagline { font-size: 0.95rem; color: var(--text-muted); max-width: 260px; line-height: 1.6; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col-title { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 1rem; color: var(--text-muted); text-decoration: none; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--blue); }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 24px; max-width: 1160px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { font-size: 0.8rem; color: var(--gray-mid); }
.footer-bottom a { color: var(--blue); font-weight: 500; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: 12px 16px 20px; gap: 4px; box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .nav-link { padding: 12px 16px; border-radius: 8px; }
  .nav-cta { margin-left: 0; margin-top: 8px; justify-content: center; padding: 14px; }
  .hero { padding: 52px 24px 44px; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 24px;
  top: 24px;
  width: auto;
  height: auto;
  overflow: visible;
  z-index: 9999;
  background: var(--navy);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}

/* Form field hint text */
.form-field-hint { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; margin-top: 4px; }

/* Global paragraph size fix */
p { font-size: 1rem; }
