/* =============================================================
   JM REFORMAS — styles.css
   Identidad: antracita + verde lima, línea fina, geometría.
   ============================================================= */

/* 1. Tokens ---------------------------------------------------- */
:root {
  --bg: #0f1215;
  --bg-2: #14181c;
  --surface: #1a1f24;
  --surface-2: #20262c;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #eef1ec;
  --muted: #9aa39e;
  --dim: #6b736f;
  --accent: #7ad321;
  --accent-hi: #95ea3c;
  --accent-ink: #0d1a03;
  --accent-soft: rgba(122, 211, 33, 0.12);
  --accent-line: rgba(122, 211, 33, 0.55);

  --display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 76px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  color-scheme: dark;
}

/* 2. Reset & base ---------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }
h4 { font-size: 1rem; letter-spacing: 0; }
em { font-style: normal; color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

/* 3. Utilities ------------------------------------------------- */
.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 9999; padding: .6rem 1rem; background: var(--accent); color: var(--accent-ink); border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 1rem; }
.g { color: var(--accent); }
.ico { width: 1.15em; height: 1.15em; flex: none; }
.ico.flip { transform: scaleX(-1); }

.kicker {
  display: inline-flex; align-items: center; gap: .8rem;
  font-family: var(--display); font-size: .78rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 1.4rem;
}
.kicker-line { width: 34px; height: 2px; background: var(--accent); display: inline-block; }

/* 4. Components ------------------------------------------------ */
.btn {
  --h: 52px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  height: var(--h); padding: 0 1.6rem; border-radius: 999px;
  font-family: var(--display); font-weight: 600; font-size: .92rem; letter-spacing: .01em;
  transition: transform .4s var(--ease-out), background-color .3s, color .3s, border-color .3s, box-shadow .4s;
  white-space: nowrap; overflow: hidden; isolation: isolate;
}
.btn-sm { --h: 42px; padding: 0 1.15rem; font-size: .84rem; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 0 rgba(122,211,33,0); }
.btn-primary:hover { background: var(--accent-hi); transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(122,211,33,.55); }
.btn-primary .ico { transition: transform .4s var(--ease-out); }
.btn-primary:hover .ico { transform: translateX(4px); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.link-arrow { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--display); font-weight: 600; font-size: .9rem; color: var(--accent); }
.link-arrow .ico { transition: transform .4s var(--ease-out); }
.link-arrow:hover .ico { transform: translateX(5px); }

.icon-badge {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: #1c2126; color: var(--accent); border: 1px solid var(--line);
  box-shadow: inset 0 0 0 6px rgba(0,0,0,.18);
}
.icon-badge svg { width: 34px; height: 34px; }
.icon-badge.sm { width: 52px; height: 52px; }
.icon-badge.sm svg { width: 28px; height: 28px; }

.ticks { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0 1.4rem; }
.ticks li { font-size: .8rem; padding: .3rem .75rem; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); }

/* 5. Splash ---------------------------------------------------- */
.splash {
  position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; justify-items: center; gap: 1.4rem;
  background: var(--bg); color: var(--accent);
  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-logo { width: 92px; height: 92px; }
.splash-logo [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1s var(--ease-out) forwards; }
.splash-logo [pathLength]:nth-child(n+2) { animation-delay: calc(.45s + var(--i, 0) * .07s); }
.splash-logo rect:nth-child(2) { --i: 1 } .splash-logo rect:nth-child(3) { --i: 2 } .splash-logo rect:nth-child(4) { --i: 3 }
.splash-logo rect:nth-child(5) { --i: 4 } .splash-logo rect:nth-child(6) { --i: 5 } .splash-logo rect:nth-child(7) { --i: 6 } .splash-logo rect:nth-child(8) { --i: 7 }
.splash-word { font-family: var(--display); font-weight: 600; letter-spacing: .3em; color: var(--text); font-size: 1rem; opacity: 0; animation: fadeUp .8s .9s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 6. Nav ------------------------------------------------------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--nav-h); transition: background-color .4s, border-color .4s, backdrop-filter .4s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(15,18,21,.9); border-bottom-color: var(--line); }
@supports (backdrop-filter: blur(10px)) { .nav.is-scrolled { background: rgba(15,18,21,.72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); } }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; flex: none; }
.brand-mark { width: 34px; height: 34px; color: var(--accent); }
.brand-word { font-family: var(--display); font-weight: 600; letter-spacing: .12em; font-size: 1.02rem; }
.nav-links { display: none; gap: 1.9rem; margin-left: auto; font-size: .9rem; color: var(--muted); }
.nav-links a { position: relative; padding: .4rem 0; transition: color .3s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out); }
.nav-links a:hover, .nav-links a.is-current { color: var(--text); }
.nav-links a:hover::after, .nav-links a.is-current::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: none; }
.nav-toggle { margin-left: .2rem; width: 44px; height: 44px; display: grid; place-content: center; gap: 7px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); transition: transform .4s var(--ease-out); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
.nav-mobile {
  position: fixed; inset: var(--nav-h) 0 auto; background: rgba(15,18,21,.98); border-bottom: 1px solid var(--line);
  display: grid; gap: .2rem; padding: 1rem var(--gutter) 1.6rem;
  clip-path: inset(0 0 100% 0); transition: clip-path .5s var(--ease-out); pointer-events: none;
}
.nav-mobile.is-open { clip-path: inset(0 0 0 0); pointer-events: auto; }
.nav-mobile a:not(.btn) { padding: .85rem 0; font-family: var(--display); font-size: 1.15rem; border-bottom: 1px solid var(--line); }
.nav-mobile .btn { margin-top: 1rem; }

