/* =============================================================
   Acrílicos y Marquesinas · styles.css
   Paleta: rojo #C60000 · blanco #FFFFFF · navy #1B273D · azul #0B4E9D
   Tipografía: Poppins (H1) · Open Sans (resto)
   ============================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --red: #C60000;
  --red-dark: #9E0000;
  --red-soft: rgba(198, 0, 0, .08);
  --white: #FFFFFF;
  --navy: #1B273D;
  --navy-2: #131c2e;
  --blue: #0B4E9D;
  --blue-soft: rgba(11, 78, 157, .08);
  --ink: #1B273D;
  --muted: #5b6577;
  --line: #e4e8f0;
  --soft: #f4f6fa;
  --wa: #25D366;
  --wa-dark: #1ebe5b;

  --h1: 'Poppins', 'Open Sans', system-ui, sans-serif;
  --sans: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --pill: 999px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --container: 1200px;
  --header-h: 76px;

  --shadow-sm: 0 4px 14px -6px rgba(27, 39, 61, .18);
  --shadow: 0 18px 40px -18px rgba(27, 39, 61, .28);
  --shadow-lg: 0 40px 80px -30px rgba(27, 39, 61, .45);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.25, .46, .45, .94);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.12; letter-spacing: -.02em; font-weight: 700; }
h1 { font-family: var(--h1); }
h2 { font-family: var(--sans); font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.15rem; }
strong { font-weight: 700; }
::selection { background: var(--red); color: var(--white); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ---------- 3. Utilities ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: clamp(4rem, 9vw, 7rem); position: relative; }
.section-soft { background: var(--soft); }
.section-navy { background: var(--navy); color: var(--white); }
.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--navy); color: var(--white); z-index: 9999; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 1rem; }
.kicker { font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin-bottom: .75rem; }
.section-navy .kicker { color: #ff8a8a; }
.accent { color: var(--red); }
.section-head { max-width: 720px; margin: 0 auto 2.75rem; text-align: center; }
.section-head p:not(.kicker) { color: var(--muted); margin-top: .9rem; font-size: 1.05rem; }
.section-head-light h2 { color: var(--white); }
.section-head-light p:not(.kicker) { color: rgba(255, 255, 255, .78); }
.lead { font-size: 1.08rem; }

/* ---------- 4. Buttons ---------- */
.btn {
  --bg: var(--red); --fg: var(--white);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.6rem; border-radius: var(--pill);
  background: var(--bg); color: var(--fg); font-weight: 700; font-size: .95rem; line-height: 1.2;
  white-space: nowrap; isolation: isolate; overflow: hidden;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), background .3s, color .3s;
  box-shadow: 0 10px 24px -12px rgba(198, 0, 0, .55);
}
.btn::after { /* shine */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .8s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -14px rgba(198, 0, 0, .6); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary:hover { background: var(--red-dark); }
.btn-lg { padding: 1rem 1.9rem; font-size: 1.02rem; }
.btn-sm { padding: .55rem 1.05rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-ghost { --bg: rgba(255, 255, 255, .1); --fg: var(--white); border: 1px solid rgba(255, 255, 255, .35); box-shadow: none; backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .18); box-shadow: none; }
.btn-outline { --bg: transparent; --fg: var(--red); border: 2px solid var(--red); box-shadow: none; padding: .65rem 1.3rem; }
.btn-outline:hover { background: var(--red); color: var(--white); box-shadow: 0 14px 26px -14px rgba(198, 0, 0, .6); }
.btn-light { --bg: var(--white); --fg: var(--navy); box-shadow: 0 14px 30px -16px rgba(0, 0, 0, .5); }
.btn-light:hover { background: #f1f4f9; }
.btn-light small { font-weight: 600; opacity: .6; }
.btn-text { --bg: transparent; --fg: inherit; box-shadow: none; padding-inline: .6rem; opacity: .8; }
.btn-text:hover { opacity: 1; box-shadow: none; transform: none; }
.btn-text::after { display: none; }
.btn.is-loading { pointer-events: none; opacity: .8; }
.btn.is-loading span { visibility: hidden; }
.btn.is-loading::before {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .4); border-top-color: var(--white); animation: spin .8s linear infinite;
}
.btn-outline.is-loading::before { border-color: rgba(198, 0, 0, .3); border-top-color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 5. Header ---------- */
.header {
  position: sticky; top: 0; z-index: 900;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: box-shadow .4s var(--ease-out), border-color .4s, background .4s;
}
/* Efecto vidrio al desplazar (el logo tiene fondo transparente, así que no deja "caja") */
@supports (backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px)) {
  .header.is-scrolled { background: rgba(255, 255, 255, .8); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); }
}
.header.is-scrolled { box-shadow: 0 8px 30px -18px rgba(27, 39, 61, .35); border-color: var(--line); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand img { height: 46px; width: auto; }
.nav { display: none; gap: 1.6rem; font-weight: 600; font-size: .92rem; color: var(--navy); }
.nav a { position: relative; padding-block: .3rem; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease-out); }
.nav a:hover::after { transform: scaleX(1); }
.btn-header { padding: .7rem 1.25rem; }
@media (min-width: 960px) { .nav { display: flex; } }

