@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  --primary: #2f5d3a;
  --accent: #6b4423;
  --bg: #f7f2e7;
  --surface: #ebe4d2;
  --text: #1c2a20;
  --muted: #6d7569;

  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  --max-width: 1200px;
  --grid-gap: 1.5rem;
  --header-height: 72px;

  --shadow-glow: 0 0 40px rgba(107, 68, 35, 0.3);
  --shadow-glow-primary: 0 0 40px rgba(47, 93, 58, 0.3);
  --shadow-subtle: 0 2px 8px rgba(28, 42, 32, 0.08);

  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* ========================================
   RESET & BASE
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--accent);
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 600;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-bottom: var(--space-md);
}

h4 {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
  max-width: 72ch;
}

.text-muted {
  color: var(--muted);
}

.text-accent {
  color: var(--accent);
}

.text-primary {
  color: var(--primary);
}

.lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 60ch;
}

/* ========================================
   FOCUS & ACCESSIBILITY
   ======================================== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   LAYOUT UTILITIES
   ======================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.section {
  padding-block: var(--space-3xl);
}

.section-alt {
  background-color: var(--surface);
}

.grid {
  display: grid;
  gap: var(--grid-gap);
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

.grid-4 {
  grid-template-columns: 1fr;
}

/* ========================================
   HEADER
   ======================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.header.scrolled {
  background: rgba(247, 242, 231, 0.95);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--muted);
  box-shadow: 0 1px 4px rgba(28, 42, 32, 0.06);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--primary);
}

.mobile-menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  position: relative;
  z-index: 1001;
}

.mobile-menu-toggle span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--text);
  margin: 0 auto;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.mobile-menu-toggle span + span {
  margin-top: 5px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-menu a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  padding: var(--space-xs) 0;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--primary);
  transition: width var(--transition-base);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-menu a:hover {
  color: var(--primary);
}

/* ========================================
   PHOTO BACKGROUND OVERLAY (CRITICAL)
   ======================================== */
.has-photo-bg {
  position: relative;
  isolation: isolate;
}

.has-photo-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.85));
  z-index: 0;
}

.has-photo-bg > * {
  position: relative;
  z-index: 1;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary,
.btn-secondary,
.cta-button,
.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 0;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-glow-primary);
}

.btn-primary:hover {
  background: #244a2e;
  color: #fff;
  box-shadow: 0 0 60px rgba(47, 93, 58, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: #fff;
}

.cta-button {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.cta-button:hover {
  background: #5a381c;
  color: #fff;
  box-shadow: 0 0 60px rgba(107, 68, 35, 0.45);
  transform: translateY(-1px);
}

.form-submit {
  background: var(--primary);
  color: #fff;
  width: 100%;
  padding: 1rem 2rem;
}

.form-submit:hover {
  background: #244a2e;
  box-shadow: var(--shadow-glow-primary);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
  min-height: 85vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-section .container {
  padding-block: var(--space-4xl);
}

.hero-section h1 {
  color: #fff;
  margin-bottom: var(--space-lg);
  max-width: 18ch;
}

.hero-section .lead {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-xl);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* ========================================
   FEATURES SECTION
   ======================================== */
.features-grid {
  display: grid;
  gap: var(--grid-gap);
  grid-template-columns: 1fr;
}

.feature-card {
  background: var(--surface);
  padding: var(--space-xl);
  border-radius: 0;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.feature-card:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.feature-card-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  margin-bottom: var(--space-lg);
  font-size: 1.25rem;
}

.feature-card h3 {
  font-size: 1.25rem;
}

.feature-card p {
  color: var(--muted);
  margin-bottom: 0;
}

/* ========================================
   SERVICES SECTION
   ======================================== */
.services-grid {
  display: grid;
  gap: var(--grid-gap);
  grid-template-columns: 1fr;
}

.service-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-xl);
  border-left: 3px solid var(--primary);
  background: var(--bg);
}

.service-item h3 {
  font-size: 1.125rem;
  color: var(--primary);
}

.service-item p {
  color: var(--muted);
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-grid {
  display: grid;
  gap: var(--space-2xl);
  grid-template-columns: 1fr;
  align-items: center;
}

.about-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.about-content h2 {
  margin-bottom: var(--space-md);
}

.about-content p {
  color: var(--muted);
}

/* ========================================
   STATS SECTION
   ======================================== */
.stats-section {
  background: var(--primary);
  color: #fff;
  padding-block: var(--space-3xl);
}

.stats-grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: 1fr 1fr;
  text-align: center;
}

.stat-item h3 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  color: #fff;
  margin-bottom: var(--space-xs);
}

.stat-item p {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0;
}

/* ========================================
   TESTIMONIALS SECTION
   ======================================== */
.testimonial-section {
  background-size: cover;
  background-position: center;
}

