/* ==========================================================================
   tokens.css — Design system for Texans Tree Service (preview v2)
   Rugged, trustworthy tree care: deep forest green + warm wood-brown + a
   safety-orange accent. Archivo (display) + Inter (body). Colors in OKLCH.
   ========================================================================== */

:root {
  color-scheme: light;

  /* --- Raw palette --- */
  --forest-950: oklch(19% 0.028 152);   /* near-black spruce (logo #16261C) */
  --forest-900: oklch(24% 0.038 152);
  --forest-800: oklch(30% 0.050 151);
  --forest-700: oklch(38% 0.066 150);
  --forest-600: oklch(47% 0.086 149);
  --forest-400: oklch(66% 0.090 148);
  --forest-200: oklch(88% 0.045 150);
  --forest-100: oklch(94% 0.028 150);

  --wood-800: oklch(30% 0.045 62);
  --wood-700: oklch(38% 0.058 60);
  --wood-500: oklch(52% 0.070 62);
  --wood-200: oklch(90% 0.030 70);

  --orange-700: oklch(58% 0.165 46);
  --orange-600: oklch(65% 0.180 50);     /* safety orange — primary CTA */
  --orange-500: oklch(72% 0.175 55);
  --orange-100: oklch(93% 0.055 60);

  --gold-500: oklch(78% 0.130 78);       /* logo accent gold */

  --paper:   oklch(97.5% 0.008 92);      /* warm paper */
  --paper-2: oklch(94.5% 0.012 88);      /* sand */
  --paper-3: oklch(91% 0.014 86);
  --white:   oklch(100% 0 0);

  --good: oklch(64% 0.13 150);

  /* --- Semantic tokens (light) --- */
  --bg:            var(--paper);
  --bg-elevated:   var(--white);
  --bg-sunken:     var(--paper-2);
  --bg-inverse:    var(--forest-950);
  --bg-brand:      var(--forest-900);

  --text:          var(--forest-950);
  --text-muted:    oklch(44% 0.020 150);
  --text-inverse:  var(--paper);
  --text-on-brand: oklch(94% 0.020 120);

  --border:        oklch(88% 0.012 120);
  --border-strong: oklch(80% 0.018 120);

  --primary:           var(--orange-600);
  --primary-strong:    var(--orange-700);
  --primary-contrast:  oklch(21% 0.03 50);
  --primary-tint:      var(--orange-100);

  --brand:         var(--forest-800);
  --brand-tint:    var(--forest-100);
  --accent:        var(--wood-500);
  --accent-gold:   var(--gold-500);

  --focus-ring:    var(--orange-600);

  /* --- Typography --- */
  --font-display: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, monospace;

  --step--1: clamp(0.83rem, 0.80rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.20vw, 1.13rem);
  --step-1:  clamp(1.20rem, 1.12rem + 0.40vw, 1.50rem);
  --step-2:  clamp(1.44rem, 1.30rem + 0.70vw, 2.00rem);
  --step-3:  clamp(1.73rem, 1.50rem + 1.15vw, 2.67rem);
  --step-4:  clamp(2.07rem, 1.70rem + 1.85vw, 3.35rem);
  --step-5:  clamp(2.49rem, 1.95rem + 2.70vw, 4.30rem);

  --leading-tight: 1.04;
  --leading-snug:  1.22;
  --leading-body:  1.62;

  --tracking-tight: -0.02em;
  --tracking-wide:  0.14em;

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

  --container:      74rem;
  --container-wide: 84rem;
  --container-prose: 42rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px oklch(24% 0.04 150 / 0.08), 0 1px 1px oklch(24% 0.04 150 / 0.05);
  --shadow:    0 6px 20px oklch(24% 0.04 150 / 0.10), 0 2px 6px oklch(24% 0.04 150 / 0.07);
  --shadow-lg: 0 24px 60px oklch(22% 0.04 150 / 0.18), 0 6px 16px oklch(22% 0.04 150 / 0.10);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.5, 1);
  --dur-fast: 140ms;
  --dur:      280ms;
  --dur-slow: 560ms;

  --header-h: 4.75rem;
}