/* ---------- 6. Hero ---------- */
.hero { position: relative; color: var(--white); min-height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; overflow: clip; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 115%; object-fit: cover; object-position: center 35%; will-change: transform; }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(19, 28, 46, .93) 0%, rgba(27, 39, 61, .82) 45%, rgba(11, 78, 157, .55) 100%); }
.hero-grid { position: absolute; inset: 0; opacity: .12;
  background-image: linear-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .5) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(70% 70% at 30% 40%, #000 20%, transparent 100%); }
.hero-inner { flex: 1; display: grid; gap: 2.5rem; align-items: center; padding-block: clamp(3rem, 8vw, 6rem) clamp(4rem, 8vw, 6rem); }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; color: #ffd0d0; margin-bottom: 1.2rem; }
.eyebrow-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(198, 0, 0, .6); animation: ping 2.2s var(--ease-out) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(198, 0, 0, .7); } 70% { box-shadow: 0 0 0 12px rgba(198, 0, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(198, 0, 0, 0); } }
.hero-title { font-size: clamp(2.1rem, 5.2vw, 3.9rem); font-weight: 800; line-height: 1.06; max-width: 15ch; margin-bottom: 1.3rem; }
.hero-title .w { display: inline-block; opacity: 0; transform: translateY(.6em) rotate(2deg); transform-origin: left bottom; animation: wordIn .9s var(--ease-out) forwards; animation-delay: calc(var(--i) * 55ms + 120ms); }
@keyframes wordIn { to { opacity: 1; transform: none; } }
.hero-text { font-size: clamp(1rem, 1.35vw, 1.15rem); color: rgba(255, 255, 255, .86); max-width: 58ch; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.6rem; }
.hero-badges { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
@media (min-width: 960px) { .hero-inner { grid-template-columns: 1.15fr minmax(360px, .85fr); gap: 3.5rem; } .hero-form { max-width: 460px; justify-self: end; width: 100%; } }
.hero-badges li { font-size: .8rem; font-weight: 600; padding: .35rem .8rem; border-radius: var(--pill); border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); }

/* form card */
.card-form {
  background: var(--white); color: var(--ink); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.card-form::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, var(--red), var(--blue)); }