/* Selector de idioma */
.lang { position: relative; margin-left: auto; flex: none; }
.lang-btn { display: inline-flex; align-items: center; gap: .4rem; height: 40px; padding: 0 .75rem; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--mono); font-size: .76rem; letter-spacing: .08em; color: var(--muted); transition: border-color .3s, color .3s; }
.lang-btn:hover, .lang.is-open .lang-btn { border-color: var(--accent-line); color: var(--text); }
.lang-btn .ico { width: 15px; height: 15px; }
.lang-btn .chev { width: 13px; height: 13px; margin-left: -.1rem; transition: transform .35s var(--ease-out); }
.lang.is-open .chev { transform: rotate(180deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 190px; padding: .4rem; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 24px 60px -24px rgba(0,0,0,.9); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .25s, transform .35s var(--ease-out), visibility 0s .35s; z-index: 5; }
.lang.is-open .lang-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .35s var(--ease-out); }
.lang-menu a { display: flex; align-items: center; gap: .8rem; padding: .62rem .75rem; border-radius: 9px; font-size: .9rem; color: var(--muted); transition: background-color .2s, color .2s; }
.lang-menu a span { width: 1.6rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; color: var(--dim); }
.lang-menu a:hover { background: var(--surface-2); color: var(--text); }
.lang-menu a.is-current, .lang-menu a.is-current span { color: var(--accent); }
.lang-menu a.is-current::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Sugerencia de idioma (según el navegador) */
.lang-toast { position: fixed; top: calc(var(--nav-h) + 12px); right: 16px; z-index: 120; display: flex; align-items: center; flex-wrap: wrap; gap: .7rem 1rem; width: min(430px, calc(100vw - 32px)); padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--accent-line); border-radius: 14px; box-shadow: 0 30px 70px -30px rgba(0,0,0,.9); animation: fadeUp .6s var(--ease-out); transition: opacity .35s, transform .35s var(--ease-out); }
.lang-toast > .ico { width: 20px; height: 20px; color: var(--accent); flex: none; }
.lang-toast p { flex: 1; min-width: 0; font-size: .9rem; }
.lang-toast-actions { display: flex; gap: .5rem; margin-left: auto; }
.lang-toast-actions .btn { --h: 36px; padding: 0 .95rem; font-size: .8rem; }
.lang-toast.is-out { opacity: 0; transform: translateY(-8px); }

/* Francés y alemán tienen palabras más largas: titular un punto más contenido */
html:lang(de) .hero-title, html:lang(fr) .hero-title { font-size: clamp(2.3rem, 4.8vw, 4rem); max-width: 17ch; }
html:lang(de) h2, html:lang(fr) h2 { hyphens: auto; }
/* Palabras largas (alemán: "Eigentümergemeinschaften") no deben ensanchar las rejillas en móviles pequeños */
.about > *, .reviews > *, .choice-grid > *, .seg > *, .quote > *, .contact > *, .footer-grid > * { min-width: 0; }
p, li, h1, h2, h3, h4, summary, .choice span, .seg span { overflow-wrap: break-word; }
html:lang(de) p, html:lang(de) li, html:lang(de) h3, html:lang(de) .choice span, html:lang(de) .seg span { hyphens: auto; }
@media (max-width: 539px) {
  .btn { height: auto; min-height: var(--h); padding-block: .55rem; white-space: normal; text-align: center; line-height: 1.25; max-width: 100%; }
}

/* Idiomas en el pie */
.footer-legal { align-items: center; }
.footer-langs { display: inline-flex; gap: .15rem; padding-right: 1.1rem; border-right: 1px solid var(--line); }
.footer-langs a { padding: .1rem .35rem; border-radius: 6px; font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; }
.footer-langs a[aria-current] { color: var(--accent); }

/* 7. Hero ------------------------------------------------------ */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 2.5rem) 0 5rem; isolation: isolate; }
.hero-grid-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(122,211,33,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122,211,33,.05) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 80%);
  animation: gridDrift 40s linear infinite;
}
@keyframes gridDrift { to { background-position: 120px 120px, 120px 120px, 24px 24px, 24px 24px; } }
.hero-photo { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; opacity: .18; filter: grayscale(.4) contrast(1.05); transform: scale(1.08); }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 20%, rgba(15,18,21,.75) 60%, rgba(15,18,21,.9)), linear-gradient(0deg, var(--bg), transparent 40%); }

.hero-inner { display: grid; gap: 3.5rem; align-items: center; }
.hero-title { font-size: clamp(2.5rem, 5.6vw, 4.6rem); line-height: 1.02; letter-spacing: -0.035em; max-width: 15ch; }
.hero-title em { position: relative; white-space: nowrap; }
.hero-title em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .08em; background: var(--accent); transform: scaleX(0); transform-origin: left; animation: underline 1.2s 1.6s var(--ease-out) forwards; }
@keyframes underline { to { transform: scaleX(1); } }
.hero-lead { margin-top: 1.6rem; max-width: 52ch; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.12rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; margin-top: 2.2rem; color: var(--muted); font-size: .88rem; }
.hero-trust li { display: inline-flex; align-items: center; gap: .45rem; }
.hero-trust .ico { color: var(--accent); }