/* Dark mode: keep the site legible if the OS is dark. Light-first design, so
   the dark override is restrained (deep forest surfaces, warm text). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:            var(--forest-950);
    --bg-elevated:   var(--forest-900);
    --bg-sunken:     oklch(16% 0.024 152);
    --bg-inverse:    var(--paper);
    --bg-brand:      oklch(21% 0.032 152);

    --text:          var(--paper);
    --text-muted:    oklch(74% 0.020 150);
    --text-inverse:  var(--forest-950);

    --border:        oklch(32% 0.02 150);
    --border-strong: oklch(42% 0.025 150);

    --brand-tint:    oklch(26% 0.04 150);
    --primary-tint:  oklch(30% 0.06 50);

    --shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.4);
    --shadow:    0 6px 20px oklch(0% 0 0 / 0.5);
    --shadow-lg: 0 24px 60px oklch(0% 0 0 / 0.6);
  }
}
/* ==========================================================================
   base.css — Reset moderno + tipografía base + accesibilidad
   ========================================================================== */

/* Reset acotado y predecible */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Compensa el header fijo al saltar a anclas */
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  font-synthesis: none;
  /* Reserva ascendente para evitar CLS al cargar la fuente */
  overflow-x: clip;
}

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

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.16em; }

/* Titulares — equilibrio de líneas (evita huérfanas) */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
p { text-wrap: pretty; }

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

strong { font-weight: 650; }

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

/* Foco visible y consistente para teclado (a11y) */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) { outline: none; }

/* Saltar al contenido (a11y) */
.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100%;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--bg-inverse);
  color: var(--text-inverse);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus-visible { top: var(--space-md); }

/* Sólo lectores de pantalla */
.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;
}

/* Respeta usuarios que reducen movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Viewport fit — el hero llena la pantalla sin recortar; secciones por contenido.
   Ver references/viewport-fit-system.md. "Caber" nunca significa clipear.
   ========================================================================== */

/* HERO: llena EXACTAMENTE una pantalla bajo el header sticky. El header es position:sticky
   (ocupa --header-h EN EL FLUJO), por eso se RESTA --header-h — NO se suma como padding. Sumarlo
   hace el hero = header + 100svh y se pasa de una pantalla (bug real). Contenido centrado, compacto
   y escalable con la altura. NUNCA height:100vh; NUNCA max-height que recorte el TEXTO. El hero se
   diseña para CABER; si el copy fuera excesivo, el salvavidas JS baja la escala (no crece, no clipea). */
.hero {
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-content: center;
  gap: clamp(0.8rem, 2svh, 1.75rem);
  padding-block: clamp(1rem, 2.4svh, 2.25rem);
  padding-inline: var(--gutter);
}
/* Tope del titular DELIBERADAMENTE bajo (<=3.6rem): en monitores anchos evita el titular gigante
   que se parte en 4 líneas y empuja los CTA fuera de pantalla. Mezcla ancho (vw) + alto (svh). */
