/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* Raw palette */
  --ivory: #F7F4EE;
  --sand: #D8C7AE;
  --terracotta: #B86F52;
  --terracotta-dark: #9C5A41;
  --terracotta-darker: #82492F;
  --olive: #3F4A3F;
  --olive-dark: #323B32;
  --charcoal: #242622;
  --white: #FFFFFF;

  /* Semantic roles */
  --color-bg: var(--ivory);
  --color-surface: var(--white);
  --color-surface-2: var(--sand);
  --color-text: var(--charcoal);
  --color-text-muted: rgba(36, 38, 34, 0.62);
  --color-text-faint: rgba(36, 38, 34, 0.42);
  --color-line: rgba(36, 38, 34, 0.14);

  /* Uses the darker terracotta shade so ivory-on-fill and
     terracotta-on-ivory text both clear 4.5:1 (WCAG AA). The
     lighter --terracotta stays available for non-text accents
     (selection, focus ring, decorative borders). */
  --color-primary: var(--terracotta-dark);
  --color-primary-hover: var(--terracotta-darker);
  --color-contrast: var(--olive);
  --color-contrast-text: var(--ivory);
  --color-contrast-text-muted: rgba(247, 244, 238, 0.68);
  --color-success: #4a7c59;
  --color-error: #a3402c;

  /* Type scale — fluid via clamp() */
  --text-xs:   clamp(0.72rem, 0.69rem + 0.15vw, 0.78rem);
  --text-sm:   clamp(0.85rem, 0.81rem + 0.2vw, 0.92rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --text-md:   clamp(1.15rem, 1.06rem + 0.45vw, 1.35rem);
  --text-lg:   clamp(1.5rem, 1.32rem + 0.9vw, 2rem);
  --text-xl:   clamp(2rem, 1.6rem + 2vw, 3rem);
  --text-2xl:  clamp(2.6rem, 1.9rem + 3.5vw, 4.2rem);
  --text-3xl:  clamp(2.3rem, 1.7rem + 3.1vw, 4.5rem);

  /* Spacing — 8px grid */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;
  --space-9: 128px;
  --space-10: 160px;

  /* Fonts */
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Easings */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --radius-sm: 4px;
  --radius-md: 10px;
  --nav-height: 84px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  text-wrap: balance;
  line-height: 1.05;
}

::selection { background: var(--terracotta); color: var(--ivory); }

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

/* =============================================================
   3. Utilities
   ============================================================= */
.container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.skip-link {
  position: fixed; top: -100px; left: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: var(--charcoal); color: var(--ivory);
  z-index: 9999; border-radius: var(--radius-sm); font-weight: 600;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: var(--space-3); }

.eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.eyebrow-on-dark { color: var(--sand); }

.section-head { max-width: 640px; margin-bottom: var(--space-7); }
.section-title { font-size: var(--text-xl); color: var(--color-text); }
.section-sub { font-size: var(--text-md); color: var(--color-text-muted); margin-top: var(--space-3); }

/* =============================================================
   4. Typography
   ============================================================= */
.hero-title { font-family: var(--font-display); font-style: normal; }

/* =============================================================
   5. Components
   ============================================================= */

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(36, 38, 34, 0.08), 0 1px 3px rgba(36, 38, 34, 0.06);
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background .3s var(--ease-out), color .3s var(--ease-out);
}
.btn span { transition: transform .35s var(--ease-out); }
.btn:hover span { transform: translateX(3px); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 20px 40px rgba(36, 38, 34, 0.16), 0 8px 18px rgba(184, 111, 82, 0.18); }
.btn:active { transform: translateY(-1px); transition-duration: .12s; }
.btn:focus-visible { outline-offset: 3px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary { background: var(--color-primary); color: var(--ivory); }
.btn-primary:hover { background: var(--color-primary-hover); }

.btn-ghost-on-dark {
  /* A fully transparent outline reads fine over a section with its own dark
     overlay, but disappears over a plain, un-scrimmed photo (the hero has
     no overlay by design) — the faint border and shadowless ivory label had
     nothing to hold onto. A small glass-panel backing + text-shadow fixes
     that without adding any full-width wash. */
  background: rgba(15, 17, 15, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ivory);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  box-shadow: none;
  border: 1px solid rgba(247, 244, 238, 0.65);
}
.btn-ghost-on-dark:hover { background: rgba(15, 17, 15, 0.42); box-shadow: none; border-color: rgba(247,244,238,0.9); }

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  box-shadow: none;
  border: 1px solid var(--color-line);
}
.btn-ghost:hover { background: rgba(36, 38, 34, 0.05); box-shadow: none; border-color: rgba(36, 38, 34, 0.3); }

