/* ==========================================================================
   Casa Verde Services — Hoja de estilos principal
   Autor: Desarrollo web · Fase HTML/CSS/JS (previa a Astro)
   Organización:
     1. Tokens de diseño (variables)
     2. Reset y base
     3. Utilidades / layout
     4. Componentes reutilizables (botones, píldoras, etiquetas)
     5. Header y navegación
     6. Secciones (hero, servicios, ... , footer)
     7. Formulario de cotización
     8. Botón flotante de WhatsApp
     9. Responsive
    10. Accesibilidad / motion
   ========================================================================== */

/* 1. TOKENS DE DISEÑO ------------------------------------------------------ */
:root {
  /* Colores de marca */
  --green-900: #0F2E20;
  --green-800: #14402C;
  --green-700: #1B4E36;
  --green-600: #1E5E3E;
  --green-400: #4EB57F;
  --green-100: #EAF4EE;
  --green-50:  #F0F7F3;

  --cream:     #FBFAF7;
  --cream-2:   #F3F1EA;
  --ink:       #22262B;
  --muted:     #4A5158;
  --muted-2:   #6B7278;
  --line:      #E6E3DA;
  --line-2:    #E0DDD2;
  --white:     #ffffff;

  /* Tipografía */
  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Rubik", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Escala tipográfica fluida */
  --fs-hero:  clamp(2.375rem, 5.2vw, 3.75rem);
  --fs-h2:    clamp(1.8rem, 3.4vw, 2.625rem);
  --fs-h3:    clamp(1.3rem, 2.4vw, 1.5rem);
  --fs-lead:  clamp(1.05rem, 1.6vw, 1.16rem);

  /* Espaciado */
  --space-section: clamp(4rem, 8vw, 6rem);
  --container: 1240px;
  --gutter: clamp(1.125rem, 3vw, 1.5rem);

  /* Formas */
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(20, 64, 44, .06);
  --shadow: 0 12px 34px rgba(20, 64, 44, .10);
  --shadow-lg: 0 24px 60px rgba(15, 46, 32, .16);

  /* Transiciones */
  --t-fast: .18s ease;
  --t: .28s ease;

  --header-h: 108px;
}

/* 2. RESET Y BASE ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--cream);
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--green-800);
  text-wrap: balance;
}
p { margin: 0; }
img { max-width: 100%; display: block; height: auto; }

a { color: var(--green-600); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--green-400); }

ul { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; }

::selection { background: var(--green-400); color: var(--green-900); }

:focus-visible {
  outline: 3px solid var(--green-400);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Enlace de salto para accesibilidad */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--green-800);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-weight: 600;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 12px; color: #fff; }

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

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

/* Compensa el header sticky al saltar a un ancla del menú */
section[id], main[id] { scroll-margin-top: calc(var(--header-h) + 14px); }

.eyebrow {
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--green-400);
  margin-bottom: .9rem;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.62;
  color: var(--muted);
  font-weight: 300;
}

.section-head { max-width: 660px; margin-bottom: 2.75rem; }
.section-head h2 { font-size: var(--fs-h2); }
.section-head .lead { margin-top: 1.1rem; }

/* Acento en cursiva verde dentro de los títulos */
.accent {
  font-style: italic;
  font-weight: 500;
  color: var(--green-600);
}
.on-dark .accent, .accent--light { color: var(--green-400); }

.grid { display: grid; gap: 1.125rem; }
.auto-fit { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.auto-fit--sm { grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr)); }

/* Utilidades de espaciado y variantes puntuales */
.eyebrow--green { color: var(--green-600); }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.6rem; }
.mt-4 { margin-top: 1.75rem; }
.self-start { align-self: flex-start; }

/* 4. COMPONENTES ----------------------------------------------------------- */
.btn {
  --btn-bg: var(--green-800);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: 1.05rem 1.75rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.btn:hover { background: var(--green-600); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0) scale(.99); box-shadow: none; }
.btn:focus-visible { outline: 3px solid var(--green-400); outline-offset: 3px; }

.btn--sm { padding: .8rem 1.35rem; font-size: .9rem; }