.hero__title {
  font-size: clamp(1.9rem, 1.2rem + 2vw + 1.4svh, 3.6rem);
  line-height: 1.05;
  text-wrap: balance;
}
.hero__subtitle { font-size: clamp(1rem, 1.4svh + 0.4vw, 1.3rem); max-width: 46ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Salvavidas opcional: si el contenido excede el alto, encoge la escala (no recorta, no crece). */
[data-hero-fit] > * { font-size: calc(1em * var(--hero-scale, 1)); }

/* Media del hero: en móvil (apilada bajo el texto) se limita para que TEXTO+IMAGEN quepan;
   en escritorio (2 col) se limita para no exceder el alto. object-fit:cover evita deformar. */
/* MÓVIL/TABLET: hero de ALTURA DEFINIDA; el texto va compacto y la 2ª columna apilada (imagen)
   toma SOLO el hueco restante bajo el texto (flex-fill). Así el hero nunca se pasa de una pantalla,
   sin importar el largo del copy — si el texto fuera enorme, la imagen se encoge (no desborda). */
@media (max-width: 59.99rem) {
  /* '.hero .hero-grid' (0,2,0) para GANARLE a layout.css '.hero-grid{display:grid}' (0,1,0), que se
     concatena después; si no, el grid seguiría activo y la imagen no tomaría el hueco restante. */
  .hero { display: flex; height: calc(100svh - var(--header-h)); min-height: 0; align-items: stretch; }
  .hero > .container { display: flex; flex-direction: column; min-height: 0; }
  .hero .hero-grid { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; gap: clamp(0.7rem, 2svh, 1.2rem); align-items: stretch; }
  .hero .hero-grid > :first-child { flex: 0 0 auto; }                                   /* texto: alto natural */
  .hero .hero-grid > :last-child:not(:first-child) { flex: 1 1 auto; min-height: 0; overflow: hidden; aspect-ratio: auto; } /* media: el resto */
  /* !important vence cualquier aspect-ratio/height en línea del autor: la imagen SIEMPRE llena el hueco
     restante y recorta con object-fit (centrado), garantizando que el hero quepa en una pantalla. */
  .hero .hero-grid > :last-child:not(:first-child) img { height: 100% !important; width: 100%; max-height: none !important; object-fit: cover; aspect-ratio: auto !important; }
  .hero__title { font-size: clamp(1.65rem, 5.5vw + 0.4rem, 2.5rem); }
  .hero__lead { font-size: 1rem; line-height: 1.45; }
}
/* ESCRITORIO: 2 columnas; la imagen se limita para no exceder el alto de la pantalla. */
@media (min-width: 60rem) {
  .hero-grid img, .hero-grid > figure, .hero-grid > .hero__media { max-height: calc(100svh - var(--header-h) - 4rem); object-fit: cover; }
}

/* Pantallas de POCA ALTURA: compactar por tramos para caber en laptops cortas / ventanas con
   muchas barras. El desborde real ocurrió a 1920x900 (ancha pero baja), no solo en móvil horizontal. */
@media (max-height: 820px) {
  .hero { padding-block: clamp(0.85rem, 1.8svh, 1.4rem); }
  .hero__title { font-size: clamp(1.7rem, 1.05rem + 1.7vw + 1svh, 2.9rem); }
}
@media (max-height: 660px) {
  .hero__title { font-size: clamp(1.5rem, 1rem + 1.5vw, 2.35rem); line-height: 1.06; }
  .hero__subtitle { font-size: 0.98rem; }
}
@media (max-height: 560px) {
  .hero { min-height: auto; align-content: start; padding-block: clamp(0.75rem, 1.5svh, 1.1rem); }
  .hero__title { font-size: clamp(1.5rem, 6.5vw, 2.2rem); }
}

/* SECCIONES: altura por contenido, NUNCA fija. Padding proporcional. */
.section { padding-block: clamp(3rem, 8vw, 6rem); padding-inline: var(--gutter); }
.section--tight { padding-block: clamp(2rem, 5vw, 3.5rem); }

/* Sección full-screen SOLO para storytelling deliberado (no de contenido). */
.section--fullscreen {
  min-height: 100svh;      /* NO height:100vh */
  display: grid;
  align-content: center;
}
@media (max-height: 560px) { .section--fullscreen { min-height: auto; } }
/* ==========================================================================
   layout.css — Containers, grids, section rhythm
   ========================================================================== */

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

/* Section header block */
.sec-head { max-width: 46rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.sec-head--center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5ch;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--primary-strong);
}
.eyebrow::before {
  content: ""; inline-size: 1.75rem; block-size: 2px;
  background: var(--primary); border-radius: 2px;
}
.sec-head--center .eyebrow::before { display: none; }
.sec-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-4);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-top: 0.6rem;
}
.sec-sub { color: var(--text-muted); font-size: var(--step-1); margin-top: 0.9rem; max-width: 44ch; }
.sec-head--center .sec-sub { margin-inline: auto; }