.hero-copy > * { opacity: 0; animation: fadeUp 1s var(--ease-out) forwards; }
.hero-copy > :nth-child(1) { animation-delay: 1s; }
.hero-copy > :nth-child(2) { animation-delay: 1.1s; }
.hero-copy > :nth-child(3) { animation-delay: 1.25s; }
.hero-copy > :nth-child(4) { animation-delay: 1.4s; }
.hero-copy > :nth-child(5) { animation-delay: 1.55s; }

/* Plano animado */
.hero-visual { perspective: 1400px; opacity: 0; animation: fadeUp 1.2s 1.1s var(--ease-out) forwards; }
.plan-card {
  position: relative; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, rgba(122,211,33,.06), rgba(20,24,28,.85) 40%), var(--bg-2);
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.02) inset;
  transform: rotateX(var(--rx, 8deg)) rotateY(var(--ry, -10deg)); transform-style: preserve-3d;
  transition: transform .9s var(--ease-out);
}
.plan-head, .plan-foot { display: flex; justify-content: space-between; padding: .8rem 1.1rem; font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; color: var(--muted); }
.plan-head { border-bottom: 1px solid var(--line); }
.plan-foot { border-top: 1px solid var(--line); }
.plan-status { display: inline-flex; align-items: center; gap: .45rem; color: var(--accent); }
.plan-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(122,211,33,.6); } 100% { box-shadow: 0 0 0 10px rgba(122,211,33,0); } }
.plan { width: 100%; height: auto; color: var(--accent); padding: 1rem; }
.plan-grid { opacity: .08; }
.bp .d { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s var(--ease-soft) forwards; animation-delay: calc(var(--d) + 1.2s); }
.bp .w { stroke-width: 2.6; }
.bp .w2 { stroke-width: 1; opacity: .7; }
.bp .win { stroke-width: 5; stroke: #cfeab0; opacity: .9; }
.bp .door { stroke-width: 1.1; opacity: .8; }
.bp .f { stroke-width: 1; opacity: .55; }
.bp .dash { stroke-width: 1.2; opacity: .6; }
.bp .pool { stroke-width: 1.2; stroke: #8fd8ff; opacity: .7; }
.bp .dim { stroke-width: .8; opacity: .55; }
.plan-labels text { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; fill: var(--text); opacity: 0; animation: fadeIn .8s forwards; animation-delay: 4.6s; }
.plan-labels text:nth-child(-n+2) { fill: var(--accent); animation-delay: 5s; }
@keyframes fadeIn { to { opacity: .72; } }
.plan-pin circle { fill: var(--accent); opacity: 0; animation: fadeIn .4s 5.2s forwards; }
.plan-pin .pulse { fill: none; stroke: var(--accent); transform-origin: 240px 160px; animation: fadeIn .4s 5.2s forwards, pinPulse 2.4s 5.2s infinite; }
@keyframes pinPulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(5); opacity: 0; } }
.plan-scan { position: absolute; left: 0; right: 0; top: 0; height: 90px; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(122,211,33,.12) 70%, rgba(122,211,33,.55) 100%); border-bottom: 1px solid var(--accent); mix-blend-mode: screen; opacity: 0; animation: scan 6s 1.2s var(--ease-soft) infinite; }
@keyframes scan { 0% { transform: translateY(-100%); opacity: 0; } 10% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(560px); opacity: 0; } }

.scroll-cue { position: absolute; left: 50%; bottom: 1.6rem; width: 26px; height: 42px; border: 1.5px solid var(--line-2); border-radius: 20px; transform: translateX(-50%); display: none; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: cue 1.8s infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }

/* 8. Marquee --------------------------------------------------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 1.15rem 0; background: var(--bg-2); }
.marquee-track { display: flex; align-items: center; gap: 2.2rem; width: max-content; animation: marquee 45s linear infinite; }
.marquee span { font-family: var(--display); font-weight: 500; font-size: clamp(1rem, 1.6vw, 1.3rem); color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
.marquee i { width: 8px; height: 8px; border: 1.5px solid var(--accent); transform: rotate(45deg); flex: none; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* 9. Sections -------------------------------------------------- */
.section { padding: clamp(5rem, 10vw, 9rem) 0; position: relative; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--split { max-width: none; display: grid; gap: 1.2rem; align-items: end; }
.section-lead { color: var(--muted); margin-top: 1.2rem; max-width: 56ch; font-size: 1.05rem; }
.section-head--split .section-lead { margin-top: 0; }

/* Servicios */
.services-main { display: grid; gap: 1.2rem; }
.service-card {
  position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden; transition: border-color .4s, transform .6s var(--ease-out);
}
.service-card:hover { border-color: var(--accent-line); transform: translateY(-4px); }
.service-media { aspect-ratio: 16 / 10; overflow: hidden; position: relative; }
.service-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out), filter .6s; filter: saturate(.85); }
.service-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--surface), transparent 55%); }
.service-card:hover .service-media img { transform: scale(1.06); filter: saturate(1); }
.service-body { position: relative; padding: 0 1.6rem 1.8rem; margin-top: -32px; display: flex; flex-direction: column; flex: 1; }
.service-body h3 { margin: 1.2rem 0 .6rem; font-size: 1.45rem; }
.service-body p { color: var(--muted); font-size: .96rem; }
.service-body .link-arrow { margin-top: auto; padding-top: 1.3rem; }

