/* ═══════════════════════════════════════════════════════════════
   CLIENT SITE TEMPLATE — Custom Styles
   Tailwind CDN handles utilities. This file handles:
   - CSS custom properties (set dynamically by main.js from config)
   - Scroll-reveal animations (GPU-accelerated, opacity + transform only)
   - Surface layering (tinted shadows from brand color)
   - Noise texture overlay
   - Hero gradient treatment
   - Component-specific polish
   ═══════════════════════════════════════════════════════════════ */

/* ─── Custom Properties (defaults, overridden by JS) ─── */
:root {
  --color-primary:       #6B8F7B;
  --color-primary-dark:  #4A6B56;
  --color-primary-light: #8FB39D;
  --color-primary-rgb:   107, 143, 123;
  --color-secondary:     #F5F0E8;
  --color-accent:        #C4B5A0;
  --color-surface:       #FEFCF9;
  --color-text:          #2D2926;
  --color-text-light:    #6B6560;
  --font-heading:        'Cormorant Garamond', Georgia, serif;
  --font-body:           'DM Sans', system-ui, sans-serif;
  --font-heading-weight: 600;
  --radius:              12px;

  /* Tinted shadows — derived from primary RGB */
  --shadow-sm:  0 1px 3px rgba(var(--color-primary-rgb), 0.08);
  --shadow-md:  0 4px 16px rgba(var(--color-primary-rgb), 0.10);
  --shadow-lg:  0 8px 32px rgba(var(--color-primary-rgb), 0.12);
  --shadow-xl:  0 16px 48px rgba(var(--color-primary-rgb), 0.14);

  /* Easing */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}


/* ─── Base Reset & Defaults ─── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-surface);
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-text);
}


/* ─── Noise Texture Overlay ─── */
.noise-overlay {
  position: relative;
}
.noise-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}


/* ─── Hero Sections ─── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--color-text);
}
.hero-home  { min-height: 100vh; min-height: 100dvh; }
.hero-inner { min-height: 45vh; }

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Gradient overlay with mix-blend-multiply for rich color treatment */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(var(--color-primary-rgb), 0.70) 0%,
    rgba(var(--color-primary-rgb), 0.45) 40%,
    rgba(0,0,0, 0.55) 100%
  );
  mix-blend-mode: multiply;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 2rem 1.5rem;
}

.hero-content h1 {
  color: #fff;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 1rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  white-space: pre-line;
}

.hero-content p {
  color: rgba(255,255,255,0.9);
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 560px;
  margin: 0 auto 2rem;
}


/* ─── Hero Stats Row ─── */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.hero-stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}


/* ─── Button Styles ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s var(--ease-smooth);
  cursor: pointer;
  border: none;
  letter-spacing: 0.01em;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.btn-ghost:hover {
  background: var(--color-primary);
  color: #fff;
}


/* ─── Section Layout ─── */
.section {
  padding: 6rem 1.5rem;
}

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

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 560px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}


/* ─── Surface Layering — Cards ─── */
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s var(--ease-smooth);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-elevated {
  box-shadow: var(--shadow-md);
}


/* ─── Service Cards ─── */
.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-secondary);
  border-radius: 12px;
  margin-bottom: 1.25rem;
  color: var(--color-primary);
  transition: background 0.3s, color 0.3s;
}

.card-hover:hover .service-icon {
  background: var(--color-primary);
  color: #fff;
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 1rem;
}

.service-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.service-detail {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.7;
  margin-top: 1rem;
}


/* ─── Testimonial Cards ─── */
.testimonial-card {
  position: relative;
  padding-top: 2.5rem;
}

.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: -0.25rem;
  left: 1.5rem;
  font-family: var(--font-heading);
  font-size: 5rem;
  color: var(--color-primary);
  opacity: 0.15;
  line-height: 1;
}

.testimonial-quote {
  font-size: 1.05rem;
  line-height: 1.7;
  font-style: italic;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

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

.testimonial-detail {
  font-size: 0.8rem;
  color: var(--color-text-light);
}


/* ─── About Split Section ─── */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Image color treatment */
.img-tinted {
  position: relative;
}
.img-tinted::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(var(--color-primary-rgb), 0.08);
  pointer-events: none;
  border-radius: inherit;
}


