/* =============================================================
   AQUALIS — Piscinas de obra · Madrid y Toledo
   Arquetipo: Editorial Dark Warm (acento agua)
   1 Tokens · 2 Reset · 3 Utilidades · 4 Tipografía · 5 Componentes
   6 Secciones · 7 Efectos · 8 Responsive · 9 Reduced-motion
   ============================================================= */

/* =============================================================
   1. TOKENS
   ============================================================= */
:root {
  --bg:        #0F0D0B;
  --bg-2:      #16130F;
  --bg-3:      #1F1A15;
  --bg-4:      #272019;

  --cream:     #F2EBDA;
  --cream-2:   #DDD2BC;
  --cream-3:   #8B7E68;

  --accent:    #6FBF3A;
  --accent-2:  #4E9426;
  --accent-3:  #A9DE7C;
  --gold:      #C49A5B;

  --line:      rgba(242, 235, 218, .12);
  --line-2:    rgba(242, 235, 218, .06);

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --ease-out:    cubic-bezier(.16, 1, .3, 1);
  --ease-in:     cubic-bezier(.7, 0, .84, 0);
  --ease-soft:   cubic-bezier(.25, .46, .45, .94);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);

  --wrap: 1220px;
  --gut:  clamp(1.15rem, 4vw, 3rem);
  --r:    14px;
  --r-lg: 22px;

  --head-h: 68px;
}

@property --mesh-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* =============================================================
   2. RESET & BASE
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 16px);
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--cream-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  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; }
p { text-wrap: pretty; }
ul { list-style: none; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--cream);
  text-wrap: balance;
  line-height: 1.06;
  letter-spacing: -.02em;
}

