/* =============================================================
   Reformas Integrales Cerquin
   Mismo lenguaje que Position X: portada de bienvenida con el nombre
   en 3D, tema oscuro con auroras que siguen al ratón, tarjetas con
   "Qué incluye" y asistente de presupuesto por pasos.
   1. Fuentes  2. Tokens  3. Base  4. Utilidades  5. Botones
   6. Navegación  7. Portada  8. Servicios  9. Antes y después
   10. Cuestionario  11. Opiniones  12. Pie  13. Páginas sencillas  14. Responsive
   ============================================================= */

/* 1. Fuentes (autoalojadas: sin conexiones a terceros) */
@font-face {
  font-family: "Archivo";
  font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("assets/fonts/archivo-var.woff2") format("woff2-variations"),
       url("assets/fonts/archivo-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal; font-display: swap;
  font-weight: 100 900; font-stretch: 62% 125%;
  src: url("assets/fonts/archivo-var-ext.woff2") format("woff2-variations"),
       url("assets/fonts/archivo-var-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal; font-display: swap;
  font-weight: 100 800;
  src: url("assets/fonts/jetbrains-mono-var.woff2") format("woff2-variations"),
       url("assets/fonts/jetbrains-mono-var.woff2") format("woff2");
}

/* 2. Tokens */
:root {
  --bg:         #0B0B0D;
  --bg-soft:    #111114;
  --bg-card:    #17171B;
  --bg-card-2:  #1D1D22;
  --ink:        #F4F3F1;
  --ink-soft:   #CFCBC6;
  --ink-mute:   #8E8A85;
  --line:       rgba(244, 243, 241, 0.10);
  --line-soft:  rgba(244, 243, 241, 0.06);

  --accent:     #EE7043;   /* teja */
  --accent-ink: #1A0E08;
  --amber:      #F2A541;
  --slate:      #3B5B7E;
  --danger:     #FF8A80;

  --grad-1: var(--slate);
  --grad-2: var(--accent);
  --grad-3: var(--amber);

  --font-display: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:    "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:   cubic-bezier(0.32, 0.72, 0, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h: 76px;
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1180px;
}

@property --mx { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
@property --my { syntax: "<percentage>"; inherits: true; initial-value: 35%; }

/* 3. Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 84px;
  background: var(--bg); color-scheme: dark;
}
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16.5px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  font-family: var(--font-display); font-weight: 680; font-stretch: 108%;
  line-height: 1.05; letter-spacing: -0.025em; text-wrap: balance;
}
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* 4. Utilidades */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .7rem 1.1rem; border-radius: 8px;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: .9rem;
  transition: top .25s var(--ease-out);
}
.skip-link:focus { top: 1rem; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }

.kicker {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 650; font-stretch: 112%; font-size: .84rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent);
}
.kicker::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
}

.section { position: relative; isolation: isolate; padding-block: clamp(4.5rem, 10vw, 8.5rem); overflow: clip; }
.section-aurora {
  position: absolute; inset: -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle 620px at var(--mx, 50%) var(--my, 35%), color-mix(in srgb, var(--grad-1) 30%, transparent) 0%, transparent 60%),
    radial-gradient(circle 760px at calc(var(--mx, 50%) + 16%) calc(var(--my, 35%) + 18%), color-mix(in srgb, var(--grad-2) 20%, transparent) 0%, transparent 62%),
    radial-gradient(circle 700px at calc(var(--mx, 50%) - 18%) calc(var(--my, 35%) - 10%), color-mix(in srgb, var(--grad-3) 14%, transparent) 0%, transparent 62%);
  filter: blur(70px) saturate(130%);
  /* Se apaga justo en el borde de cada sección: sin cortes rectos entre una y otra */
  -webkit-mask-image: linear-gradient(180deg, transparent 8.33%, #000 24%, #000 76%, transparent 91.67%);
          mask-image: linear-gradient(180deg, transparent 8.33%, #000 24%, #000 76%, transparent 91.67%);
}
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); margin-top: .9rem; }
.section-head p { color: var(--ink-soft); font-size: 1.06rem; margin-top: 1.1rem; max-width: 40rem; }
.section-head em, h1 em, h2 em { color: var(--accent); font-style: normal; }
.section-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* Aparición al hacer scroll (como Position X) */
.js .reveal {
  opacity: 0; transform: translateY(36px); filter: blur(6px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out), filter .8s var(--ease-out);
}
.js .reveal.is-visible { opacity: 1; transform: none; filter: blur(0); }