.btn-lg { padding: var(--space-4) var(--space-6); font-size: var(--text-base); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  color: var(--color-primary);
  position: relative;
  padding-bottom: 2px;
}
.link-arrow::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.link-arrow:hover::after { transform: scaleX(1); transform-origin: left; }
.link-arrow span { transition: transform .35s var(--ease-out); }
.link-arrow:hover span { transform: translateX(4px); }

/* --- Checklist icons --- */
.porque-list { display: flex; flex-direction: column; gap: var(--space-3); }
.porque-list li {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm); font-weight: 600;
}
.porque-list svg {
  width: 20px; height: 20px; flex-shrink: 0;
  color: var(--color-primary);
  background: rgba(184, 111, 82, 0.12);
  border-radius: 50%; padding: 3px;
}
.porque-list { margin: var(--space-5) 0 var(--space-6); }

/* --- Reveal on scroll --- */
[data-reveal], .reveal {
  opacity: 0; transform: translateY(36px);
  transition: opacity .85s var(--ease-soft), transform .85s var(--ease-soft);
}
[data-reveal].is-revealed, .reveal.is-revealed { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

[data-reveal-mask] {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.05s var(--ease-soft);
}
[data-reveal-mask].is-revealed { clip-path: inset(0); }

/* =============================================================
   6. Sections
   ============================================================= */

/* --- Header / Nav --- */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  height: var(--nav-height);
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out), height .4s var(--ease-out);
}
.nav-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4);
}
.nav.is-scrolled {
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  box-shadow: 0 1px 0 rgba(36, 38, 34, 0.08);
  height: 72px;
}
.nav.is-scrolled .nav-logo,
.nav.is-scrolled .nav-link { color: var(--color-text); }

.nav-logo {
  font-family: var(--font-display);
  font-size: var(--text-md);
  color: var(--color-text);
  display: inline-flex; align-items: center;
  transition: color .4s var(--ease-out);
}
.nav-logo img { display: block; height: 72px; width: auto; transition: height .4s var(--ease-out); }
.nav.is-scrolled .nav-logo img { height: 56px; }
.nav.is-menu-open .nav-logo { color: var(--color-text); }

.nav-links { display: none; align-items: center; gap: var(--space-6); }
.nav-link {
  position: relative;
  font-size: var(--text-sm); font-weight: 600;
  color: var(--color-text);
  padding-block: var(--space-1);
  transition: color .4s var(--ease-out);
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-actions { display: flex; align-items: center; gap: var(--space-4); }
.nav-cta { display: none; }

.nav-burger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; z-index: 110;
}
.nav-burger span {
  display: block; width: 22px; height: 2px; background: var(--color-text);
  transition: transform .4s var(--ease-soft), opacity .3s var(--ease-out), background .4s var(--ease-out);
}
.nav.is-scrolled .nav-burger span, .nav.is-menu-open .nav-burger span { background: var(--color-text); }
.nav.is-menu-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-menu-open .nav-burger span:nth-child(2) { opacity: 0; }
.nav.is-menu-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 105;
  background: var(--ivory);
  display: grid; place-items: center;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .65s var(--ease-soft);
}
.nav.is-menu-open .mobile-menu { clip-path: inset(0); }
.mobile-menu nav { display: flex; flex-direction: column; align-items: center; gap: var(--space-5); }
.mobile-menu-link { font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-text); }
.mobile-menu-cta { margin-top: var(--space-4); }