::selection { background: var(--accent); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* =============================================================
   3. UTILIDADES
   ============================================================= */
.wrap {
  width: min(100% - var(--gut) * 2, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; border-radius: 8px;
  background: var(--cream); color: var(--bg); font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.kicker {
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-3);
  font-weight: 500;
  margin-bottom: 1rem;
}

.sec-title {
  font-size: clamp(1.95rem, 5vw, 3.5rem);
  max-width: 20ch;
}
.sec-title em {
  font-style: italic;
  color: var(--accent-3);
  font-variation-settings: "SOFT" 100;
}

.sec-lead {
  margin-top: 1.15rem;
  max-width: 56ch;
  color: var(--cream-3);
  font-size: clamp(.98rem, 1.6vw, 1.08rem);
}

.sec-head { margin-bottom: clamp(2.2rem, 5vw, 3.6rem); }

.section { padding-block: clamp(4rem, 10vw, 7.5rem); }

/* =============================================================
   4. COMPONENTES
   ============================================================= */

/* --- Botones --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .55rem;
  padding: .82rem 1.4rem;
  border-radius: 999px;
  font-weight: 500; font-size: .95rem;
  letter-spacing: -.01em;
  transition: transform .35s var(--ease-out), background-color .35s var(--ease-out),
              color .35s var(--ease-out), border-color .35s var(--ease-out),
              box-shadow .35s var(--ease-out);
  will-change: transform;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

.btn-primary {
  background: var(--accent);
  color: #12240A;
  font-weight: 600;
  box-shadow: 0 10px 30px -12px rgba(111, 191, 58, .65);
}
.btn-primary:hover { background: var(--accent-3); box-shadow: 0 16px 40px -14px rgba(111, 191, 58, .8); }
.btn-primary:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--cream);
  background: rgba(242, 235, 218, .03);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-3); background: rgba(111, 191, 58, .07); }

.btn-sm  { padding: .58rem 1.05rem; font-size: .88rem; }
.btn-lg  { padding: 1rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-note {
  font-size: .72rem; opacity: .62; font-weight: 500;
  padding-left: .5rem; margin-left: .1rem;
  border-left: 1px solid currentColor;
}

/* --- Marca --- */
.brand { display: inline-flex; align-items: center; gap: .6rem; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: linear-gradient(140deg, var(--accent-3), var(--accent-2) 60%, #2E5C13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand-name {
  font-family: var(--serif); font-size: 1.22rem; color: var(--cream);
  letter-spacing: -.015em;
}

/* =============================================================
   5. SPLASH · DEMO FLAG · HEADER
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 9000;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .7s var(--ease-out), visibility .7s;
  animation: splashSafety .01s 4.5s forwards;
}
.splash.is-out { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes splashSafety { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.splash-inner { display: grid; gap: .9rem; justify-items: center; }
.splash-mark {
  font-family: var(--serif); font-size: 1.7rem; color: var(--cream);
  letter-spacing: .02em;
}
.splash-line {
  width: 120px; height: 2px; border-radius: 2px;
  background: var(--line); position: relative; overflow: hidden;
}
.splash-line::after {
  content: ""; position: absolute; inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  animation: splashFill 1.4s var(--ease-out) forwards;
}
@keyframes splashFill { to { transform: translateX(0); } }

/* --- Aviso DEMO --- */
.demo-flag {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%);
  z-index: 800;
  display: flex; align-items: center; gap: .7rem;
  width: min(100% - 2rem, 640px);
  padding: .68rem 2.4rem .68rem 1rem;
  border-radius: 999px;
  background: rgba(31, 26, 21, .93);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  font-size: .8rem; color: var(--cream-3);
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .9);
}
.demo-flag strong {
  flex: none; font-size: .68rem; letter-spacing: .14em;
  padding: .22rem .5rem; border-radius: 5px;
  background: var(--gold); color: #221806; font-weight: 700;
}
.demo-flag.is-hidden { display: none; }

/* En móvil no debe quedar debajo de los botones flotantes. */
@media (max-width: 719px) {
  .demo-flag {
    left: .8rem; right: 4.9rem; width: auto;
    transform: none;
    bottom: .8rem;
    padding: .6rem 2rem .6rem .8rem;
    font-size: .74rem;
    line-height: 1.35;
  }
}
.demo-flag-close {
  position: absolute; right: .55rem; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%;
  font-size: 1.15rem; line-height: 1; color: var(--cream-3);
  transition: color .3s var(--ease-out), background-color .3s var(--ease-out);
}
.demo-flag-close:hover { color: var(--cream); background: rgba(242, 235, 218, .08); }

/* --- Header --- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 700;
  height: var(--head-h);
  transition: background-color .4s var(--ease-out), border-color .4s var(--ease-out),
              backdrop-filter .4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  background: rgba(15, 13, 11, .88);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line-2);
}
.header-inner {
  width: min(100% - var(--gut) * 2, 1340px);
  margin-inline: auto; height: 100%;
  display: flex; align-items: center; gap: 1.4rem;
}
.nav { display: none; gap: 1.5rem; margin-left: auto; font-size: .92rem; }
.nav a { color: var(--cream-2); transition: color .3s var(--ease-out); position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -5px; height: 1px;
  background: var(--accent); transition: right .35s var(--ease-out);
}
.nav a:hover { color: var(--cream); }
.nav a:hover::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: .7rem; margin-left: auto; }
.nav + .header-actions { margin-left: 0; }

.header-tel {
  display: none; align-items: center; gap: .45rem;
  font-size: .92rem; color: var(--cream); font-weight: 500;
  transition: color .3s var(--ease-out);
}
.header-tel svg { width: 16px; height: 16px; fill: var(--accent); }
.header-tel:hover { color: var(--accent-3); }

.burger {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-content: center; gap: 5px;
  border: 1px solid var(--line);
}
.burger span {
  display: block; width: 17px; height: 1.5px; border-radius: 2px;
  background: var(--cream);
  transition: transform .35s var(--ease-out), opacity .25s var(--ease-out);
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child  { transform: translateY(-3.25px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: var(--head-h) 0 auto 0; z-index: 690;
  background: rgba(15, 13, 11, .97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 1.2rem var(--gut) 1.6rem;
  display: grid; gap: .2rem;
  transform: translateY(-12px); opacity: 0; visibility: hidden;
  transition: transform .4s var(--ease-out), opacity .35s var(--ease-out), visibility .4s;
}
.mobile-nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
.mobile-nav a {
  padding: .8rem 0; font-size: 1.08rem; color: var(--cream);
  border-bottom: 1px solid var(--line-2);
}
.mobile-nav a:last-of-type { border-bottom: 0; }

/* =============================================================
   6. HERO
   ============================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: calc(var(--head-h) + 2rem);
  padding-bottom: 4.5rem;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(1.12) contrast(1.06);
  object-position: 50% 62%;
  transform: scale(1.04);
}
.hero-tint {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,13,11,.72) 0%, rgba(15,13,11,.34) 42%, rgba(15,13,11,.88) 100%),
    linear-gradient(95deg, rgba(15,13,11,.84) 0%, rgba(15,13,11,.12) 66%);
}
.hero-mesh {
  position: absolute; inset: -20%; z-index: 1; pointer-events: none;
  background:
    radial-gradient(38% 42% at 22% 32%, rgba(111,191,58,.30), transparent 70%),
    radial-gradient(34% 38% at 76% 62%, rgba(196,154,91,.18), transparent 72%);
  filter: blur(70px);
  animation: meshDrift 22s var(--ease-soft) infinite alternate;
}
@keyframes meshDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(3%, -4%, 0) scale(1.12); }
}
.hero-grain {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .32;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/></filter><rect width='120' height='120' filter='url(%23n)' opacity='.42'/></svg>");
}

.hero-inner {
  position: relative; z-index: 3;
  width: min(100% - var(--gut) * 2, var(--wrap));
  margin-inline: auto;
}

.hero-kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--cream-2);
  padding: .42rem .9rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(15, 13, 11, .5);
  backdrop-filter: blur(8px);
  margin-bottom: 1.6rem;
}
.hero-kicker .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(111, 191, 58, .6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 9px rgba(111, 191, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 191, 58, 0); }
}

.hero-title {
  font-size: clamp(2.4rem, 6.6vw, 5.1rem);
  max-width: 17ch;
  margin-bottom: 1.5rem;
}
.hero-title em {
  font-style: italic; color: var(--accent-3);
  font-variation-settings: "SOFT" 100;
}

.hero-sub {
  max-width: 52ch; color: var(--cream-2);
  font-size: clamp(1rem, 1.8vw, 1.14rem);
  margin-bottom: 2.2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2.4rem; }

.hero-proof {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem;
  font-size: .92rem; color: var(--cream-3);
}
.hero-proof strong { color: var(--cream); font-weight: 600; }
.hero-proof .stars { color: var(--gold); letter-spacing: .1em; }

.hero-scroll {
  position: absolute; left: 50%; bottom: 1.6rem; z-index: 3;
  transform: translateX(-50%);
  width: 24px; height: 38px; border-radius: 999px;
  border: 1px solid var(--line);
  display: grid; place-items: start center; padding-top: 7px;
}
.hero-scroll span {
  width: 3px; height: 7px; border-radius: 2px; background: var(--accent);
  animation: scrollDot 1.9s var(--ease-soft) infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: translateY(15px); opacity: 0; }
}

/* =============================================================
   7. BARRA DE CONFIANZA
   ============================================================= */
.trust {
  background: var(--bg-2);
  border-block: 1px solid var(--line-2);
  padding-block: clamp(1.8rem, 4vw, 2.6rem);
}
.trust-grid {
  display: grid; gap: 1.4rem 1rem;
  grid-template-columns: repeat(2, 1fr);
  text-align: center;
}
.trust-item strong {
  display: block; font-family: var(--serif);
  font-size: clamp(1.35rem, 3vw, 1.9rem); color: var(--cream);
  line-height: 1.1; margin-bottom: .25rem;
}
.trust-item span { font-size: .8rem; color: var(--cream-3); line-height: 1.35; display: block; }

/* =============================================================
   8. SERVICIOS
   ============================================================= */
.services-grid { display: grid; gap: 1.2rem; }

.svc {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  transition: border-color .45s var(--ease-out), transform .45s var(--ease-out);
  transform-style: preserve-3d;
}
.svc:hover { border-color: rgba(111, 191, 58, .35); }
.svc-media { aspect-ratio: 16 / 10; overflow: hidden; }
.svc-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease-out), filter .8s var(--ease-out);
}
.svc:hover .svc-media img { transform: scale(1.06); filter: saturate(1.18); }
.svc-body { padding: 1.5rem 1.4rem 1.7rem; }
.svc-body h3 { font-size: 1.32rem; margin-bottom: .7rem; }
.svc-body p { font-size: .93rem; color: var(--cream-3); margin-bottom: 1.1rem; }
.svc-body ul { display: grid; gap: .45rem; }
.svc-body li {
  font-size: .86rem; color: var(--cream-2);
  padding-left: 1.15rem; position: relative;
}
.svc-body li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* =============================================================
   9. CALCULADORA
   ============================================================= */