.services-mini { display: grid; gap: 1px; margin-top: 1.2rem; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mini { display: flex; gap: 1rem; align-items: flex-start; padding: 1.5rem; background: var(--bg); transition: background-color .4s; }
.mini:hover { background: var(--surface); }
.mini h4 { font-size: 1.05rem; margin-bottom: .25rem; }
.mini p { color: var(--muted); font-size: .88rem; line-height: 1.5; }

/* Del plano a la realidad */
.morph { position: relative; height: 320vh; background: var(--bg); }
.morph-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; overflow: hidden; padding-top: var(--nav-h); }
.morph-inner { display: grid; gap: 2rem; align-items: center; }
.morph-steps { display: grid; gap: 1rem; counter-reset: s; }
.morph-steps li { display: flex; gap: 1.1rem; padding: 1rem 0 1rem 1.1rem; border-left: 2px solid var(--line-2); opacity: .38; transition: opacity .5s, border-color .5s; }
.morph-steps li.is-active { opacity: 1; border-color: var(--accent); }
.morph-steps span { font-family: var(--mono); font-size: .8rem; color: var(--accent); padding-top: .2rem; }
.morph-steps h3 { font-size: clamp(1.15rem, 2vw, 1.6rem); margin-bottom: .3rem; }
.morph-steps p { color: var(--muted); font-size: .92rem; }
.morph-stage {
  --p: 0; position: relative; aspect-ratio: 800 / 530; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-2); background: var(--bg-2);
  background-image: linear-gradient(rgba(122,211,33,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(122,211,33,.06) 1px, transparent 1px);
  background-size: 40px 40px;
  transform: perspective(1400px) rotateX(calc((1 - var(--p)) * 18deg)) scale(calc(.9 + var(--p) * .1));
}
.morph-photo { position: absolute; inset: 0; clip-path: inset(calc((1 - var(--reveal, 0)) * 100%) 0 0 0); }
.morph-photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.15 - var(--reveal, 0) * .15)); }
.morph-lines { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--accent); opacity: calc(1 - var(--reveal, 0) * .75); }
.morph-lines [pathLength] { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--draw, 0)); }
.morph-labels { opacity: var(--draw, 0); }
.morph-tag { position: absolute; left: 1rem; bottom: 1rem; padding: .45rem .9rem; border-radius: 999px; background: rgba(15,18,21,.75); border: 1px solid var(--line-2); font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.morph-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); }
.morph-progress span { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--accent); }

/* Antes / después */
.ba-tabs { display: flex; gap: .5rem; overflow-x: auto; overflow-y: visible; padding-bottom: .4rem; margin-bottom: 1.2rem; scrollbar-width: none; }
.ba-tabs button { flex: none; padding: .65rem 1.2rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: .88rem; transition: all .3s; }
.ba-tabs button:hover { color: var(--text); }
.ba-tabs button.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.ba { --pos: 50%; position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); user-select: none; touch-action: pan-y; background: var(--surface); }
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s; }
.ba-before-wrap { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
/* Simulación del "antes" mientras no haya fotos reales (quitar .is-demo al poner las vuestras) */
.ba.is-demo .ba-before { filter: grayscale(1) sepia(.35) brightness(.62) contrast(.85) blur(.4px); }
.ba.is-demo .ba-before-wrap::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(255,255,255,.035) 0 2px, transparent 2px 9px); }
.ba.is-swapping .ba-img { opacity: 0; }
.ba-label { position: absolute; top: 1rem; padding: .35rem .8rem; border-radius: 999px; background: rgba(15,18,21,.78); font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; pointer-events: none; }
.ba-label--l { left: 1rem; }
.ba-label--r { right: 1rem; color: var(--accent); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; }
.ba-handle span { position: absolute; top: 50%; left: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 8px rgba(122,211,33,.18); transition: transform .3s var(--ease-out); }
.ba-handle span .ico { width: 14px; height: 14px; }
.ba-handle span .ico:first-child { transform: scaleX(-1); }
.ba-handle span .ico.flip { transform: none; }
.ba:hover .ba-handle span { transform: scale(1.08); }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; -webkit-appearance: none; appearance: none; }
.ba-range:focus-visible + * { outline: none; }
.ba:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }
.ba-caption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 2rem; margin-top: 1.2rem; }
.ba-caption h3 { font-size: 1.25rem; }
.ba-caption p { font-family: var(--mono); font-size: .78rem; color: var(--muted); letter-spacing: .06em; }

/* Stats */
.stats { padding: clamp(3.5rem, 7vw, 5.5rem) 0; border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.2rem 1.5rem; }
.stat strong { display: block; font-family: var(--display); font-weight: 600; font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1; letter-spacing: -0.04em; color: var(--text); }
.stat strong span { color: var(--accent); }
.stat p { color: var(--muted); font-size: .9rem; margin-top: .7rem; max-width: 24ch; }

/* Timeline */
.timeline { position: relative; display: grid; gap: 2.4rem; padding-left: 2.6rem; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: calc(-2.6rem + 5px); top: .35rem; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); z-index: 1; }
.t-num { font-family: var(--mono); font-size: .78rem; color: var(--accent); letter-spacing: .1em; }
.timeline h3 { margin: .35rem 0 .45rem; font-size: 1.3rem; }
.timeline p { color: var(--muted); font-size: .95rem; max-width: 46ch; }
.timeline-line { position: absolute; left: 11px; top: .5rem; bottom: .5rem; width: 1.5px; background: var(--line-2); }
.timeline-line span { display: block; width: 100%; height: calc(var(--tl, 0) * 100%); background: var(--accent); box-shadow: 0 0 12px var(--accent); }