/* 5. Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 52px; padding: .95rem 1.6rem; border-radius: 999px;
  font-weight: 650; font-size: .98rem; white-space: nowrap;
  transition: transform .35s var(--ease-out), background .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s var(--ease-out), opacity .3s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { color: var(--ink); border: 1px solid var(--line); background: rgba(244, 243, 241, 0.02); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-icon { display: inline-block; font-size: 1.05em; transition: transform .3s var(--ease-out); }
@media (hover: hover) {
  .btn-primary:hover { box-shadow: 0 8px 30px -6px rgba(238, 112, 67, 0.55); transform: translateY(-2px); }
  .btn-ghost:hover { border-color: rgba(244, 243, 241, 0.3); background: rgba(244, 243, 241, 0.05); }
  .btn:hover .btn-icon { transform: translateX(3px); }
}

/* 6. Navegación: oculta durante la portada, aparece al bajar */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  height: var(--nav-h); display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease-out), border-color .35s var(--ease-out), opacity .45s var(--ease-out), transform .45s var(--ease-out);
}
html.is-ready body:has(.splash) .nav { opacity: 0; transform: translateY(-14px); pointer-events: none; }
html.is-ready body:has(.splash) .nav.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.nav.is-solid {
  background: rgba(11, 11, 13, 0.8); border-color: var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.logo {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 800; font-stretch: 125%; font-size: 1.15rem; letter-spacing: -.01em; text-transform: uppercase;
}
.logo-mark { width: 30px; height: 30px; }
.logo-mark-bg { fill: var(--accent); }
.logo-mark-c { fill: none; stroke: var(--accent-ink); stroke-width: 8; stroke-linecap: square; }
.nav-links { display: none; align-items: center; gap: 2.1rem; }
.nav-links a { position: relative; padding-block: .3rem; font-size: .93rem; color: var(--ink-soft); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease-out);
}
@media (hover: hover) {
  .nav-links a:hover { color: var(--ink); }
  .nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
}
.nav-actions { display: flex; align-items: center; gap: .9rem; }
.nav-cta { display: none; min-height: 44px; padding: .7rem 1.3rem; }
.nav-burger { display: inline-flex; flex-direction: column; gap: 5px; padding: .75rem .5rem; }
.nav-burger span { width: 22px; height: 2px; background: var(--ink); transition: transform .3s var(--ease-out), opacity .3s var(--ease-out); }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 190;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 2rem 1.25rem; background: var(--bg-soft); border-top: 1px solid var(--line);
  transform: translateY(-12px); visibility: hidden; pointer-events: none;
  transition: transform .3s var(--ease-out), visibility 0s linear .3s;
}
.nav-mobile.is-open { transform: none; visibility: visible; pointer-events: auto; transition: transform .3s var(--ease-out), visibility 0s; }
.nav-mobile ul { display: flex; flex-direction: column; gap: 1.6rem; }
.nav-mobile a:not(.btn) { font-size: 1.65rem; font-weight: 650; font-stretch: 108%; }
.nav-mobile .btn { margin-top: 2rem; }
html.menu-open { overflow: hidden; }

