/* base.css — handcrafted framework. Copied verbatim into every site.
   Theme overrides live in theme.css (loaded AFTER this file).
   Class catalog is documented in sitegen.py SYS prompt. */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body, system-ui, -apple-system, "Segoe UI", sans-serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text, #1a1a1a);
  background: var(--bg, #fff);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
img { object-fit: cover; }
a { color: var(--accent, #c45a2f); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display, var(--font-body, sans-serif));
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading, var(--text, #1a1a1a));
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: .6em; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: .6em; letter-spacing: -.01em; }
h3 { font-size: 1.25rem; margin-bottom: .5em; }
h4 { font-size: 1.05rem; margin-bottom: .4em; }
p  { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 700; }
em { font-style: italic; }

/* ---------- layout primitives ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--surface, #f7f4ee); }
.section-dark { background: #0f0f12; color: #f5f3ee; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #ffffff; }
.section-dark .tag-line { color: var(--accent, #c45a2f); }
.section-dark .stat-num { color: var(--accent, #c45a2f); }
.section-dark .stat-label { color: #c9c4ba; }

.grid { display: grid; gap: 32px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-split { grid-template-columns: 1fr 1fr; align-items: center; }
.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2rem; }
.center-text { text-align: center; }
.muted { color: var(--muted, #6b6b6b); }
.tag-line { text-transform: uppercase; letter-spacing: .15em; font-size: .8rem; color: var(--accent, #c45a2f); font-weight: 600; margin-bottom: 1rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg, var(--bg, #fff));
  border-bottom: 1px solid var(--border, #e6e1d7);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 18px 24px;
}
.nav-brand {
  font-family: var(--font-display, var(--font-body, sans-serif));
  font-weight: 800; font-size: 1.2rem;
  color: var(--nav-text, var(--heading, var(--text, #1a1a1a)));
  letter-spacing: -.01em;
}
.nav-brand:hover { text-decoration: none; color: var(--accent, #c45a2f); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--nav-text, var(--text, #1a1a1a));
  font-size: .95rem; font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .15s, color .15s;
}
.nav-links a:hover { text-decoration: none; border-bottom-color: var(--accent, #c45a2f); color: var(--accent, #c45a2f); }
.nav-links a.active { border-bottom-color: var(--accent, #c45a2f); color: var(--accent, #c45a2f); }
.nav-burger {
  display: none;
  width: 40px; height: 40px;
  font-size: 1.4rem;
  align-items: center; justify-content: center;
  border-radius: 6px;
}
.nav-burger:hover { background: var(--surface, #f7f4ee); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 540px;
  display: flex; align-items: center;
  padding: 80px 0;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.30) 0%, rgba(0,0,0,.55) 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  color: #fff;
}
.hero-inner h1, .hero-inner h2 { color: #fff; }
.hero-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  font-size: .8rem; letter-spacing: .2em;
  font-weight: 600;
  padding: 6px 14px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  margin-bottom: 1.2rem;
}
.hero-title { max-width: 760px; margin-bottom: 1.2rem; }
.hero-lede { font-size: 1.15rem; max-width: 620px; opacity: .92; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Light hero (no image, used on inner pages) */
.hero-light {
  background: var(--surface, #f7f4ee);
  padding: 72px 0 56px;
}
.hero-light .hero-inner { color: var(--text, #1a1a1a); }
.hero-light .hero-inner h1, .hero-light .hero-inner h2 { color: var(--heading, var(--text, #1a1a1a)); }
.hero-light .hero-eyebrow {
  background: rgba(0,0,0,.06);
  border-color: rgba(0,0,0,.12);
  color: var(--accent, #c45a2f);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600; font-size: .95rem;
  text-decoration: none;
  transition: transform .12s, box-shadow .15s, background .15s;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--accent, #c45a2f);
  color: #fff;
  box-shadow: 0 2px 0 rgba(0,0,0,.15);
}
.btn-primary:hover { background: var(--accent-hover, #a4471f); color: #fff; }
.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.6);
}
.btn-secondary:hover { background: rgba(255,255,255,.15); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--text, #1a1a1a);
  border-color: var(--border, #e6e1d7);
}
.btn-ghost:hover { background: var(--surface, #f7f4ee); }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* ---------- cards ---------- */
.card {
  background: var(--bg, #fff);
  border: 1px solid var(--border, #e6e1d7);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.15);
  border-color: var(--accent, #c45a2f);
}
.card-img { aspect-ratio: 16/10; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin-bottom: .5em; }
.card-meta { margin-top: auto; padding-top: 16px; font-size: .85rem; color: var(--muted, #6b6b6b); }

/* card variants */
.card-flat {
  background: var(--surface, #f7f4ee);
  border-color: transparent;
}
.card-feature .card-body { padding: 32px; }
.card-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft, rgba(196,90,47,.12));
  color: var(--accent, #c45a2f);
  margin-bottom: 16px;
}
.card-icon svg { width: 24px; height: 24px; }

/* ---------- gallery ---------- */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); }
.gallery-item {
  aspect-ratio: 1; overflow: hidden; border-radius: 8px;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.gallery-item:hover img { transform: scale(1.06); }

/* ---------- about/two-col blocks ---------- */
.split {
  display: grid; gap: 56px;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.split-img { border-radius: 12px; overflow: hidden; aspect-ratio: 4/3; }
.split-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.stat-num {
  font-family: var(--font-display, var(--font-body, sans-serif));
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--accent, #c45a2f);
  display: block;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted, #6b6b6b);
}

/* ---------- testimonial ---------- */
.testimonial {
  max-width: 760px; margin: 0 auto;
  text-align: center;
}
.testimonial-quote {
  font-family: var(--font-display, var(--font-body, sans-serif));
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--heading, var(--text, #1a1a1a));
  margin-bottom: 24px;
}
.testimonial-quote::before, .testimonial-quote::after { content: "\201C"; }
.testimonial-author { font-size: .95rem; color: var(--muted, #6b6b6b); }
.testimonial-author strong { color: var(--text, #1a1a1a); }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: .85rem; font-weight: 600; color: var(--text, #1a1a1a); }
.form-field input, .form-field textarea, .form-field select {
  padding: 12px 14px;
  border: 1px solid var(--border, #e6e1d7);
  border-radius: 8px;
  background: var(--bg, #fff);
  font-size: .95rem;
  transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none;
  border-color: var(--accent, #c45a2f);
  box-shadow: 0 0 0 3px var(--accent-soft, rgba(196,90,47,.18));
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field.error input, .form-field.error textarea { border-color: #d94343; }
.form-field-help { font-size: .8rem; color: var(--muted, #6b6b6b); }

/* contact info card */
.contact-info { display: grid; gap: 18px; }
.contact-info-row { display: flex; align-items: flex-start; gap: 14px; }
.contact-info-row svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--accent, #c45a2f); margin-top: 2px; }
.contact-info-row .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted, #6b6b6b); display: block; margin-bottom: 2px; }
.contact-info-row .value { font-size: 1rem; color: var(--text, #1a1a1a); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--border, #e6e1d7);
  border-radius: 10px;
  background: var(--bg, #fff);
  overflow: hidden;
}
.faq-item summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem; font-weight: 400;
  color: var(--accent, #c45a2f);
  transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 22px 18px; color: var(--muted, #6b6b6b); }

/* ---------- footer ---------- */
.footer {
  background: #0f0f12;
  color: #c9c4ba;
  padding: 64px 0 24px;
}
.footer p { color: #c9c4ba; }
.footer a { color: #fff; }
.footer-grid {
  display: grid; gap: 40px;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  margin-bottom: 48px;
}
.footer h4 {
  color: #fff;
  font-size: .85rem; text-transform: uppercase; letter-spacing: .14em;
  margin-bottom: 18px;
}
.footer-brand { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer ul { display: flex; flex-direction: column; gap: 10px; font-size: .95rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-size: .85rem; color: #8c887e;
}
.footer-bottom a { color: #c9c4ba; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  transition: background .15s;
}
.footer-social a:hover { background: rgba(255,255,255,.18); text-decoration: none; }
.footer-social svg { width: 18px; height: 18px; }

/* ---------- legal pages ---------- */
.legal-prose {
  max-width: 800px;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text, #1a1a1a);
}
.legal-prose h2 { margin-top: 2.5em; margin-bottom: .8em; font-size: 1.5rem; }
.legal-prose h3 { margin-top: 1.8em; margin-bottom: .6em; font-size: 1.15rem; }
.legal-prose p, .legal-prose ul, .legal-prose ol { margin-bottom: 1.2em; }
.legal-prose ul, .legal-prose ol { padding-left: 1.4em; }
.legal-prose ul { list-style: disc; }
.legal-prose ol { list-style: decimal; }
.legal-prose li { margin-bottom: .5em; }
.legal-prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .92rem; }
.legal-prose th, .legal-prose td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--border, #e6e1d7);
}
.legal-prose th { background: var(--surface, #f7f4ee); font-weight: 600; }

/* ---------- utility ---------- */
.divider { height: 1px; background: var(--border, #e6e1d7); margin: 48px 0; border: 0; }
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft, rgba(196,90,47,.12));
  color: var(--accent, #c45a2f);
  font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
}
.skip-link {
  position: absolute; left: -9999px; top: -9999px;
}
.skip-link:focus { left: 12px; top: 12px; padding: 8px 14px; background: #000; color: #fff; z-index: 999; border-radius: 4px; }

/* ---------- reveal animation (driven by base.js) ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .hero { min-height: 440px; padding: 56px 0; }
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--nav-bg, var(--bg, #fff));
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border, #e6e1d7);
  }
  .nav-links.open a { border-bottom: none; padding: 4px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 20px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 10px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