.card-form-flat { box-shadow: var(--shadow); border: 1px solid var(--line); }
.form-title { font-size: 1.5rem; margin-bottom: .2rem; }
.form-sub { color: var(--muted); font-size: .9rem; margin-bottom: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .9rem; }
.field label, .field .label { font-size: .82rem; font-weight: 700; color: var(--navy); }
.field label small { font-weight: 500; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; padding: .8rem .95rem; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: #fbfcfe;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: var(--white); box-shadow: 0 0 0 4px var(--blue-soft); }
.field input.is-invalid, .field textarea.is-invalid { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .84rem; color: var(--muted); margin: .4rem 0 1.1rem; cursor: pointer; }
.check input { margin-top: .2rem; width: 17px; height: 17px; accent-color: var(--red); flex: none; }
.check a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.check.is-invalid { color: var(--red); }
.form-error { color: var(--red); font-size: .86rem; font-weight: 600; margin: -.3rem 0 .9rem; padding: .6rem .8rem; background: var(--red-soft); border-radius: 10px; }
.form-error[hidden] { display: none; }

/* marquee */
.marquee { position: relative; z-index: 1; overflow: hidden; border-top: 1px solid rgba(255, 255, 255, .15); background: rgba(19, 28, 46, .55); backdrop-filter: blur(6px); padding: .85rem 0; }
.marquee-track { display: flex; gap: 2.5rem; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .8); display: inline-flex; align-items: center; gap: 2.5rem; white-space: nowrap; }
.marquee-track span::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 7. Por qué ---------- */
.why-inner { display: grid; gap: 3rem; align-items: center; }
.why-copy h2 { margin-bottom: 1.1rem; }
.why-copy p { color: var(--muted); margin-bottom: 1rem; }
.why-copy .lead { color: var(--ink); }
.why-list { list-style: none; padding: 0; margin: 1.3rem 0 1.8rem; display: grid; gap: .65rem; }
.why-list li { display: flex; gap: .7rem; align-items: center; font-weight: 600; font-size: .95rem; }
.why-list svg { color: var(--blue); flex: none; }
.why-media { position: relative; padding-bottom: 4.5rem; }
.why-figure { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); position: relative; transform-style: preserve-3d; transition: transform .6s var(--ease-out); }
.why-figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(27, 39, 61, .35)); }
.why-figure img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform 1.2s var(--ease-out); }
.why-figure:hover img { transform: scale(1.04); }
.bogota-card {
  position: absolute; left: 1rem; right: 1rem; bottom: 0; display: flex; gap: 1rem; align-items: flex-start;
  background: var(--navy); color: var(--white); padding: 1.25rem 1.4rem; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  border-left: 5px solid var(--red);
}
.bogota-card h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.bogota-card p { font-size: .9rem; color: rgba(255, 255, 255, .8); margin: 0; }
.bogota-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--red), var(--blue)); }
@media (min-width: 960px) {
  .why-inner { grid-template-columns: 1.05fr 1fr; gap: 4.5rem; }
  .bogota-card { left: -2.5rem; right: 2rem; bottom: 1rem; }
  .why-media { padding-bottom: 3rem; }
}

/* ---------- 8. Garantías ---------- */
.guarantee-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g-card {
  position: relative; background: var(--white); border-radius: var(--radius); padding: 2rem 1.6rem 1.6rem; text-align: center;
  border: 1.5px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .4s;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.g-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--red), var(--blue)); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out); }
.g-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.g-card:hover::before { transform: scaleX(1); }
.g-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: var(--red); background: var(--red-soft); transition: transform .5s var(--ease-bounce), background .4s, color .4s; }
.g-card:hover .g-icon { transform: rotate(-6deg) scale(1.08); background: var(--red); color: var(--white); }
.g-card h3 { font-size: 1.12rem; flex: 1; }

/* ---------- 9. Nuestro trabajo (galería) ---------- */
.work { background: var(--navy-2); color: var(--white); overflow: clip; isolation: isolate; }
.work-bg { position: absolute; inset: 0; z-index: -1; }
.work-bg img { width: 100%; height: 115%; object-fit: cover; opacity: .22; will-change: transform; }
.work-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--navy-2) 0%, rgba(19, 28, 46, .6) 30%, rgba(19, 28, 46, .7) 70%, var(--navy-2) 100%); }
.gallery { columns: 2; column-gap: .8rem; }
.g-item {
  display: block; break-inside: avoid; margin-bottom: .8rem; position: relative; border-radius: 14px; overflow: hidden; background: #0f1626;
  box-shadow: 0 10px 30px -15px rgba(0, 0, 0, .8); aspect-ratio: var(--r, 4/3);
  transform: translateY(24px); opacity: 0; transition: transform .8s var(--ease-out), opacity .8s var(--ease-out);
}
.g-item.is-in { transform: none; opacity: 1; }
.g-item.is-hidden { display: none; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out), filter .6s; }
.g-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(27, 39, 61, .65)); opacity: 0; transition: opacity .5s; }
.g-item:hover img { transform: scale(1.06); }
.g-item:hover::after { opacity: 1; }
.g-zoom { position: absolute; right: .7rem; bottom: .7rem; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: var(--white); opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .5s var(--ease-out); z-index: 1; }
.g-item:hover .g-zoom { opacity: 1; transform: none; }
.gallery-more { text-align: center; margin-top: 2rem; }
.gallery-more[hidden] { display: none; }
@media (min-width: 720px) { .gallery { columns: 3; column-gap: 1rem; } .g-item { margin-bottom: 1rem; } }
@media (min-width: 1280px) { .gallery { columns: 4; } }