/* 7. Portada: fachada difuminada, cliente detrás del nombre en 3D */
.splash {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  --word: min(15.2vw, 30svh, 17rem);          /* tamaño de CERQUIN: siempre en una línea */
  --pad-b: clamp(5.5rem, 13svh, 8.5rem);
  padding-bottom: var(--pad-b);
  text-align: center; overflow: clip; background: var(--bg);
  --px: 0; --py: 0;
}
.splash-bg { position: absolute; inset: -6%; z-index: 0; translate: calc(var(--px) * -18px) calc(var(--py) * -12px); }
.splash-bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.splash-bg-img--blur { filter: blur(16px) saturate(1.1); transform: scale(1.08); }
.splash-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11, 11, 13, 0.7) 0%, rgba(11, 11, 13, 0.35) 30%, rgba(11, 11, 13, 0.45) 55%, rgba(11, 11, 13, 0.92) 82%, var(--bg) 100%),
    radial-gradient(80% 60% at 50% 40%, rgba(238, 112, 67, 0.12), transparent 70%);
}
.splash-grain {
  position: absolute; inset: 0; z-index: 1; opacity: .06; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.splash-person {
  position: absolute; z-index: 2; left: 0; right: 0; top: 2.5svh;
  height: min(calc((100svh - var(--pad-b) - 7rem - var(--word) - 5svh) / 0.58), 90svh, 980px, 185vw);
  display: flex; justify-content: center; pointer-events: none;
  translate: calc(var(--px) * 12px) calc(var(--py) * 6px);
}
.splash-person-img {
  height: 100%; width: auto; max-width: none;
  object-fit: contain; object-position: bottom;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55)) saturate(.95) brightness(.93);
}
/* La parte baja de la persona se funde con el fondo para que el texto se lea */
.splash-person::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 50%;
  background: linear-gradient(180deg, transparent, rgba(11, 11, 13, 0.84) 48%, var(--bg) 88%);
}

.splash-inner { position: relative; z-index: 3; perspective: 1200px; }
.splash-kicker {
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .6rem 1.2rem; border-radius: 999px;
  font-weight: 650; font-stretch: 112%; font-size: clamp(.82rem, 1.15vw, 1rem);
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  /* Cápsula oscura: se lee bien encima de cualquier foto */
  background: rgba(11, 11, 13, 0.72);
  border: 1px solid rgba(244, 243, 241, 0.16);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.splash-kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

.splash-wordmark {
  margin-top: .15em;
  /* "CERQUIN" mide 5,87 em de ancho: así ocupa como máximo el 90 % de la pantalla, en una línea */
  font-size: var(--word);
  white-space: nowrap;
  font-weight: 850; font-stretch: 125%;
  line-height: .86; letter-spacing: -0.035em;
  color: var(--ink);
  transform-style: preserve-3d; backface-visibility: hidden; will-change: transform;
}
.splash-wordmark .letters { display: inline-block; transform-style: preserve-3d; }
.letter {
  display: inline-block;
  /* Volumen 3D: canto de la letra + sombra y halo de color */
  text-shadow:
    0 .012em 0 #D9D3CC, 0 .024em 0 #C4BDB5, 0 .036em 0 #ADA59C, 0 .048em 0 #968E85, 0 .06em 0 #7E766D,
    0 .07em .02em rgba(0, 0, 0, 0.45), 0 .12em .12em rgba(0, 0, 0, 0.45), 0 .2em .45em rgba(238, 112, 67, 0.28);
}

.splash-tagline {
  margin-top: clamp(1.1rem, 3vw, 1.8rem);
  min-height: 1.4em;
  font-weight: 620; font-stretch: 104%; font-size: clamp(1.15rem, 2.3vw, 1.7rem);
  color: var(--ink-soft); text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}
.splash-tagline .type-a { color: var(--accent); text-shadow: 0 0 22px rgba(238, 112, 67, 0.45); }
.type-cursor {
  display: inline-block; width: 2px; height: .95em; margin-left: 2px;
  background: var(--accent); vertical-align: -0.14em;
}
.type-cursor.is-typing { animation: cursor-blink 800ms steps(1) infinite; }
.type-cursor.is-done { opacity: 0; transition: opacity .3s ease; }
@keyframes cursor-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.tw-char { visibility: hidden; }
.tw-char.is-on { visibility: visible; }

.splash-cue {
  position: absolute; z-index: 3; left: 50%; bottom: clamp(1.25rem, 4vw, 2.5rem);
  width: 2.6rem; height: 2.6rem; margin-left: -1.3rem;
  display: grid; place-items: center; border-radius: 50%;
  color: var(--ink-mute);
}
.splash-cue .icon { width: 1.6rem; height: 1.6rem; }
@media (hover: hover) { .splash-cue:hover { color: var(--ink); } }

@media (prefers-reduced-motion: no-preference) {
  /* Enfoque: la fachada se desenfoca mientras entra el nombre */
  .splash-bg-img--blur { animation: rack-focus 1.8s ease .15s both; }
  @keyframes rack-focus { from { opacity: 0; } to { opacity: 1; } }

  .splash-person-img { animation: person-in 1.4s var(--ease-out) .25s both; }
  @keyframes person-in { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }

  .splash-kicker { animation: fade-up 1s var(--ease-out) 1.2s both; }
  @keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

  /* Las letras caen desde arriba girando, como en Position X */
  .letter {
    animation: letter-fall 950ms var(--ease-bounce) both;
    animation-delay: calc(var(--d) + .35s);
  }
  @keyframes letter-fall {
    0%   { opacity: 0; transform: translateY(-140vh) translateX(var(--x)) rotate(var(--r)); }
    55%  { opacity: 1; }
    100% { opacity: 1; transform: translateY(0) translateX(0) rotate(0deg); }
  }

  .splash-cue { animation: cue-bob 2.2s ease-in-out 2.8s infinite; }
  @keyframes cue-bob { 0%, 100% { transform: translateY(0); opacity: .55; } 50% { transform: translateY(8px); opacity: 1; } }
}

/* 8. Servicios: tarjetas numeradas con foto y "Qué incluye" */
.service-list { display: grid; gap: 1.1rem; }
.service-card {
  display: grid; grid-template-columns: 1fr; overflow: clip;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: border-color .3s var(--ease-out), background .3s var(--ease-out);
}
@media (hover: hover) {
  .service-card:hover { border-color: rgba(238, 112, 67, 0.35); background: var(--bg-card-2); }
  .service-card:hover .service-media img { transform: scale(1.04); }
}
.service-body { padding: clamp(1.5rem, 3vw, 2.3rem); display: flex; flex-direction: column; }
.service-head { display: flex; gap: 1.2rem; align-items: flex-start; }
.service-num { font-family: var(--font-mono); font-size: 1.02rem; color: var(--accent); padding-top: .25rem; }
.service-title-wrap h3 { font-size: clamp(1.3rem, 2.1vw, 1.6rem); }
.service-title-wrap p { color: var(--ink-soft); margin-top: .55rem; font-size: .99rem; max-width: 36rem; }
.service-card details { margin-top: auto; padding-top: 1.4rem; }
.service-card summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: .6rem;
  padding-top: 1.2rem; border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono); font-size: .86rem; color: var(--ink-mute);
}
.service-card summary::-webkit-details-marker { display: none; }
.service-card summary::after { content: "+"; margin-left: auto; font-size: 1.15rem; color: var(--ink-soft); transition: transform .3s var(--ease-out); }
.service-card details[open] summary::after { transform: rotate(45deg); }
.service-includes { margin-top: 1rem; display: grid; gap: .65rem; }
.service-includes li { display: flex; gap: .7rem; font-size: .95rem; color: var(--ink-soft); }
.service-includes li::before { content: "→"; color: var(--accent); flex-shrink: 0; }
.service-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); order: -1; }
.service-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-soft); }
.service-media--top img { object-position: 50% 30%; }

