/* ==========================================================================
   Oak & Stone Landscaping
   All colors, fonts, and sizes live in :root, so a re-skin is a one-place edit.
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
/* Fraunces 500 for headings; DM Sans (one variable file) for 400 and 500. Preloaded in index.html. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/fraunces-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/dm-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  /* Palette */
  --bg: #EEE8DB;                 /* page background (cream) */
  --bg-rgb: 238, 232, 219;       /* same as --bg, for the hero overlay */
  --bg-alt: #E7E0CF;             /* alternate sections */
  --surface: #FAF6EC;            /* cards */
  --border: #D9D0BB;             /* borders and dividers */
  --text: #1F3D2B;               /* main text (deep forest green) */
  --muted: #586559;              /* secondary text */
  --accent: #C8643B;             /* terracotta: graphics, stars, focus, slider handle */
  --accent-strong: #9D4927;      /* terracotta for anything carrying text (buttons, small labels): passes 4.5:1 contrast */
  --accent-hover: #833A1D;
  --on-accent: #FFFDF8;          /* text on terracotta buttons */
  --error: #B3402A;


  /* Fonts */
  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Shape and depth */
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(31, 61, 43, 0.05), 0 22px 44px -28px rgba(31, 61, 43, 0.3);

  /* Layout */
  --nav-h: 72px;
  --container: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 { font-size: clamp(3rem, 5.8vw, 5.2rem); line-height: 1.02; letter-spacing: -0.03em; }
h2 { font-size: clamp(2.35rem, 4.8vw, 3.9rem); }
h3 { font-size: 1.5rem; line-height: 1.2; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
}
.skip-link:focus { top: 1rem; }

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

/* Small labels */
.eyebrow {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
  text-wrap: balance;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.97rem;
  font-weight: 500;
  line-height: 1.1;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn--lg { padding: 1.05rem 1.9rem; font-size: 1.02rem; }
.btn--block { width: 100%; }

.btn--primary { background: var(--accent-strong); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary:disabled { opacity: 0.65; cursor: progress; }

.btn--ghost { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn--ghost:hover { border-color: var(--muted); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 120; /* above the full-screen menu (110) so the logo and close button stay visible and tappable */
  height: var(--nav-h);
  background: rgba(238, 232, 219, 0.88);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.is-scrolled { border-bottom-color: var(--border); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.logo__mark { color: var(--text); flex: none; }

.nav__links { display: flex; gap: 2rem; margin-inline: auto; }
.nav__links a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }
.nav__cta { padding: 0.65rem 1.25rem; font-size: 0.92rem; }

/* Menu toggle (mobile only) */
.menu-toggle {
  display: none;
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.menu-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 25px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* Full-screen mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + 1.5rem) var(--gutter) 2rem;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-1rem);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease), visibility 0s linear 0.4s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

.mobile-menu__nav { display: flex; flex-direction: column; }
.mobile-menu__nav a {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-heading);
  font-size: clamp(2rem, 9vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.mobile-menu__foot { display: grid; gap: 1.1rem; }
.mobile-menu__foot p { color: var(--muted); font-size: 0.95rem; text-align: center; }
.mobile-menu__foot p a { color: var(--text); font-weight: 500; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(5rem, 11vw, 9rem); }
.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}
.section__head { max-width: 720px; margin-bottom: clamp(2.75rem, 6vw, 4.25rem); }
.section__head .eyebrow { margin-bottom: 1rem; }
.section__lede { max-width: 56ch; margin-top: 1.4rem; color: var(--muted); font-size: 1.12rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(560px, 84vh, 800px);
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  background: var(--bg);
}
/* The photo is a real <img> (so it can be preloaded and prioritised). A cream overlay sits on top of it so the
   dark text stays readable, and the bottom edge fades into the page. */
.hero__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 55%;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(var(--bg-rgb), 0) 72%, var(--bg) 100%),
    linear-gradient(90deg, rgba(var(--bg-rgb), 0.96) 0%, rgba(var(--bg-rgb), 0.94) 50%, rgba(var(--bg-rgb), 0.7) 66%, rgba(var(--bg-rgb), 0.06) 100%);
}

.hero__grid { width: 100%; }
.hero__copy { max-width: 41rem; }
.hero .eyebrow { margin-bottom: 1.5rem; }
.hero__lede {
  max-width: 50ch;
  margin-top: 1.75rem;
  color: var(--muted);
  font-size: clamp(1.1rem, 1.6vw, 1.28rem);
  line-height: 1.6;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.4rem; }
.hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
  margin-top: 2.4rem;
  color: var(--muted);
  font-size: 0.93rem;
}
.hero__proof li { display: flex; align-items: center; gap: 0.5rem; }
.hero__proof li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero__chip {
  position: absolute;
  right: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  bottom: clamp(1.25rem, 3vw, 2.25rem);
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
}
.hero__stars { color: var(--accent); letter-spacing: 0.08em; }

/* ---------- Grid + cards ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  margin: 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card__img {
  aspect-ratio: 4 / 3;
  margin-bottom: 1.5rem;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
}
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card h3 { margin: 0 0.35rem 0.6rem; }
.card > p { margin-inline: 0.35rem; margin-bottom: 0.35rem; color: var(--muted); font-size: 0.98rem; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.stat { padding-top: 1.75rem; border-top: 1px solid var(--border); }
.stat__num {
  font-family: var(--font-heading);
  font-size: clamp(3.4rem, 7vw, 5.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat__label { max-width: 24ch; margin-top: 0.9rem; color: var(--muted); }

/* ---------- Before / after slider ---------- */
/* --pos (0-100) is the only value JS changes. The after pane is revealed with clip-path and the
   handle moves with transform (cqw = 1% of the stage width), so nothing reflows while dragging. */
.compare { max-width: 1100px; margin-inline: auto; }

.compare__stage {
  --pos: 50;
  position: relative;
  aspect-ratio: 16 / 9;
  container-type: inline-size;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  box-shadow: var(--shadow);
  cursor: ew-resize;
  touch-action: pan-y; /* vertical scroll still works; horizontal drags stay with the slider */
  -webkit-user-select: none;
  user-select: none;
}

.compare__pane {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}
.compare__pane--after { clip-path: inset(0 0 0 calc(var(--pos) * 1%)); }

.compare__tag {
  position: absolute;
  top: 1rem;
  z-index: 4; /* above the handle (z-index 3) so the line never cuts through the text */
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(250, 246, 236, 0.92);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
}
.compare__tag--before { left: 1rem; }
.compare__tag--after { right: 1rem; }

.compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -20px;
  z-index: 3;
  width: 40px;
  transform: translateX(calc(var(--pos) * 1cqw));
  cursor: ew-resize;
  touch-action: pan-y;
}
.compare__handle:focus-visible { outline: none; }
.compare__handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 19px;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(250, 246, 236, 0.55);
}
.compare__grip {
  position: absolute;
  top: 50%;
  left: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border-radius: 50%;
  background: var(--accent-strong);
  color: var(--on-accent);
  box-shadow: 0 4px 16px rgba(31, 61, 43, 0.3);
  transition: transform 0.2s var(--ease), background 0.2s;
}
.compare__handle:hover .compare__grip,
.compare__stage.is-dragging .compare__grip { background: var(--accent-hover); transform: scale(1.08); }
.compare__handle:focus-visible .compare__grip { outline: 2px solid var(--text); outline-offset: 3px; }

.compare__caption { margin-top: 1.5rem; }
.compare__caption h3 { margin-bottom: 0.35rem; }
.compare__caption p { max-width: 60ch; color: var(--muted); }

