/* ==========================================================================
   ARQ. RONNIE CRUZ | Diseño y Construcción
   Sistema de diseño "Blueprint": cuadrícula técnica, azul de marca y líneas finas.
   Metodología: mobile first. Los estilos base son móviles y se amplían con min-width.

   ÍNDICE
   00 Fuentes
   01 Tokens (tema oscuro por defecto + tema claro)
   02 Reset y base
   03 Utilidades y revelados
   04 Botones
   05 Preloader
   06 Header, navegación y menú móvil
   07 Hero
   08 Marquesina
   09 Manifiesto y cifras
   10 Servicios (bento)
   11 Proceso
   12 Comparador plano / resultado
   13 Espacios (galería horizontal)
   14 Por qué elegirnos
   15 Preguntas frecuentes
   16 Contacto y formulario
   17 Footer
   18 Botón flotante de WhatsApp
   19 Movimiento reducido
   ========================================================================== */

/* 00 FUENTES ------------------------------------------------------------- */
@font-face {
    font-family: "Geist";
    src: url("fonts/geist-latin.woff2") format("woff2");
    font-weight: 300 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Geist Mono";
    src: url("fonts/geist-mono-latin.woff2") format("woff2");
    font-weight: 400 600;
    font-style: normal;
    font-display: swap;
}
/* Michroma evoca el rotulado cuadrado "RONNIE CRUZ" del logotipo. Solo para marca y cifras. */
@font-face {
    font-family: "Michroma";
    src: url("fonts/michroma-latin.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* 01 TOKENS -------------------------------------------------------------- */
:root {
    /* Marca: azul extraído del logotipo (#0872B9) */
    --blue: #0872B9;
    --blue-500: #1587D1;
    --blue-glow: rgba(21, 135, 209, .38);

    /* Tema oscuro (por defecto) */
    color-scheme: dark;
    --bg: #060A12;
    --bg-2: #0A111E;
    --bg-3: #0F1829;
    --surface: rgba(143, 184, 230, .05);
    --surface-2: rgba(143, 184, 230, .09);
    --line: rgba(143, 184, 230, .16);
    --line-strong: rgba(143, 184, 230, .32);
    --ink: #EAF0F8;
    --ink-2: #A9B7CB;
    --ink-3: #8393AA;
    --accent-text: #5BB4EE;          /* azul de marca aclarado para texto sobre fondo oscuro */
    --stroke: rgba(234, 240, 248, .42);
    --grid-line: rgba(91, 180, 238, .075);
    --glass: rgba(6, 10, 18, .72);
    --shadow-tint: 2, 8, 18;
    --error: #FF9B9B;
    --scene-rgb: 91, 180, 238;       /* maqueta 3D del hero */
    --scene-hi-rgb: 226, 244, 255;

    /* Tipografía */
    --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --font-brand: "Michroma", "Geist", ui-sans-serif, sans-serif;

    /* Forma: un solo radio para toda la página (6px). Círculos solo en controles redondos. */
    --r: 6px;

    /* Layout */
    --header-h: 68px;
    --gutter: clamp(20px, 5vw, 56px);
    --maxw: 1320px;

    /* Movimiento */
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-io: cubic-bezier(.65, 0, .35, 1);

    /* Escala de z-index */
    --z-fab: 40;
    --z-header: 50;
    --z-menu: 60;
    --z-loader: 100;
}

[data-theme="light"] {
    color-scheme: light;
    --bg: #F4F7FB;
    --bg-2: #EAF0F7;
    --bg-3: #FFFFFF;
    --surface: rgba(10, 15, 24, .035);
    --surface-2: rgba(10, 15, 24, .065);
    --line: rgba(10, 15, 24, .12);
    --line-strong: rgba(10, 15, 24, .28);
    --ink: #0A0F18;
    --ink-2: #44546A;
    --ink-3: #5B6B80;
    --accent-text: #0768A8;          /* azul de marca un punto más profundo: cumple 4.5:1 sobre los fondos claros */
    --stroke: rgba(10, 15, 24, .5);
    --grid-line: rgba(8, 114, 185, .09);
    --glass: rgba(244, 247, 251, .78);
    --shadow-tint: 20, 40, 70;
    --error: #B42318;
    --scene-rgb: 8, 114, 185;
    --scene-hi-rgb: 4, 62, 102;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
}
html.is-loading { overflow: hidden; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, address { margin: 0; }
address { font-style: normal; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--blue); color: #fff; }

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

/* Lenis (scroll suave) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

.skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: calc(var(--z-loader) + 1);
    padding: 12px 18px;
    background: var(--blue);
    color: #fff;
    font-weight: 600;
    border-radius: var(--r);
    transition: top .25s var(--ease-out);
}
.skip-link:focus { top: 16px; }

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Iconos (sprite Phosphor) */
.ic { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
.ic-lg { width: 2rem; height: 2rem; }

/* 03 UTILIDADES Y REVELADOS --------------------------------------------- */
.container {
    width: 100%;
    max-width: calc(var(--maxw) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section { padding-block: clamp(76px, 11vw, 168px); position: relative; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .85em;
    font-family: var(--font-mono);
    font-size: .74rem;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent-text);
}
.eyebrow::before {
    content: "";
    width: 28px; height: 1px;
    background: currentColor;
    opacity: .7;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -.03em; text-wrap: balance; }

h2 {
    font-size: clamp(2rem, 1.1rem + 3.7vw, 4rem);
    line-height: 1.05;
    letter-spacing: -.038em;
}

.section-head { max-width: 900px; margin-bottom: clamp(40px, 6vw, 84px); }
.section-head h2, .contact-head h2 { margin-top: .35em; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .section-lead { margin-inline: auto; }

.section-lead {
    max-width: 60ch;
    margin-top: 1.1em;
    color: var(--ink-2);
    font-size: clamp(1rem, .55vw + .92rem, 1.2rem);
    line-height: 1.6;
    text-wrap: pretty;
}

/* Titulares que se revelan palabra por palabra (JS los divide en .w > .wi) */
.split .w {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: .14em;
    margin-bottom: -.14em;
}
.split .wi {
    display: inline-block;
    transform: translateY(112%);
    transition: transform 1.05s var(--ease-out);
    transition-delay: calc(var(--wi, 0) * 55ms);
}
.split.in .wi { transform: none; }

/* Revelado al hacer scroll: se usa @keyframes con fill "backwards" para no pisar los
   transform/transition propios de cada componente (hover, magnetismo, etc.). */
html.js [data-reveal] { opacity: 0; }
html.js [data-reveal].in {
    opacity: 1;
    animation: reveal-up 1.1s var(--ease-out) var(--d, 0s) backwards;
}
@keyframes reveal-up {
    from { opacity: 0; transform: translate3d(0, 34px, 0); }
    to   { opacity: 1; transform: none; }
}

/* 04 BOTONES ------------------------------------------------------------- */
.btn {
    --h: 48px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65em;
    height: var(--h);
    padding-inline: 1.45em;
    border-radius: var(--r);
    font-size: .98rem;
    font-weight: 600;
    letter-spacing: -.01em;
    white-space: nowrap;
    isolation: isolate;
    overflow: hidden;
    transition: transform .35s var(--ease-out), background-color .3s, border-color .3s, box-shadow .35s;
}
.btn .ic { transition: transform .4s var(--ease-out); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-sm { --h: 40px; padding-inline: 1.1em; font-size: .9rem; }
.btn-lg { --h: 56px; padding-inline: 1.75em; font-size: 1.02rem; }
.btn-block { width: 100%; }

.btn-primary {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 14px 34px -16px rgba(8, 114, 185, .9), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-primary::before {      /* barrido de luz al pasar el cursor */
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .9s var(--ease-out);
}
.btn-primary:hover { background: var(--blue-500); box-shadow: 0 18px 42px -14px rgba(21, 135, 209, .95), inset 0 1px 0 rgba(255, 255, 255, .28); }
.btn-primary:hover::before { transform: translateX(120%); }
.btn-primary:hover .ic { transform: translate(2px, -2px); }

.btn-ghost {
    border: 1px solid var(--line-strong);
    color: var(--ink);
    background: transparent;
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--accent-text); }

/* 05 PRELOADER ----------------------------------------------------------- */
/* El preloader es siempre oscuro (momento de marca), sin importar el tema. */
.loader {
    position: fixed;
    inset: 0;
    z-index: var(--z-loader);
    display: grid;
    place-items: center;
    color: #EAF0F8;
    overflow: hidden;
}
.no-js .loader { display: none; }

.loader-panel {
    position: absolute;
    left: 0; right: 0;
    height: 50.2%;
    background:
        linear-gradient(rgba(91, 180, 238, .07) 1px, transparent 1px) 0 0 / 56px 56px,
        linear-gradient(90deg, rgba(91, 180, 238, .07) 1px, transparent 1px) 0 0 / 56px 56px,
        #060A12;
    transition: transform 1.15s var(--ease-io);
}
.loader-panel--top { top: 0; }
.loader-panel--bottom { bottom: 0; background-position: 0 100%, 0 100%, 0 0; }

.loader-core {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: center;
    gap: 22px;
    transition: opacity .5s var(--ease-out), transform .8s var(--ease-out);
}

.loader-ring { position: relative; width: clamp(150px, 38vw, 200px); aspect-ratio: 1; }
.loader-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.lr-guide { fill: none; stroke: rgba(91, 180, 238, .25); stroke-width: .6; stroke-dasharray: 1.2 3.2; transform-origin: 50% 50%; animation: spin 18s linear infinite; }
.lr-track { fill: none; stroke: rgba(143, 184, 230, .16); stroke-width: 1.6; }
.lr-fill {
    fill: none;
    stroke: #1587D1;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: calc(100 - var(--p, 0));
    filter: drop-shadow(0 0 6px rgba(21, 135, 209, .8));
}
.loader-mark {
    position: absolute;
    left: 50%; top: 50%;
    width: 52%;
    height: auto;
    transform: translate(-50%, -50%);
    animation: mark-breathe 2.8s ease-in-out infinite;
}
@keyframes mark-breathe {
    0%, 100% { opacity: .82; transform: translate(-50%, -50%) scale(.985); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.015); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.loader-name {
    font-family: var(--font-brand);
    font-size: clamp(.82rem, 3vw, 1rem);
    letter-spacing: .34em;
    padding-left: .34em;
}
.loader-meta {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-family: var(--font-mono);
    font-size: .8rem;
    color: #A9B7CB;
}
.loader-pct { min-width: 2.4ch; text-align: right; color: #EAF0F8; font-variant-numeric: tabular-nums; }
.loader-msg { margin-left: 14px; letter-spacing: .1em; text-transform: uppercase; font-size: .7rem; }

.loader-line { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(143, 184, 230, .14); z-index: 2; }
.loader-line span { display: block; height: 100%; background: #1587D1; transform-origin: 0 50%; transform: scaleX(calc(var(--p, 0) / 100)); box-shadow: 0 0 14px rgba(21, 135, 209, .9); }

.loader.is-done { pointer-events: none; }
.loader.is-done .loader-core { opacity: 0; transform: scale(.94) translateY(-10px); }
.loader.is-done .loader-line { opacity: 0; transition: opacity .3s; }
.loader.is-done .loader-panel--top { transform: translateY(-101%); }
.loader.is-done .loader-panel--bottom { transform: translateY(101%); }

/* 06 HEADER, NAVEGACIÓN Y MENÚ MÓVIL ------------------------------------ */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: var(--z-header);
    transition: transform .6s var(--ease-out), background-color .4s, border-color .4s, backdrop-filter .4s;
    border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
    background: var(--glass);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
    border-bottom-color: var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
html.menu-open .site-header { transform: none; }

.header-inner {
    height: var(--header-h);
    max-width: calc(var(--maxw) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 44px; height: auto; }
.brand-mark--light { display: none; }
[data-theme="light"] .brand-mark--dark { display: none; }
[data-theme="light"] .brand-mark--light { display: block; }
.brand-text { display: grid; line-height: 1.15; }
.brand-name { font-family: var(--font-brand); font-size: .78rem; letter-spacing: .2em; white-space: nowrap; }
.brand-tag { font-size: .68rem; color: var(--ink-3); letter-spacing: .04em; white-space: nowrap; }

.nav { display: none; }
.nav ul { display: flex; gap: clamp(16px, 1.8vw, 30px); }
.nav a {
    position: relative;
    display: block;
    padding: 8px 2px;
    font-size: .92rem;
    font-weight: 500;
    color: var(--ink-2);
    transition: color .25s;
}
.nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 2px;
    height: 1px;
    background: var(--accent-text);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform .5s var(--ease-out);
}
.nav a:hover, .nav a[aria-current="true"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-cta { display: none; }

.icon-btn {
    width: 44px; height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    color: var(--ink);
    transition: background-color .25s, border-color .25s, transform .35s var(--ease-out);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--accent-text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .ic { grid-area: 1 / 1; }

.theme-toggle .ic-moon { display: none; }
[data-theme="light"] .theme-toggle .ic-sun { display: none; }
[data-theme="light"] .theme-toggle .ic-moon { display: block; }

.menu-toggle .ic-close { display: none; }
.menu-toggle[aria-expanded="true"] .ic-open { display: none; }
.menu-toggle[aria-expanded="true"] .ic-close { display: block; }

.scroll-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.scroll-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--accent-text));
    transform: scaleX(var(--sp, 0));
    transform-origin: 0 50%;
    box-shadow: 0 0 12px var(--blue-glow);
}

/* Menú móvil a pantalla completa */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: var(--z-menu);
    padding: calc(var(--header-h) + 28px) var(--gutter) calc(28px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
        var(--bg);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path .8s var(--ease-io), visibility 0s .8s;
}
html.menu-open .mobile-menu { clip-path: inset(0); visibility: visible; transition: clip-path .8s var(--ease-io), visibility 0s; }
html.menu-open { overflow: hidden; }
.site-header { z-index: calc(var(--z-menu) + 1); }

.mobile-nav { display: grid; gap: 2px; }
.mobile-nav a {
    display: block;
    padding: 12px 0;
    font-size: clamp(2rem, 9vw, 3.2rem);
    font-weight: 600;
    letter-spacing: -.035em;
    line-height: 1.1;
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .5s, transform .8s var(--ease-out), color .25s;
}
.mobile-nav a:hover { color: var(--accent-text); }
html.menu-open .mobile-nav a { opacity: 1; transform: none; }
html.menu-open .mobile-nav a:nth-child(1) { transition-delay: .25s; }
html.menu-open .mobile-nav a:nth-child(2) { transition-delay: .31s; }
html.menu-open .mobile-nav a:nth-child(3) { transition-delay: .37s; }
html.menu-open .mobile-nav a:nth-child(4) { transition-delay: .43s; }
html.menu-open .mobile-nav a:nth-child(5) { transition-delay: .49s; }
html.menu-open .mobile-nav a:nth-child(6) { transition-delay: .55s; }

.mobile-foot { display: grid; gap: 18px; }
.mobile-foot .btn { width: 100%; }
.mobile-meta { color: var(--ink-3); font-size: .9rem; text-align: center; }
.mobile-meta a { color: var(--ink); font-weight: 600; }

/* 07 HERO ---------------------------------------------------------------- */
.hero {
    position: relative;
    isolation: isolate;
    overflow: clip;
    min-height: 100dvh;
    display: flex;
    align-items: flex-start;
    padding-top: calc(var(--header-h) + clamp(28px, 6vh, 64px));
    padding-bottom: clamp(220px, 46vh, 420px);
}
.hero::before {                     /* cuadrícula de plano técnico */
    content: "";
    position: absolute;
    inset: 0;
    z-index: -3;
    background:
        linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px,
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 55% 45%, #000 20%, transparent 78%);
    mask-image: radial-gradient(ellipse 80% 70% at 55% 45%, #000 20%, transparent 78%);
    animation: grid-drift 40s linear infinite;
}
@keyframes grid-drift { to { background-position: 64px 64px, 64px 64px; } }

.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-glow {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(620px circle at var(--gx, 68%) var(--gy, 46%), rgba(21, 135, 209, .2), transparent 62%);
    transition: background-position .3s;
}
[data-theme="light"] .hero-glow { background: radial-gradient(620px circle at var(--gx, 68%) var(--gy, 46%), rgba(8, 114, 185, .13), transparent 62%); }

.hero-inner {
    width: 100%;
    max-width: calc(var(--maxw) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.hero-copy { max-width: 780px; display: grid; justify-items: start; }

.hero-title {
    margin-top: 1.1rem;
    font-size: clamp(2.15rem, 1rem + 5.1vw, 4.6rem);
    line-height: 1.03;
    letter-spacing: -.042em;
    font-weight: 600;
}
.hero-line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.hero-rotator { display: grid; }
.rot {
    grid-area: 1 / 1;
    color: var(--accent-text);
    opacity: 0;
    transform: translateY(105%);
    transition: transform 1s var(--ease-out), opacity .6s var(--ease-out);
}
.rot.is-active { opacity: 1; transform: none; }
.rot.is-out { opacity: 0; transform: translateY(-105%); }

.hero-lead {
    margin-top: 1.5rem;
    max-width: 34em;
    font-size: clamp(1.02rem, .5vw + .95rem, 1.28rem);
    color: var(--ink-2);
    text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.hero-actions .btn { flex: 1 1 auto; }

/* Entrada del hero al terminar el preloader */
html.js .h-in { opacity: 0; transform: translateY(26px); }
html.js .hero-line.h-in { transform: none; }
html.js .hero-line-in.h-in { display: block; opacity: 1; transform: translateY(108%); }
html.is-ready.js .h-in,
html.is-ready.js .hero-line.h-in,
html.is-ready.js .hero-line-in.h-in {
    opacity: 1;
    transform: none;
    transition: opacity 1s var(--ease-out) calc(var(--i, 0) * .13s + .1s), transform 1.25s var(--ease-out) calc(var(--i, 0) * .13s + .1s);
}

/* 08 MARQUESINA ---------------------------------------------------------- */
.marquee {
    overflow: hidden;
    padding-block: clamp(22px, 3.4vw, 42px);
    border-block: 1px solid var(--line);
    background: var(--bg-2);
}
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-group { display: flex; align-items: center; flex: none; }
.marquee-group li {
    padding-inline: clamp(14px, 2vw, 30px);
    font-size: clamp(2.2rem, 1rem + 5vw, 5.2rem);
    font-weight: 600;
    letter-spacing: -.035em;
    line-height: 1.1;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 1px var(--stroke);
}
.marquee-group li:nth-child(4n + 1) { color: var(--ink); -webkit-text-stroke: 0; }
.marquee-group li.sep {
    width: clamp(14px, 1.6vw, 24px);
    height: clamp(14px, 1.6vw, 24px);
    padding: 0;
    border-radius: 50%;
    border: 1.5px solid var(--accent-text);
    -webkit-text-stroke: 0;
    flex: none;
}

/* 09 MANIFIESTO Y CIFRAS ------------------------------------------------- */
.manifesto { padding-block: clamp(84px, 12vw, 190px); }
.manifesto-text {
    max-width: 21em;
    font-size: clamp(1.7rem, .9rem + 3vw, 3.5rem);
    line-height: 1.16;
    letter-spacing: -.034em;
    font-weight: 500;
    text-wrap: pretty;
}
.mw { opacity: .16; }
.no-gsap .mw { opacity: 1; }

.stats {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: clamp(56px, 8vw, 120px);
    border-top: 1px solid var(--line);
}
.stat {
    display: grid;
    gap: 10px;
    padding-block: 28px;
    border-top: 1px solid var(--line);
}
.stat:first-child { border-top: 0; }
.stat-num {
    font-family: var(--font-brand);
    font-size: clamp(3rem, 1.5rem + 5vw, 6rem);
    line-height: 1;
    letter-spacing: -.02em;
    color: var(--ink);
}
.stat-label { max-width: 22ch; color: var(--ink-2); font-size: 1rem; }

/* 10 SERVICIOS (bento) --------------------------------------------------- */
.services { background: var(--bg); }
.bento { display: grid; grid-template-columns: 1fr; gap: 12px; }

.cell {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 22px;
    padding: clamp(22px, 2.6vw, 34px);
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--bg-3);
    color: #fff;
    transition: border-color .4s, box-shadow .5s;
}
.cell:hover { border-color: var(--line-strong); box-shadow: 0 30px 70px -34px rgba(var(--shadow-tint), .9); }

.cell-img {
    position: absolute;
    inset: 0;
    z-index: -3;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 1.6s var(--ease-out);
}
.cell:hover .cell-img { transform: scale(1.06); }

.cell:has(.cell-img)::before {      /* velo para legibilidad del texto sobre la foto */
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient(to top, rgba(4, 8, 16, .92) 0%, rgba(4, 8, 16, .55) 42%, rgba(4, 8, 16, .08) 100%);
}
.cell::after {                      /* foco de luz que sigue al cursor */
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(91, 180, 238, .2), transparent 62%);
    opacity: 0;
    transition: opacity .4s;
}
.cell:hover::after { opacity: 1; }

.cell-body { display: grid; gap: 10px; justify-items: start; max-width: 36ch; }
.cell-body .ic-lg { color: #8fd0ff; margin-bottom: 4px; }
.cell h3 { font-size: clamp(1.3rem, 1rem + 1vw, 1.75rem); line-height: 1.12; letter-spacing: -.03em; }
.cell p { font-size: .96rem; line-height: 1.5; color: rgba(255, 255, 255, .8); }

/* Celdas sin foto: azul de marca, cristal técnico y llamada a la acción */
.cell--blue {
    background: linear-gradient(150deg, #0A7FC8 0%, #0872B9 38%, #045085 100%);
    border-color: rgba(255, 255, 255, .14);
}
.cell--blue .cell-body .ic-lg { color: #fff; }
.cell--blue p { color: rgba(255, 255, 255, .88); }
.ruler {
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 44px;
    z-index: -1;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .75) 0 1px, transparent 1px 48px) 0 0 / 100% 20px no-repeat,
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .45) 0 1px, transparent 1px 12px) 0 0 / 100% 11px no-repeat;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ruler::after {                      /* marcador de medida que recorre la regla */
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 2px; height: 36px;
    background: #fff;
    box-shadow: 0 0 14px rgba(255, 255, 255, .9);
    animation: measure 5.5s var(--ease-io) infinite alternate;
}
@keyframes measure { from { transform: translateX(8px); } to { transform: translateX(calc(min(100vw, 480px) - 40px)); } }

.cell--ghost {
    color: var(--ink);
    background:
        linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 28px 28px,
        var(--bg-3);
}
.cell--ghost p { color: var(--ink-2); }
.cell--ghost .cell-body .ic-lg { color: var(--accent-text); }
.cell-watermark {
    position: absolute;
    right: -6%; top: -4%;
    width: 62%; height: auto;
    aspect-ratio: 1;
    z-index: -1;
    fill: none;
    color: var(--accent-text);
    opacity: .1;
    transform: rotate(-8deg);
    transition: transform 1.4s var(--ease-out), opacity .6s;
}
.cell-watermark use { fill: currentColor; }
.cell--ghost:hover .cell-watermark { transform: rotate(0) scale(1.05); opacity: .16; }

.cell--multi {
    min-height: 0;
    gap: 28px;
    color: var(--ink);
    justify-content: space-between;
    background: linear-gradient(135deg, var(--surface-2), var(--surface));
    border-style: dashed;
    border-color: var(--line-strong);
}
.cell--multi p { color: var(--ink-2); }
.cell--multi .cell-body { max-width: 52ch; }
.cell--multi .cell-body .ic-lg { color: var(--accent-text); }
.cell--multi h3 { font-size: clamp(1.4rem, 1rem + 1.5vw, 2.2rem); }

/* 11 PROCESO ------------------------------------------------------------- */
.process { background: var(--bg-2); border-block: 1px solid var(--line); }
.process-grid { display: grid; gap: clamp(48px, 8vw, 80px); }
.process-sticky { display: grid; justify-items: start; gap: 0; }
.process-sticky .section-lead { margin-bottom: 28px; }
.process-fig {
    position: relative;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 16 / 10;
    margin-bottom: 28px;
    overflow: hidden;
    border-radius: var(--r);
    border: 1px solid var(--line);
}
.process-fig img { position: absolute; inset: -9% 0; width: 100%; height: 118%; object-fit: cover; max-width: none; }

.steps { position: relative; display: grid; }
/* Riel y relleno de la línea de tiempo: pseudo-elementos controlados con --line-h y --sf (JS) */
.steps::before, .steps::after {
    content: "";
    position: absolute;
    left: 25px;
    top: 26px;
    width: 2px;
    height: var(--line-h, calc(100% - 52px));
    border-radius: 2px;
}
.steps::before { background: var(--line); }
.steps::after {
    background: linear-gradient(to bottom, var(--blue), var(--accent-text));
    transform-origin: 50% 0;
    transform: scaleY(var(--sf, 1));
    box-shadow: 0 0 14px var(--blue-glow);
}
.step { position: relative; padding: 0 0 clamp(44px, 7vw, 92px) 80px; }
.step:last-child { padding-bottom: 0; }
.step-node {
    position: absolute;
    left: 0; top: 0;
    width: 52px; height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--bg-2);
    border: 1px solid var(--line-strong);
    color: var(--ink-3);
    transition: color .5s, border-color .5s, background-color .5s, box-shadow .6s, transform .6s var(--ease-out);
}
.step-node .ic { width: 1.4rem; height: 1.4rem; }
.step h3 { font-size: clamp(1.35rem, 1rem + 1.4vw, 2rem); line-height: 1.12; padding-top: 10px; transition: color .5s; color: var(--ink-3); }
.step p { max-width: 46ch; margin-top: .6em; color: var(--ink-3); transition: color .5s; }
.step.is-active .step-node { color: #fff; background: var(--blue); border-color: var(--accent-text); box-shadow: 0 0 0 6px rgba(21, 135, 209, .16), 0 10px 30px -8px var(--blue-glow); transform: scale(1.06); }
.step.is-active h3 { color: var(--ink); }
.step.is-active p { color: var(--ink-2); }
.no-gsap .step .step-node, .no-gsap .step h3, .no-gsap .step p { color: var(--ink); }

/* 12 COMPARADOR PLANO / RESULTADO --------------------------------------- */
.render { overflow: clip; }
.compare { position: relative; max-width: 1180px; margin-inline: auto; }
.compare-frame {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--r);
    border: 1px solid var(--line-strong);
    background: #071C34;
    cursor: ew-resize;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 40px 90px -40px rgba(var(--shadow-tint), .9);
}
.compare-img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; pointer-events: none; }
.compare-reveal {                    /* capa "resultado": solo transform, sin repintados costosos */
    position: absolute;
    inset: 0;
    overflow: hidden;
    transform: translate3d(calc(var(--pos, .5) * 100%), 0, 0);
    will-change: transform;
}
.compare-reveal .compare-img { transform: translate3d(calc(var(--pos, .5) * -100%), 0, 0); will-change: transform; }
.compare-handle {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transform: translate3d(calc(var(--pos, .5) * 100%), 0, 0);
    will-change: transform;
}
.compare-handle::before {
    content: "";
    position: absolute;
    left: -1px; top: 0; bottom: 0;
    width: 2px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(8, 114, 185, .55), 0 0 26px rgba(91, 180, 238, .9);
}
.compare-knob {
    position: absolute;
    left: 0; top: 50%;
    width: 56px; height: 56px;
    margin: -28px 0 0 -28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 10px 30px -6px rgba(8, 114, 185, .9);
    animation: knob-pulse 2.6s ease-in-out infinite;
}
@keyframes knob-pulse {
    0%, 100% { box-shadow: 0 10px 30px -6px rgba(8, 114, 185, .9), 0 0 0 0 rgba(91, 180, 238, .5); }
    50% { box-shadow: 0 10px 30px -6px rgba(8, 114, 185, .9), 0 0 0 14px rgba(91, 180, 238, 0); }
}
.compare-range { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.compare:has(.compare-range:focus-visible) .compare-frame { outline: 2px solid var(--accent-text); outline-offset: 4px; }
.compare-captions {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    font-family: var(--font-mono);
    font-size: .76rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-2);
}
.render-cta { display: flex; justify-content: center; margin-top: clamp(36px, 5vw, 64px); }

/* 13 ESPACIOS (galería horizontal) -------------------------------------- */
.spaces { background: var(--bg-2); border-block: 1px solid var(--line); }
.spaces-pin { display: flex; flex-direction: column; justify-content: center; gap: clamp(28px, 4vw, 48px); padding-block: clamp(76px, 11vw, 120px); overflow: hidden; }
.spaces-head { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.spaces-head h2 { margin-top: .35em; max-width: 14em; }

.spaces-viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 6px; }
.spaces-viewport::-webkit-scrollbar { display: none; }
.spaces-track { display: flex; align-items: flex-end; gap: clamp(14px, 2vw, 28px); width: max-content; padding-inline: var(--gutter); }
.space-card { flex: none; width: min(74vw, 340px); scroll-snap-align: start; }
.space-media { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--r); border: 1px solid var(--line); background: var(--bg-3); }
.space-media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform 1.6s var(--ease-out); }
.space-card:hover .space-media img { transform: scale(1.06); }
.space-card figcaption { padding-top: 16px; }
.space-card h3 { font-size: 1.2rem; letter-spacing: -.025em; }
.space-card p { margin-top: 4px; color: var(--ink-2); font-size: .94rem; max-width: 30ch; }
.space-end { flex: none; width: min(74vw, 340px); scroll-snap-align: start; align-self: center; display: grid; justify-items: start; gap: 14px; padding-right: var(--gutter); }
.space-end h3 { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.4rem); line-height: 1.08; }
.space-end p { color: var(--ink-2); margin-bottom: 8px; }

.spaces-progress { display: none; }

/* 14 POR QUÉ ELEGIRNOS --------------------------------------------------- */
.why { overflow: clip; }
.why-list { position: relative; border-top: 1px solid var(--line); }
.why-row {
    position: relative;
    display: grid;
    gap: 12px;
    padding-block: clamp(26px, 3.4vw, 44px);
    border-bottom: 1px solid var(--line);
    transition: opacity .5s var(--ease-out);
}
.why-row h3 { font-size: clamp(1.45rem, 1rem + 2vw, 2.6rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 500; transition: transform .7s var(--ease-out), color .4s; }
.why-row p { color: var(--ink-2); max-width: 46ch; }
.why-arrow { display: none; width: 1.8rem; height: 1.8rem; color: var(--accent-text); transition: transform .6s var(--ease-out); }
.why-list.has-active .why-row:not(.is-active) { opacity: .42; }
.why-row.is-active h3 { transform: translateX(10px); color: var(--accent-text); }
.why-row.is-active .why-arrow { transform: rotate(45deg); }

.why-preview { display: none; }

/* 15 PREGUNTAS FRECUENTES ------------------------------------------------ */
.faq { background: var(--bg-2); border-top: 1px solid var(--line); }
.faq-grid { display: grid; gap: clamp(36px, 6vw, 72px); }
.faq-aside { display: grid; justify-items: start; }
.faq-aside .section-lead { margin-bottom: 28px; }

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-q {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-block: 24px;
    text-align: left;
    font-size: clamp(1.08rem, .95rem + .5vw, 1.3rem);
    font-weight: 500;
    letter-spacing: -.02em;
    line-height: 1.3;
    transition: color .3s;
}
.faq-q:hover { color: var(--accent-text); }
.faq-q .ic { width: 1.4rem; height: 1.4rem; color: var(--accent-text); transition: transform .6s var(--ease-out); }
.faq-q[aria-expanded="true"] .ic { transform: rotate(135deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease-out); }
.faq-a > div { overflow: hidden; }
.faq-a p { padding-bottom: 26px; color: var(--ink-2); max-width: 58ch; }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }

/* 16 CONTACTO Y FORMULARIO ---------------------------------------------- */
.contact { overflow: clip; isolation: isolate; }
.contact-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(900px circle at 85% 0%, rgba(21, 135, 209, .22), transparent 60%),
        linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px,
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px;
    -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
}
.contact-head { display: grid; justify-items: start; max-width: 900px; margin-bottom: clamp(44px, 6vw, 84px); }
.contact-head h2 { font-size: clamp(2.2rem, 1.1rem + 4.6vw, 4.8rem); }
.contact-head .btn { margin-top: 30px; }

.contact-grid { display: grid; gap: clamp(32px, 5vw, 56px); }
.contact-card { padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); align-self: start; }
.contact-card ul { display: grid; gap: 24px; }
.contact-card li { display: flex; gap: 16px; align-items: flex-start; }
.contact-card .ic { width: 1.5rem; height: 1.5rem; color: var(--accent-text); margin-top: 2px; }
.contact-card .k { display: block; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.contact-card a, .contact-card .v { font-size: 1.05rem; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.contact-card a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease-out), color .3s; }
.contact-card a:hover { background-size: 100% 1px; color: var(--accent-text); }

.contact-form { display: grid; gap: 20px; padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg-3); box-shadow: 0 40px 90px -50px rgba(var(--shadow-tint), .9); }
.contact-form h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
.form-help { margin-top: -10px; color: var(--ink-2); font-size: .96rem; }
.field { display: grid; gap: 8px; }
.field label { font-size: .88rem; font-weight: 600; letter-spacing: -.005em; }
.field .opt { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r);
    background: var(--surface);
    color: var(--ink);
    font-size: 1rem;
    transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 44px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.field select option { background: var(--bg-3); color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 4px rgba(21, 135, 209, .22); background: var(--surface-2); }
.field.has-error input, .field.has-error select { border-color: var(--error); }
.field-error { min-height: 0; font-size: .85rem; color: var(--error); }
.field-error:empty { display: none; }
.form-success { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--r); border: 1px solid var(--accent-text); background: var(--surface); color: var(--ink); font-size: .95rem; }
.form-success[hidden] { display: none; }
.form-success .ic { width: 1.5rem; height: 1.5rem; color: var(--accent-text); margin-top: 1px; }
.form-success a { text-decoration: underline; text-underline-offset: 3px; color: var(--accent-text); font-weight: 600; }

/* 17 FOOTER -------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-top: clamp(56px, 8vw, 100px); overflow: clip; }
.footer-top { display: grid; gap: 40px; }
.footer-logo { width: min(100%, 300px); height: auto; }
.footer-logo--light { display: none; }
[data-theme="light"] .footer-logo--dark { display: none; }
[data-theme="light"] .footer-logo--light { display: block; }
.footer-brand p { margin-top: 20px; max-width: 34ch; color: var(--ink-2); }
.footer-col h2 { font-family: var(--font-mono); font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 18px; line-height: 1.3; }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { color: var(--ink-2); transition: color .25s; }
.footer-col a:hover { color: var(--accent-text); }
.footer-mega {
    margin-top: clamp(40px, 6vw, 80px);
    font-family: var(--font-brand);
    font-size: 8.4vw;
    line-height: 1;
    letter-spacing: .03em;
    text-align: center;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 1px var(--line-strong);
    -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
    user-select: none;
}
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; padding-block: 26px calc(34px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); margin-top: -.2em; position: relative; color: var(--ink-3); font-size: .88rem; }
.footer-bottom a { color: var(--ink-2); transition: color .25s; margin-right: 76px; }   /* deja libre el botón flotante */
.footer-bottom a:hover { color: var(--accent-text); }

/* 18 BOTÓN FLOTANTE DE WHATSAPP ----------------------------------------- */
.fab {
    position: fixed;
    right: calc(16px + env(safe-area-inset-right));
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: var(--z-fab);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px) scale(.9);
    pointer-events: none;
    transition: opacity .6s var(--ease-out), transform .8s var(--ease-out);
}
html.is-ready .fab { opacity: 1; transform: none; pointer-events: auto; transition-delay: 1.4s; }
html:not(.js) .fab { opacity: 1; transform: none; pointer-events: auto; }
.fab-icon {
    position: relative;
    width: 60px; height: 60px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #1FA855;               /* verde de WhatsApp: único color ajeno a la marca, para reconocimiento inmediato */
    color: #fff;
    box-shadow: 0 16px 34px -10px rgba(31, 168, 85, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .4s var(--ease-out);
}
.fab-icon .ic { width: 30px; height: 30px; }
.fab-icon::before, .fab-icon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #1FA855; animation: fab-ring 2.8s var(--ease-out) infinite; }
.fab-icon::after { animation-delay: 1.4s; }
@keyframes fab-ring { from { transform: scale(1); opacity: .7; } to { transform: scale(1.7); opacity: 0; } }
.fab:hover .fab-icon { transform: scale(1.07) rotate(-6deg); }
.fab:active .fab-icon { transform: scale(.95); }
.fab-tip {
    display: none;
    padding: 10px 16px;
    border-radius: var(--r);
    background: var(--bg-3);
    border: 1px solid var(--line-strong);
    color: var(--ink);
    font-size: .9rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 16px 40px -16px rgba(var(--shadow-tint), .9);
    opacity: 0;
    transform: translateX(10px);
    transition: opacity .5s, transform .6s var(--ease-out);
}
.fab.show-tip .fab-tip, .fab:hover .fab-tip, .fab:focus-visible .fab-tip { opacity: 1; transform: none; }

/* ==========================================================================
   RESPONSIVE (mobile first: se amplía hacia arriba)
   ========================================================================== */

/* Móvil grande / tablet pequeña */
@media (min-width: 640px) {
    .hero-actions .btn { flex: 0 0 auto; }
    .stats { grid-template-columns: repeat(3, 1fr); }
    .stat { border-top: 0; border-left: 1px solid var(--line); padding: 32px 0 8px 28px; }
    .stat:first-child { border-left: 0; padding-left: 0; }
    .footer-top { grid-template-columns: 1.4fr 1fr 1fr; }
    .fab-tip { display: block; }
    .compare-frame { aspect-ratio: 16 / 10; }
}

/* Tablet */
@media (min-width: 768px) {
    .bento { grid-template-columns: repeat(2, 1fr); }
    .cell { min-height: 360px; }
    .cell--planos, .cell--construccion, .cell--multi { grid-column: 1 / -1; }
    .cell--planos, .cell--construccion { min-height: 420px; }
    .cell--multi { flex-direction: row; align-items: center; }
    .why-row { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 40px; align-items: center; gap: 40px; }
    .why-arrow { display: block; justify-self: end; }
    .faq-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
    .contact-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
    .compare-frame { aspect-ratio: 16 / 9; }
}

/* Escritorio: navegación completa */
@media (min-width: 1100px) {
    .nav { display: block; }
    .header-cta { display: inline-flex; }
    .menu-toggle, .mobile-menu { display: none; }
}

@media (min-width: 1024px) {
    :root { --header-h: 76px; }
    .hero { align-items: center; padding-block: calc(var(--header-h) + 12px) 56px; }
    .hero-copy { max-width: 800px; }
    .hero-title { font-size: clamp(3rem, 1rem + 4.2vw, 4.9rem); }

    /* Bento 12 columnas con ritmo: grande, alta, dos pequeñas / tres de distinto ancho / franja completa */
    .bento { grid-template-columns: repeat(12, 1fr); grid-template-rows: 290px 290px 360px auto; gap: 14px; }
    .cell { min-height: 0; }
    .cell--planos       { grid-column: 1 / 7;   grid-row: 1 / 3; }
    .cell--render       { grid-column: 7 / 10;  grid-row: 1 / 3; }
    .cell--fachada      { grid-column: 10 / 13; grid-row: 1; }
    .cell--interior     { grid-column: 10 / 13; grid-row: 2; }
    .cell--levantamiento{ grid-column: 1 / 4;   grid-row: 3; }
    .cell--construccion { grid-column: 4 / 10;  grid-row: 3; }
    .cell--supervision  { grid-column: 10 / 13; grid-row: 3; }
    .cell--multi        { grid-column: 1 / -1;  grid-row: 4; }
    .cell--render .cell-body, .cell--planos .cell-body { max-width: 30ch; }
    .cell--planos h3 { font-size: 2rem; }

    /* Proceso: columna izquierda fija mientras avanzan las etapas */
    .process-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(56px, 8vw, 120px); align-items: start; }
    .process-aside { align-self: stretch; }
    .process-sticky { position: sticky; top: calc(var(--header-h) + 32px); }

    .space-card { width: clamp(250px, min(26vw, calc((100dvh - 500px) * .8)), 420px); }
    .space-end { width: clamp(280px, 30vw, 440px); }

    /* Galería anclada: el scroll vertical se traduce en desplazamiento horizontal */
    .spaces-pin.is-pinned { height: 100dvh; min-height: 0; padding-block: calc(var(--header-h) + 4px) 24px; gap: 22px; justify-content: space-between; }
    .spaces-pin.is-pinned .spaces-viewport { padding-bottom: 0; }
    .spaces-pin.is-pinned .spaces-viewport { overflow: visible; scroll-snap-type: none; }
    .spaces-pin.is-pinned .spaces-progress { display: block; position: relative; height: 2px; width: min(var(--maxw), calc(100% - var(--gutter) * 2)); margin-inline: auto; background: var(--line); }
    .spaces-pin.is-pinned .spaces-progress span { position: absolute; inset: 0; background: var(--accent-text); transform-origin: 0 50%; transform: scaleX(var(--hp, 0)); box-shadow: 0 0 12px var(--blue-glow); }
    .spaces-pin.is-pinned .spaces-head h2 { max-width: 18em; font-size: clamp(1.8rem, 1rem + 2.4vw, 3.2rem); }

    /* Vista previa que sigue al cursor sobre la lista de diferenciales */
    .why-preview {
        display: block;
        position: absolute;
        left: 0; top: 0;
        z-index: 5;
        width: clamp(240px, 22vw, 330px);
        aspect-ratio: 4 / 5;
        overflow: hidden;
        border-radius: var(--r);
        border: 1px solid var(--line-strong);
        pointer-events: none;
        opacity: 0;
        scale: .9;
        transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
        transition: opacity .35s, scale .6s var(--ease-out);
        box-shadow: 0 40px 80px -30px rgba(var(--shadow-tint), .95);
    }
    .why-preview.is-visible { opacity: 1; scale: 1; }
    .why-preview img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; transition: opacity .45s; }
    .why-preview img.is-on { opacity: 1; }
}