/* 9. Antes y después */
.ba-tabs { display: flex; gap: .6rem; overflow-x: auto; scrollbar-width: none; padding: 4px; margin: -4px -4px 1.4rem; }
.ba-tabs::-webkit-scrollbar { display: none; }
.ba-tab {
  flex: none; text-align: left; padding: .8rem 1.2rem; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--line);
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out);
}
.ba-tab-title { display: block; font-weight: 650; line-height: 1.3; }
.ba-tab-meta { display: block; font-family: var(--font-mono); font-size: .76rem; color: var(--ink-mute); margin-top: .15rem; }
.ba-tab[aria-selected="true"] { border-color: var(--accent); background: rgba(238, 112, 67, 0.1); }
.ba-tab[aria-selected="true"] .ba-tab-meta { color: var(--accent); }
@media (hover: hover) { .ba-tab[aria-selected="false"]:hover { border-color: rgba(244, 243, 241, 0.3); } }

.ba-panel[hidden] { display: none; }
.js .ba-panels .ba-panel + .ba-panel { margin-top: 0; }
.ba-panels .ba-panel + .ba-panel { margin-top: 3rem; }
.ba-panel.is-switching .ba-frame { animation: ba-swap .6s var(--ease-soft); }
@keyframes ba-swap { from { opacity: .35; transform: scale(.985); } to { opacity: 1; transform: none; } }