/* ---------- 10. Diseños (carrusel) ---------- */
.designs { padding-bottom: clamp(3rem, 7vw, 5rem); overflow: clip; }
.carousel { position: relative; }
.carousel-track {
  display: flex; gap: 1rem; overflow-x: auto; overflow-y: visible; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 1rem var(--gutter) 2rem; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 min(78vw, 420px); scroll-snap-align: center; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--soft); cursor: zoom-in; position: relative; transition: transform .6s var(--ease-out); }
.slide img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform 1s var(--ease-out); }
.slide:hover { transform: translateY(-4px); }
.slide:hover img { transform: scale(1.05); }
.slide::after { content: "Diseño 3D"; position: absolute; left: .9rem; top: .9rem; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--white); background: rgba(27, 39, 61, .75); padding: .3rem .65rem; border-radius: var(--pill); backdrop-filter: blur(6px); }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-60%); z-index: 2; width: 48px; height: 48px; border-radius: 50%; background: var(--white); color: var(--navy); box-shadow: var(--shadow); display: none; place-items: center; transition: transform .4s var(--ease-out), background .3s, color .3s; }
.carousel-btn:hover { background: var(--red); color: var(--white); transform: translateY(-60%) scale(1.06); }
.carousel-btn.prev { left: calc(var(--gutter) - 12px); }
.carousel-btn.next { right: calc(var(--gutter) - 12px); }
@media (min-width: 720px) { .carousel-btn { display: grid; } .slide { flex-basis: 440px; } }

/* ---------- 11. Cotizador IA ---------- */
.estimator { background: radial-gradient(60% 50% at 85% 10%, rgba(11, 78, 157, .5), transparent 70%), radial-gradient(40% 40% at 5% 90%, rgba(198, 0, 0, .35), transparent 70%), var(--navy); }
.ai-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .9rem; border-radius: var(--pill); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); color: var(--white); letter-spacing: .08em; }
.est-card { background: var(--white); color: var(--ink); border-radius: 24px; padding: clamp(1.4rem, 3.5vw, 2.6rem); box-shadow: var(--shadow-lg); max-width: 920px; margin: 0 auto; }
.est-steps { list-style: none; padding: 0; display: flex; gap: .4rem; justify-content: space-between; margin-bottom: 2rem; counter-reset: s; }
.est-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 600; color: var(--muted); text-align: center; position: relative; }
.est-steps li span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); border: 2px solid var(--line); font-weight: 700; transition: all .4s var(--ease-out); }
.est-steps li::before { content: ""; position: absolute; top: 16px; left: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.est-steps li:last-child::before { display: none; }
.est-steps li span { position: relative; z-index: 1; }
.est-steps li.is-active span { background: var(--red); color: var(--white); border-color: var(--red); transform: scale(1.1); box-shadow: 0 0 0 5px var(--red-soft); }
.est-steps li.is-active { color: var(--navy); }
.est-steps li.is-done span { background: var(--blue); color: var(--white); border-color: var(--blue); }
.est-steps li.is-done::before { background: var(--blue); }
.est-step { display: none; animation: stepIn .55s var(--ease-out); }
.est-step.is-active { display: block; }
@keyframes stepIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.est-step legend { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.2rem; color: var(--navy); }
.chip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.chip span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 54px; padding: .6rem .8rem; border-radius: 14px; border: 1.5px solid var(--line); background: #fbfcfe; font-weight: 600; font-size: .9rem; transition: all .3s var(--ease-out); }
.chip:hover span { border-color: var(--blue); background: var(--white); }
.chip input:checked + span { border-color: var(--red); background: var(--red); color: var(--white); box-shadow: 0 10px 22px -12px rgba(198, 0, 0, .6); transform: translateY(-2px); }
.chip input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.chip-wide { grid-column: 1 / -1; }
.est-row { display: grid; gap: 1rem; }
.est-area output { font-size: 1.35rem; font-weight: 700; color: var(--blue); padding: .55rem 0; }
.est-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.2rem; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; text-align: center; padding: 1.4rem; border: 2px dashed var(--line); border-radius: var(--radius); background: #fbfcfe; cursor: pointer; min-height: 200px; transition: all .3s; overflow: hidden; }
.drop:hover, .drop.is-over { border-color: var(--blue); background: var(--blue-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-icon { color: var(--blue); }
.drop-text { font-size: .85rem; color: var(--muted); }
.drop-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop-preview[hidden] { display: none; }
.drop.has-file .drop-icon, .drop.has-file .drop-text { display: none; }
.drop-clear { position: absolute; top: .6rem; right: .6rem; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: var(--white); font-size: 1.2rem; line-height: 1; z-index: 2; }
.drop-clear[hidden] { display: none; }
.est-loading { text-align: center; padding: 2rem 0; color: var(--muted); }
.est-loading[hidden], .est-out[hidden] { display: none; }
.est-spinner { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 1rem; border: 4px solid var(--line); border-top-color: var(--red); animation: spin .9s linear infinite; }
.est-out { display: grid; gap: 1.2rem; }
.est-price { text-align: center; padding: 1.6rem 1.2rem; border-radius: var(--radius); background: linear-gradient(135deg, var(--navy), var(--blue)); color: var(--white); }
.est-price small { display: block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; margin-bottom: .4rem; }
.est-price strong { display: block; font-family: var(--h1); font-size: clamp(1.5rem, 4vw, 2.3rem); line-height: 1.1; }
.est-price em { display: block; font-style: normal; font-size: .85rem; opacity: .85; margin-top: .5rem; }
.est-reco { display: grid; gap: .5rem; padding: 1.2rem 1.3rem; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--soft); }
.est-reco h4 { display: flex; align-items: center; gap: .5rem; color: var(--red); font-size: 1rem; }
.est-reco p { color: var(--muted); font-size: .95rem; }
.est-reco ul { margin: .3rem 0 0 1.1rem; color: var(--ink); font-size: .92rem; }
.est-actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; align-items: center; }
.est-actions .countdown { font-size: .82rem; color: var(--muted); width: 100%; text-align: center; }
.est-disclaimer { font-size: .78rem; color: var(--muted); margin-top: 1.4rem; text-align: center; }
@media (min-width: 720px) {
  .est-row { grid-template-columns: 1fr 1fr auto; align-items: end; }
  .est-row-2 { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .est-row-3 { grid-template-columns: repeat(3, 1fr); }
  .chip-grid-4 { grid-template-columns: repeat(4, 1fr); }
  .est-steps li { font-size: .8rem; }
}

/* ---------- 12. Contacto ---------- */
.contact-inner { display: grid; gap: 2.5rem; align-items: start; }
.contact-form .kicker { margin-bottom: .4rem; }
.map-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); aspect-ratio: 4 / 3; }
.map-frame iframe { width: 100%; height: 100%; filter: saturate(.9); }
.contact-list { list-style: none; padding: 0; margin-top: 1.4rem; display: grid; gap: .8rem; }
.contact-list li { display: flex; gap: .8rem; align-items: center; font-weight: 600; font-size: .95rem; }
.contact-list svg { color: var(--red); flex: none; }
.contact-list a:hover { color: var(--blue); }
@media (min-width: 960px) { .contact-inner { grid-template-columns: 1fr 1fr; gap: 3.5rem; } }