/* Nosotros */
.about { display: grid; gap: 3.5rem; align-items: center; }
.about-media { position: relative; padding: 0 2.5rem 3.5rem 0; }
.about-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3.4; border: 1px solid var(--line); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
/* Foto de la villa en espejo: así la piscina y el mar quedan a la izquierda, sin taparlos la foto pequeña */
.about-photo--villa img { transform: scaleX(-1); object-position: 60% 50%; }
.about-photo--sm { position: absolute; right: 0; bottom: 0; width: 46%; aspect-ratio: 1; border: 6px solid var(--bg-2); }
.about-plan { position: absolute; left: -1.2rem; bottom: .5rem; width: 120px; color: var(--accent); opacity: .5; }
.about-copy h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); margin-bottom: 1.4rem; }
.about-copy > p:not(.kicker) { color: var(--muted); margin-bottom: 1rem; }
.values { display: grid; gap: 1rem; margin: 2rem 0 2.2rem; }
.values li { display: grid; gap: .2rem; padding-left: 1.1rem; border-left: 2px solid var(--accent); }
.values strong { font-family: var(--display); font-weight: 600; }
.values span { color: var(--muted); font-size: .92rem; }

/* Reseñas */
.reviews { display: grid; gap: 1.2rem; }
.google-card { padding: 2rem; border-radius: var(--radius); border: 1px solid var(--line-2); background: radial-gradient(120% 120% at 0% 0%, rgba(122,211,33,.09), transparent 50%), var(--surface); display: flex; flex-direction: column; gap: 1.4rem; }
.google-top { display: flex; gap: 1rem; align-items: center; }
.g-logo { width: 44px; height: 44px; padding: 9px; border-radius: 50%; background: #fff; }
.g-name { font-family: var(--display); font-weight: 600; font-size: 1.1rem; }
.g-sub { color: var(--muted); font-size: .85rem; }
.g-rating { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.g-rating strong { font-family: var(--display); font-size: 3.2rem; line-height: 1; }
.stars { display: inline-flex; gap: 2px; color: #fbbc05; }
.stars svg { width: 20px; height: 20px; }
.g-count { color: var(--muted); font-size: .9rem; }
.g-text { color: var(--muted); }
.g-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: auto; }
.review-list { display: grid; gap: 1.2rem; }
.review-list:empty { display: none; }
.review { padding: 1.8rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; gap: 1rem; }
.review blockquote { color: var(--text); font-size: 1rem; }
.review footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: .86rem; color: var(--muted); }
.review footer strong { color: var(--text); font-family: var(--display); font-weight: 600; }

/* Instagram */
.insta { padding: 0 0 clamp(5rem, 10vw, 8rem); }
.insta-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.6rem; }
.insta-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.insta-links { display: flex; flex-wrap: wrap; gap: .6rem; }
.social-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.1rem; border-radius: 999px; border: 1px solid var(--line-2); font-size: .88rem; transition: border-color .3s, color .3s; }
.social-pill:hover { border-color: var(--accent); color: var(--accent); }
.insta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.insta-item { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 10px; }
.insta-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out), filter .5s; filter: grayscale(.3); }
.insta-item::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--accent); border-radius: inherit; opacity: 0; transition: opacity .4s; }
.insta-item:hover img { transform: scale(1.07); filter: none; }
.insta-item:hover::after { opacity: 1; }

/* Presupuesto */
.quote { display: grid; gap: 3rem; align-items: start; }
.quote-intro > p:not(.kicker) { color: var(--muted); margin-top: 1.2rem; max-width: 46ch; }
.quote-points { display: grid; gap: .6rem; margin: 1.8rem 0; }
.quote-points li { display: flex; align-items: center; gap: .6rem; font-size: .95rem; }
.quote-points .ico { color: var(--accent); }
.quote-alt { padding-top: 1.6rem; border-top: 1px solid var(--line); display: grid; gap: .6rem; }
.quote-alt p { color: var(--dim); font-size: .85rem; text-transform: uppercase; letter-spacing: .14em; font-family: var(--display); font-weight: 600; }
.contact-line { display: inline-flex; align-items: center; gap: .7rem; font-family: var(--display); font-weight: 600; font-size: 1.15rem; transition: color .3s; width: fit-content; }
.contact-line .ico { color: var(--accent); }
.contact-line:hover { color: var(--accent); }

