@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

/* ==========================================================================
   1. CSS Custom Properties
   ========================================================================== */

:root {
  --primary: #2E5339;
  --accent: #7A4B29;
  --bg: #F7F4EB;
  --surface: #EBE7DB;
  --text: #1C261E;
  --muted: #657362;

  --font-heading: "Manrope", sans-serif;
  --font-body: "Lora", serif;

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

  --container-max: 1200px;
  --header-height: 72px;

  --transition-base: 0.25s ease;
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */

*,
*::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);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul,
ol {
  list-style: none;
}

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

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: var(--space-md);
}

h2 {
  font-size: clamp(1.625rem, 4vw, 2.5rem);
  margin-bottom: var(--space-md);
}

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

h4 {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: var(--space-sm);
}

.lead {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--muted);
}

.section-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

/* ==========================================================================
   4. Layout Utilities
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-sm);
  padding-right: var(--space-sm);
}

.section {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-lg);
}

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

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

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

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

/* ==========================================================================
   5. Buttons
   ========================================================================== */

.btn-primary,
.btn-secondary,
.cta-button,
.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 2rem;
  border-radius: 0;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base);
  text-align: center;
  line-height: 1.4;
}

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

.btn-primary:hover {
  background-color: #234029;
  border-color: #234029;
  color: #fff;
}

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

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

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

.cta-button:hover {
  background-color: #5f3a1f;
  border-color: #5f3a1f;
  color: #fff;
}

.form-submit {
  background-color: var(--primary);
  color: #fff;
  border-color: var(--primary);
  width: 100%;
}

.form-submit:hover {
  background-color: #234029;
  border-color: #234029;
}

/* ==========================================================================
   6. Header & Navigation
   ========================================================================== */

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

.header.scrolled {
  background-color: var(--bg);
  border-bottom-color: var(--muted);
}

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

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

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

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

.nav-menu a {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-base), border-color var(--transition-base);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--muted);
  border-radius: 0;
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text);
  position: relative;
}

.mobile-menu-toggle span::before,
.mobile-menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--text);
}

.mobile-menu-toggle span::before {
  top: -6px;
}

.mobile-menu-toggle span::after {
  top: 6px;
}

/* ==========================================================================
   7. 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;
}

/* ==========================================================================
   8. Hero Section
   ========================================================================== */

.hero-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  padding: var(--space-2xl) var(--space-sm);
}

.hero-section .container {
  max-width: 780px;
}

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

.hero-section .lead {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.2rem;
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
}

/* ==========================================================================
   9. Features Section
   ========================================================================== */

.features-section {
  background-color: var(--bg);
}

.feature-card {
  padding: var(--space-lg);
  border: 1px solid var(--surface);
  background-color: var(--surface);
  border-radius: 0;
  transition: border-color var(--transition-base);
}

.feature-card:hover {
  border-color: var(--primary);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
  border-radius: 0;
}

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

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

/* ==========================================================================
   10. Services Section
   ========================================================================== */

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

.service-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border: 1px solid var(--muted);
  background-color: var(--bg);
  border-radius: 0;
}

.service-item h3 {
  color: var(--primary);
}

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

.service-item .service-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.service-item .service-link:hover {
  color: var(--primary);
}

/* ==========================================================================
   11. About Section
   ========================================================================== */

.about-section {
  background-color: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.about-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--surface);
  border-radius: 0;
}

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

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

/* ==========================================================================
   12. Stats Section
   ========================================================================== */

.stats-section {
  background-color: var(--primary);
  color: #fff;
}

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

.stat-item {
  padding: var(--space-md);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   13. Testimonials Section
   ========================================================================== */

.testimonial-section {
  background-size: cover;
  background-position: center;
  padding: var(--space-2xl) var(--space-sm);
}

.testimonial-section .section-header h2,
.testimonial-section .section-header .section-label,
.testimonial-section .section-header p {
  color: #fff;
}

.testimonial-section .section-header .section-label {
  color: rgba(255, 255, 255, 0.7);
}

.testimonial-section .section-header p {
  color: rgba(255, 255, 255, 0.8);
}

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

.testimonial-card {
  background: var(--surface);
  padding: var(--space-lg);
  border: 1px solid var(--muted);
  border-radius: 0;
}

.testimonial-card blockquote {
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: var(--space-md);
}

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

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

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 0;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.testimonial-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

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

/* ==========================================================================
   14. CTA Section
   ========================================================================== */

.cta-section {
  background-color: var(--primary);
  text-align: center;
  padding: var(--space-2xl) var(--space-sm);
}

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

.cta-section p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto var(--space-lg);
}

.cta-section .cta-button {
  background-color: #fff;
  color: var(--primary);
  border-color: #fff;
}

.cta-section .cta-button:hover {
  background-color: var(--bg);
  border-color: var(--bg);
  color: var(--primary);
}

/* ==========================================================================
   15. Contact Section & Forms
   ========================================================================== */

.contact-section {
  background-color: var(--bg);
}

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

.contact-info h3 {
  margin-bottom: var(--space-md);
}

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

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

.contact-row .contact-text {
  font-size: 0.95rem;
  color: var(--text);
}

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

.contact-form {
  background-color: var(--surface);
  padding: var(--space-lg);
  border: 1px solid var(--muted);
  border-radius: 0;
}

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

.form-group label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  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);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

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

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

/* ==========================================================================
   16. Policy Pages
   ========================================================================== */

.policy-page {
  padding: var(--space-xl) 0;
}

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

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

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

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

.policy-page h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

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

.policy-page ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: var(--space-sm);
}

.policy-page ul li {
  margin-bottom: 0.35rem;
}

/* ==========================================================================
   17. Footer
   ========================================================================== */

.footer {
  background-color: var(--text);
  color: rgba(255, 255, 255, 0.75);
  padding: var(--space-xl) 0 var(--space-md);
}

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

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0;
}

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

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

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

/* ==========================================================================
   18. Cookie Popup
   ========================================================================== */

.cookie-popup {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: 1.5rem;
  max-width: 420px;
  background-color: var(--text);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

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

.cookie-popup p {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.cookie-popup a {
  color: #fff;
  text-decoration: underline;
}

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

.cookie-actions button {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 0;
  cursor: pointer;
  transition: background-color var(--transition-base);
}

.cookie-accept {
  background-color: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}

.cookie-accept:hover {
  background-color: #234029;
}

.cookie-decline {
  background-color: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-decline:hover {
  color: #fff;
  border-color: #fff;
}

/* ==========================================================================
   19. Accessibility & Focus
   ========================================================================== */

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.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;
}

/* ==========================================================================
   20. 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;
  }
}

/* ==========================================================================
   21. Responsive — Tablet (768px+)
   ========================================================================== */

@media (min-width: 768px) {
  .container {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }

  .section {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }

  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }

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

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

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

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

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

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

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

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

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

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

  .cookie-popup {
    left: auto;
  }
}

/* ==========================================================================
   22. Responsive — Desktop (1024px+)
   ========================================================================== */

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

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

/* ==========================================================================
   23. Responsive — Mobile (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: 0.65rem 0;
    border-bottom: 1px solid var(--surface);
  }

  .nav-menu.open a:last-child {
    border-bottom: none;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .stat-item {
    padding: var(--space-sm);
  }
}

/* ==========================================================================
   24. Print Styles
   ========================================================================== */

@media print {
  .header,
  .footer,
  .cookie-popup,
  .cta-section,
  .mobile-menu-toggle {
    display: none;
  }

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

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

  .section {
    padding: 1rem 0;
  }
}