/* ---------- 13. Footer ---------- */
.footer { background: var(--navy); color: rgba(255, 255, 255, .82); padding-top: clamp(3rem, 7vw, 5rem); }
.footer-grid { display: grid; gap: 2.2rem; padding-bottom: 2.5rem; }
.footer-brand img { height: 56px; width: auto; background: var(--white); padding: .5rem .8rem; border-radius: 10px; margin-bottom: 1rem; }
.footer-brand p { font-size: .92rem; max-width: 42ch; }
.footer h3 { color: var(--white); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.footer ul { list-style: none; padding: 0; display: grid; gap: .55rem; font-size: .93rem; }
.footer a { transition: color .3s; }
.footer a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 1.2rem; font-size: .82rem; color: rgba(255, 255, 255, .6); text-align: center; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

/* ---------- 14. Flotantes: WhatsApp + Chat ---------- */
.wa-float {
  position: fixed; right: 1.1rem; bottom: calc(6.4rem + var(--aviso, 0px)); z-index: 950;
  display: flex; align-items: center; gap: .5rem; height: 58px; padding: 0 1.1rem 0 .85rem; border-radius: var(--pill);
  background: var(--wa); color: var(--white); font-weight: 700; box-shadow: 0 14px 30px -12px rgba(37, 211, 102, .8);
  transition: transform .45s var(--ease-out), background .3s, bottom .45s var(--ease-out);
}
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); animation: ping 2.4s var(--ease-out) infinite; }
.wa-float:hover { transform: translateY(-3px) scale(1.03); background: var(--wa-dark); }
.wa-label { font-size: .9rem; }
@media (max-width: 539px) { .hero-actions .btn { width: 100%; white-space: normal; text-align: center; } .wa-label { display: none; } .wa-float { padding: 0; width: 58px; justify-content: center; } }

