/* ============================================================
   benpageins.com v3 — Global Styles
   Design Canon authority: Section 2 of
   https://www.notion.so/340498ae9e4f81f088abfc14ef9cde61

   Locks (Step 5b reconciliation 2026-04-16):
   - Outer container 1100px, text blocks 780px (.container.text)
   - Dark sections capped at 2 per page (hero + footer only)
   - Rust accent #9A4428 (working default; Ben picks final via /color-test.html)
   - Rust as small contained background blocks ALLOWED.
     Rust as full-width section background NOT ALLOWED.
   - One rust-colored element per viewport (don't stack)
   - Playfair Display + Inter, mobile-first
   ============================================================ */

/* --- Variables --- */
:root {
  --dark: #1c1917;
  --cream: #faf9f7;
  --rust: #8F3F24;             /* Locked 2026-05-14 (Decision A — swatch C, original Design Canon). Was #9A4428 working default, originally #B5503A. */
  --rust-soft: #b1604a;        /* lighter rust for hover/border on dark */
  --text-dark: #1c1917;
  --text-dark-muted: #57534e;
  --text-cream: #d4d0ca;
  --text-light: #faf9f7;
  --text-light-faint: #a8a29e;
  --max-w: 1100px;             /* outer container — was 720px */
  --max-w-text: 780px;         /* prose / Q&A / Ben's Take cap */
  --section-pad: 80px;
  --section-pad-mobile: 48px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-dark);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* --- Layout --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.container.text { max-width: var(--max-w-text); margin-left: auto; margin-right: auto; }
.section { padding: var(--section-pad) 0; }
@media (max-width: 768px) { .section { padding: var(--section-pad-mobile) 0; } }

/* Prose-by-default: naked text children of any .container cap at 780px.
   Cards, grids, and infographics keep full container width. (Step 5b Fix 10) */
.section > .container > h2,
.section > .container > h3,
.section > .container > p,
.section > .container > ul,
.section > .container > ol {
  max-width: var(--max-w-text);
}
.section > .container > .card-grid,
.section > .container > .infographic-placeholder,
.section > .container > .cta-alt-row {
  max-width: 100%;
}

/* --- Nav --- */
.nav {
  background: var(--dark);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav-logo { display: flex; align-items: baseline; gap: 0.4rem; }
.nav-logo-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;       /* "Page Insurance" regular weight */
  color: var(--text-light);
}
.nav-logo-sep { color: var(--text-light-faint); font-size: 0.9rem; }
.nav-logo-sub {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;       /* "Ben Page" bold (Fix 2 / Section 2.5) */
  color: var(--text-light);
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-cream);
}
.nav-links a:hover { color: var(--text-light); }
.nav-phone {
  font-size: 0.85rem;
  color: var(--rust);
  font-weight: 600;
  white-space: nowrap;
}
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-light);
}
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--dark); padding: 1rem 1.5rem; gap: 1rem; }
  .nav-links.active { display: flex; }
  .hamburger { display: flex; }
}

/* --- Hero (dark — one of two allowed dark sections) --- */
.hero {
  background: var(--dark);
  color: var(--text-light);
  padding: 100px 0 80px;
  text-align: left;
}
.hero .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}
.hero-content { flex: 1; min-width: 280px; max-width: var(--max-w-text); }
.hero-photo-right {
  width: 240px;
  height: 240px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .hero .container { flex-direction: column; }
  .hero-photo-right { width: 160px; height: 160px; margin: 0 auto; }
}
.hero h1 { margin-bottom: 1.25rem; }
.hero-sub { font-size: 1.15rem; color: var(--text-cream); margin-bottom: 2rem; max-width: 560px; }

/* Hero with background image */
.hero-bg {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 480px;
  display: flex;
  align-items: center;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, 0.82);
}
.hero-bg .container { position: relative; z-index: 1; }
.hero-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.15);
  margin: 0 auto 2rem;
}

/* --- Cream body sections --- */
.cream { background: var(--cream); }

/* --- Not the right fit pull-quote (position 2 on every page) --- */
.not-right-fit {
  border-left: 3px solid var(--rust);
  padding: 1rem 0 1rem 1.5rem;
  font-size: 1.15rem;
  color: var(--text-dark);
  font-style: italic;
  margin: 0 auto;
  max-width: var(--max-w-text);
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}
.card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.card-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--rust);
  font-weight: 600;
  font-size: 0.9rem;
}

/* --- Ben's Take callout --- */
.bens-take {
  border-left: 3px solid var(--rust);
  padding: 1.5rem 0 1.5rem 1.5rem;
  margin: 2rem auto;
  max-width: var(--max-w-text);
}
.bens-take-label {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rust);
  margin-bottom: 0.75rem;
}

/* --- Testimonial --- */
.testimonial {
  padding: var(--section-pad) 0;
}
.testimonial .container {
  max-width: var(--max-w-text);
}
.testimonial blockquote {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  line-height: 1.5;
  font-style: italic;
  margin-bottom: 1rem;
}
.testimonial cite {
  display: block;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--text-dark-muted);
}