.testimonial-section h2 {
  color: #fff;
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.testimonials-grid {
  display: grid;
  gap: var(--grid-gap);
  grid-template-columns: 1fr;
}

.testimonial-card {
  background: var(--surface);
  padding: var(--space-xl);
  border-radius: 0;
}

.testimonial-card blockquote {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: var(--space-lg);
}

.testimonial-card blockquote::before {
  content: '\201C';
  font-size: 2.5rem;
  line-height: 0;
  vertical-align: -0.4em;
  color: var(--primary);
  margin-right: 0.15em;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.testimonial-author img {
  width: 3rem;
  height: 3rem;
  border-radius: 0;
  object-fit: cover;
}

.testimonial-author-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.testimonial-author-role {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
  background: var(--primary);
  text-align: center;
  padding-block: var(--space-4xl);
}

.cta-section h2 {
  color: #fff;
  margin-bottom: var(--space-md);
}

.cta-section p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 50ch;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact-grid {
  display: grid;
  gap: var(--space-2xl);
  grid-template-columns: 1fr;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.contact-row-icon {
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 0.2rem;
}

.contact-row-text {
  font-size: 0.95rem;
}

.contact-row-text strong {
  display: block;
  margin-bottom: 0.15rem;
}

.contact-row-text span {
  color: var(--muted);
}

/* ========================================
   FORMS
   ======================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  width: 100%;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--muted);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 93, 58, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-row {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}

/* ========================================
   POLICY PAGES
   ======================================== */
.policy-page {
  padding-block: var(--space-3xl);
}

.policy-page .container {
  max-width: 800px;
}

.policy-page h1 {
  margin-bottom: var(--space-sm);
}

.policy-page .last-updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-2xl);
}

.policy-page h2 {
  font-size: 1.5rem;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--surface);
}

.policy-page h3 {
  font-size: 1.125rem;
  margin-top: var(--space-lg);
}

.policy-page ul,
.policy-page ol {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.policy-page ul {
  list-style: disc;
}

.policy-page ol {
  list-style: decimal;
}

.policy-page li {
  margin-bottom: var(--space-sm);
  color: var(--muted);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.75);
  padding-block: var(--space-3xl) var(--space-xl);
}

.footer-grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: 1fr;
  margin-bottom: var(--space-2xl);
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: var(--space-md);
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 30ch;
}

.footer-col ul li {
  margin-bottom: var(--space-sm);
}

.footer-col ul a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  transition: color var(--transition-base);
}

.footer-col ul a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: flex-start;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
}

.footer-bottom-links a:hover {
  color: #fff;
}

/* ========================================
   COOKIE POPUP
   ======================================== */
.cookie-popup {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  left: var(--space-lg);
  background: var(--text);
  color: rgba(255, 255, 255, 0.9);
  padding: var(--space-lg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 420px;
  border-radius: 0;
}

.cookie-popup p {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.8);
}

.cookie-popup-actions {
  display: flex;
  gap: var(--space-sm);
}

.cookie-popup .btn-primary {
  padding: 0.6rem 1.25rem;
  font-size: 0.8rem;
}

.cookie-popup .btn-secondary {
  padding: 0.6rem 1.25rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.3);
}

.cookie-popup .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.cookie-popup.hidden {
  display: none;
}

/* ========================================
   SECTION HEADERS
   ======================================== */
.section-header {
  margin-bottom: var(--space-2xl);
}

.section-header .eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  display: block;
}

.section-header p {
  color: var(--muted);
  max-width: 55ch;
}

.section-header--center {
  text-align: center;
}

.section-header--center p {
  margin-inline: auto;
}

/* ========================================
   DIVIDER
   ======================================== */
.divider {
  width: 3rem;
  height: 2px;
  background: var(--primary);
  margin-block: var(--space-md);
  border: none;
}

/* ========================================
   RESPONSIVE: TABLET (768px+)
   ======================================== */
@media (min-width: 768px) {
  .section {
    padding-block: var(--space-4xl);
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
  }

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .cookie-popup {
    left: auto;
  }
}

/* ========================================
   RESPONSIVE: DESKTOP (1024px+)
   ======================================== */
@media (min-width: 1024px) {
  :root {
    --grid-gap: 2rem;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* ========================================
   MOBILE NAVIGATION (max-width: 767px)
   ======================================== */
@media (max-width: 767px) {
  .mobile-menu-toggle {
    display: inline-block;
  }

  .nav-menu {
    display: none;
  }

  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 1rem;
    border-top: 1px solid var(--muted);
  }

  .nav-menu.open a {
    padding: var(--space-sm) 0;
    font-size: 1rem;
  }

  .hero-section {
    min-height: 70vh;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
}

/* ========================================
   PREFERS REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  .header,
  .footer,
  .cookie-popup,
  .mobile-menu-toggle {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  .section {
    padding-block: 1rem;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}