/* Generic responsive grids */
.grid { display: grid; gap: clamp(1rem, 2.4vw, 1.75rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 62rem) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 40rem) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.section { padding-block: clamp(3.25rem, 8vw, 6.5rem); padding-inline: var(--gutter); }
.section--tight { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section--sunken { background: var(--bg-sunken); }
.section--brand {
  background:
    radial-gradient(120% 90% at 85% 0%, oklch(30% 0.06 150 / 0.55), transparent 60%),
    var(--bg-brand);
  color: var(--text-on-brand);
}
.section--brand .sec-title { color: var(--paper); }
.section--brand .sec-sub { color: oklch(85% 0.02 120); }
/* ==========================================================================
   components.css — Texans Tree Service (preview v2)
   Custom header/footer, full-bleed hero, service cards, estimate tool (star),
   work gallery, trust, service area, CTA bands, sticky call bar, motion.
   ========================================================================== */

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55ch;
  padding: 0.9rem 1.5rem; min-height: 3rem;
  font-family: var(--font-display); font-weight: 700; font-size: var(--step-0);
  line-height: 1; letter-spacing: 0.01em; text-decoration: none; white-space: nowrap;
  border-radius: var(--radius-pill); border: 2px solid transparent; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.btn--primary { background: var(--primary); color: var(--primary-contrast); box-shadow: 0 6px 18px oklch(65% 0.18 50 / 0.35); }
.btn--primary:hover { background: var(--primary-strong); transform: translateY(-2px); box-shadow: 0 10px 26px oklch(60% 0.18 50 / 0.42); }
.btn--ghost { background: color-mix(in oklch, var(--white) 12%, transparent); color: var(--paper); border-color: color-mix(in oklch, var(--white) 45%, transparent); backdrop-filter: blur(4px); }
.btn--ghost:hover { background: color-mix(in oklch, var(--white) 22%, transparent); transform: translateY(-2px); }
.btn--solid-forest { background: var(--forest-800); color: var(--paper); }
.btn--solid-forest:hover { background: var(--forest-700); transform: translateY(-2px); }
.btn--lg { padding: 1.05rem 1.9rem; min-height: 3.4rem; font-size: var(--step-1); }
.btn--block { width: 100%; }
.btn__icon { display: inline-flex; }

/* ---- Header (bold forest bar, solidifies on scroll) ---------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100; block-size: var(--header-h);
  display: flex; align-items: center;
  background: linear-gradient(180deg, var(--forest-950), var(--forest-900));
  color: var(--paper);
  border-block-end: 1px solid oklch(40% 0.05 150 / 0.5);
  transition: box-shadow var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.site-header[data-scrolled="true"] { box-shadow: 0 10px 30px oklch(19% 0.03 150 / 0.35); }
.nav { display: flex; align-items: center; gap: 1.5rem; inline-size: 100%; }
.brand-lockup { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--paper); margin-inline-end: auto; }
.brand-lockup__mark {
  inline-size: 2.5rem; block-size: 2.5rem; display: grid; place-items: center;
  color: var(--accent-gold); background: oklch(28% 0.05 150); border-radius: 12px;
  border: 1px solid oklch(45% 0.06 150 / 0.6);
}
.brand-lockup__name { display: grid; line-height: 1; }
.brand-lockup__name b { font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; letter-spacing: 0.02em; }
.brand-lockup__name span { font-family: var(--font-display); font-weight: 600; font-size: 0.66rem; letter-spacing: 0.34em; color: var(--forest-400); text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links a {
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; text-decoration: none;
  color: oklch(90% 0.02 130); padding: 0.3rem 0; position: relative;
}
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--accent-gold); transition: width var(--dur) var(--ease-out); }
.nav-links a:hover { color: var(--paper); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }

.header-phone { display: inline-flex; align-items: center; gap: 0.5ch; color: var(--paper); text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; }
.header-phone .btn__icon { color: var(--accent-gold); }
.header-cta { display: inline-flex; }
.nav-toggle { display: none; color: var(--paper); padding: 0.4rem; border-radius: 8px; }

@media (max-width: 60rem) {
  .nav-links, .header-phone, .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 95;
  background: linear-gradient(180deg, var(--forest-950), var(--forest-900));
  color: var(--paper); padding: 1.5rem var(--gutter) 2.5rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.mobile-menu[data-open="true"] { opacity: 1; transform: none; pointer-events: auto; }
.mobile-menu a { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; text-decoration: none; color: var(--paper); padding: 0.85rem 0; border-bottom: 1px solid oklch(40% 0.05 150 / 0.5); }
.mobile-menu .btn { margin-top: 1.25rem; }

/* ---- Hero (full-bleed, one screen) --------------------------------------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  color: var(--paper);
  background: var(--forest-950);
}
.hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(94deg, oklch(18% 0.03 150 / 0.94) 0%, oklch(18% 0.03 150 / 0.74) 42%, oklch(18% 0.03 150 / 0.30) 100%),
    linear-gradient(0deg, oklch(16% 0.03 150 / 0.7), transparent 45%);
}
.hero__inner { max-width: 44rem; }
.hero__eyebrow { color: var(--accent-gold); font-family: var(--font-display); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; font-size: var(--step--1); display: inline-flex; align-items: center; gap: 0.6ch; }
.hero__title { color: var(--paper); font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; margin-top: 0.6rem; }
.hero__title em { color: var(--accent-gold); font-style: normal; }
.hero__lead { color: oklch(92% 0.015 120); max-width: 40ch; margin-top: 0.9rem; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 1.4rem; list-style: none; padding: 0; }
.hero__trust li { display: inline-flex; align-items: center; gap: 0.5ch; font-size: 0.92rem; font-weight: 600; color: oklch(90% 0.02 120); }
.hero__trust svg { color: var(--accent-gold); flex: none; }

/* ---- Chips / pills ------------------------------------------------------- */
.chip { display: inline-flex; align-items: center; gap: 0.5ch; padding: 0.4rem 0.85rem; border-radius: var(--radius-pill); font-size: 0.85rem; font-weight: 600; background: var(--brand-tint); color: var(--forest-700); }

/* ---- Service cards ------------------------------------------------------- */
.svc-card {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--bg-elevated); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--forest-200); }
.svc-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.svc-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.svc-card:hover .svc-card__media img { transform: scale(1.06); }
.svc-card__icon { position: absolute; left: 0.85rem; top: 0.85rem; inline-size: 2.6rem; block-size: 2.6rem; display: grid; place-items: center; border-radius: 12px; background: color-mix(in oklch, var(--forest-950) 78%, transparent); color: var(--accent-gold); backdrop-filter: blur(3px); }
.svc-card__body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.svc-card__title { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.svc-card__body p { color: var(--text-muted); font-size: 0.98rem; }
.svc-card__link { margin-top: auto; padding-top: 0.4rem; display: inline-flex; align-items: center; gap: 0.5ch; font-family: var(--font-display); font-weight: 700; color: var(--primary-strong); text-decoration: none; }
.svc-card__link svg { transition: transform var(--dur) var(--ease-out); }
.svc-card:hover .svc-card__link svg { transform: translateX(4px); }

/* ---- Estimate tool (STAR) ------------------------------------------------ */
.estimate { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.25rem, 3vw, 2.25rem); align-items: start; }
@media (max-width: 60rem) { .estimate { grid-template-columns: 1fr; } }