/* --- Hero: editorial architecture ---
   Single full-bleed photo, always object-fit:cover (never letterboxed,
   never masked) — the house is the protagonist and nothing should crop,
   distort, or compete with it. .hero-media is a plain wrapper so the
   scroll-parallax JS can translate it without fighting the img's own
   sizing. .hero-overlay is one soft directional scrim, not a heavy grade. */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  /* padding (not the content's) so centering happens in the space below the
     fixed nav — the photo layer still fills the full box (absolute + inset:0
     use the padding edge as their containing block), only the text respects it. */
  padding-top: var(--nav-height);
  overflow: hidden;
  isolation: isolate;
  background: var(--ivory);
}
.hero-media {
  position: absolute; inset: 0; z-index: 0;
  will-change: transform;
}
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 48%;
  transform: scale(1.14);
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  /* Light editorial veil, ivory — tight to the text column so most of the
     photo stays bright and true rather than washed. */
  background:
    linear-gradient(90deg, rgba(247,244,238,0.88) 0%, rgba(247,244,238,0.5) 20%, rgba(247,244,238,0.14) 36%, rgba(247,244,238,0) 50%),
    linear-gradient(0deg, rgba(247,244,238,0.2) 0%, rgba(247,244,238,0) 16%, rgba(247,244,238,0) 84%, rgba(247,244,238,0.16) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  margin-inline: 0;
  margin-left: clamp(1rem, 6vw, 4.5rem);
  max-width: 560px;
  text-align: left;
}
.hero-content .eyebrow { color: var(--color-primary); }
.hero-title {
  /* Dedicated (smaller) clamp than the shared --text-3xl (which tops out at
     4.5rem) so the whole block — eyebrow, title, subtitle, buttons — fits
     inside the hero without pushing the buttons past the fold. */
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3.6rem);
  color: var(--color-text);
  line-height: 1;
  margin-bottom: var(--space-4);
}
.hero-sub {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-bottom: var(--space-5);
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: var(--space-4); }

.hero-scroll {
  display: none;
  position: absolute; right: var(--space-5); bottom: var(--space-6); z-index: 1;
  align-items: center; gap: var(--space-2);
  color: var(--color-text); font-size: var(--text-xs); font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  writing-mode: vertical-rl;
}
/* Decorative — only shown once the centered hero content has room to breathe. */
@media (min-width: 720px) and (min-height: 640px) {
  .hero-scroll { display: flex; }
}
.hero-scroll svg {
  writing-mode: horizontal-tb; width: 14px; height: 20px;
  animation: scrollHint 2.2s ease-in-out infinite;
}
@keyframes scrollHint { 0%, 100% { transform: translateY(0); opacity: .7; } 50% { transform: translateY(6px); opacity: 1; } }

/* --- Intro editorial --- */
.intro { padding-block: var(--space-9) var(--space-8); position: relative; }
.intro-grid { position: relative; display: grid; gap: var(--space-7); }
.intro-number {
  position: absolute; top: -2.4rem; left: calc(-1 * var(--space-3));
  font-family: var(--font-display);
  font-size: clamp(6rem, 5rem + 6vw, 11rem);
  color: var(--color-surface-2);
  line-height: 1; z-index: -1; user-select: none;
}
.intro-text { max-width: 46ch; }
.intro-title { font-size: var(--text-xl); margin-bottom: var(--space-5); }
.intro-copy { color: var(--color-text-muted); font-size: var(--text-md); margin-bottom: var(--space-5); }
.intro-quote {
  font-family: var(--font-display); font-style: italic;
  font-size: var(--text-md); color: var(--color-primary);
  border-left: 2px solid var(--color-primary);
  padding-left: var(--space-4);
}
.intro-figure { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius-md); }
.intro-figure img { width: 100%; height: 100%; object-fit: cover; }

