/* ==========================================================================
   Forest & Stone — Marketing Site Stylesheet
   Visual DNA: dark-luxury × forest-greens × slight-4 × subtle shadows
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  --primary: #2C4C3B;
  --accent: #8B5A2B;
  --bg: #F4F1EA;
  --surface: #FFFFFF;
  --text: #1E2A24;
  --muted: #6B7A72;

  --primary-dark: #1F3629;
  --primary-light: #3E6A53;
  --accent-light: #A97442;
  --border: #E3DED4;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);

  --radius: 4px;
  --radius-lg: 8px;

  --font-heading: 'JetBrains Mono', ui-monospace, monospace;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --container: 1200px;
  --gutter: 1.25rem;
  --section-pad: 4rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t: 0.25s;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

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

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--t) var(--ease);
}
a:hover { color: var(--accent); }

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

ul, ol { list-style: none; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

::selection {
  background: var(--primary);
  color: var(--bg);
}

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

h1 { font-size: clamp(2.25rem, 5vw + 1rem, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw + 1rem, 2.75rem); }
h3 { font-size: clamp(1.25rem, 1.5vw + 0.75rem, 1.75rem); }
h4 { font-size: 1.25rem; }

p { max-width: 68ch; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

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

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-pad);
}

.section-head {
  max-width: 640px;
  margin-bottom: 3rem;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

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

@media (min-width: 768px) {
  :root { --section-pad: 5.5rem; --gutter: 2rem; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  :root { --section-pad: 7rem; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all var(--t) var(--ease);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary,
.cta-button,
.form-submit {
  background: var(--primary);
  color: var(--bg);
  border: 1px solid var(--primary);
}
.btn-primary:hover,
.cta-button:hover,
.form-submit:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

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

.btn-accent {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}
.btn-accent:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--bg);
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 241, 234, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--t) var(--ease);
  box-shadow: var(--shadow);
}

.header.scrolled {
  background: rgba(244, 241, 234, 0.96);
  border-bottom-color: var(--border);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
  position: relative;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }

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

.nav-menu a {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  padding: 0.5rem 0;
  position: relative;
}
.nav-menu a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--t) var(--ease);
}
.nav-menu a:hover::after,
.nav-menu a.active::after { width: 100%; }

.nav-cta {
  margin-left: 0.5rem;
}

.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--text);
}
.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  position: relative;
}
.mobile-menu-toggle span::before,
.mobile-menu-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform var(--t) var(--ease);
}
.mobile-menu-toggle span::before { top: -7px; }
.mobile-menu-toggle span::after  { top:  7px; }

@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);
    box-shadow: var(--shadow);
    gap: 0.25rem;
  }
  .nav-menu.open a {
    padding: 0.85rem 0.5rem;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }
  .nav-menu.open a:last-child { border-bottom: none; }
  .nav-cta { margin-left: 0; margin-top: 0.5rem; width: 100%; }
}

/* ---------- Photo Background Overlay (CRITICAL) ---------- */
.has-photo-bg {
  position: relative;
  isolation: isolate;
  color: var(--bg);
  background-size: cover;
  background-position: center;
}
.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;
}
.has-photo-bg h1,
.has-photo-bg h2,
.has-photo-bg h3,
.has-photo-bg h4 { color: var(--bg); }
.has-photo-bg .eyebrow { color: var(--accent-light); }
.has-photo-bg .lead { color: rgba(244, 241, 234, 0.85); }

/* ---------- Hero ---------- */
.hero-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding-block: 5rem 4rem;
  background-image: url('/img/hero-forest.jpg');
}

.hero-content {
  max-width: 720px;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
}

.hero-content .lead {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-section .btn-secondary {
  color: var(--bg);
  border-color: rgba(244, 241, 234, 0.5);
}
.hero-section .btn-secondary:hover {
  background: var(--bg);
  color: var(--primary);
  border-color: var(--bg);
}

/* ---------- Features ---------- */
.feature-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: rgba(44, 76, 59, 0.08);
  color: var(--primary);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 1.4rem;
}

.feature-card h3 {
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Services ---------- */
.services-section {
  background: var(--surface);
}

.service-card {
  padding: 2.5rem 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: all var(--t) var(--ease);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease);
}
.service-card:hover { border-color: var(--primary); }
.service-card:hover::before { transform: scaleX(1); }