/* Cuando el asistente está oculto, el botón de WhatsApp ocupa su sitio */
body.sin-chat .wa-float { bottom: calc(1.1rem + var(--aviso, 0px)); }
.chat { position: fixed; right: 1.1rem; bottom: calc(1.1rem + var(--aviso, 0px)); z-index: 960; }
.chat { transition: bottom .45s var(--ease-out); }
.chat-bubble { position: relative; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--red), var(--blue)); color: var(--white); box-shadow: 0 16px 34px -12px rgba(27, 39, 61, .7); transition: transform .45s var(--ease-out); }
.chat-bubble:hover { transform: translateY(-3px) scale(1.04); }
.chat-bubble .ico-close, .chat.is-open .ico-open { display: none; }
.chat.is-open .ico-close { display: block; }
.chat-ping { position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; background: #ffd23f; border: 2px solid var(--white); }
.chat.is-open .chat-ping, .chat.was-opened .chat-ping { display: none; }
.chat-panel {
  position: absolute; right: 0; bottom: 76px; width: min(380px, calc(100vw - 2.2rem)); height: min(560px, calc(100dvh - 7rem));
  display: flex; flex-direction: column; background: var(--white); color: var(--ink); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden;
  transform-origin: bottom right; animation: chatIn .45s var(--ease-out);
}
.chat-panel[hidden] { display: none; }
@keyframes chatIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
.chat-head { display: flex; gap: .75rem; align-items: center; padding: .9rem 1rem; background: var(--navy); color: var(--white); }
.chat-head strong { display: block; font-size: .9rem; line-height: 1.2; }
.chat-head small { font-size: .74rem; opacity: .8; display: flex; align-items: center; gap: .35rem; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); display: inline-block; }
.chat-avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, var(--red), var(--blue)); flex: none; }
.chat-close { margin-left: auto; font-size: 1.5rem; line-height: 1; opacity: .8; }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; background: var(--soft); scroll-behavior: smooth; }
.msg { max-width: 88%; padding: .7rem .9rem; border-radius: 16px; font-size: .9rem; line-height: 1.5; animation: msgIn .4s var(--ease-out); word-wrap: break-word; }
.msg a { color: var(--blue); text-decoration: underline; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg-bot { align-self: flex-start; background: var(--white); border-bottom-left-radius: 4px; box-shadow: var(--shadow-sm); }
.msg-user { align-self: flex-end; background: var(--navy); color: var(--white); border-bottom-right-radius: 4px; }
.msg-typing { display: flex; gap: 4px; padding: .9rem 1rem; }
.msg-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing 1.2s infinite; }
.msg-typing i:nth-child(2) { animation-delay: .15s; } .msg-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }
.chat-suggest { display: flex; flex-wrap: wrap; gap: .4rem; }
.chat-suggest button { font-size: .78rem; font-weight: 600; padding: .4rem .75rem; border-radius: var(--pill); background: var(--white); border: 1.5px solid var(--line); color: var(--navy); transition: all .3s; }
.chat-suggest button:hover { border-color: var(--red); color: var(--red); }
.chat-form { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--line); background: var(--white); }
.chat-form input { flex: 1; padding: .7rem .9rem; border-radius: var(--pill); border: 1.5px solid var(--line); background: var(--soft); }
.chat-form input:focus { outline: none; border-color: var(--blue); }
.chat-form button { width: 44px; height: 44px; border-radius: 50%; background: var(--red); color: var(--white); display: grid; place-items: center; transition: transform .3s var(--ease-out), background .3s; }
.chat-form button:hover { background: var(--red-dark); transform: scale(1.05); }
.chat-foot { font-size: .7rem; color: var(--muted); text-align: center; padding: 0 .8rem .6rem; background: var(--white); }
.chat-foot a { color: var(--blue); text-decoration: underline; }

/* ---------- 15. Cookies ---------- */
.cookie {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 980; max-width: 560px;
  background: var(--red); color: var(--white); padding: 1.1rem 1.25rem; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: .8rem; animation: cookieIn .6s var(--ease-out);
}
.cookie[hidden] { display: none; }
@keyframes cookieIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.cookie p { font-size: .9rem; font-weight: 500; }
.cookie a { text-decoration: underline; text-underline-offset: 2px; font-weight: 700; }
.cookie-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.cookie .btn-text { color: var(--white); }
/* En pantallas anchas vuelve abajo a la izquierda, pero sin llegar nunca
   a la columna de los botones flotantes de la derecha. */
