@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand identity and mood */
  --color-bg: #FAFAF8;            /* pearl white marble background (LIGHT) */
  --color-bg-alt: #F2EEE1;         /* subtle section alternate background */
  --color-bg-card: #FFFFFF;         /* card background (white) */
  --color-border: #D8D1BF;          /* subtle borders, marble feel */
  --color-shadow: rgba(0,0,0,.25);   /* base shadow color for depth */

  /* Primary gold accent (deep gold starting point) */
  --color-primary: #9A6F00;
  --color-text-on-primary: #FFFFFF;  /* white text on primary buttons (ensure contrast) */
  --color-accent: #1A1A1A;             /* charcoal accent for UI details */

  /* Text system (LIGHT THEME -> dark text) */
  --color-text: #1A1A1A;              /* body text (dark for readability on LIGHT BG) */
  --color-text-muted: #6B5B35;        /* muted text, darker on LIGHT bg */

  /* Typography scale (CSS variables) */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-md: 1.125rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.75rem;
  --font-size-hero: 3.5rem;

  --line-height-tight: 1.2;
  --line-height-base: 1.6;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
  --font-family-body: 'Barlow Condensed', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-family-heading: "Merriweather", Georgia, 'Times New Roman', serif;

  /* UI rounding and elevation */
  --radius: 12px;
  --shadow-elev: 0 4px 6px rgba(0,0,0,.15), 0 10px 15px rgba(0,0,0,.15);

  /* Layout / density */
  --container-max: 1260px;
  --section-padding-mobile: 2rem;
  --section-padding-desktop: 2rem 0;
}

/* 1) Reset / base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color .2s ease;
}
a:hover { text-decoration: underline; }

/* 2) Typography (headings use serif-leaning, body uses brand sans) */
h1, h2, h3, h4 {
  color: var(--color-text);
  line-height: var(--line-height-tight);
  margin: 0 0 .5rem;
}
h1 { font-family: var(--font-family-heading); font-size: var(--font-size-3xl); font-weight: 800; }
h2 { font-family: var(--font-family-heading); font-size: var(--font-size-2xl); font-weight: 700; }
h3 { font-family: var(--font-family-heading); font-size: var(--font-size-xl); font-weight: 600; }
h4 { font-family: var(--font-family-heading); font-size: var(--font-size-lg); font-weight: 600; }
p { margin: 0 0 1rem; color: var(--color-text); }
ul, ol { margin: 0 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }

/* 3) Layout base utilities */
.container {
  width: 100%;
  margin: 0 auto;            /* mandatory centering at all breakpoints */
  padding: 0 1rem;
  max-width: var(--container-max);
  box-sizing: border-box;
}
.section {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 2rem 0; /* default mobile density; overridden in hero if needed */
}
.section-title {
  font-size: var(--font-size-2xl);
  margin: 0 0 0.75rem;
  font-family: var(--font-family-heading);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-card);
  box-shadow: var(--shadow-elev);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,.25), 0 14px 24px rgba(0,0,0,.15);
}
.card > img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
.card-body, .card > :not(img) {
  padding: 1rem 1.25rem; /* mandatory breathing room for text content */
}
.card h3, .card h4 { margin-top: 0; margin-bottom: 0.5rem; }
.card p { margin: 0; line-height: var(--line-height-base); color: var(--color-text-muted); }

/* FAQ accordion (details/summary) */
.faq-section { padding: 2rem 0; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--color-bg-card);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.faq-item[open] {
  border-color: var(--color-primary);
  box-shadow: 0 2px 12px var(--color-shadow);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-md);
  list-style: none;
  user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform .2s ease;
}
.faq-item[open] > .faq-question::after { content: "−"; }
.faq-answer {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--color-border);
}
.faq-answer p { margin: 0.75rem 0 0; color: var(--color-text-muted); }

/* Hamburger nav (mobile) - exact structure rules from prompt */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-bg);
  min-height: 64px; /* as required, not a fixed height */
  overflow: visible;
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem; /* mobile density */
  margin: 0 auto;
}
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  max-height: 52px;
  text-decoration: none;
}
.site-logo img {
  height: 44px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
}
.nav-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.nav-toggle-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
  padding: 0.4rem 0.6rem;
  z-index: 200;
  border-radius: 6px;
  background: rgba(0,0,0,0.45);
  border: 1.5px solid rgba(255,255,255,0.7);
}
.nav-toggle-label span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #ffffff; /* mandatory white bars for hamburger */
  border-radius: 2px;
  transition: 0.2s ease;
}
.site-nav {
  display: none; /* mobile collapsed by default */
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 500;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.nav-toggle-input:checked ~ .site-nav {
  display: block;
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
}
.nav-item { }
.nav-link {
  display: block;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
  transition: color .2s ease, background .2s ease;
}
.nav-link:hover { background: rgba(0,0,0,.04); text-decoration: underline; }

/* Dropdown in nav (mobile & desktop) */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; user-select: none; white-space: nowrap; padding: 0.75rem 1rem; display: block; color: var(--color-text); text-decoration: none; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  z-index: 9999;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  white-space: nowrap;
}
.nav-dropdown:hover > .nav-dropdown-menu,
.nav-dropdown:focus-within > .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu .nav-link {
  display: block;
  padding: 0.5rem 1.25rem;
  width: 100%;
  border-bottom: none;
}
.nav-dropdown-menu .nav-link:hover {
  background: var(--color-bg-alt);
}