.estimate__panel {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--shadow);
}
.estimate__legend { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; display: flex; align-items: center; gap: 0.6ch; }
.estimate__legend .step-n { inline-size: 1.6rem; block-size: 1.6rem; display: grid; place-items: center; border-radius: 999px; background: var(--forest-800); color: var(--paper); font-size: 0.85rem; }
.estimate__hint { color: var(--text-muted); font-size: 0.9rem; margin: 0.35rem 0 0.9rem; }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 1.4rem; }
.opt {
  display: flex; align-items: center; gap: 0.7ch; text-align: left;
  padding: 0.85rem 0.95rem; border-radius: var(--radius); border: 2px solid var(--border);
  background: var(--bg); color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 0.98rem;
  cursor: pointer; transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.opt svg { color: var(--forest-600); flex: none; }
.opt:hover { border-color: var(--forest-400); transform: translateY(-1px); }
.opt[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-tint); }
.opt[aria-pressed="true"] svg { color: var(--primary-strong); }
.opt small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.78rem; color: var(--text-muted); }

.estimate__result {
  background:
    radial-gradient(120% 100% at 100% 0%, oklch(30% 0.06 150 / 0.6), transparent 55%),
    var(--forest-900);
  color: var(--paper); border-radius: var(--radius-lg); padding: clamp(1.35rem, 3vw, 2rem);
  min-height: 100%; box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.estimate__result h3 { color: var(--paper); font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 1rem + 1.6vw, 1.9rem); }