.calc-sec { background: var(--bg-2); }

.calc {
  border-radius: var(--r-lg);
  background: var(--bg-3);
  border: 1px solid var(--line);
  padding: clamp(1.35rem, 3.5vw, 2.6rem);
  max-width: 940px;
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, .9);
}

.calc-progress {
  height: 3px; border-radius: 3px; background: var(--line-2);
  overflow: hidden; margin-bottom: 1.5rem;
}
.calc-bar {
  display: block; height: 100%; width: 33.33%;
  background: var(--accent);
  transition: width .6s var(--ease-out);
}

.calc-steps {
  display: flex; gap: 1.4rem; flex-wrap: wrap;
  margin-bottom: 2rem; font-size: .84rem; color: var(--cream-3);
}
.calc-steps li { display: flex; align-items: center; gap: .5rem; transition: color .4s var(--ease-out); }
.calc-steps li span {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: .76rem;
  border: 1px solid var(--line); flex: none;
  transition: background-color .4s var(--ease-out), color .4s var(--ease-out),
              border-color .4s var(--ease-out);
}
.calc-steps li.is-active { color: var(--cream); }
.calc-steps li.is-active span { background: var(--accent); color: #12240A; border-color: var(--accent); font-weight: 600; }
.calc-steps li.is-done span { background: rgba(111,191,58,.2); border-color: rgba(111,191,58,.45); color: var(--accent-3); }

.calc-panel { border: 0; padding: 0; display: none; }
.calc-panel.is-active { display: block; animation: panelIn .45s var(--ease-out) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } }

.calc-q {
  font-family: var(--serif); font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  color: var(--cream); margin-bottom: 1.2rem; padding: 0;
}
.calc-q-sm { font-size: 1.05rem; margin-top: 2rem; }

.opts { display: grid; gap: .7rem; grid-template-columns: 1fr; }

.opt {
  display: flex; align-items: center; gap: .85rem;
  padding: 1rem 1.15rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: rgba(242, 235, 218, .02);
  text-align: left; width: 100%;
  transition: border-color .3s var(--ease-out), background-color .3s var(--ease-out),
              transform .3s var(--ease-out);
}
.opt:hover { border-color: rgba(111, 191, 58, .5); transform: translateY(-1px); }
.opt.is-on { border-color: var(--accent); background: rgba(111, 191, 58, .1); }

.opt-box {
  width: 20px; height: 20px; border-radius: 6px; flex: none;
  border: 1.5px solid var(--line); position: relative;
  transition: border-color .3s var(--ease-out), background-color .3s var(--ease-out);
}
.opt-box.is-round { border-radius: 50%; }
.opt.is-on .opt-box { background: var(--accent); border-color: var(--accent); }
.opt-box::after {
  content: ""; position: absolute; inset: 0;
  background: no-repeat center / 11px url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306201F' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'><path d='M4 13l5 5L20 7'/></svg>");
  opacity: 0; transition: opacity .25s var(--ease-out);
}
.opt.is-on .opt-box::after { opacity: 1; }

.opt-text { display: grid; gap: .12rem; min-width: 0; }
.opt-label { color: var(--cream); font-size: .98rem; font-weight: 500; }
.opt-note  { color: var(--cream-3); font-size: .8rem; }
.opt-price { margin-left: auto; color: var(--accent-3); font-size: .82rem; white-space: nowrap; }

.calc-hint { margin-top: 1rem; font-size: .82rem; color: var(--cream-3); }

.calc-nav { display: flex; gap: .7rem; justify-content: flex-end; margin-top: 2rem; }

/* --- Resultado --- */
.calc-result { animation: panelIn .55s var(--ease-out) both; }
.calc-result-kicker {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-3); margin-bottom: .7rem;
}
.calc-range {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 6vw, 3.2rem);
  color: var(--cream); line-height: 1.05;
  margin-bottom: 1rem; letter-spacing: -.03em;
}
.calc-range i { font-style: italic; color: var(--cream-3); font-size: .5em; padding-inline: .18em; }
.calc-desc { color: var(--cream-2); margin-bottom: 1.5rem; font-size: .96rem; }

.calc-includes {
  display: grid; gap: .5rem; margin-bottom: 1.5rem;
  padding: 1.15rem 1.25rem; border-radius: var(--r);
  background: rgba(111, 191, 58, .06);
  border: 1px solid rgba(111, 191, 58, .18);
}
.calc-includes li {
  font-size: .88rem; color: var(--cream-2);
  padding-left: 1.5rem; position: relative;
}
.calc-includes li::before {
  content: ""; position: absolute; left: 0; top: .35em;
  width: 13px; height: 13px;
  background: no-repeat center / contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236FBF3A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M4 13l5 5L20 7'/></svg>");
}

.calc-legal {
  font-size: .8rem; color: var(--cream-3); line-height: 1.55;
  margin-bottom: 1.6rem; max-width: 62ch;
}
.calc-cta { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }

/* =============================================================
   10. ANTES / DESPUÉS
   ============================================================= */
.ba {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  cursor: ew-resize;
  user-select: none;
  touch-action: pan-y;
}
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before-wrap {
  position: absolute; inset: 0;
  clip-path: inset(0 50% 0 0);
  will-change: clip-path;
}
.ba-before-wrap img { width: 100%; height: 100%; object-fit: cover; }