/* --- Beneficios --- */
.beneficios { padding-block: var(--space-8); }
.beneficios-grid { display: grid; gap: var(--space-4); }
.beneficio-card {
  background: var(--color-surface);
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-md);
  border-top: 3px solid transparent;
  box-shadow: 0 1px 0 var(--color-line);
  transition: transform .5s var(--ease-soft), box-shadow .5s var(--ease-soft), border-color .5s var(--ease-out), background .5s var(--ease-out);
}
.beneficio-card:hover {
  transform: translateY(-6px);
  border-top-color: var(--color-primary);
  box-shadow: 0 30px 60px -20px rgba(36, 38, 34, 0.22);
  background: var(--color-surface);
}
.beneficio-num {
  display: block; font-family: var(--font-display); font-size: var(--text-lg);
  color: var(--color-surface-2); margin-bottom: var(--space-4);
  transition: color .5s var(--ease-out);
}
.beneficio-card:hover .beneficio-num { color: var(--color-primary); }
.beneficio-card h3 { font-size: var(--text-md); margin-bottom: var(--space-2); letter-spacing: 0.02em; }
.beneficio-card p { color: var(--color-text-muted); }

/* --- Gallery (portfolio carousel — the client builds custom houses, not a
   fixed catalog, so this replaces individual "model" cards with a scrolling
   gallery of real projects, paged by the two arrow buttons). --- */
.gallery { padding-block: var(--space-8); background: var(--color-surface); overflow: hidden; }
.gallery-wrap {
  position: relative;
  display: flex; align-items: center; gap: var(--space-3);
  max-width: 1440px; margin-inline: auto;
  padding-inline: var(--space-4);
}
.gallery-track {
  display: flex; gap: var(--space-4);
  overflow-x: auto; overflow-y: visible;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  padding-block: var(--space-2) var(--space-3);
  /* Hide the native scrollbar — the arrow buttons are the intended control,
     native scroll/swipe still works underneath for touch and trackpads. */
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-item {
  flex: 0 0 auto;
  width: clamp(230px, 26vw, 360px);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  overflow: hidden;
  scroll-snap-align: start;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s var(--ease-soft);
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-arrow {
  flex: 0 0 auto;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--color-surface); color: var(--color-text);
  border: 1px solid var(--color-line);
  box-shadow: 0 8px 20px rgba(36, 38, 34, 0.1);
  transition: background .3s var(--ease-out), transform .3s var(--ease-soft), box-shadow .3s var(--ease-out);
}
.gallery-arrow svg { width: 18px; height: 18px; }
.gallery-arrow:hover { background: var(--color-primary); color: var(--ivory); transform: translateY(-2px); box-shadow: 0 14px 28px rgba(36, 38, 34, 0.16); }
.gallery-arrow:active { transform: translateY(0); }
.gallery-cta { text-align: center; margin-top: var(--space-7); }

/* --- Diferencial --- */
.diferencial {
  position: relative; overflow: hidden;
  padding-block: var(--space-9);
  background: var(--olive); color: var(--color-contrast-text);
  isolation: isolate;
}
.diferencial-bg { position: absolute; inset: 0; z-index: -1; }
.diferencial-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.28; filter: grayscale(0.3) saturate(0.7); }
.diferencial-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(63,74,63,0.94) 0%, rgba(63,74,63,0.75) 45%, rgba(63,74,63,0.94) 100%);
}
.diferencial-inner { position: relative; }
.diferencial-text { max-width: 640px; margin-bottom: var(--space-8); }
.diferencial-title { font-size: var(--text-xl); margin-bottom: var(--space-4); }
.diferencial-copy { font-size: var(--text-md); color: var(--color-contrast-text-muted); }
.diferencial-stats {
  display: grid; gap: var(--space-6);
  border-top: 1px solid rgba(247, 244, 238, 0.2);
  padding-top: var(--space-6);
}
.stat-num {
  font-family: var(--font-display); font-size: var(--text-2xl);
  color: var(--sand); line-height: 1; margin-bottom: var(--space-2);
}
.stat-label { font-size: var(--text-sm); color: var(--color-contrast-text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.diferencial-note { margin-top: var(--space-6); font-size: var(--text-xs); color: rgba(247,244,238,0.45); }

/* --- Proceso / timeline --- */
.proceso { padding-block: var(--space-8); }
.timeline-wrap { position: relative; }
.timeline-line { display: none; }
.timeline { position: relative; display: grid; gap: var(--space-6); }
.timeline-step { position: relative; }
.timeline-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--color-surface); border: 1px solid var(--color-line);
  font-family: var(--font-display); font-size: var(--text-md); color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  transition: background .5s var(--ease-out), color .5s var(--ease-out), border-color .5s var(--ease-out);
}
.timeline-step.is-revealed .timeline-num { background: var(--color-primary); color: var(--ivory); border-color: var(--color-primary); }
.timeline-step h3 { font-size: var(--text-md); margin-bottom: var(--space-2); }
.timeline-step p { color: var(--color-text-muted); font-size: var(--text-sm); max-width: 32ch; }