.estimate__badge { display: inline-flex; align-items: center; gap: 0.5ch; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--forest-950); background: var(--accent-gold); padding: 0.3rem 0.7rem; border-radius: 999px; }
.estimate__reco { display: flex; align-items: center; gap: 0.8rem; margin: 0.9rem 0 0.4rem; }
.estimate__reco .ic { inline-size: 3rem; block-size: 3rem; flex: none; display: grid; place-items: center; border-radius: 14px; background: oklch(28% 0.05 150); color: var(--accent-gold); border: 1px solid oklch(45% 0.06 150 / 0.6); }
.estimate__desc { color: oklch(88% 0.02 120); margin-top: 0.5rem; }
.estimate__list { list-style: none; padding: 0; margin: 1rem 0 1.25rem; display: grid; gap: 0.55rem; }
.estimate__list li { display: flex; gap: 0.7ch; align-items: flex-start; font-size: 0.96rem; color: oklch(91% 0.015 120); }
.estimate__list svg { color: var(--accent-gold); flex: none; margin-top: 0.15rem; }
.estimate__cta { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.estimate__note { font-size: 0.8rem; color: oklch(78% 0.02 120); margin-top: 0.9rem; }
.estimate__result [data-swap] { transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.estimate__result.is-updating [data-swap] { opacity: 0; transform: translateY(6px); }

/* ---- Work gallery -------------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem; grid-auto-flow: dense; }
@media (max-width: 60rem) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 40rem) { .gallery { grid-template-columns: 1fr 1fr; } }
.gtile { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 1 / 1; box-shadow: var(--shadow-sm); }
.gtile--tall { grid-row: span 2; aspect-ratio: 1 / 2; }
.gtile--wide { grid-column: span 2; aspect-ratio: 2 / 1; }
@media (max-width: 40rem) { .gtile--tall { grid-row: span 2; aspect-ratio: 1 / 2; } .gtile--wide { grid-column: span 2; aspect-ratio: 2 / 1; } }
.gtile img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.gtile:hover img { transform: scale(1.05); }
.gtile figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem 0.9rem 0.7rem;
  font-size: 0.82rem; font-weight: 600; color: var(--paper);
  background: linear-gradient(0deg, oklch(16% 0.03 150 / 0.9), transparent);
  opacity: 0; transform: translateY(6px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.gtile:hover figcaption, .gtile:focus-within figcaption { opacity: 1; transform: none; }

/* ---- Why us -------------------------------------------------------------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2.4vw, 1.6rem); }
@media (max-width: 62rem) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 34rem) { .why-grid { grid-template-columns: 1fr; } }
.why-card { padding: 1.4rem; border-radius: var(--radius-lg); background: var(--bg-elevated); border: 1px solid var(--border); }
.why-card .ic { inline-size: 3rem; block-size: 3rem; display: grid; place-items: center; border-radius: 14px; background: var(--brand-tint); color: var(--forest-700); margin-bottom: 0.9rem; }
.why-card h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.18rem; margin-bottom: 0.35rem; }
.why-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ---- Service area -------------------------------------------------------- */
.area { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 60rem) { .area { grid-template-columns: 1fr; } }
.area__list { columns: 2; column-gap: 1.5rem; margin: 1.25rem 0 1.5rem; padding: 0; list-style: none; }
.area__list li { display: flex; align-items: center; gap: 0.5ch; padding: 0.32rem 0; font-weight: 600; color: var(--text); break-inside: avoid; }
.area__list svg { color: var(--primary-strong); flex: none; }
.map-facade {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow); background:
    radial-gradient(90% 70% at 30% 20%, oklch(52% 0.09 150 / 0.35), transparent 60%),
    repeating-linear-gradient(90deg, oklch(90% 0.02 120), oklch(90% 0.02 120) 1px, transparent 1px, transparent 34px),
    repeating-linear-gradient(0deg, oklch(90% 0.02 120), oklch(90% 0.02 120) 1px, transparent 1px, transparent 34px),
    var(--paper-2);
  min-height: 17rem; display: grid; place-items: center; text-align: center; padding: 1.5rem;
}
.map-facade__pin { color: var(--primary-strong); filter: drop-shadow(0 6px 10px oklch(60% 0.18 50 / 0.4)); }
.map-facade__card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.15rem; box-shadow: var(--shadow-sm); }
.map-facade__card strong { font-family: var(--font-display); }
.map-facade__card a { color: var(--primary-strong); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4ch; margin-top: 0.4rem; }