.ba-tag {
  position: absolute; top: 1rem; z-index: 4;
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  padding: .35rem .75rem; border-radius: 999px;
  background: rgba(15, 13, 11, .78); color: var(--cream);
  backdrop-filter: blur(8px); border: 1px solid var(--line);
}
.ba-tag-l { left: 1rem; }
.ba-tag-r { right: 1rem; }

.ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; z-index: 5;
  width: 44px; margin-left: -22px;
  display: grid; place-items: center;
  cursor: ew-resize;
}
.ba-handle::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; margin-left: -1px; background: var(--cream);
  box-shadow: 0 0 22px rgba(0, 0, 0, .6);
}
.ba-handle span {
  position: relative; z-index: 1;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--cream);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
  display: grid; place-items: center;
  transition: transform .3s var(--ease-out);
}
.ba-handle:hover span { transform: scale(1.08); }
.ba-handle span::after {
  content: ""; width: 18px; height: 12px;
  background: no-repeat center / contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16' fill='%230F0D0B'><path d='M8 0 0 8l8 8zM16 0l8 8-8 8z'/></svg>");
}

.ba figcaption {
  position: absolute; left: 1rem; right: 1rem; bottom: 1rem; z-index: 4;
  font-size: .82rem; color: var(--cream-2);
  background: rgba(15, 13, 11, .74); backdrop-filter: blur(8px);
  padding: .5rem .85rem; border-radius: 10px;
  border: 1px solid var(--line);
  width: fit-content; max-width: calc(100% - 2rem);
}

/* =============================================================
   11. SHOWCASE (proyectos)
   ============================================================= */
.showcase { padding-block: clamp(4rem, 10vw, 7.5rem); overflow: hidden; }
.showcase-head { margin-bottom: clamp(2rem, 5vw, 3.2rem); }

.showcase-viewport { position: relative; }

.showcase-nav {
  display: none; gap: .5rem;
  justify-content: flex-end;
  width: min(100% - var(--gut) * 2, var(--wrap));
  margin: 0 auto 1rem;
}
.showcase-arrow {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  transition: border-color .3s var(--ease-out), background-color .3s var(--ease-out),
              opacity .3s var(--ease-out);
}
.showcase-arrow:hover { border-color: var(--accent); background: rgba(111,191,58,.1); }
.showcase-arrow:disabled { opacity: .3; cursor: default; }
.showcase-arrow svg { width: 17px; height: 17px; fill: none; stroke: var(--cream); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 960px) { .showcase-nav { display: flex; } }
.showcase-track {
  display: flex; gap: 1.1rem;
  scroll-behavior: smooth;
  padding-inline: var(--gut);
  overflow-x: auto; overflow-y: visible;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  padding-bottom: 1.2rem;
}

.proj {
  flex: 0 0 clamp(250px, 74vw, 380px);
  scroll-snap-align: center;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-3); border: 1px solid var(--line-2);
  transition: border-color .45s var(--ease-out);
}
.proj:hover { border-color: rgba(111, 191, 58, .35); }
.proj-media { aspect-ratio: 4 / 3; overflow: hidden; }
.proj-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease-out), filter .8s var(--ease-out);
}
.proj:hover .proj-media img { transform: scale(1.06); filter: saturate(1.18); }
.proj-info { padding: 1.15rem 1.2rem 1.35rem; }
.proj-info h3 { font-size: 1.15rem; margin-bottom: .2rem; }
.proj-info p { font-size: .88rem; color: var(--accent-3); margin-bottom: .35rem; }
.proj-info span { font-size: .8rem; color: var(--cream-3); }

/* =============================================================
   12. PRECIOS
   ============================================================= */
.prices { background: var(--bg-2); }
.price-table {
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.price-row {
  display: grid; gap: .3rem;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--line-2);
  align-items: center;
}
.price-row:last-child { border-bottom: 0; }
.price-row-head { display: none; }
.price-row > span:first-child { color: var(--cream); font-weight: 500; font-size: 1rem; }
.price-row strong {
  font-family: var(--serif); font-size: 1.3rem; color: var(--accent-3);
  letter-spacing: -.02em;
}
.price-row > span:last-child { font-size: .85rem; color: var(--cream-3); }
.price-note { margin-top: 1.1rem; font-size: .82rem; color: var(--cream-3); max-width: 70ch; }

/* =============================================================
   13. PROCESO
   ============================================================= */