.ba-frame {
  --pos: 50%;
  position: relative; overflow: hidden; aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--bg-soft);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize;
}
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: var(--ink); box-shadow: 0 0 24px rgba(0, 0, 0, 0.5); pointer-events: none;
}
.ba-knob {
  position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.6), 0 0 0 6px rgba(238, 112, 67, 0.18);
  transition: transform .4s var(--ease-soft);
}
.ba-knob .icon { width: 26px; height: 26px; }
.ba-frame.is-dragging .ba-knob { transform: scale(.9); }
.ba-frame:has(.ba-range:focus-visible) .ba-knob { outline: 3px solid var(--ink); outline-offset: 4px; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.ba-label {
  position: absolute; top: 14px; padding: .35rem .75rem; border-radius: 999px;
  font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink); background: rgba(11, 11, 13, 0.7); border: 1px solid var(--line); pointer-events: none;
}
.ba-label--before { left: 14px; }
.ba-label--after { right: 14px; }
.ba-caption { margin-top: 1.4rem; max-width: 46rem; }
.ba-caption h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
.ba-caption p { color: var(--ink-soft); margin-top: .5rem; }
.ba-caption .ba-facts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.ba-facts span {
  font-family: var(--font-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em;
  padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft);
}

/* 10. Cuestionario por pasos */
.form-wrap {
  max-width: 50rem; padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.form-progress { margin-bottom: 2.2rem; }
.no-js .form-progress { display: none; }
.form-progress-bar { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.form-progress-fill { height: 100%; width: 20%; background: var(--accent); border-radius: 999px; transition: width .45s var(--ease-out); }
.form-progress-label { display: flex; justify-content: space-between; margin-top: .7rem; font-family: var(--font-mono); font-size: .78rem; color: var(--ink-mute); }

.lead-form fieldset { border: 0; padding: 0; min-width: 0; }
.lead-form legend { padding: 0; font-weight: 680; font-stretch: 108%; letter-spacing: -0.02em; font-size: clamp(1.25rem, 2.4vw, 1.65rem); outline: none; }
.no-js .wizard-step + .wizard-step { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.lead-form.is-wizard .wizard-step { display: none; }
.lead-form.is-wizard .wizard-step.is-active { display: block; animation: step-in .5s var(--ease-out); }
@keyframes step-in { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 22px)); } to { opacity: 1; transform: none; } }
.step-help { margin-top: .5rem; color: var(--ink-mute); font-size: .94rem; }
.step-note { margin-top: 1.1rem; color: var(--ink-mute); font-size: .92rem; }
.step-error, .field-error { color: var(--danger); font-size: .9rem; font-weight: 550; }
.step-error:not(:empty) { margin-top: 1rem; }
.field-error:not(:empty) { margin-top: .35rem; }