/* --- Por qué elegirnos --- */
.porque { padding-block: var(--space-8); background: var(--color-surface); }
.porque-grid { display: grid; gap: var(--space-7); align-items: center; }
.porque-figure { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius-md); }
.porque-figure img { width: 100%; height: 100%; object-fit: cover; }

/* --- Testimonios --- */
.testimonios { padding-block: var(--space-8); }
.testimonios-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 88%;
  gap: var(--space-4);
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: var(--space-3);
  scrollbar-width: none;
}
.testimonios-track::-webkit-scrollbar { display: none; }
.testimonio-card {
  scroll-snap-align: start;
  background: var(--color-surface);
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-primary);
}
.testimonio-card p { font-family: var(--font-display); font-size: var(--text-md); line-height: 1.4; margin-bottom: var(--space-5); }
.testimonio-card footer { display: flex; flex-direction: column; gap: 2px; }
.testimonio-card cite { font-style: normal; font-weight: 700; }
.testimonio-card footer span { font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.testimonios-dots { display: flex; justify-content: center; gap: var(--space-2); margin-top: var(--space-5); }
.testimonios-dots button {
  width: 8px; height: 8px; border-radius: 50%; background: var(--color-line);
  transition: background .3s var(--ease-out), width .3s var(--ease-out);
}
.testimonios-dots button.is-active { background: var(--color-primary); width: 22px; border-radius: 999px; }

/* --- FAQ --- */
.faq { padding-block: var(--space-8); background: var(--color-surface); }
.faq-grid { display: grid; gap: var(--space-7); }
.faq-head { margin-bottom: 0; }
.faq-item { border-bottom: 1px solid var(--color-line); }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  text-align: left; padding-block: var(--space-4);
  font-family: var(--font-display); font-size: var(--text-md); font-weight: 400;
}
.faq-icon { position: relative; width: 18px; height: 18px; flex-shrink: 0; }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; top: 50%; left: 50%; background: var(--color-text);
  transition: transform .4s var(--ease-soft), opacity .3s var(--ease-out);
}
.faq-icon::before { width: 14px; height: 1.5px; transform: translate(-50%, -50%); }
.faq-icon::after { width: 1.5px; height: 14px; transform: translate(-50%, -50%); }
.faq-question[aria-expanded="true"] .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
.faq-question[aria-expanded="true"] .faq-icon::before { transform: translate(-50%, -50%) rotate(180deg); }
.faq-answer {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .5s var(--ease-soft);
}
.faq-answer > p { overflow: hidden; padding-right: var(--space-8); color: var(--color-text-muted); }
.faq-item.is-open .faq-answer { grid-template-rows: 1fr; }
.faq-answer > p { min-height: 0; }
.faq-answer { overflow: hidden; }
.faq-item.is-open .faq-answer > p { padding-bottom: var(--space-4); }

/* --- CTA Final --- */
.cta-final { position: relative; padding-block: var(--space-9); overflow: hidden; isolation: isolate; }
.cta-final-bg { position: absolute; inset: 0; z-index: -1; }
.cta-final-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.cta-final-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(36,38,34,0.92) 0%, rgba(36,38,34,0.55) 60%, rgba(36,38,34,0.7) 100%);
}
.cta-final-inner { text-align: center; max-width: 720px; margin-inline: auto; }
.cta-final-title { font-size: var(--text-xl); color: var(--ivory); margin-bottom: var(--space-4); }
.cta-final-copy { font-size: var(--text-md); color: rgba(247,244,238,0.82); margin-bottom: var(--space-6); }
.cta-final-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-4); }