.steps { display: grid; gap: 0; counter-reset: step; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 1.1rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line-2);
}
.step:last-child { border-bottom: 0; }
.step-n {
  font-family: var(--serif); font-size: 1.15rem; color: var(--accent);
  padding-top: .15rem;
}
.step h3 { font-size: 1.2rem; margin-bottom: .45rem; }
.step h3 em {
  font-family: var(--sans); font-style: normal;
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-3); background: rgba(111, 191, 58, .12);
  border: 1px solid rgba(111, 191, 58, .28);
  padding: .22rem .55rem; border-radius: 999px;
  margin-left: .6rem; vertical-align: middle;
  display: inline-block;
}
.step p { font-size: .93rem; color: var(--cream-3); max-width: 62ch; }

/* =============================================================
   14. TESTIMONIOS
   ============================================================= */
.quotes { background: var(--bg-2); }
.quote-grid { display: grid; gap: 1.1rem; }
.quote {
  padding: 1.6rem 1.5rem;
  border-radius: var(--r-lg);
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  position: relative;
}
.quote::before {
  content: "\201C";
  position: absolute; top: .35rem; right: 1.1rem;
  font-family: var(--serif); font-size: 4rem; line-height: 1;
  color: rgba(111, 191, 58, .18);
}
.quote p {
  font-family: var(--serif); font-size: 1.06rem; line-height: 1.5;
  color: var(--cream); margin-bottom: 1.1rem;
}
.quote footer strong { display: block; color: var(--cream); font-size: .92rem; font-weight: 600; }
.quote footer span { font-size: .82rem; color: var(--cream-3); }
.quotes-note { margin-top: 1.2rem; font-size: .78rem; color: var(--cream-3); }

/* =============================================================
   15. ZONAS
   ============================================================= */
.zones-grid { display: grid; gap: 2.6rem; }
.zones-cols { display: grid; gap: 2rem; grid-template-columns: repeat(2, 1fr); }
.zones-cols h3 {
  font-family: var(--sans); font-size: .74rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent-3); margin-bottom: 1rem;
  font-weight: 500;
}
.zones-cols ul { display: grid; gap: .5rem; }
.zones-cols li {
  font-size: .9rem; color: var(--cream-2);
  padding-left: .95rem; position: relative;
}
.zones-cols li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}

/* =============================================================
   16. FAQ
   ============================================================= */
.faq { display: grid; gap: .5rem; max-width: 860px; }
.faq-item {
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--bg-3);
  transition: border-color .35s var(--ease-out);
}
.faq-item[open] { border-color: rgba(111, 191, 58, .3); }
.faq-item summary {
  padding: 1.1rem 3rem 1.1rem 1.25rem;
  cursor: pointer; list-style: none; position: relative;
  color: var(--cream); font-size: 1rem; font-weight: 500;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 1.2rem; top: 50%;
  width: 12px; height: 12px; margin-top: -6px;
  background: no-repeat center / contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236FBF3A' stroke-width='3' stroke-linecap='round'><path d='M12 5v14M5 12h14'/></svg>");
  transition: transform .35s var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(135deg); }
.faq-item p { padding: 0 1.25rem 1.2rem; font-size: .93rem; color: var(--cream-3); max-width: 68ch; }

/* =============================================================
   17. CTA FINAL + FORMULARIO
   ============================================================= */
.cta-final { position: relative; overflow: hidden; padding-block: clamp(4rem, 10vw, 7rem); }
.cta-bg { position: absolute; inset: 0; z-index: 0; }
.cta-bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-tint {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,13,11,.94), rgba(15,13,11,.88));
}
.cta-grid { position: relative; z-index: 1; display: grid; gap: 2.6rem; }
.cta-list { display: grid; gap: .6rem; margin-top: 1.7rem; }
.cta-list li {
  font-size: .92rem; color: var(--cream-2);
  padding-left: 1.6rem; position: relative;
}
.cta-list li::before {
  content: ""; position: absolute; left: 0; top: .32em;
  width: 14px; height: 14px;
  background: no-repeat center / contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236FBF3A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M4 13l5 5L20 7'/></svg>");
}