.choice-grid { display: grid; gap: .8rem; margin-top: 1.4rem; }
.choice-grid.is-4col, .choice-grid.is-3col { grid-template-columns: repeat(2, 1fr); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
.choice-box {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .8rem;
  height: 100%; padding: 1.05rem 1.2rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: .98rem; line-height: 1.3;
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out), transform .3s var(--ease-out);
}
.choice-box > .icon { width: 26px; height: 26px; color: var(--ink-mute); transition: color .25s; }
.choice-label { display: block; font-weight: 620; }
.choice-hint { display: block; margin-top: .25rem; font-size: .84rem; color: var(--ink-mute); line-height: 1.4; }
.choice-box.is-row { flex-direction: row; align-items: center; gap: 1rem; }
.choice-box.is-center { justify-content: center; align-items: center; text-align: center; min-height: 60px; font-weight: 620; font-variant-numeric: tabular-nums; }
.choice-level {
  flex: none; width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 600; font-size: .95rem; letter-spacing: -0.04em;
  color: var(--ink-soft); background: var(--bg-soft); border: 1px solid var(--line);
  transition: background .25s, color .25s, border-color .25s;
}
.choice:active .choice-box { transform: scale(.985); }
@media (hover: hover) { .choice:hover input:not(:checked) + .choice-box { border-color: rgba(244, 243, 241, 0.28); } }
.choice input:checked + .choice-box { border-color: var(--accent); background: rgba(238, 112, 67, 0.09); }
.choice input:checked + .choice-box > .icon { color: var(--accent); }
.choice input:checked + .choice-box .choice-level { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.choice input:focus-visible + .choice-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice input[type="checkbox"] + .choice-box::after {
  content: ""; position: absolute; top: 12px; right: 12px; width: 20px; height: 20px;
  border-radius: 6px; border: 1.5px solid rgba(244, 243, 241, 0.25);
  background: transparent no-repeat center / 12px;
  transition: background-color .2s, border-color .2s;
}
.choice input[type="checkbox"]:checked + .choice-box::after {
  border-color: var(--accent); background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath fill='%231A0E08' d='M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z'/%3E%3C/svg%3E");
}

.field { margin-top: 1.2rem; }
.field label { display: block; margin-bottom: .5rem; font-size: .9rem; color: var(--ink-soft); }
.optional { color: var(--ink-mute); }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: .85rem 1rem;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); font-size: 1rem;
  transition: border-color .25s var(--ease-out), box-shadow .25s var(--ease-out);
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field input::placeholder { color: var(--ink-mute); opacity: 1; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(238, 112, 67, 0.18); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field input::-webkit-calendar-picker-indicator { opacity: 0; }
.fields { display: grid; gap: 0 1rem; }

.chips-label { margin-top: 1.4rem; font-family: var(--font-mono); font-size: .78rem; color: var(--ink-mute); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.chip {
  min-height: 42px; padding: .5rem 1rem; border-radius: 999px;
  border: 1px solid var(--line); font-size: .92rem; font-weight: 560;
  transition: border-color .2s, background .2s, color .2s;
}
.chip.is-active { border-color: var(--accent); background: rgba(238, 112, 67, 0.12); color: var(--ink); }
@media (hover: hover) { .chip:not(.is-active):hover { border-color: rgba(244, 243, 241, 0.3); } }

.summary { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.summary-item {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .3rem .35rem .3rem .85rem; border-radius: 999px;
  font-size: .85rem; background: var(--bg-soft); border: 1px solid var(--line);
}
.summary-item .k { color: var(--ink-mute); }
.summary-item .v { font-weight: 620; }
.summary-edit { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-soft); }
.summary-edit .icon { width: 14px; height: 14px; }
@media (hover: hover) { .summary-edit:hover { background: var(--line); color: var(--ink); } }

.field-check { position: relative; display: flex; align-items: flex-start; gap: .75rem; margin-top: 1.4rem; font-size: .9rem; color: var(--ink-soft); cursor: pointer; }
.field-check input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
.check-box {
  flex: none; width: 22px; height: 22px; margin-top: 1px;
  display: grid; place-items: center; border-radius: 6px;
  border: 1.5px solid rgba(244, 243, 241, 0.3); color: transparent;
  transition: background .2s, border-color .2s, color .2s;
}
.check-box .icon { width: 14px; height: 14px; }
.field-check input:checked + .check-box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.field-check input:focus-visible + .check-box { outline: 2px solid var(--accent); outline-offset: 3px; }
.field-check input[aria-invalid="true"] + .check-box { border-color: var(--danger); }
.field-check a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.legal-note { margin-top: .8rem; font-size: .8rem; color: var(--ink-mute); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.send-error {
  margin-top: 1.4rem; padding: .9rem 1rem; border-radius: 10px;
  color: var(--danger); font-size: .92rem;
  background: rgba(255, 138, 128, 0.08); border: 1px solid rgba(255, 138, 128, 0.3);
}
.send-error a { text-decoration: underline; }

.wizard-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; }
.wizard-nav .btn-back[hidden] { display: inline-flex; visibility: hidden; }
.wizard-nav [data-next][hidden], .wizard-nav [data-submit][hidden] { display: none; }
.no-js .wizard-nav .btn-back, .no-js .wizard-nav .btn-next { display: none; }
.no-js .wizard-nav { justify-content: flex-end; }
.lead-form.is-sending [data-submit] { opacity: .7; pointer-events: none; }

.form-success { text-align: center; padding-block: 1.5rem; outline: none; }
.form-success[hidden] { display: none; }
.form-success-icon {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 1.4rem;
  display: grid; place-items: center; background: rgba(238, 112, 67, 0.12);
}
.form-success-icon svg { width: 44px; height: 44px; fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.form-success-icon circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw 1s var(--ease-out) forwards; opacity: .4; }
.form-success-icon path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw .6s .5s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.form-success h3 { font-size: 1.5rem; }
.form-success p { color: var(--ink-soft); margin: .8rem auto 0; max-width: 30rem; }
.form-alt { margin-top: 1.4rem; color: var(--ink-mute); font-size: .95rem; }
.form-alt a { color: var(--ink); border-bottom: 1px solid var(--accent); }

/* 11. Opiniones: reseñas de Google en una cinta que avanza sola hacia la derecha */
.section--reviews { padding-top: clamp(2rem, 5vw, 4rem); }
.reviews-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 1.4rem 2rem; margin-bottom: clamp(2rem, 4vw, 3rem);
}
.reviews-head .section-head { margin-bottom: 0; }
.reviews-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.reviews-btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem 1.1rem;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(244, 243, 241, 0.02);
  font-family: var(--font-mono); font-size: .8rem; color: var(--ink-soft);
  transition: border-color .25s var(--ease-out), color .25s var(--ease-out);
}
.reviews-btn[hidden] { display: none; }
.reviews-btn .icon { width: 1.05em; height: 1.05em; }
@media (hover: hover) { .reviews-btn:hover { border-color: rgba(238, 112, 67, 0.45); color: var(--ink); } }