/* ─── Values Grid ─── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.value-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.value-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.value-card p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.6;
}


/* ─── Process Steps ─── */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  counter-reset: process-counter;
}

.process-step {
  text-align: center;
  padding: 2rem 1.5rem;
}

.process-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-primary);
  opacity: 0.25;
  line-height: 1;
  margin-bottom: 1rem;
}

.process-step h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.process-step p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
}


/* ─── CTA Banner ─── */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 5rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.cta-banner h2 {
  color: #fff;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 1rem;
}

.cta-banner p {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.cta-banner .btn-primary {
  background: #fff;
  color: var(--color-primary-dark);
}
.cta-banner .btn-primary:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-2px);
}


/* ─── Navbar ─── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 1.5rem;
  transition: all 0.4s var(--ease-smooth);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: 0.75rem 1.5rem;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
  letter-spacing: -0.02em;
}

.navbar.scrolled .nav-logo {
  color: var(--color-text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s var(--ease-spring);
}

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

.navbar.scrolled .nav-links a {
  color: var(--color-text-light);
}
.navbar.scrolled .nav-links a:hover,
.navbar.scrolled .nav-links a.active {
  color: var(--color-primary);
}

.nav-links .nav-cta {
  padding: 0.5rem 1.25rem;
  background: var(--color-primary);
  color: #fff !important;
  border-radius: var(--radius);
  transition: all 0.3s;
}
.nav-links .nav-cta::after { display: none; }
.nav-links .nav-cta:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

/* Mobile Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all 0.3s;
  border-radius: 2px;
}

.navbar.scrolled .nav-toggle span {
  background: var(--color-text);
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }


/* ─── Contact Form ─── */
.contact-form {
  max-width: 640px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(var(--color-primary-rgb), 0.15);
  border-radius: calc(var(--radius) - 2px);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: #fff;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
}

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

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%236B6560' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-required {
  color: var(--color-primary);
}

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2.5rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
}

.form-submit:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.form-submit:active { transform: scale(0.97); }

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-success {
  display: none;
  text-align: center;
  padding: 3rem 2rem;
}

.form-success.visible {
  display: block;
}

.form-success h3 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

/* Honeypot field */
.honey {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}


/* ─── Booking Section ─── */
.booking-embed iframe {
  width: 100%;
  min-height: 600px;
  border: none;
  border-radius: var(--radius);
}

.booking-fallback {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--color-secondary);
  border-radius: var(--radius);
}

.booking-fallback h3 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.booking-fallback p {
  color: var(--color-text-light);
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}


/* ─── Footer ─── */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.7);
  padding: 4rem 1.5rem 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand h3 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

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

.footer-info p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: rgba(255,255,255,0.5);
  transition: color 0.3s;
}
.footer-social a:hover { color: #fff; }


/* ─── Scroll Animations (GPU-accelerated: opacity + transform only) ─── */
.fade-in {
  opacity: 0;
  transition: opacity 0.8s var(--ease-smooth);
}
.fade-in.visible { opacity: 1; }

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-spring);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-spring);
}
.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for grid children */
.stagger > *:nth-child(1) { transition-delay: 0s; }
.stagger > *:nth-child(2) { transition-delay: 0.1s; }
.stagger > *:nth-child(3) { transition-delay: 0.2s; }
.stagger > *:nth-child(4) { transition-delay: 0.3s; }
.stagger > *:nth-child(5) { transition-delay: 0.4s; }
.stagger > *:nth-child(6) { transition-delay: 0.5s; }


/* ─── Focus States ─── */
.focus-ring:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 2px;
}


/* ─── Business Info Grid ─── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.info-item h3 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-item h3 svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.info-item p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.6;
}


/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .about-split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .about-image { max-height: 400px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 4rem 1.25rem; }

  /* Mobile nav */
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    background: #fff;
    box-shadow: -8px 0 32px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-smooth);
    gap: 1rem;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    color: var(--color-text) !important;
    font-size: 1.05rem;
  }

  .nav-links a::after {
    bottom: -2px;
  }

  .nav-links .nav-cta {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Grids collapse */
  .values-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-stats {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .hero-stat-value { font-size: 1.35rem; }

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

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .hero-content h1 {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .hero-content { padding: 1.5rem 1rem; }
  .btn { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
}