/* ---- Reviews-live slot (honest, links out — no fabricated ratings) ------- */
.reviews-live { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.review-link { display: inline-flex; align-items: center; gap: 0.6ch; padding: 0.85rem 1.25rem; border-radius: var(--radius-pill); background: var(--bg-elevated); border: 1px solid var(--border); font-family: var(--font-display); font-weight: 700; color: var(--text); text-decoration: none; box-shadow: var(--shadow-sm); transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out); }
.review-link:hover { transform: translateY(-2px); border-color: var(--forest-400); }
.review-link svg { color: var(--accent-gold); }

/* ---- Big CTA band -------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band__title { font-family: var(--font-display); font-weight: 800; font-size: var(--step-4); color: var(--paper); letter-spacing: -0.02em; }
.cta-band__sub { color: oklch(86% 0.02 120); margin: 0.8rem auto 1.5rem; max-width: 42ch; }
.cta-band__ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }
.cta-band__meta { margin-top: 1.25rem; color: oklch(80% 0.02 120); font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.6ch; }

/* ---- Footer -------------------------------------------------------------- */
.site-footer { background: linear-gradient(180deg, var(--forest-900), var(--forest-950)); color: oklch(86% 0.02 120); }
.footer-cta { text-align: center; padding: clamp(2.5rem, 6vw, 4rem) var(--gutter); border-bottom: 1px solid oklch(40% 0.05 150 / 0.5); }
.footer-cta h2 { font-family: var(--font-display); font-weight: 800; color: var(--paper); font-size: var(--step-3); }
.footer-cta p { margin: 0.6rem auto 1.3rem; max-width: 40ch; color: oklch(84% 0.02 120); }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: clamp(1.5rem, 3vw, 2.5rem); padding-block: clamp(2.5rem, 5vw, 3.5rem); }
@media (max-width: 60rem) { .footer-main { grid-template-columns: 1fr 1fr; } }
@media (max-width: 34rem) { .footer-main { grid-template-columns: 1fr; } }
.footer-logo-chip { display: inline-flex; background: var(--paper); padding: 0.7rem 0.95rem; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.footer-logo-chip img { height: 2.4rem; width: auto; }
.footer-about p { margin-top: 0.9rem; color: oklch(80% 0.02 120); max-width: 32ch; }
.footer-col h3 { font-family: var(--font-display); font-weight: 800; color: var(--paper); font-size: 1rem; letter-spacing: 0.02em; margin-bottom: 0.9rem; }
.footer-col a, .footer-col address { display: block; color: oklch(82% 0.02 120); text-decoration: none; font-style: normal; padding: 0.28rem 0; }
.footer-col a:hover { color: var(--paper); }
.footer-nap a { padding: 0; display: inline; }
.footer-nap .phone-big { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--paper); }
.footer-hours { color: oklch(80% 0.02 120); font-size: 0.92rem; }
.footer-bottom { border-top: 1px solid oklch(40% 0.05 150 / 0.5); padding: 1.4rem var(--gutter); display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; align-items: center; justify-content: space-between; font-size: 0.85rem; }
.studio-credit { color: oklch(78% 0.02 120); }
.studio-credit__link { color: var(--accent-gold); text-decoration: none; font-weight: 600; }
.studio-credit__link:hover { text-decoration: underline; }

/* ---- Sticky mobile call bar --------------------------------------------- */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: none; gap: 0.6rem; padding: 0.6rem calc(var(--gutter) * 0.6);
  padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
  background: color-mix(in oklch, var(--forest-950) 92%, transparent);
  backdrop-filter: blur(10px); border-top: 1px solid oklch(40% 0.05 150 / 0.6);
}
.callbar .btn { flex: 1; }
.callbar__hint { display: none; }
@media (max-width: 60rem) { .callbar { display: flex; } body { padding-bottom: 4.5rem; } }

/* ---- Scroll reveal ------------------------------------------------------- */
/* JS-gated: without the .js class (no/slow JS) content is fully visible — the
   reveal is a pure enhancement and never traps content in opacity:0. Equal
   specificity to .reveal.is-in, which is declared after, so is-in wins. */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); will-change: opacity, transform; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .svc-card__media img, .gtile img { transition: none !important; }
}
/* ==========================================================================
   utilities.css — helpers (end of cascade)
   ========================================================================== */
.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; }
.visually-hidden { position: absolute !important; clip: rect(0 0 0 0); width: 1px; height: 1px; overflow: hidden; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