.form {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.35rem, 3.5vw, 2.1rem);
  display: grid; gap: 1rem;
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, .95);
}
.field { display: grid; gap: .4rem; }
.field label { font-size: .82rem; color: var(--cream-2); font-weight: 500; }
.field label span { color: var(--cream-3); font-weight: 400; }
.field input, .field textarea {
  padding: .82rem 1rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: rgba(242, 235, 218, .03);
  color: var(--cream);
  transition: border-color .3s var(--ease-out), background-color .3s var(--ease-out);
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(139, 126, 104, .75); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  background: rgba(111, 191, 58, .06);
}
.field.is-bad input, .field.is-bad textarea { border-color: #C2564A; }

.form button[type="submit"] { position: relative; overflow: hidden; }
.btn-check {
  position: absolute; inset: 0; margin: auto;
  width: 26px; height: 26px; fill: none;
  stroke: #12240A; stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 40;
  opacity: 0;
}
.form.is-sent .btn-label { opacity: 0; }
.form.is-sent .btn-check {
  opacity: 1;
  animation: drawCheck .6s var(--ease-out) forwards;
}
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.form.is-sent button[type="submit"] { pointer-events: none; }

.form-legal { font-size: .76rem; color: var(--cream-3); }
.form-demo {
  font-size: .74rem; color: var(--gold);
  border-top: 1px solid var(--line-2); padding-top: .8rem;
}

.form-ok {
  padding: 1.1rem 1.2rem; border-radius: var(--r);
  background: rgba(111, 191, 58, .1);
  border: 1px solid rgba(111, 191, 58, .3);
  color: var(--cream); font-size: .92rem;
}

/* =============================================================
   18. FOOTER
   ============================================================= */
.footer { background: var(--bg-2); border-top: 1px solid var(--line-2); padding-block: 3.2rem 2rem; }
.footer-grid { display: grid; gap: 2.2rem; }
.footer h4 {
  font-family: var(--sans); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent-3); margin-bottom: .9rem; font-weight: 500;
}
.footer p { font-size: .88rem; color: var(--cream-3); margin-bottom: .4rem; }
.footer a { transition: color .3s var(--ease-out); }
.footer a:hover { color: var(--accent-3); }
.footer-claim { margin-top: .9rem; max-width: 34ch; }
.footer-legal {
  margin-top: 2.6rem; padding-top: 1.4rem;
  border-top: 1px solid var(--line-2);
}
.footer-legal p { font-size: .78rem; color: var(--cream-3); }
.footer-legal strong { color: var(--gold); }

/* =============================================================
   19. FLOTANTES: WHATSAPP + ASISTENTE
   ============================================================= */
.fab-wa, .fab-bot {
  position: fixed; z-index: 850;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .8);
  transition: transform .35s var(--ease-out), background-color .35s var(--ease-out);
}
.fab-wa:hover, .fab-bot:hover { transform: translateY(-3px) scale(1.04); }

.fab-wa { right: 1rem; bottom: 5.6rem; background: #25D366; }
.fab-wa svg { width: 28px; height: 28px; fill: #062d13; }

.fab-bot { right: 1rem; bottom: 1rem; background: var(--accent); }
.fab-bot svg { width: 25px; height: 25px; fill: none; stroke: #12240A; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fab-bot .i-close { display: none; }
.fab-bot.is-open .i-chat { display: none; }
.fab-bot.is-open .i-close { display: block; }

.fab-bot-ping {
  position: absolute; top: 2px; right: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--bg);
}
.fab-bot.is-open .fab-bot-ping { display: none; }

/* --- Panel del asistente --- */
.bot {
  position: fixed; z-index: 860;
  right: 1rem; bottom: 1rem;
  width: min(calc(100vw - 2rem), 372px);
  max-height: min(78vh, 620px);
  display: flex; flex-direction: column;
  border-radius: 20px; overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--line);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .95);
  transform: translateY(14px) scale(.97); opacity: 0;
  transition: transform .4s var(--ease-out), opacity .3s var(--ease-out);
}
.bot.is-open { transform: translateY(0) scale(1); opacity: 1; }

.bot-head {
  display: flex; align-items: center; gap: .7rem;
  padding: .95rem 1rem;
  background: var(--bg-4);
  border-bottom: 1px solid var(--line-2);
}
.bot-id { display: flex; align-items: center; gap: .7rem; flex: 1; min-width: 0; }
.bot-av {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 1.1rem; color: #12240A;
  background: linear-gradient(140deg, var(--accent-3), var(--accent-2));
}
.bot-id strong { display: block; color: var(--cream); font-size: .93rem; font-weight: 600; }
.bot-status { font-size: .76rem; color: var(--accent-3); display: flex; align-items: center; gap: .35rem; }
.bot-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.bot-x {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  font-size: 1.35rem; line-height: 1; color: var(--cream-3);
  transition: color .3s var(--ease-out), background-color .3s var(--ease-out);
}
.bot-x:hover { color: var(--cream); background: rgba(242, 235, 218, .08); }

.bot-log {
  flex: 1; overflow-y: auto;
  padding: 1.1rem 1rem .4rem;
  display: flex; flex-direction: column; gap: .6rem;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}