.btn--ghost {
  --btn-bg: #fff;
  --btn-fg: var(--green-800);
  border-color: var(--line-2);
}
.btn--ghost:hover { background: #fff; color: var(--green-800); border-color: var(--green-400); }

.btn--accent {
  --btn-bg: var(--green-400);
  --btn-fg: var(--green-900);
}
.btn--accent:hover { background: #fff; color: var(--green-800); }

.btn--on-dark.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: #fff;
  border-color: rgba(255,255,255,.28);
}
.btn--on-dark.btn--ghost:hover { background: rgba(255,255,255,.08); color: #fff; border-color: var(--green-400); }

.btn--block { width: 100%; }

/* Enlace de texto con subrayado de acento */
.link-underline {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  color: var(--green-800);
  border-bottom: 2px solid var(--green-400);
  padding-bottom: 4px;
}
.link-underline:hover { color: var(--green-400); }
.on-dark .link-underline { color: #fff; }
button.link-underline { background: none; cursor: pointer; border: 0; border-bottom: 2px solid var(--green-400); margin-top: .5rem; }

.link-arrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .92rem;
  color: var(--green-600);
}
.link-arrow:hover { color: var(--green-400); }

/* Flecha animable dentro de enlaces */
.arw { display: inline-block; margin-left: .25em; transition: transform var(--t-fast); }
.link-arrow:hover .arw,
.link-underline:hover .arw { transform: translateX(5px); }

.pill {
  display: inline-block;
  font-size: .84rem;
  font-weight: 300;
  color: var(--green-600);
  background: var(--green-100);
  padding: .5rem .9rem;
  border-radius: var(--radius-pill);
}

/* Marcador de posición de imagen (fallback si una foto no carga) */
.ph {
  background-color: #EDEAE1;
  background-image: repeating-linear-gradient(135deg, #E2DED2 0 8px, #EDEAE1 8px 16px);
}

/* Marco de imagen reutilizable */
.frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--cream-2);
}
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }

/* Zoom sutil de la imagen al hacer hover en tarjetas con foto */
.card:hover .frame img,
.service-card:hover .frame img,
.service-wide:hover .frame img,
.post-card:hover .frame img,
.biz-card:hover .frame img,
.jobs-card:hover .frame img { transform: scale(1.05); }

/* Cursor de "ampliable" en imágenes con lightbox */
[data-lightbox] { cursor: zoom-in; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.card:hover { border-color: var(--green-400); transform: translateY(-3px); box-shadow: var(--shadow); }

/* 5. HEADER Y NAVEGACIÓN --------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 250, 247, .9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--t), background var(--t);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(15, 46, 32, .09); background: rgba(251, 250, 247, .96); }
.site-header.is-scrolled .header-inner { padding-block: .5rem; }
.site-header.is-scrolled .brand img { height: 60px; }
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: .9rem;
  transition: padding var(--t);
}
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 76px; width: auto; transition: height var(--t); }

.nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-left: auto;
  font-size: .93rem;
  font-weight: 400;
}
.nav a { color: #3A4046; position: relative; }
.nav a:hover { color: var(--green-600); }
.nav a.is-active { color: var(--green-800); }
/* Subrayado animado (solo escritorio, donde el menú es horizontal) */
@media (min-width: 901px) {
  .nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 2px;
    background: var(--green-400);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t-fast);
  }
  .nav a:hover::after,
  .nav a.is-active::after { transform: scaleX(1); }
}

.header-actions { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.header-phone {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .88rem;
  color: var(--green-800);
  padding: .7rem 1rem;
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-pill);
}
.header-phone:hover { border-color: var(--green-800); color: var(--green-800); }

/* Botón hamburguesa (oculto en escritorio) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid var(--line-2);
  border-radius: 12px;
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--green-800);
  border-radius: 2px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 6. SECCIONES ------------------------------------------------------------- */