/* --- Footer --- */
.footer { background: var(--charcoal); color: var(--ivory); padding-block: var(--space-8) var(--space-5); }
.footer-grid { display: grid; gap: var(--space-6); padding-bottom: var(--space-7); border-bottom: 1px solid rgba(247,244,238,0.14); }
.footer-logo { font-size: var(--text-lg); color: var(--ivory); display: inline-flex; margin-bottom: var(--space-3); }
.footer-logo img { display: block; height: 52px; width: auto; }
.footer-brand p { color: rgba(247,244,238,0.62); max-width: 30ch; }
.footer-heading { display: block; font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(247,244,238,0.5); margin-bottom: var(--space-3); }
.footer-links, .footer-contact { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-links a, .footer-contact a, .footer-location { color: rgba(247,244,238,0.82); font-size: var(--text-sm); }
.footer-links a, .footer-contact a { position: relative; width: fit-content; }
.footer-links a::after, .footer-contact a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease-out);
}
.footer-links a:hover::after, .footer-contact a:hover::after { transform: scaleX(1); transform-origin: left; }
.footer-bottom { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-5); font-size: var(--text-xs); color: rgba(247,244,238,0.45); }
.footer-credits a { color: rgba(247,244,238,0.6); text-decoration: underline; }

/* --- WhatsApp floating button --- */
.whatsapp-float {
  position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45);
  animation: whatsappPulse 2.6s ease-in-out infinite;
}
.whatsapp-float svg { width: 30px; height: 30px; }
.whatsapp-float:hover { animation-play-state: paused; }
@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45); }
  50% { box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45), 0 0 0 10px rgba(37, 211, 102, 0.12); }
}
.whatsapp-tooltip {
  position: absolute; right: calc(100% + var(--space-3)); top: 50%; transform: translateY(-50%);
  background: var(--charcoal); color: var(--ivory);
  font-size: var(--text-xs); font-weight: 600; white-space: nowrap;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease-out);
}
.whatsapp-float:hover .whatsapp-tooltip, .whatsapp-float:focus-visible .whatsapp-tooltip { opacity: 1; }

/* =============================================================
   7. Effects
   ============================================================= */
@property --count { syntax: "<integer>"; inherits: false; initial-value: 0; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .beneficios-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-actions .btn { flex: 0 0 auto; }
}

@media (min-width: 720px) {
  .intro-grid { grid-template-columns: 0.9fr 1.1fr; align-items: center; }
  .intro-number { top: -3.5rem; }
  .porque-grid { grid-template-columns: 1fr 1fr; }
  .diferencial-stats { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .testimonios-track { grid-auto-columns: 46%; }
}

@media (min-width: 960px) {
  .nav-inner { display: grid; grid-template-columns: 1fr auto 1fr; }
  .nav-logo { justify-self: center; }
  .nav-actions { justify-self: end; }
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-burger { display: none; }

  .timeline {
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-4);
    padding-top: var(--space-6);
  }
  .timeline-line {
    display: block; position: absolute; top: calc(var(--space-6) + 24px);
    left: 5%; right: 5%; height: 1px; background: var(--color-line);
  }
  .timeline-line-fill {
    display: block; height: 100%; width: 0%; background: var(--color-primary);
    transition: width .3s var(--ease-out);
  }

  .testimonios-track { grid-auto-columns: 32%; }
  .testimonios-dots { display: none; }

  .faq-grid { grid-template-columns: 0.8fr 1.2fr; }
}

@media (min-width: 1280px) {
  .diferencial-stats { gap: var(--space-8); }
}

@media (min-width: 1600px) {
  .container { max-width: 1440px; }
}

/* =============================================================
   9. Reduced-motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .whatsapp-float { animation: none; }
  .hero-scroll svg { animation: none; }
  [data-reveal], .reveal, [data-reveal-mask] { transition-duration: .25s; }
}
