/* ============================================================
   THE MARGIN — Design System
   Brand guide: DM Serif Display + DM Sans
   Palette: Ink / Slate / Steel / Ember / Sand / Cream / Mist
   Ratio: 60% Cream/Sand — 30% Ink/Slate — 10% Ember
   ============================================================ */

/* --- Tokens --- */
:root {
  --ink:    #1A1A2E;
  --slate:  #2D3142;
  --steel:  #4F5D75;
  --ember:  #D4553A;
  --sand:   #F0EBE3;
  --cream:  #FAF8F5;
  --mist:   #E8E4DE;
  --sage:   #7B8F7B;
  --white:  #FFFFFF;

  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-w:  1080px;
  --gutter: clamp(20px, 4vw, 40px);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }

/* --- Base --- */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--slate);
  background: var(--cream);
}
a { color: inherit; text-decoration: none; }
strong { font-weight: 600; color: var(--ink); }

/* --- Container --- */
.container {
  width: min(calc(100% - var(--gutter) * 2), var(--max-w));
  margin-inline: auto;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(36px, 5.5vw, 56px);
  line-height: 1.1;
  margin-bottom: 24px;
}
h2 {
  font-size: clamp(26px, 3.5vw, 38px);
  line-height: 1.15;
  margin-bottom: 20px;
}
h3 {
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 10px;
}
p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }
.lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--steel);
  max-width: 640px;
}
.muted { color: var(--steel); }
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 16px;
}

/* --- Header --- */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--mist);
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.wordmark span { color: var(--ember); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--steel);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--ember);
  color: var(--white);
  border-color: var(--ember);
}
.btn-primary:hover {
  background: #bf4a32;
  border-color: #bf4a32;
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--mist);
}
.btn-secondary:hover {
  border-color: var(--ink);
}

/* --- Sections --- */
.section {
  padding: 80px 0;
}
.section + .section {
  border-top: 1px solid var(--mist);
}
.section-alt {
  background: var(--sand);
}

/* --- Hero --- */
.hero {
  padding: 72px 0 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

/* --- Panels / Cards --- */
.card {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: 12px;
  padding: 32px;
}
.card-accent {
  border-top: 3px solid var(--ember);
}

/* --- Offer Box (sticky sidebar) --- */
.offer-box {
  position: sticky;
  top: 88px;
}
.offer-box .price {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--ink);
  margin-bottom: 4px;
}
.offer-box .price-context {
  font-size: 14px;
  color: var(--steel);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* --- Grids --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* --- Steps --- */
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 16px;
  margin-bottom: 14px;
}

/* --- Dividers --- */
.ember-line {
  width: 48px;
  height: 3px;
  background: var(--ember);
  border: none;
  margin: 0 0 24px;
}

/* --- Lists --- */
ul.check-list {
  list-style: none;
  padding: 0;
}
ul.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  line-height: 1.5;
}
ul.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--ember);
}
ul.not-list li::before {
  border-color: var(--mist);
}

/* --- FAQ --- */
.faq-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--mist);
}
.faq-item:first-child { padding-top: 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--ink);
  margin-bottom: 10px;
}
.faq-a {
  color: var(--steel);
  max-width: 680px;
}

/* --- Apply CTA Section --- */
.apply-section {
  text-align: center;
  padding: 80px 0;
  background: var(--ink);
  color: var(--cream);
}
.apply-section h2 {
  color: var(--cream);
}
.apply-section .muted {
  color: var(--steel);
  /* lighter steel on dark bg */
  color: #9ca3b0;
}
.apply-section .btn-primary {
  background: var(--ember);
  color: var(--white);
}

/* --- Footer --- */
.footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--mist);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-brand {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
}
.footer-brand span { color: var(--ember); }
.footer-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--steel);
}
.footer-links a:hover { color: var(--ink); }

/* --- Utilities --- */
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-0  { margin-bottom: 0; }
.text-center { text-align: center; }
.max-w-prose { max-width: 640px; }

/* --- Responsive --- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .grid-2    { grid-template-columns: 1fr; }
  .grid-3    { grid-template-columns: 1fr; }
  .grid-6    { grid-template-columns: repeat(2, 1fr); }
  .offer-box { position: static; }
  .nav-links { display: none; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  h1 { font-size: 32px; }
}
@media (max-width: 480px) {
  .grid-6 { grid-template-columns: 1fr; }
}