.quote-form { position: relative; padding: clamp(1.4rem, 3vw, 2.4rem); border-radius: calc(var(--radius) + 4px); border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 40px 80px -50px rgba(0,0,0,.9); min-width: 0; }
.qf-progress { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.qf-progress span { display: block; height: 100%; width: 25%; background: var(--accent); transition: width .6s var(--ease-out); }
.qf-step-label { margin: 1rem 0 .4rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; }
.qf-step { border: 0; display: none; min-width: 0; }
.qf-step.is-active { display: grid; gap: 1.2rem; animation: stepIn .55s var(--ease-out); }
@keyframes stepIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.qf-step legend { font-family: var(--display); font-weight: 600; font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin-bottom: 1.2rem; letter-spacing: -.01em; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.choice input, .seg input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; padding: 1.1rem; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); font-family: var(--display); font-weight: 600; font-size: .95rem; cursor: pointer; transition: border-color .3s, background-color .3s, transform .4s var(--ease-out); height: 100%; }
.choice span svg { width: 34px; height: 34px; color: var(--accent); }
.choice span:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice input:focus-visible + span, .seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.field-row { display: grid; gap: 1.2rem; }
.field { display: grid; gap: .5rem; min-width: 0; }
.field > span, .field > span output { font-size: .85rem; color: var(--muted); font-weight: 500; }
.field > span output { color: var(--accent); font-family: var(--mono); }
.field input:not([type="range"]), .field select, .field textarea {
  width: 100%; padding: .9rem 1rem; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2);
  transition: border-color .3s, box-shadow .3s; outline: none;
}
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.5rem; }
.field select option { background: var(--surface); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field textarea { resize: vertical; min-height: 110px; }
.field input.is-invalid, .field select.is-invalid { border-color: #ff6b5b; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--fill, 18%), var(--line-2) var(--fill, 18%)); outline: none; margin: .8rem 0; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 4px solid var(--bg); box-shadow: 0 0 0 1px var(--accent); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 4px solid var(--bg); cursor: pointer; }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; }
/* Grupos de 4 opciones (p. ej. uso con «Otros»): 2 × 2 en lugar de 3 + 1 */
.seg:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); }
.seg label { position: relative; }
.seg span { display: block; text-align: center; padding: .8rem .6rem; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: .88rem; cursor: pointer; transition: all .3s; height: 100%; }
.seg span:hover { border-color: var(--accent-line); }
.seg input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent); }
.seg.is-invalid span { border-color: rgba(255,107,91,.6); }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .88rem; color: var(--muted); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: .1rem; accent-color: var(--accent); flex: none; }
.check a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.qf-error { min-height: 1.4em; margin-top: 1rem; color: #ff8a7d; font-size: .88rem; }
.qf-nav { display: flex; justify-content: space-between; gap: .8rem; margin-top: .6rem; }
.qf-nav [data-qf-next], .qf-nav [data-qf-submit] { margin-left: auto; }
.qf-done { text-align: center; padding: 2rem .5rem 1rem; animation: stepIn .6s var(--ease-out); }
.done-mark { display: inline-grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); margin-bottom: 1.2rem; box-shadow: 0 0 0 10px var(--accent-soft); }
.done-mark svg { width: 34px; height: 34px; }
.qf-done h3 { font-size: 1.6rem; margin-bottom: .6rem; }
.qf-done p { color: var(--muted); max-width: 44ch; margin: 0 auto; }
.qf-done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 1.6rem; }
.quote-form.is-done .qf-nav, .quote-form.is-done .qf-error, .quote-form.is-done .qf-step-label, .quote-form.is-done .qf-progress { display: none; }

/* FAQ */
.faq { display: grid; gap: 1rem; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.5rem 0; font-family: var(--display); font-weight: 600; font-size: clamp(1rem, 1.6vw, 1.2rem); transition: color .3s; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; flex: none; width: 14px; height: 14px; background: linear-gradient(var(--accent), var(--accent)) center / 100% 2px no-repeat, linear-gradient(var(--accent), var(--accent)) center / 2px 100% no-repeat; transition: transform .4s var(--ease-out); }
.faq-list details[open] summary::after { transform: rotate(135deg); }
.faq-list summary:hover { color: var(--accent); }
.faq-list details p { color: var(--muted); padding: 0 2.5rem 1.6rem 0; max-width: 70ch; animation: fadeUp .5s var(--ease-out); }

/* Contacto */
.contact { display: grid; gap: 3rem; align-items: stretch; }
.contact-copy h2 { margin-bottom: 2rem; }
.contact-list { display: grid; gap: 1.1rem; }
.contact-list li { display: flex; align-items: center; gap: .9rem; font-size: 1.05rem; }
.contact-list .ico { width: 22px; height: 22px; color: var(--accent); }
.contact-list a { transition: color .3s; }
.contact-list a:hover { color: var(--accent); }
.contact-social { display: flex; gap: .6rem; margin-top: 2rem; }
.contact-social a { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); transition: all .3s; }
.contact-social a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.contact-social.sm { margin-top: 1.2rem; }
.contact-social.sm a { width: 38px; height: 38px; }
.map { position: relative; min-height: 360px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); background: var(--surface); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(.9) invert(.92) contrast(.9) hue-rotate(180deg); }
.map-placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .8rem; text-align: center; padding: 1.5rem; }
.map-lines { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--accent); opacity: .35; }
.map-pin { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 10px var(--accent-soft); animation: ping 2.4s infinite; }
.map-pin .ico { width: 24px; height: 24px; }
.map-placeholder p { position: relative; font-family: var(--display); font-weight: 600; }
.map-placeholder .btn, .map-placeholder small { position: relative; }
.map-placeholder small { color: var(--dim); font-size: .75rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 4.5rem 0 1.5rem; background: #0b0d10; }
.footer-grid { display: grid; gap: 2.5rem; }
.footer-brand p:last-child { color: var(--muted); font-size: .92rem; max-width: 34ch; margin-top: 1rem; }
.footer-tag { display: flex; align-items: center; gap: .7rem; margin-top: 1rem; font-family: var(--display); font-size: .66rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text); }
.footer-tag span { width: 22px; height: 2px; background: var(--accent); }
.footer h4 { font-family: var(--display); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 1.1rem; }
.footer ul { display: grid; gap: .6rem; font-size: .93rem; color: var(--muted); }
.footer ul a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--dim); }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 1.3rem; }
.footer-bottom a:hover, .footer-bottom button:hover { color: var(--accent); }
.footer-bottom button { font-size: inherit; color: inherit; }