@media (min-width: 1024px) and (max-height: 820px) {
    .spaces-pin.is-pinned .spaces-head .section-lead { display: none; }
}

@media (hover: none), (pointer: coarse) {
    .why-preview { display: none !important; }
}

@media (min-width: 1280px) {
    .footer-mega { font-size: 8.8vw; }
}

/* Cuando el navegador no soporta :has(), la velo se aplica a todas las celdas con imagen */
@supports not selector(:has(*)) {
    .cell--planos::before, .cell--render::before, .cell--fachada::before, .cell--interior::before, .cell--construccion::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -2;
        background: linear-gradient(to top, rgba(4, 8, 16, .92) 0%, rgba(4, 8, 16, .55) 42%, rgba(4, 8, 16, .08) 100%);
    }
}

/* Reducción de transparencia: fondos sólidos */
@media (prefers-reduced-transparency: reduce) {
    .site-header.is-scrolled { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* 19 MOVIMIENTO REDUCIDO ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        transition-delay: 0s !important;
    }
    html.js [data-reveal], html.js .h-in, .split .wi { opacity: 1 !important; transform: none !important; }
    html.js .hero-line-in.h-in { transform: none !important; }
    .rot { transition: none; }
    .mw { opacity: 1; }
    .step .step-node, .step h3, .step p { color: var(--ink); }
    .marquee-track { transform: none !important; }
}