.service-number {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.service-card h3 { margin-bottom: 1rem; }
.service-card p { color: var(--muted); margin-bottom: 1.5rem; }

.service-link {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 500;
}
.service-link::after {
  content: ' →';
  transition: transform var(--t) var(--ease);
  display: inline-block;
}
.service-link:hover::after { transform: translateX(4px); }

/* ---------- About ---------- */
.about-section .grid {
  align-items: center;
  gap: 3rem;
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 5;
  background: var(--primary);
}
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content h2 { margin-bottom: 1.5rem; }
.about-content p {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.about-signature {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.about-signature-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
.about-signature-name {
  font-family: var(--font-heading);
  font-weight: 600;
}
.about-signature-role {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- Stats ---------- */
.stats-section {
  background: var(--primary);
  color: var(--bg);
}
.stats-section h2,
.stats-section h3 { color: var(--bg); }

.stat {
  text-align: center;
  padding: 1.5rem 1rem;
}
.stat-value {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--bg);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-value .accent { color: var(--accent-light); }
.stat-label {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.7);
}

/* ---------- Testimonials ---------- */
.testimonial-section {
  background-image: url('/img/testimonial-bg.jpg');
  padding-block: 6rem;
}

.testimonial-section .section-head {
  color: var(--bg);
}

.testimonial-card {
  background: var(--surface);
  color: var(--text);
  padding: 2.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

.testimonial-quote-mark {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  line-height: 0.5;
  color: var(--accent);
  font-weight: 700;
}

.testimonial-text {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.testimonial-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.testimonial-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
}
.testimonial-role {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---------- CTA ---------- */
.cta-section {
  background: var(--primary-dark);
  color: var(--bg);
  text-align: center;
}
.cta-section h2 { color: var(--bg); margin-bottom: 1rem; }
.cta-section p {
  color: rgba(244, 241, 234, 0.8);
  margin-inline: auto;
  margin-bottom: 2.5rem;
  max-width: 52ch;
}

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

/* ---------- Contact ---------- */
.contact-section .grid {
  gap: 3rem;
}

.contact-info h2 { margin-bottom: 1rem; }
.contact-info > p {
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.contact-row .icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  color: var(--accent);
  line-height: 1.4;
  width: 1.4rem;
  text-align: center;
}
.contact-row .label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 0.15rem;
}
.contact-row .value {
  color: var(--text);
  font-weight: 500;
}

/* ---------- Forms ---------- */
.form {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.form-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .form-row.two-col { grid-template-columns: 1fr 1fr; }
}

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

.form-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 76, 59, 0.15);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--muted); }

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

.form-submit {
  width: 100%;
  margin-top: 0.5rem;
}

.form-note {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 1rem;
  text-align: center;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--primary-dark);
  color: rgba(244, 241, 234, 0.75);
  padding-block: 4rem 1.5rem;
}

.footer a { color: rgba(244, 241, 234, 0.85); }
.footer a:hover { color: var(--bg); }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-brand .logo { color: var(--bg); margin-bottom: 1rem; display: inline-block; }
.footer-brand p {
  max-width: 36ch;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.footer h4 {
  color: var(--bg);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.footer-links li { margin-bottom: 0.65rem; }
.footer-links a {
  font-size: 0.9375rem;
  transition: color var(--t) var(--ease), padding-left var(--t) var(--ease);
}
.footer-links a:hover { padding-left: 4px; }

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(244, 241, 234, 0.12);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  font-size: 0.8125rem;
}
@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
}
.footer-socials a {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 241, 234, 0.2);
  border-radius: var(--radius);
  transition: all var(--t) var(--ease);
}
.footer-socials a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

/* ---------- Cookie Popup ---------- */
.cookie-popup {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: 1.5rem;
  max-width: 420px;
  margin-left: auto;
  background: var(--surface);
  color: var(--text);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform var(--t) var(--ease), opacity var(--t) var(--ease);
}
.cookie-popup.hidden {
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
}
.cookie-popup h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.cookie-popup p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}
.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.cookie-actions .btn { padding: 0.6rem 1.1rem; font-size: 0.75rem; }

@media (min-width: 768px) {
  .cookie-popup { left: auto; }
}

/* ---------- Policy Pages ---------- */
.policy-page {
  padding-block: 4rem 5rem;
}

.policy-page .policy-head {
  max-width: 720px;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.policy-page .policy-head .updated {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
  display: block;
}

.policy-content {
  max-width: 720px;
}

.policy-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
}
.policy-content h2:first-child { margin-top: 0; padding-top: 0; }

.policy-content h3 {
  font-size: 1.125rem;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.policy-content p {
  margin-bottom: 1rem;
  color: var(--text);
}

.policy-content ul,
.policy-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.25rem;
  list-style: disc;
}
.policy-content ol { list-style: decimal; }
.policy-content li {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.policy-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

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

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.7s var(--ease) both;
}

/* ---------- Print ---------- */
@media print {
  .header, .footer, .cookie-popup, .cta-section { display: none; }
  body { background: white; color: black; }
  .has-photo-bg::before { display: none; }
}