/* 10. Asistente ------------------------------------------------ */
.assist-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 120; height: 60px; min-width: 60px; padding: 0 1.3rem 0 1.1rem;
  display: inline-flex; align-items: center; gap: .6rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--display); font-weight: 600; font-size: .9rem;
  box-shadow: 0 16px 40px -12px rgba(122,211,33,.6), 0 0 0 0 rgba(122,211,33,.5);
  transition: transform .4s var(--ease-out), padding .4s var(--ease-out), opacity .4s;
  animation: fabIn .8s 2.8s var(--ease-out) both, fabPulse 3s 4s infinite;
}
.assist-fab .ico { width: 24px; height: 24px; }
.assist-fab .ico-close { display: none; }
.assist-fab[aria-expanded="true"] { padding: 0; justify-content: center; animation: none; }
.assist-fab[aria-expanded="true"] .ico-chat, .assist-fab[aria-expanded="true"] .assist-fab-label { display: none; }
.assist-fab[aria-expanded="true"] .ico-close { display: block; }
.assist-fab:hover { transform: translateY(-3px); }
@keyframes fabIn { from { opacity: 0; transform: translateY(30px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes fabPulse { 0%, 70%, 100% { box-shadow: 0 16px 40px -12px rgba(122,211,33,.6), 0 0 0 0 rgba(122,211,33,.45); } 85% { box-shadow: 0 16px 40px -12px rgba(122,211,33,.6), 0 0 0 14px rgba(122,211,33,0); } }

.assist {
  position: fixed; right: 18px; bottom: 90px; z-index: 119; width: min(400px, calc(100vw - 24px)); height: min(640px, calc(100svh - 120px));
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: 0 40px 100px -30px rgba(0,0,0,.9);
  transform-origin: bottom right; animation: assistIn .5s var(--ease-out);
}
@keyframes assistIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
.assist-head { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.assist-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent-line); color: var(--accent); flex: none; }
.assist-avatar svg { width: 22px; height: 22px; }
.assist-name { font-family: var(--display); font-weight: 600; font-size: .98rem; }
.assist-status { display: flex; align-items: center; gap: .4rem; font-size: .76rem; color: var(--muted); }
.assist-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.assist-x { margin-left: auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.assist-x:hover { background: var(--bg); color: var(--text); }
.assist-body { flex: 1; overflow-y: auto; padding: 1.2rem 1rem; display: flex; flex-direction: column; gap: .6rem; scroll-behavior: smooth; overscroll-behavior: contain; }
.msg { max-width: 86%; padding: .75rem 1rem; border-radius: 16px; font-size: .92rem; line-height: 1.5; animation: msgIn .4s var(--ease-out); }
.msg.bot { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 5px; align-self: flex-start; }
.msg.user { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; align-self: flex-end; font-weight: 500; }
.msg.bot strong { color: var(--accent); font-weight: 600; }
.msg.card { max-width: 100%; width: 100%; padding: 1.1rem; background: linear-gradient(160deg, var(--accent-soft), transparent 60%), var(--surface); border: 1px solid var(--accent-line); }
.msg.card h4 { font-size: 1rem; margin-bottom: .4rem; }
.msg.card p { color: var(--muted); font-size: .86rem; }
.msg.card .tier { display: inline-block; margin-bottom: .6rem; padding: .2rem .6rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.typing { display: inline-flex; gap: 4px; padding: .9rem 1rem; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.assist-quick { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0 1rem .8rem; }
.assist-quick:empty { display: none; }
.assist-quick button { padding: .55rem .9rem; border-radius: 999px; border: 1px solid var(--accent-line); color: var(--text); font-size: .84rem; background: var(--bg); transition: all .25s; animation: msgIn .4s var(--ease-out) both; }
.assist-quick button:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.assist-lead { display: grid; gap: .5rem; padding: 0 1rem .8rem; }
.assist-lead input { width: 100%; padding: .7rem .9rem; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); outline: none; font-size: .9rem; }
.assist-lead input:focus { border-color: var(--accent); }
.assist-lead label.check { font-size: .78rem; }
.assist-lead .btn { --h: 44px; }
.assist-input { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--line); background: var(--surface); }
.assist-input input { flex: 1; min-width: 0; padding: .7rem .9rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg); outline: none; font-size: .9rem; }
.assist-input input:focus { border-color: var(--accent); }
.assist-input button { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.assist-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.assist-actions .btn { --h: 40px; font-size: .82rem; padding: 0 1rem; }

/* 11. Cookies -------------------------------------------------- */
.cookie { position: fixed; left: 16px; bottom: 16px; z-index: 130; width: min(440px, calc(100vw - 32px)); padding: 1.2rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 30px 70px -30px rgba(0,0,0,.9); animation: fadeUp .6s var(--ease-out); }
.cookie p { font-size: .86rem; color: var(--muted); }
.cookie a { color: var(--accent); text-decoration: underline; }
.cookie-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }

/* 12. Reveal --------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--rd, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* 13. Responsive ----------------------------------------------- */
@media (min-width: 540px) {
  .choice-grid { grid-template-columns: repeat(6, 1fr); }
  .choice-grid > * { grid-column: span 2; }
  /* 8 opciones: la última fila (Pavimento, Otros) ocupa todo el ancho a partes iguales */
  .choice-grid > :nth-child(7):nth-last-child(2), .choice-grid > :nth-child(8):last-child { grid-column: span 3; }
  .insta-grid { gap: .8rem; }
}
@media (min-width: 720px) {
  .services-main { grid-template-columns: 1fr 1fr; }
  .service-card--feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr; }
  .service-card--feature .service-media { aspect-ratio: auto; min-height: 420px; }
  .service-card--feature .service-media::after { background: linear-gradient(90deg, transparent 60%, var(--surface)); }
  .service-card--feature .service-body { margin-top: 0; padding: 2.6rem; justify-content: center; }
  .services-mini { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .insta-grid { grid-template-columns: repeat(6, 1fr); }
  .section-head--split { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .reviews { grid-template-columns: minmax(300px, 1fr) 2fr; }
  .review-list { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .timeline { grid-template-columns: repeat(5, 1fr); gap: 1.6rem; padding: 2.6rem 0 0; }
  .timeline li::before { left: 0; top: calc(-2.6rem - 6px); }
  .timeline-line { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 1.5px; }
  .timeline-line span { height: 100%; width: calc(var(--tl, 0) * 100%); }
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .lang { margin-left: 0; }
  .nav-toggle, .nav-mobile { display: none; }
  .hero-inner { grid-template-columns: 1.05fr 1fr; gap: 4rem; }
  .scroll-cue { display: block; }
  .services-main { grid-template-columns: 1fr 1fr; }
  .services-mini { grid-template-columns: repeat(4, 1fr); }
  .morph-inner { grid-template-columns: .8fr 1.4fr; gap: 4rem; }
  .about { grid-template-columns: 1fr 1fr; gap: 5rem; }
  .quote { grid-template-columns: .85fr 1.15fr; gap: 4.5rem; }
  .quote-intro { position: sticky; top: calc(var(--nav-h) + 2rem); }
  .faq { grid-template-columns: .8fr 1.2fr; gap: 4rem; align-items: start; }
  .faq .section-head { position: sticky; top: calc(var(--nav-h) + 2rem); }
  .contact { grid-template-columns: .9fr 1.1fr; gap: 4rem; }
}
@media (max-width: 959px) {
  .hero { padding-bottom: 3.5rem; }
  .hero-visual { max-width: 560px; }
  .morph { height: 260vh; }
  .morph-sticky { align-items: flex-start; padding-top: calc(var(--nav-h) + 1.2rem); }
  .morph-steps { gap: .4rem; }
  .morph-steps li { padding: .5rem 0 .5rem .9rem; }
  .morph-steps li:not(.is-active) p { display: none; }
}
@media (max-width: 539px) {
  .btn { --h: 50px; padding: 0 1.3rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .assist-fab-label { display: none; }
  .assist-fab { padding: 0; justify-content: center; }
  .assist { right: 12px; bottom: 86px; height: calc(100svh - 110px); }
  .ba { aspect-ratio: 4 / 3.6; }
  .about-media { padding: 0 1.5rem 2.5rem 0; }
  .nav-inner { gap: .5rem; }
  .brand-word { font-size: .92rem; letter-spacing: .1em; }
  .lang-btn { padding: 0 .6rem; gap: .3rem; }
  .lang-btn > .ico:first-child { display: none; }
  .lang-toast-actions { width: 100%; }
  .lang-toast-actions .btn { flex: 1; }
}

/* 13b. Pantallas táctiles --------------------------------------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, label, summary { -webkit-tap-highlight-color: rgba(122,211,33,.18); }
.ba { cursor: ew-resize; }
@media (hover: none), (pointer: coarse) {
  /* iOS hace zoom al enfocar campos con letra < 16px */
  input, select, textarea, .assist-input input, .assist-lead input { font-size: 16px; }
  /* Sin efecto "pegado" del hover tras tocar */
  .btn-primary:hover, .btn-ghost:hover, .service-card:hover, .choice span:hover,
  .assist-fab:hover, .contact-social a:hover { transform: none; }
  .ba-range { pointer-events: none; }
  /* Zonas de toque cómodas (≥ 44 px) */
  .contact-line, .contact-list a, .footer ul a { display: inline-flex; align-items: center; min-height: 44px; }
  .footer ul { gap: 0; }
}

/* iPhone con muesca / barra de inicio (viewport-fit=cover) */
@supports (padding: env(safe-area-inset-bottom)) {
  .container, .nav-mobile { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
  .assist-fab { right: calc(18px + env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); }
  .assist { bottom: calc(90px + env(safe-area-inset-bottom)); }
  .cookie { left: calc(16px + env(safe-area-inset-left)); bottom: calc(16px + env(safe-area-inset-bottom)); }
  .footer { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
}

/* 14. Reduced motion (solo efectos intrusivos) ------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plan-scan { animation: none; display: none; }
  .hero-grid-bg { animation: none; }
  .assist-fab { animation: fabIn .8s 1s var(--ease-out) both; }
}