/* --- Q&A Section --- */
.qa-section { padding: var(--section-pad) 0; }
.qa-section .container { max-width: var(--max-w-text); }
.qa-item { border-bottom: 1px solid #e7e5e4; padding: 1.5rem 0; }
.qa-item:last-child { border-bottom: none; }
.qa-q {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.qa-a { color: var(--text-dark-muted); font-size: 0.95rem; }

/* --- Infographic placeholder (full 1100px width) --- */
.infographic-placeholder {
  background: #f5f5f4;
  border: 2px dashed #d6d3d1;
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-dark-muted);
  font-size: 0.9rem;
  margin: 2rem 0;
}

/* --- Float photo --- */
.float-photo {
  float: right;
  margin: 0 0 1.5rem 2rem;
  max-width: 220px;
}
.float-photo img { border-radius: 8px; }
.float-caption {
  font-size: 0.75rem;
  color: var(--text-dark-muted);
  margin-top: 0.5rem;
  text-align: center;
}
@media (max-width: 600px) {
  .float-photo { float: none; margin: 0 auto 1.5rem; }
}

/* --- Button --- */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s;
  text-align: center;
}
.btn:hover { opacity: 0.88; }
.btn-primary { background: var(--rust); color: white; }
.btn-outline { border: 2px solid var(--text-cream); color: var(--text-cream); }
.btn-on-rust { background: var(--text-light); color: var(--dark); }

/* ============================================================
   Mid-page CTA — three alternatives (Step 5b Fix 12)
   Cream-background, not full-width-dark. Ben picks one in Step 6,
   then the chosen treatment ships across all pages.
   ============================================================ */

/* CTA section wrapper (cream background, ~80px padding) */
.cta-options { padding: var(--section-pad) 0; }
.cta-options .label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dark-muted);
  margin-bottom: 0.75rem;
}
.cta-options h2 {
  font-size: 1.4rem;
  margin-bottom: 2rem;
}

/* Layout: alternative + QR code side-by-side on desktop */
.cta-alt-row {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}
.cta-alt-row:last-child { margin-bottom: 0; }
.cta-alt-row .cta-alt { flex: 1; min-width: 0; }
.cta-alt-row .qr-code {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  background: white;
  padding: 10px;
  border: 1px solid #e7e5e4;
  border-radius: 8px;
}
.cta-alt-row .qr-caption {
  font-size: 0.72rem;
  color: var(--text-dark-muted);
  text-align: center;
  margin-top: 0.4rem;
  max-width: 140px;
}
.cta-alt-row .qr-wrap { display: flex; flex-direction: column; align-items: center; }

/* Hide QR on tablet/mobile (Fix 13: desktop only >1024px) */
@media (max-width: 1024px) {
  .cta-alt-row { flex-direction: column; align-items: stretch; gap: 1rem; }
  .cta-alt-row .qr-wrap { display: none; }
}

/* Alternative A: Pull-quote phone, rust left border, cream bg */
.cta-alt-a {
  border-left: 4px solid var(--rust);
  padding: 1.5rem 0 1.5rem 1.75rem;
}
.cta-alt-a .phone {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-dark);
  display: block;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}
.cta-alt-a .phone a { color: inherit; }
.cta-alt-a .sub { color: var(--text-dark-muted); font-size: 0.95rem; font-style: italic; }

/* Alternative B: Contained rust-background accent card.
   Per Fix 14 / Section 2.9: rust IS allowed as a small contained
   background block (not full-width). */
.cta-alt-b {
  background: var(--rust);
  color: var(--text-light);
  border-radius: 10px;
  padding: 1.75rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.cta-alt-b .phone {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  display: block;
}
.cta-alt-b .phone a { color: var(--text-light); }
.cta-alt-b .sub { color: var(--text-cream); font-size: 0.9rem; display: block; margin-top: 0.25rem; }
.cta-alt-b .copy { flex: 1; min-width: 220px; }

/* Alternative C: White card on cream, rust button */
.cta-alt-c {
  background: white;
  border-radius: 10px;
  padding: 1.75rem 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.cta-alt-c .phone {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  display: block;
  line-height: 1.1;
}
.cta-alt-c .phone a { color: inherit; }
.cta-alt-c .sub { color: var(--text-dark-muted); font-size: 0.9rem; display: block; margin-top: 0.25rem; }
.cta-alt-c .copy { flex: 1; min-width: 220px; }

/* --- Footer (dark — second allowed dark section) --- */
.footer {
  background: var(--dark);
  color: var(--text-cream);
  padding: 3rem 0 2rem;
  text-align: center;
}
.footer-phone {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  color: var(--rust);
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.footer-phone a { color: var(--rust); }
.footer-cta-text { color: var(--text-cream); font-size: 0.9rem; margin-bottom: 2rem; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}
.footer-nav a:hover { color: var(--text-light); }
.footer-legal { font-size: 0.72rem; color: var(--text-light-faint); }
.footer-legal a { color: var(--text-light-faint); opacity: 0.6; }
.footer-legal a:hover { opacity: 1; }

/* --- Utility --- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