/* Hero */
.hero { padding-top: clamp(3rem, 6vw, 4.5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .9rem .45rem .65rem;
  border-radius: var(--radius-pill);
  background: var(--green-100);
  color: var(--green-600);
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: 1.6rem;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-400); }
.hero h1 { font-size: var(--fs-hero); line-height: 1.05; letter-spacing: -.025em; }
.hero .lead { margin-top: 1.4rem; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-proof {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.2rem;
  padding-top: 1.9rem;
  border-top: 1px solid var(--line);
}
.avatars { display: flex; }
.avatars span {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2.5px solid var(--cream);
}
.avatars span + span { margin-left: -13px; }
.avatars .a1 { background: #D9E7DF; }
.avatars .a2 { background: #C3DDCE; }
.avatars .a3 { background: #A8CFBB; }
.avatars .a4 {
  background: var(--green-800); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: .72rem; font-weight: 700;
}
.hero-proof strong { font-family: var(--font-head); font-size: .95rem; color: var(--green-800); display: block; }
.hero-proof small { font-size: .84rem; color: var(--muted-2); }

.hero-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: .9rem;
}
.hero-media .tall { grid-row: span 2; aspect-ratio: .72; }
.hero-media .wide { aspect-ratio: 1.15; }
.hero-quote-card {
  border-radius: var(--radius);
  background: var(--green-800);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 170px;
}
.hero-quote-card .k {
  font-family: var(--font-head); font-size: .8rem; font-weight: 600;
  color: var(--green-400); letter-spacing: .08em; text-transform: uppercase;
}
.hero-quote-card .big {
  font-family: var(--font-head); font-size: 2.1rem; font-weight: 800;
  color: #fff; line-height: 1.05;
}
.hero-quote-card small { font-size: .84rem; color: #B9CFC3; margin-top: .5rem; display: block; }

/* Servicios */
.services-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2.5rem; flex-wrap: wrap; margin-bottom: 2.9rem;
}
.services-head > div { max-width: 640px; }

/* Grid de servicios: 3 columnas fijas para que no queden huecos.
   (Con auto-fit, la tarjeta ancha 1/-1 "ocupaba" una 4ª columna y dejaba un vacío.) */
.services .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .services .grid { grid-template-columns: 1fr; } }
.service-card { overflow: hidden; display: flex; flex-direction: column; }
.service-card .frame { border-radius: 0; aspect-ratio: 1.5; }
.service-card .body { padding: 1.6rem 1.5rem 1.75rem; display: flex; flex-direction: column; flex: 1; }
.service-card h3 { font-size: 1.44rem; }
.service-card p { margin-top: .75rem; font-size: .97rem; color: var(--muted); flex: 1; }
.service-card .link-arrow { margin-top: 1.25rem; }

.service-wide { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); overflow: hidden; }
.service-wide .body { padding: clamp(1.75rem, 3vw, 2.4rem); justify-content: center; }
.service-wide .frame { border-radius: 0; min-height: 320px; }
.service-wide h3 { font-size: var(--fs-h3); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }

.service-cta { background: var(--green-800); border-color: var(--green-800); padding: 1.9rem 1.75rem; display: flex; flex-direction: column; justify-content: space-between; }
.service-cta h3 { color: #fff; }
.service-cta p { color: #B9CFC3; }
.service-cta:hover { transform: translateY(-3px); }

/* Empresas */
.business { background: var(--cream-2); border-block: 1px solid var(--line); }
.biz-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast); }
.biz-card .frame { border-radius: 0; aspect-ratio: 1.7; }
.biz-body { padding: 1.6rem 1.6rem 1.75rem; display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.biz-card:hover { border-color: var(--green-400); transform: translateY(-3px); box-shadow: var(--shadow); }
.biz-card:hover .biz-num { background: var(--green-400); color: var(--green-900); }
.biz-num { transition: background var(--t-fast), color var(--t-fast); }
.biz-num {
  width: 36px; height: 36px; border-radius: 10px; background: var(--green-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--green-600); font-family: var(--font-head); font-weight: 700; font-size: .88rem;
}
.biz-card h3 { font-size: 1.32rem; }
.biz-card p { font-size: .97rem; color: var(--muted); flex: 1; }

/* Compromiso (oscuro) */
.commitment { background: var(--green-800); color: #fff; }
.commitment h2, .commitment h3 { color: #fff; }
.commitment .glass {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
}
.commitment .glass h3 { font-size: 1.18rem; line-height: 1.3; }
.commitment .glass p { margin-top: .75rem; font-size: .94rem; color: #B9CFC3; }
.commitment .split { margin-top: 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.commitment .frame { min-height: 300px; background: var(--green-700); }
.commitment .promo {
  border-radius: var(--radius); background: var(--green-400); padding: clamp(1.75rem, 3vw, 2.25rem);
  display: flex; flex-direction: column; justify-content: center; color: var(--green-900);
}
.commitment .promo h3 { color: var(--green-900); font-size: 1.5rem; line-height: 1.2; }
.promo-list { list-style: none; margin: 1.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.promo-list li { display: flex; flex-direction: column; gap: .15rem; }
.promo-list strong { font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; color: var(--green-900); }
.promo-list span { font-size: .92rem; line-height: 1.5; color: #0F3323; }

/* Nosotros */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.about-media { margin-top: 2rem; aspect-ratio: 1.3; }
.about-list { display: flex; flex-direction: column; }
.about-item {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: auto 1fr; gap: 1.15rem;
}
.about-item:last-child { border-bottom: 1px solid var(--line); }
.about-item .n { font-family: var(--font-head); font-weight: 700; font-size: .82rem; color: var(--green-400); padding-top: 4px; }
.about-item h4 { font-size: 1.18rem; }
.about-item p { margin-top: .5rem; font-size: .97rem; color: var(--muted); }

/* Antes y después */
.ba-wrap {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.75rem);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(1.75rem, 3vw, 2.75rem); align-items: center;
}
.ba-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.ba-gallery figure { margin: 0; }
.ba-gallery .frame { aspect-ratio: 1.25; border-radius: 18px; }
.ba-tag {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--font-head); font-weight: 700; font-size: .72rem; letter-spacing: .1em;
  padding: .38rem .75rem; border-radius: var(--radius-pill);
}
.ba-tag.antes { color: var(--green-800); background: #fff; }
.ba-tag.despues { color: #fff; background: var(--green-800); }

/* Testimonios */
.testimonials { background: var(--cream-2); border-block: 1px solid var(--line); }
.quote-card { background: #fff; border-radius: var(--radius); padding: 1.75rem 1.6rem; display: flex; flex-direction: column; gap: 1.1rem; margin: 0; }
.stars { color: var(--green-400); font-size: .95rem; letter-spacing: 2px; }
.quote-card blockquote { margin: 0; font-size: 1rem; line-height: 1.62; color: #3A4046; flex: 1; }
.quote-card figcaption { display: flex; align-items: center; gap: .75rem; border-top: 1px solid #EFEDE6; padding-top: 1rem; }
.quote-card .who { width: 38px; height: 38px; border-radius: 50%; background: #DFEAE4; flex-shrink: 0; }
.quote-card figcaption strong { font-family: var(--font-head); font-size: .95rem; color: var(--green-800); display: block; }
.quote-card figcaption small { font-size: .82rem; color: var(--muted-2); }

/* Cómo funciona */
.step-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.9rem 1.75rem; }
.step-card .num { font-family: var(--font-head); font-weight: 800; font-size: 2.4rem; color: var(--green-100); line-height: 1; }
.step-card h3 { margin-top: .9rem; font-size: 1.32rem; }
.step-card p { margin-top: .65rem; font-size: .97rem; color: var(--muted); }
.step-card.dark { background: var(--green-800); }
.step-card.dark h3 { color: #fff; }
.step-card.dark p { color: #B9CFC3; }
.step-card.dark .num { color: rgba(78,181,127,.35); }

/* Zonas (oscuro) */
.zones { background: var(--green-800); color: #fff; }
.zones h2 { color: #fff; }
.zones .lead { color: #B9CFC3; }
.zones-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.zone-list { display: flex; flex-wrap: wrap; gap: .6rem; align-content: flex-start; }
.zone-chip {
  font-family: var(--font-head); font-weight: 500; font-size: .9rem; color: #fff;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  padding: .7rem 1.1rem; border-radius: var(--radius-pill);
}
.zone-chip:hover { background: var(--green-400); color: var(--green-900); border-color: var(--green-400); }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-of-type { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; background: none; border: 0; padding: 1.4rem 0; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
  text-align: left; font-family: var(--font-head); font-weight: 600; font-size: 1.16rem; color: var(--green-800);
}
.faq-q:hover { color: var(--green-600); }
.faq-icon {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--green-100); color: var(--green-600);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
  transition: transform var(--t), background var(--t-fast);
}
.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-a {
  overflow: hidden;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t);
}
.faq-q[aria-expanded="true"] + .faq-a { grid-template-rows: 1fr; }
.faq-a > div { min-height: 0; }
.faq-a p { font-size: 1rem; line-height: 1.65; color: var(--muted); max-width: 640px; padding-bottom: 1.5rem; }

/* Blog */
.blog { background: var(--cream-2); border-top: 1px solid var(--line); }
.blog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: 2.4rem; }
.blog-head h2 { max-width: 560px; font-size: clamp(1.7rem, 3vw, 2.375rem); }
.post-card { background: #fff; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; color: inherit; }
.post-card:hover { color: inherit; box-shadow: var(--shadow); transform: translateY(-3px); transition: transform var(--t-fast), box-shadow var(--t-fast); }
.post-card .frame { border-radius: 0; aspect-ratio: 1.6; }
.post-card .body { padding: 1.5rem; }
.post-card .cat { font-family: var(--font-mono); font-size: .7rem; color: #8A8F86; letter-spacing: .04em; }
.post-card h3 { margin-top: .65rem; font-size: 1.18rem; line-height: 1.3; }

/* Trabaja con nosotros */
.jobs-card {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff;
}
.jobs-card .frame { border-radius: 0; min-height: 340px; }
.jobs-card .body { padding: clamp(2rem, 4vw, 3rem); display: flex; flex-direction: column; justify-content: center; }
.jobs-card h2 { font-size: clamp(1.55rem, 2.8vw, 2.125rem); }
.check-list { margin-top: 1.4rem; display: flex; flex-direction: column; gap: .65rem; }
.check-list li { font-size: .97rem; color: #3A4046; display: flex; gap: .65rem; }
.check-list .ok { color: var(--green-400); }

/* 7. FORMULARIO DE COTIZACIÓN --------------------------------------------- */
.quote-panel {
  background: var(--green-800); border-radius: 28px;
  padding: clamp(1.75rem, 4vw, 3.5rem);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(2rem, 4vw, 3.25rem); align-items: start;
}
.quote-intro { position: sticky; top: calc(var(--header-h) + 20px); }
.quote-intro h2 { color: #fff; font-size: var(--fs-h2); }
.quote-intro .lead { color: #B9CFC3; margin-top: 1.25rem; max-width: 460px; }
.quote-phone {
  display: inline-flex; align-items: center; gap: .75rem; margin-top: 1.75rem;
  font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; color: #fff;
  border-bottom: 2px solid var(--green-400); padding-bottom: 6px;
}
.quote-phone:hover { color: var(--green-400); }
.quote-meta { margin-top: 2.1rem; display: flex; flex-direction: column; gap: 1rem; }
.quote-meta .k { font-family: var(--font-mono); font-size: .7rem; color: var(--green-400); letter-spacing: .08em; }
.quote-meta .v { margin-top: .35rem; font-size: 1rem; line-height: 1.55; color: #fff; }
.quote-meta .v a { color: #fff; }
.quote-meta .v a:hover { color: var(--green-400); }

.quote-form-wrap { background: var(--cream); border-radius: 22px; padding: clamp(1.75rem, 3vw, 2.25rem); }

.progress { margin-bottom: 1.6rem; }
.progress-label { font-family: var(--font-mono); font-size: .7rem; color: #8A8F86; letter-spacing: .06em; margin-bottom: .6rem; }
.progress-bar { height: 5px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: var(--green-400); border-radius: var(--radius-pill); width: 25%; transition: width .35s ease; }

/* Reset de fieldset (evita borde y el bug de min-inline-size) */
.quote-form fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.quote-form legend { padding: 0; }

.step h3 { font-size: 1.35rem; }
.step > .options { margin-top: 1.25rem; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: .6rem; }
.options--col { grid-template-columns: 1fr; }

/* Opción seleccionable (radio accesible) */
.option { position: relative; }
.option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.option .box {
  display: block; text-align: left; font-family: var(--font-body); font-size: .95rem; font-weight: 300;
  padding: .95rem 1.15rem; border-radius: 14px; background: #fff;
  border: 1.5px solid var(--line-2); color: #3A4046; transition: all var(--t-fast);
}
.option input:hover + .box { border-color: var(--green-400); }
.option input:checked + .box { background: var(--green-800); color: #fff; border-color: var(--green-800); font-weight: 500; }
.option input:focus-visible + .box { outline: 3px solid var(--green-400); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: var(--green-800); }
.field input {
  width: 100%; font-family: var(--font-body); font-size: .95rem; font-weight: 300; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
  padding: .85rem 1rem; outline: none; transition: border-color var(--t-fast);
}
.field input:focus { border-color: var(--green-400); }
.field input[aria-invalid="true"] { border-color: #C0392B; }
.field .error { font-size: .8rem; color: #C0392B; min-height: 1em; }
.fields { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.25rem; }

.step-actions { display: flex; gap: .6rem; margin-top: 1.6rem; }
.step-actions .btn { flex: 1; }
.step-actions .btn--back { flex: 0 0 auto; }

.form-note { margin-top: .9rem; font-size: .8rem; line-height: 1.5; color: #8A8F86; }

/* Estado enviado */
.quote-success { display: none; flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.25rem 0; }
.quote-success .check {
  width: 52px; height: 52px; border-radius: 50%; background: var(--green-100); color: var(--green-600);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.quote-success h3 { font-size: 1.6rem; }
.quote-form-wrap.is-sent .quote-form { display: none; }
.quote-form-wrap.is-sent .quote-success { display: flex; }

/* Modo multipaso: solo activo cuando JS está disponible */
.quote-form[data-js="on"] .step:not(.is-active) { display: none; }

/* 8. BOTÓN FLOTANTE DE WHATSAPP ------------------------------------------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  display: inline-flex; align-items: center; gap: .5rem;
  background: #25D366; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .9rem;
  padding: .85rem 1.15rem; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  transition: transform var(--t-fast);
}
.wa-float:hover { transform: translateY(-2px) scale(1.02); color: #fff; }
.wa-float svg { width: 20px; height: 20px; }
.wa-float .label { white-space: nowrap; }

/* 9. FOOTER ---------------------------------------------------------------- */
.site-footer { background: var(--green-900); color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 2.5rem; padding-top: 4.5rem; }
.footer-brand .name { font-family: var(--font-head); font-weight: 600; font-size: 1.6rem; letter-spacing: .06em; line-height: 1; }
.footer-brand .sub { font-family: var(--font-head); font-weight: 500; font-size: .95rem; letter-spacing: .34em; color: var(--green-400); margin-top: 6px; }
.footer-brand p { margin-top: 1.25rem; font-size: .95rem; color: #9FB6A9; max-width: 280px; }
.socials { display: flex; gap: .6rem; margin-top: 1.4rem; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; color: #fff; font-family: var(--font-head); font-weight: 600;
}
.socials a:hover { background: var(--green-400); color: var(--green-900); border-color: var(--green-400); }
.footer-col h4 { font-family: var(--font-head); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green-400); margin-bottom: .9rem; }
.footer-col a, .footer-col .addr { font-size: .95rem; color: #D6E2DA; font-weight: 300; display: block; padding-block: .35rem; }
.footer-col a:hover { color: var(--green-400); }
.footer-col .addr { color: #9FB6A9; line-height: 1.55; }
.footer-bottom {
  margin-top: 3.5rem; padding: 1.5rem 0 2rem; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; gap: 1.25rem; flex-wrap: wrap;
  font-size: .84rem; color: #7F998A;
}
.footer-bottom nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-bottom a { color: #7F998A; }
.footer-bottom a:hover { color: var(--green-400); }

/* 10. RESPONSIVE ----------------------------------------------------------- */
@media (max-width: 900px) {
  .nav-toggle { display: flex; margin-left: 0; }
  .header-inner { gap: .6rem; flex-wrap: nowrap; }
  .brand { margin-right: auto; }
  .brand img { height: 58px; }
  .header-actions .btn { padding: .68rem 1rem; font-size: .82rem; white-space: nowrap; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.25rem;
    margin: 0;
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
  }
  .nav.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
  .nav a { padding: .85rem .25rem; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .header-actions .header-phone { display: none; }
  .header-actions { margin-left: 0; }
}

@media (max-width: 560px) {
  :root { --header-h: 92px; }
  .hero-cta .btn, .step-actions { width: 100%; }
  .hero-media { grid-template-columns: 1fr 1fr; }
  .wa-float .label { display: none; }
  .wa-float { padding: .95rem; }
  .footer-bottom { flex-direction: column; }
  .btn { width: 100%; }
  .header-actions .btn { width: auto; }
  .quote-intro { position: static; }
}

/* 11. ACCESIBILIDAD / MOTION ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Utilidad: solo 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;
}

/* ==========================================================================
   12. INTERACCIONES Y ANIMACIONES (mejora progresiva — todo bajo .js)
   ========================================================================== */

/* --- Reveal al entrar en viewport ---
   El estado oculto SOLO aplica cuando hay JS (.js en <html>), así que sin JS
   todo se ve. El observador de main.js añade .is-visible. */
/* Grupo A — elementos no interactivos: revelan con opacidad + desplazamiento */
.js :where(.section-head, .services-head, .step-card, .glass, .about-item,
  .quote-card, .ba-wrap, .jobs-card, .zones-grid > div, .commitment .split > *) {
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}
.js :where(.section-head, .services-head, .step-card, .glass, .about-item,
  .quote-card, .ba-wrap, .jobs-card, .zones-grid > div, .commitment .split > *):not(.is-visible) {
  opacity: 0; transform: translateY(22px);
}

/* Grupo B — tarjetas interactivas: revelan SOLO con opacidad, para no
   bloquear el hover (elevación) ni el tilt 3D que usan `transform`. */
.js :where(.card, .biz-card, .post-card) {
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast), opacity .7s ease;
}
.js :where(.card, .biz-card, .post-card):not(.is-visible) { opacity: 0; }

/* --- Botón "volver arriba" --- */
.to-top {
  position: fixed; right: 20px; bottom: 84px; z-index: 69;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--green-800); color: #fff; border: 0; cursor: pointer;
  font-size: 1.25rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast), background var(--t-fast);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--green-600); transform: translateY(-3px); }

/* --- Lightbox (galería a pantalla completa) --- */
body.no-scroll { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 5vw, 4rem);
  background: rgba(15, 46, 32, .93);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t), visibility var(--t);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lb-figure { margin: 0; display: flex; flex-direction: column; gap: .85rem; align-items: center; max-width: 1100px; }
.lb-img { max-width: 100%; max-height: 78vh; width: auto; height: auto; object-fit: contain; border-radius: 12px; box-shadow: var(--shadow-lg); background: var(--cream-2); }
.lb-cap { color: #E7EFE9; font-size: .95rem; text-align: center; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.5rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: var(--green-400); color: var(--green-900); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-prev:hover { transform: translateY(-50%) scale(1.08); }
.lb-next:hover { transform: translateY(-50%) scale(1.08); }
@media (max-width: 560px) {
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
  .lb-close { top: 10px; right: 10px; }
  /* Comparadores a pantalla completa en móvil (mejor para arrastrar) */
  .ba-gallery { grid-template-columns: 1fr; }
}

/* --- Comparador interactivo antes/después --- */
.ba-slider {
  position: relative; overflow: hidden; border-radius: 18px;
  aspect-ratio: 1.25; container-type: inline-size; user-select: none; --pos: 50%;
}
.ba-slider > img,
.ba-before img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ba-before { position: absolute; inset: 0; width: var(--pos); overflow: hidden; }
.ba-before img { width: 100cqi; max-width: none; }
.ba-divider { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: #fff; transform: translateX(-1.5px); box-shadow: 0 0 0 1px rgba(15,46,32,.12); pointer-events: none; }
.ba-handle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--green-800);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 700;
  box-shadow: var(--shadow);
}
.ba-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  -webkit-appearance: none; appearance: none; background: transparent; cursor: ew-resize;
}
.ba-range:focus-visible { outline: 3px solid var(--green-400); outline-offset: 3px; }
.ba-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 46px; height: 260px; background: transparent; cursor: ew-resize; }
.ba-range::-moz-range-thumb { width: 46px; height: 260px; border: 0; background: transparent; cursor: ew-resize; }
.ba-range::-moz-range-track { background: transparent; }
.ba-slider .ba-tag { z-index: 2; }
.ba-slider .ba-tag.despues { right: 12px; left: auto; }

/* Overrides de accesibilidad de movimiento para lo nuevo */
@media (prefers-reduced-motion: reduce) {
  .js :where(.section-head, .services-head, .card, .biz-card,
    .step-card, .glass, .about-item, .quote-card, .post-card, .ba-wrap,
    .jobs-card, .zones-grid > div, .commitment .split > *) {
    opacity: 1 !important; transform: none !important;
  }
  /* Hero: mostrar todo sin animación */
  .js .hero .rw-i,
  .js .hero .lead, .js .hero .hero-cta, .js .hero .hero-proof,
  .js .hero-media .frame, .js .hero-media .hero-quote-card {
    opacity: 1 !important; transform: none !important;
  }
  .hero-decor, .scroll-progress { display: none !important; }
}

/* ==========================================================================
   13. CINEMÁTICO PREMIUM
   ========================================================================== */

/* Barra de progreso de scroll */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--green-600), var(--green-400));
  will-change: transform;
}

/* Hero: profundidad (glow radial) y destellos flotantes */
.hero { position: relative; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: -14%; right: -8%; width: min(640px, 72vw); aspect-ratio: 1;
  background: radial-gradient(circle at 60% 40%, rgba(78,181,127,.20), rgba(78,181,127,0) 68%);
}
.hero-decor { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-decor .spark {
  position: absolute; color: var(--green-400); line-height: 1;
  animation: cv-float 5.5s ease-in-out infinite;
}
.hero-decor .s1 { top: 10%; right: 5%; font-size: 28px; animation-delay: 0s; }
.hero-decor .s2 { top: 44%; right: 1.5%; font-size: 16px; color: var(--green-600); animation-delay: 1.3s; }
.hero-decor .s3 { top: 4%; right: 34%; font-size: 20px; animation-delay: 2.2s; }
@keyframes cv-float {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .5; }
  50% { transform: translateY(-16px) rotate(18deg); opacity: 1; }
}

/* Entrada coreografiada del hero (revelada al añadir .is-loaded) */
.js .hero .rw-i {
  display: inline-block; opacity: 0; transform: translateY(0.65em);
  transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1);
}
.hero.is-loaded .rw-i { opacity: 1; transform: none; }

.js .hero .lead,
.js .hero .hero-cta,
.js .hero .hero-proof {
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1);
}
.hero.is-loaded .lead { transition-delay: .5s; }
.hero.is-loaded .hero-cta { transition-delay: .62s; }
.hero.is-loaded .hero-proof { transition-delay: .74s; }
.hero.is-loaded .lead,
.hero.is-loaded .hero-cta,
.hero.is-loaded .hero-proof { opacity: 1; transform: none; }

.js .hero-media .frame,
.js .hero-media .hero-quote-card {
  opacity: 0; transform: translateY(30px) scale(.96);
  transition: opacity .9s ease, transform .9s cubic-bezier(.16,1,.3,1);
}
.hero.is-loaded .hero-media .tall { transition-delay: .3s; }
.hero.is-loaded .hero-media .wide { transition-delay: .46s; }
.hero.is-loaded .hero-quote-card { transition-delay: .62s; }
.hero.is-loaded .hero-media .frame,
.hero.is-loaded .hero-media .hero-quote-card { opacity: 1; transform: none; }

/* Tilt 3D de tarjetas (el JS aplica el transform en hover) */
.card, .biz-card, .post-card { transform-style: preserve-3d; }
.tilt-media { will-change: transform; }

/* Profundidad (glow) en la sección de cotización */
#cotizar { position: relative; isolation: isolate; }
#cotizar::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: -6%; bottom: -8%; width: min(520px, 60vw); aspect-ratio: 1;
  background: radial-gradient(circle, rgba(78,181,127,.16), rgba(78,181,127,0) 70%);
}
