/* ==========================================================================
   Horsewood — base.css
   Shared design tokens, reset, and base typography
   ========================================================================== */

:root {
  /* Colors */
  --bg-dark: #120A08;
  --bg-espresso: #3A2419;
  --accent-amber: #E67A2E;
  --accent-amber-deep: #C4611E;
  --bg-white: #FFFFFF;
  --bg-ivory: #FAF7F4;
  --text-dark: #2A1D16;
  --text-muted: #6B5347;
  --text-white: #FFFFFF;
  --border-color: #E4D9CE;

  /* Radius */
  --radius: 18px;
  --radius-sm: 10px;

  /* Shadow */
  --shadow-card: 0 4px 16px rgba(18, 10, 8, .18);
  --shadow-featured: 0 5px 20px rgba(18, 10, 8, .30);

  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Layout */
  --max-width: 1200px;
  --section-pad: clamp(56px, 8vw, 96px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--text-dark);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 .6em;
  color: var(--text-dark);
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }

p { margin: 0 0 1.2em; }
p.lead { font-size: 20px; }

a { color: var(--accent-amber-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { padding-left: 1.4em; }
li { margin-bottom: .5em; }

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

.section { padding: var(--section-pad) 0; }
.section-ivory { background: var(--bg-ivory); }
.section-dark {
  background-color: var(--bg-dark);
  background-image: radial-gradient(at center center, var(--bg-espresso) 0%, var(--bg-dark) 100%);
  color: var(--text-white);
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark p { color: var(--text-white); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-amber-deep);
  margin-bottom: .75em;
}
.section-dark .eyebrow { color: var(--accent-amber); }

.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--text-muted); font-size: 20px; }
.section-dark .section-head p { color: #E9DCD2; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 18px;
  padding: 18px 34px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  min-height: 44px;
  transition: background-color .2s ease, transform .15s ease, border-color .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: var(--accent-amber);
  color: var(--bg-dark);
}
.btn-primary:hover { background: var(--accent-amber-deep); color: var(--bg-white); }
.btn-secondary {
  background: transparent;
  border-color: var(--accent-amber);
  color: var(--text-white);
}
.btn-secondary:hover { background: rgba(230,122,46,.12); }
.btn-block { width: 100%; }
.btn-lg { padding: 20px 40px; font-size: 20px; }

/* Focus states */
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent-amber);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--accent-amber);
  color: var(--bg-dark);
  padding: 14px 20px;
  z-index: 1000;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; top: 0; }

/* Trust badges */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
  align-items: center;
}
.badge-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
}
.badge-item svg { flex-shrink: 0; color: var(--accent-amber); }

/* Cards */
.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 32px;
  border: 1px solid var(--border-color);
}

/* Utility */
.text-center { text-align: center; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Ticker */
.ticker {
  background: var(--bg-dark);
  color: var(--text-white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  padding: 10px 16px;
  letter-spacing: .02em;
}
.ticker span { color: var(--accent-amber); }

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  transition: box-shadow .2s ease;
}
.site-header.scrolled { box-shadow: 0 4px 18px rgba(18,10,8,.12); }
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 20px;
}
.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 22px;
  color: var(--text-dark);
  white-space: nowrap;
}
.logo span { color: var(--accent-amber-deep); }
.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav-links a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
}
.nav-cta { flex-shrink: 0; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg { width: 28px; height: 28px; color: var(--text-dark); }

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 20px 24px 28px;
    border-bottom: 1px solid var(--border-color);
    gap: 18px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .nav-cta.desktop-only { display: none; }
}

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: #D8CBC0;
  padding: 64px 0 32px;
}
.site-footer h4 { color: var(--text-white); font-size: 17px; margin-bottom: 1em; }
.site-footer a { color: #D8CBC0; }
.site-footer a:hover { color: var(--accent-amber); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .7em; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 28px;
  font-size: 14px;
  line-height: 1.7;
  color: #B3A398;
}
.footer-legal p { margin-bottom: 1em; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  font-size: 14px;
  color: #8C7C70;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* Mobile sticky CTA */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 600;
  background: var(--bg-dark);
  padding: 12px 16px;
  box-shadow: 0 -4px 16px rgba(0,0,0,.25);
}
@media (max-width: 760px) {
  .mobile-sticky-cta { display: block; }
  body { padding-bottom: 76px; }
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 90px;
  z-index: 550;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent-amber);
  color: var(--bg-dark);
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}
.back-to-top.visible { display: flex; }
@media (max-width: 760px) { .back-to-top { bottom: 96px; } }

/* Exit popup */
.exit-popup-overlay {
  position: fixed; inset: 0;
  background: rgba(18,10,8,.7);
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.exit-popup-overlay.visible { display: flex; }
.exit-popup {
  background: var(--bg-dark);
  background-image: radial-gradient(at center center, var(--bg-espresso) 0%, var(--bg-dark) 100%);
  color: var(--text-white);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  padding: 40px;
  text-align: center;
  position: relative;
}
.exit-popup h3 { color: var(--text-white); font-size: 1.7rem; }
.exit-popup-close {
  position: absolute;
  top: 14px; right: 14px;
  background: none; border: none;
  color: var(--text-white);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 8px;
}
.exit-timer {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--accent-amber);
  margin: 16px 0;
}

/* FAQ accordion */
.faq-item {
  border-bottom: 1px solid var(--border-color);
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 22px 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 19px;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-question .icon { flex-shrink: 0; transition: transform .2s ease; color: var(--accent-amber-deep); }
.faq-question[aria-expanded="true"] .icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.faq-answer-inner { padding-bottom: 22px; color: var(--text-muted); }

/* Utility grid helpers */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
}