/* Sin JavaScript o con "reducir movimiento": fila que se desliza con el dedo */
.reviews { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: .4rem; }
.reviews::-webkit-scrollbar { display: none; }
.reviews-track { display: flex; width: max-content; }
.reviews-group { display: flex; gap: 1.1rem; padding-inline: 1.25rem; }
.review {
  position: relative; flex: none; width: clamp(272px, 80vw, 372px);
  display: flex; flex-direction: column; gap: 1rem; padding: 1.6rem 1.6rem 1.35rem;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  scroll-snap-align: center;
  transition: border-color .3s var(--ease-out), background .3s var(--ease-out);
}
@media (hover: hover) { .review:hover { border-color: rgba(238, 112, 67, 0.35); background: var(--bg-card-2); } }
.review-mark { position: absolute; top: 1.3rem; right: 1.4rem; width: 2.1rem; height: 2.1rem; fill: var(--accent); opacity: .16; }
.review-stars {
  display: block; width: calc(var(--stars, 5) * 1.3rem); height: 1.1rem; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z'/%3E%3C/svg%3E") 0 0 / 1.3rem 1.1rem repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z'/%3E%3C/svg%3E") 0 0 / 1.3rem 1.1rem repeat-x;
}
.review-text p { font-size: 1rem; line-height: 1.6; color: var(--ink); }
.review-author {
  margin-top: auto; padding-top: 1.1rem; border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: .8rem;
}
.review-avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(238, 112, 67, 0.12); border: 1px solid rgba(238, 112, 67, 0.3);
  color: var(--accent); font-weight: 700; font-stretch: 112%;
}
.review-name { display: block; font-weight: 650; line-height: 1.3; }
.review-source { display: flex; align-items: center; gap: .35rem; margin-top: .15rem; font-family: var(--font-mono); font-size: .72rem; color: var(--ink-mute); }
.review-source .icon { width: .95em; height: .95em; }