@media (min-width: 720px) {
  .cookie {
    left: 1.5rem; right: auto; bottom: 1.5rem;
    max-width: min(560px, calc(100vw - 3rem - 175px));  /* 175px = botón de WhatsApp con su etiqueta + aire */
  }
}

/* ---------- 16. Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 1200; background: rgba(10, 15, 26, .94); display: grid; place-items: center; padding: 3.5rem 1rem 2rem; animation: fade .3s; }
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lb-figure { max-width: min(1200px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.lb-figure img { max-height: calc(100vh - 8rem); max-width: 100%; object-fit: contain; border-radius: 12px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); animation: lbIn .4s var(--ease-out); }
@keyframes lbIn { from { opacity: 0; transform: scale(.96); } }
.lb-figure figcaption { color: rgba(255, 255, 255, .8); font-size: .9rem; text-align: center; }
.lb-close { position: absolute; top: .8rem; right: 1rem; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: var(--white); font-size: 1.7rem; line-height: 1; transition: background .3s; }
.lb-close:hover { background: var(--red); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: var(--white); display: grid; place-items: center; transition: background .3s; }
.lb-nav:hover { background: var(--red); }
.lb-prev { left: .6rem; } .lb-next { right: .6rem; }

/* ---------- 17. Reveal + tilt ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }
html.no-js .reveal, html.no-js .g-item { opacity: 1; transform: none; }
[data-tilt] { transform-style: preserve-3d; }

/* ---------- 18. Reduced motion: solo lo intrusivo ---------- */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation-duration: 140s; }
  .wa-float::before, .eyebrow-dot { animation: none; }
  .hero-bg img, .work-bg img { transform: none !important; }
}

/* ---------- 19. Página de gracias / legales ---------- */
.page-hero { background: var(--navy); color: var(--white); padding: clamp(3rem, 8vw, 6rem) 0; text-align: center; position: relative; overflow: clip; }
.page-hero::after { content: ""; position: absolute; inset: auto -10% -60% -10%; height: 80%; background: radial-gradient(50% 50% at 50% 50%, rgba(11, 78, 157, .55), transparent 70%); pointer-events: none; }
.page-hero h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); max-width: 22ch; margin-inline: auto; }
.page-hero p { color: rgba(255, 255, 255, .8); max-width: 60ch; margin: 1rem auto 0; font-size: 1.05rem; }
.thanks-check { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 1.4rem; display: grid; place-items: center; background: var(--wa); color: var(--white); box-shadow: 0 0 0 12px rgba(37, 211, 102, .18); animation: pop .7s var(--ease-bounce); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.thanks-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 2rem; }
.thanks-card { background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); text-align: center; }
.thanks-card .g-icon { margin: 0 auto .9rem; }
.thanks-card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.thanks-card p { color: var(--muted); font-size: .92rem; margin-bottom: 1rem; }
.thanks-est { max-width: 720px; margin: 2.5rem auto 0; }
.thanks-est[hidden] { display: none; }
.prose { max-width: 800px; margin: 0 auto; color: #2b3547; }
.prose h2 { font-size: 1.35rem; margin: 2.2rem 0 .8rem; color: var(--navy); }
.prose h3 { font-size: 1.1rem; margin: 1.6rem 0 .6rem; color: var(--navy); }
.prose p, .prose li { margin-bottom: .8rem; font-size: 1rem; }
.prose ul { padding-left: 1.3rem; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.page-back { display: inline-flex; gap: .4rem; align-items: center; margin-top: 2.5rem; font-weight: 700; color: var(--red); }

/* ---------- 20. Legales ---------- */
.legal-date { font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.2rem; }
.legal-box { background: var(--soft); border: 1.5px solid var(--line); border-left: 5px solid var(--red); border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin: 1.2rem 0 1.6rem; font-size: .95rem; line-height: 1.8; }
.legal-box p { margin: 0; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 1rem 0 1.2rem; display: block; overflow-x: auto; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
.legal-table th { background: var(--soft); color: var(--navy); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.legal-table code, .prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; background: var(--soft); padding: .1rem .35rem; border-radius: 5px; }
.prose ul li { margin-bottom: .5rem; }
@media (min-width: 720px) { .legal-table { display: table; } }