/* ---------- Reviews ---------- */
.quote { display: flex; flex-direction: column; gap: 1.25rem; padding: 2rem; }
.stars { color: var(--accent); line-height: 0; }
.quote blockquote { margin: 0; font-size: 1.08rem; line-height: 1.6; }
.quote figcaption { margin-top: auto; color: var(--muted); font-size: 0.92rem; }
.quote figcaption strong { display: block; color: var(--text); font-weight: 500; font-size: 0.98rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.faq .section__head { margin-bottom: 0; position: sticky; top: calc(var(--nav-h) + 2rem); }
.faq__list { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 0;
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-strong); }
.faq__icon {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
}
.faq__icon::before, .faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  margin: -1px 0 0 -6px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease);
}
.faq__icon::after { transform: rotate(90deg); }
.faq details[open] .faq__icon::after { transform: rotate(0deg); }
.faq details > p { max-width: 62ch; padding-bottom: 1.6rem; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.contact__copy .eyebrow { margin-bottom: 1rem; }
.contact__details { margin-top: 2.25rem; max-width: 460px; border-top: 1px solid var(--border); }
.contact__details li { display: flex; gap: 1rem; padding: 0.95rem 0; border-bottom: 1px solid var(--border); }
.contact__details span { flex: none; width: 4.5rem; color: var(--muted); }
.contact__details a:hover { color: var(--accent-strong); }

.form { display: grid; gap: 1.15rem; padding: 2rem; }
.field { display: grid; gap: 0.45rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
.field label { font-size: 0.9rem; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem; /* 16px avoids iOS zoom on focus */
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #C3B8A0; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(200, 100, 59, 0.2);
}
.field.has-error input, .field.has-error textarea { border-color: var(--error); }
.field__error { min-height: 0; color: var(--error); font-size: 0.83rem; }
.form__status { min-height: 1.4em; font-size: 0.95rem; text-align: center; color: var(--muted); }
.form__status.is-error { color: var(--error); }

/* Netlify spam honeypot. display:none keeps phones from rendering (and autofilling) it; bots still see and fill it. */
.form__hp { display: none; }

/* ---------- Instant estimate ---------- */
/* Sits directly under Services on the same background, so it shares that section's bottom spacing. */
.estimate { padding-top: 0; }
.estimate__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.estimate__copy .eyebrow { margin-bottom: 1rem; }
.estimate__points { display: grid; gap: 0.6rem; margin-top: 2rem; color: var(--muted); font-size: 0.95rem; }
.estimate__points li { display: flex; align-items: center; gap: 0.6rem; }
.estimate__points li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.estimator { padding: clamp(1.5rem, 3.5vw, 2.25rem); }
.estimator [hidden] { display: none !important; } /* .btn sets display, which would otherwise beat the hidden attribute */

.estimator__progress { margin-bottom: 1.75rem; }
.estimator__progress-label { margin-bottom: 0.6rem; color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.estimator__bar { height: 6px; overflow: hidden; border-radius: 999px; background: var(--bg-alt); }
.estimator__bar span {
  display: block;
  width: calc(var(--progress, 0.2) * 100%);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.4s var(--ease);
}

.estimator fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.estimator legend { width: 100%; margin-bottom: 1.25rem; padding: 0; }
.estimator h3 { margin: 0; } /* undo .card h3's side margins so headings line up with the options */
.estimator__question:focus-visible { outline-offset: 6px; }
.estimator__question:focus:not(:focus-visible) { outline: none; }

.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.choice {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 4rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.choice:hover { border-color: #C3B8A0; }
.choice input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  display: grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  margin: 0;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
}
.choice input::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--accent-strong);
  transform: scale(0);
  transition: transform 0.2s var(--ease);
}
.choice input:checked { border-color: var(--accent-strong); }
.choice input:checked::before { transform: scale(1); }
.choice:has(input:checked) { border-color: var(--accent-strong); background: var(--surface); box-shadow: inset 0 0 0 1px var(--accent-strong); }
/* Where :has() works, outline the whole option instead of just the small circle. */
@supports selector(:has(*)) {
  .choice input:focus-visible { outline: none; }
  .choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
}
.choice__text { display: grid; gap: 0.15rem; font-weight: 500; }
.choice__text small { color: var(--muted); font-size: 0.88rem; font-weight: 400; }

.estimator__fields { display: grid; gap: 1.15rem; }
.field__optional { color: var(--muted); font-weight: 400; }

.estimator__msg { color: var(--error); font-size: 0.93rem; }
.estimator__msg:not(:empty) { margin-top: 1rem; }

.estimator__actions { display: flex; gap: 0.75rem; margin-top: 1.75rem; }
.estimator__next { margin-left: auto; }

.estimator__fine { margin-top: 1rem; color: var(--muted); font-size: 0.95rem; }

.estimator__step:not([hidden]) { animation: estimator-in 0.45s var(--ease); }
@keyframes estimator-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  .estimator__step:not([hidden]) { animation: none; }
}

/* ---------- Language toggle ---------- */
.lang-toggle {
  min-height: 40px;
  margin-right: -1rem; /* sit a little closer to the Free quote button than the nav's 2rem gap */
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s;
}
.lang-toggle:hover { border-color: var(--muted); }
.logo, .nav__links a, .nav__cta, .lang-toggle { white-space: nowrap; }
.lang-toggle[aria-busy="true"] { cursor: progress; opacity: 0.7; }

/* ---------- Service cards that link to their own page ---------- */
/* The title link stretches over the whole card, so the card is one big tap target with one clear link name. */
.card--link { position: relative; display: flex; flex-direction: column; }
.card--link:hover { border-color: #C3B8A0; }
.card__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card__link:focus-visible { outline: none; }
.card__link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 3px; }
.card__more { margin: auto 0.35rem 0.35rem; padding-top: 0.6rem; color: var(--accent-strong); font-size: 0.95rem; font-weight: 500; }
.card--link:hover .card__more { color: var(--accent-hover); }
.card > .card__price { margin: 0.25rem 0.35rem 0; color: var(--text); font-size: 0.95rem; font-weight: 500; text-wrap: pretty; }

/* ---------- Service pages ---------- */
.hero--page { min-height: clamp(520px, 74vh, 720px); }

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; color: var(--muted); }
.breadcrumb a { text-decoration: underline; text-decoration-color: rgba(157, 73, 39, 0.35); text-underline-offset: 3px; }
.breadcrumb a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
.breadcrumb [aria-current] { color: var(--muted); }