/* Mobile-specific dropdown indentation for nested menu under toggle */
@media (max-width: 767px) {
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
  }
  .nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }
}

/* 4) Responsive behaviors as requested (mobile-first base) */
html, body {
  overflow-x: hidden;
}
@media (min-width: 768px) {
  /* Tablet: header layout – logo left, nav right; hamburger hidden; nav visible */
  .container {
    max-width: var(--container-max);
    margin: 0 auto;
  }
  .site-header .container {
    justify-content: space-between;
  }
  .nav-toggle-label {
    display: none !important; /* hide hamburger on tablet+ */
  }
  .site-nav {
    display: flex !important;
    position: static;
    background: transparent;
    border-top: none;
    box-shadow: none;
  }
  .nav-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
    justify-content: flex-end;
  }
  /* NAV LAYOUT (logo-left nav-right) adjustments */
  .site-nav { margin-left: auto; justify-content: flex-end; }
  .nav-link { font-size: var(--font-size-sm); padding: 0.4rem 0.75rem; }
}

@media (min-width: 1024px) {
  /* Desktop refinements */
  .container {
    max-width: 1260px;
    padding: 0 2rem;
  }
  .hero { min-height: 70vh; }
  .hero h1 { font-size: var(--font-size-hero); }
  .section { padding: 4rem 0; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .site-footer .footer-inner { flex-direction: row; justify-content: space-between; }
  .nav-link { font-size: var(--font-size-sm); }
}

@media (min-width: 1280px) {
  /* Extra-wide polish */
  .container { padding: 0 2.5rem; }
  .hero h1 { letter-spacing: .5px; }
}

/* 5) Hero layout and utility for hero content (EXACTLY as required) */
.hero {
  background: linear-gradient(135deg, #FAFAF8 0%, #F1E6D5 50%, #FAFAF8 100%);
  color: var(--color-text);
  display: block;
  width: 100%;
  position: relative;
}
.hero-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 4rem 0;
  width: 100%;
}
.hero-text { flex: 1 1 55%; }
.hero-media { flex: 1 1 40%; }

/* hero image badge shape rules */
.hero-img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  max-height: 460px;
  display: block;
}
@media (max-width: 767px) {
  .hero-inner { flex-direction: column; }
  .hero-media { width: 100%; }
}
@media (min-width: 768px) {
  /* ensure hero content scales well on tablet/desktop */
  .hero-text h1 { margin: 0 0 .5rem; font-size: var(--font-size-2xl); }
  .hero-text p { margin: 0 0 1rem; }
}
.hero p { color: var(--color-text); }

/* 6) Forms (inputs, selects, labels, buttons) */
input, textarea, select {
  font-family: inherit;
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  outline: none;
}
label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: var(--font-size-xs);
  color: var(--color-text);
}
button[type="submit"] {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  padding: 0.75rem 1rem;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  transition: filter .2s ease, transform .2s ease;
}
button[type="submit"]:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text);
  font-family: var(--font-family-body);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-align: center;
  transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }

/* 7) Buttons (primary/secondary) - ensure color-on-primary adherence via variables */
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary); /* white by design for contrast on gold */
  border: 1px solid rgba(0,0,0,.04);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-group { display: inline-flex; gap: .5rem; }

/* 8) Tables (basic) */
table { width: 100%; border-collapse: collapse; }
thead th { text-align: left; font-weight: var(--font-weight-bold); padding: .5rem; border-bottom: 1px solid var(--color-border); }
tbody td { padding: .5rem; border-bottom: 1px solid var(--color-border); }

/* 9) Utility classes */
.text-center { text-align: center; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.hidden { display: none !important; }

/* 10) Footer */
.site-footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.footer-inner > div { flex: 1 1 auto; }

/* FINAL: structural default colors for accessibility checks (ensure contrast on LIGHT BG) */
.hero, .section, .site-footer, .site-header { color: var(--color-text); }
.hero .card, .hero .card-body { color: var(--color-text); }

/* Ensure the hero text inherits color on light backgrounds (no forced light text in hero) */
.hero { color: var(--color-text); }

/* Ensure even nested light panels inside hero override to dark text if needed */
.hero .card, .hero .card h3, .hero .card p,
.hero-text-card { color: var(--color-text); }