/* Con JavaScript: cinta continua (las reseñas van duplicadas para que no se corte) */
.reviews.is-marquee {
  overflow: hidden; scroll-snap-type: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.reviews.is-marquee .reviews-group { padding: 0 1.1rem 0 0; }
.reviews.is-marquee .reviews-track { animation: reviews-right var(--reviews-dur, 70s) linear infinite; will-change: transform; }
.reviews.is-paused .reviews-track, .reviews.is-held .reviews-track, .reviews.is-offscreen .reviews-track { animation-play-state: paused; }
@media (hover: hover) { .reviews.is-marquee:hover .reviews-track { animation-play-state: paused; } }
@keyframes reviews-right { from { transform: translate3d(-50%, 0, 0); } to { transform: translate3d(0, 0, 0); } }

/* 12. Pie */
.footer { padding-block: 3.5rem 2.5rem; border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 2.4rem; grid-template-columns: 1fr; }
.footer-brand p { color: var(--ink-soft); margin-top: .9rem; max-width: 24rem; font-size: .94rem; }
.footer-col h4, .footer-zones h4 {
  margin-bottom: 1rem; font-family: var(--font-mono); font-weight: 500; font-size: .78rem;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-mute);
}
.footer-col ul { display: grid; gap: .7rem; }
.footer-col li, .footer-col a { font-size: .93rem; color: var(--ink-soft); line-height: 1.45; }
@media (hover: hover) { .footer-col a:hover { color: var(--ink); } }
.footer-zones { margin-top: 2.6rem; padding-top: 2rem; border-top: 1px solid var(--line-soft); }
.footer-zones p { font-size: .88rem; line-height: 1.75; color: var(--ink-mute); max-width: 70rem; }
.footer-bottom {
  margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; justify-content: space-between; align-items: center;
  font-size: .82rem; color: var(--ink-mute);
}
.footer-legal { display: inline-flex; gap: 1.2rem; }
.footer-bottom a { color: var(--ink-mute); }
@media (hover: hover) { .footer-bottom a:hover { color: var(--ink-soft); } }

/* 13. Páginas sencillas (privacidad, créditos, respuesta sin JavaScript) */
.page-simple { min-height: 100vh; }
.simple-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: var(--container); margin: 0 auto; padding: 1.5rem 1.25rem; }
.page-simple .brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-stretch: 125%; text-transform: uppercase; }
.page-simple .brand-mark { width: 30px; height: 30px; }
.page-simple .brand-mark-bg { fill: var(--accent); }
.page-simple .brand-mark-c { fill: none; stroke: var(--accent-ink); stroke-width: 8; stroke-linecap: square; }
.simple-back { font-family: var(--font-mono); font-size: .85rem; color: var(--accent); }
.simple-main { max-width: 760px; margin: 0 auto; padding: 2.5rem 1.25rem 6rem; }
.simple-main h1, .page-simple main h1 { font-size: clamp(2rem, 5vw, 3rem); }
.simple-main h2 { margin-top: 2.4rem; font-size: 1.25rem; }
.simple-main p { margin-top: .9rem; color: var(--ink-soft); }
.simple-main a:not(.brand) { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.pending { padding: 0 .3em; border-radius: 4px; background: rgba(238, 112, 67, 0.16); color: var(--ink); }
.credits { margin-top: 1.6rem; padding-left: 1.1em; display: grid; gap: .8rem; list-style: disc; color: var(--ink-soft); font-size: .95rem; }
.credits strong { color: var(--ink); }
.credit-file { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-mute); }

/* 14. Responsive */
@media (min-width: 540px) {
  .fields { grid-template-columns: 1fr 1fr; }
  .field--full { grid-column: 1 / -1; }
}
@media (min-width: 720px) {
  .container { padding-inline: 2rem; }
  .choice-grid.is-2col { grid-template-columns: repeat(2, 1fr); }
  .choice-grid.is-3col { grid-template-columns: repeat(3, 1fr); }
  .choice-grid.is-4col { grid-template-columns: repeat(4, 1fr); }
  .service-card { grid-template-columns: 1.35fr 1fr; }
  .reviews-group { padding-inline: 2rem; }
  .service-media { order: 0; aspect-ratio: auto; min-height: 260px; }
  .service-media img { position: absolute; inset: 0; }
  .ba-frame { aspect-ratio: 3 / 2; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-burger { display: none; }
  .nav-mobile { display: none; }
}
@media (min-width: 1280px) {
  .container { padding-inline: 2.5rem; }
  .ba-frame { aspect-ratio: 16 / 9; }
}
@media (max-width: 539px) {
  .section-actions .btn { flex: 1 1 100%; }
  .splash { --pad-b: 6.5rem; }
  .splash-kicker { font-size: .7rem; font-stretch: 100%; letter-spacing: .12em; white-space: nowrap; gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transform: none; filter: none; transition: opacity .5s ease; }
  .lead-form.is-wizard .wizard-step.is-active, .ba-panel.is-switching .ba-frame { animation: none; }
  .type-cursor { display: none; }
}