/* What's included */
.checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.checklist li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.3rem 1rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--border);
}
.checklist li::before {
  content: "";
  grid-row: span 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-strong) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23FFFDF8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E") center / 15px no-repeat;
}
.checklist strong { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; }
.checklist span { color: var(--muted); }

/* What it costs */
.pricing { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.price-card { padding: clamp(1.75rem, 4vw, 2.5rem); }
.price-card > p { margin: 0; } /* override .card > p */
.price-card > .price-card__amount {
  margin-top: 0.9rem;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 5.5vw, 3.8rem);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.price-card > .price-card__unit { margin-top: 0.7rem; color: var(--muted); }
.price-card > .price-card__note { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.95rem; }
.price-card .btn { margin-top: 1.75rem; }
.factors h3 { margin-bottom: 0.5rem; }
.factors li { display: grid; gap: 0.2rem; padding-block: 1.1rem; border-bottom: 1px solid var(--border); }
.factors li strong { font-weight: 500; }
.factors li span { color: var(--muted); }

/* Process */
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.step { padding: 2rem; }
.step > .step__num {
  margin: 0 0.35rem 1.25rem;
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 3rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

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

/* Before/after placeholder until real photos exist */
.compare-placeholder {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1.5px dashed #C3B8A0;
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.compare-placeholder__pane {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.6rem;
  padding: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}
.compare-placeholder__pane + .compare-placeholder__pane { border-left: 1.5px dashed #C3B8A0; }
.compare-placeholder svg { color: #A89C82; }

/* ---------- Thank-you and 404 pages ---------- */
/* One short centered message, tall enough that the footer sits at the bottom of the screen. */
.message { display: grid; align-items: center; min-height: calc(100svh - var(--nav-h) - 12rem); padding-block: clamp(4rem, 10vw, 7rem); }
.message__inner { max-width: 44rem; }
.message__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 1.75rem;
  border-radius: 50%;
  background: var(--accent-strong);
  color: var(--on-accent);
}
.message .eyebrow { margin-bottom: 1.25rem; }
.message .section__lede { margin-top: 1.25rem; }
.message__call { margin-top: 1.5rem; color: var(--muted); }
.message__call a { color: var(--text); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(31, 61, 43, 0.35); text-underline-offset: 3px; white-space: nowrap; }
.message__call a:hover { color: var(--accent-strong); text-decoration-color: currentColor; }
.message .hero__actions { margin-top: 2.25rem; }

.thanks-estimate { max-width: 34rem; margin-top: 2.25rem; padding: clamp(1.5rem, 3.5vw, 2rem); }
.thanks-estimate[hidden] { display: none; }
.thanks-estimate > p { margin: 0; } /* override .card > p */
.thanks-estimate > .eyebrow { margin-bottom: 0.75rem; color: var(--accent-strong); }
.thanks-estimate h2 { font-size: 1.35rem; line-height: 1.25; }
.thanks-estimate__amount { display: block; margin-top: 0.3rem; font-size: clamp(2.1rem, 5vw, 3rem); letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.thanks-estimate > .thanks-estimate__fine { margin-top: 1rem; color: var(--muted); font-size: 0.95rem; }
.thanks-estimate > .thanks-estimate__recap { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); font-size: 0.93rem; }
.thanks-estimate .btn { margin-top: 1.5rem; }

.not-found__heading { margin-top: clamp(3rem, 7vw, 4.5rem); font-size: 1.5rem; }
.not-found__services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.not-found__services .card { padding: 1.25rem 1.4rem; }
.not-found__services .card__link { font-family: var(--font-heading); font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.25; }
.not-found__services .card__more { margin: 0; padding-top: 0.35rem; }

/* ---------- Footer ---------- */
.footer { background: var(--text); color: rgba(245, 241, 232, 0.78); padding-block: 4.5rem 2.5rem; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
}
.footer .logo { color: var(--bg); }
.footer .logo__mark { color: var(--bg); }
.footer__brand p { max-width: 30ch; margin-top: 1rem; font-size: 0.95rem; }
/* Instagram: 44px tap target; the negative margin lines the icon up with the text above it. */
.footer__social {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0.75rem 0 0 -11px;
  border-radius: 50%;
  color: rgba(245, 241, 232, 0.78); /* fades to the accent via the .footer a color transition */
}
.footer__social:hover { color: var(--accent); }
.footer h4 {
  margin-bottom: 1rem;
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.footer li { margin-bottom: 0.5rem; font-size: 0.95rem; }
.footer a { transition: color 0.2s; }
.footer li a:hover { color: var(--bg); text-decoration: underline; text-underline-offset: 3px; }
.footer :focus-visible { outline-color: var(--bg); }
.footer__legal {
  grid-column: 1 / -1;
  padding-top: 2rem;
  border-top: 1px solid rgba(245, 241, 232, 0.18);
  font-size: 0.83rem;
  color: rgba(245, 241, 232, 0.6);
}

/* ---------- Sticky tap-to-call (phones only) ---------- */
.call-bar { display: none; }

/* ---------- Scroll reveal (below the hero only) ---------- */
/* Only hide elements when JS is running, so the page still works without it. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav__inner { gap: 1.5rem; }
  .nav__links { gap: 1.4rem; }
  .lang-toggle { margin-right: -0.5rem; }
  /* Spanish nav labels are longer: use the menu button until there's room for all of them. */
  html[lang="es"] .nav__links, html[lang="es"] .nav__cta { display: none; }
  html[lang="es"] .menu-toggle { display: block; margin-right: -11px; }
  html[lang="es"] .lang-toggle { margin-left: auto; margin-right: -0.75rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .hero::before {
    background:
      linear-gradient(180deg, rgba(var(--bg-rgb), 0) 78%, var(--bg) 100%),
      linear-gradient(180deg, rgba(var(--bg-rgb), 0.95) 0%, rgba(var(--bg-rgb), 0.94) 66%, rgba(var(--bg-rgb), 0.88) 100%);
  }
  .hero__img { object-position: 68% 50%; }
  .hero__chip { position: static; display: inline-block; margin-top: 1.75rem; }
  .grid--3 { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
  .faq .section__head { position: static; margin-bottom: 2.5rem; }
  .contact { grid-template-columns: 1fr; }
  .estimate__grid { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .menu-toggle { display: block; margin-right: -11px; }
  .lang-toggle { margin-left: auto; margin-right: -1.25rem; }
}

/* Phones */
@media (max-width: 767px) {
  body { padding-bottom: 5.25rem; } /* room for the tap-to-call button */
  .stats { grid-template-columns: 1fr; gap: 1.75rem; }
  .checklist { grid-template-columns: 1fr; }
  .call-bar {
    position: fixed;
    left: 50%;
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 90;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 1.6rem;
    border-radius: 999px;
    background: var(--accent-strong);
    color: var(--on-accent);
    box-shadow: 0 10px 28px -8px rgba(31, 61, 43, 0.55);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    transform: translateX(-50%);
    white-space: nowrap;
  }
  .call-bar:active { background: var(--accent-hover); }
  body.menu-open .call-bar { display: none; }
}

@media (max-width: 640px) {
  .grid--4 { grid-template-columns: 1fr; }
  .not-found__services { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__chip { font-size: 0.82rem; }
  .form { padding: 1.5rem; }
}

@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 100%; }
  .quote { padding: 1.5rem; }
  .step { padding: 1.5rem; }
  .compare-placeholder { aspect-ratio: 4 / 3; }
  .choices { grid-template-columns: 1fr; }
  .estimator__actions .btn { flex: 1 1 0; }
}