.msg {
  max-width: 84%; padding: .7rem .9rem;
  border-radius: 16px; font-size: .9rem; line-height: 1.5;
  animation: msgIn .35s var(--ease-out) both;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.msg-bot {
  align-self: flex-start;
  background: var(--bg-4); color: var(--cream-2);
  border-bottom-left-radius: 5px;
}
.msg-me {
  align-self: flex-end;
  background: var(--accent); color: #12240A; font-weight: 500;
  border-bottom-right-radius: 5px;
}
.msg-sum {
  align-self: stretch; max-width: 100%;
  background: rgba(111, 191, 58, .08);
  border: 1px solid rgba(111, 191, 58, .25);
  color: var(--cream-2); font-size: .84rem;
}
.msg-sum b { color: var(--cream); }

.typing { display: inline-flex; gap: 4px; padding: .3rem 0; }
.typing i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--cream-3);
  animation: typing 1.3s infinite;
}
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes typing {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.bot-choices {
  display: flex; flex-wrap: wrap; gap: .45rem;
  padding: .7rem 1rem 1rem;
}
.bot-choices:empty { display: none; }
.chip {
  padding: .5rem .85rem; border-radius: 999px;
  border: 1px solid rgba(111, 191, 58, .4);
  background: rgba(111, 191, 58, .07);
  color: var(--accent-3); font-size: .84rem;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out),
              transform .3s var(--ease-out);
  animation: msgIn .3s var(--ease-out) both;
}
.chip:hover { background: var(--accent); color: #12240A; transform: translateY(-1px); }
.chip-wa { border-color: #25D366; background: rgba(37, 211, 102, .12); color: #6ee79b; }
.chip-wa:hover { background: #25D366; color: #062d13; }

.bot-input {
  display: flex; gap: .5rem; padding: .7rem 1rem 1rem;
  border-top: 1px solid var(--line-2);
}
.bot-input input {
  flex: 1; min-width: 0;
  padding: .68rem .9rem; border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(242, 235, 218, .03); color: var(--cream);
}
.bot-input input:focus { outline: none; border-color: var(--accent); }
.bot-input button {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: var(--accent); display: grid; place-items: center;
  transition: transform .3s var(--ease-out);
}
.bot-input button:hover { transform: scale(1.06); }
.bot-input svg { width: 19px; height: 19px; fill: #12240A; }

.bot-foot {
  padding: 0 1rem .8rem; font-size: .7rem; color: var(--cream-3);
  text-align: center;
}

/* =============================================================
   20. EFECTOS
   ============================================================= */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

[data-tilt] { transition: transform .5s var(--ease-out); }

/* =============================================================
   21. RESPONSIVE
   ============================================================= */
@media (min-width: 540px) {
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
  .opts { grid-template-columns: repeat(2, 1fr); }
  .opts-extras { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 720px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .quote-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .price-row {
    grid-template-columns: 1.1fr .9fr 1.6fr;
    gap: 1.2rem;
  }
  .price-row-head {
    display: grid; background: var(--bg-3);
    font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--cream-3);
  }
  .price-row-head span { color: var(--cream-3) !important; font-weight: 500 !important; font-size: .72rem !important; }
  .step { grid-template-columns: 64px 1fr; gap: 1.6rem; }
  .step-n { font-size: 1.5rem; }
}

@media (min-width: 960px) {
  :root { --head-h: 76px; }
  .nav { display: flex; }
  .header-tel { display: flex; }
  .burger { display: none; }
  .trust-grid { grid-template-columns: repeat(5, 1fr); }
  .zones-grid { grid-template-columns: .9fr 1.1fr; gap: 3.5rem; align-items: start; }
  .cta-grid { grid-template-columns: 1fr .85fr; gap: 4rem; align-items: center; }
  .quote-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .opts { grid-template-columns: repeat(3, 1fr); }
  .ba { aspect-ratio: 16 / 8; }
  .bot { right: 1.5rem; bottom: 1.5rem; }
  .fab-bot { right: 1.5rem; bottom: 1.5rem; }
  .fab-wa { right: 1.5rem; bottom: 6.2rem; }
}

@media (min-width: 1280px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
  .svc-body { padding: 1.6rem 1.5rem 1.9rem; }
}

/* =============================================================
   22. REDUCED MOTION (solo lo intrusivo)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mesh { animation: none; }
  .hero-scroll span { animation: none; opacity: .8; }
  .hero-kicker .dot { animation: none; }
  .hero-bg img { transform: none; }
}
