:root {
  --ink: #0b0b0c;
  --ink-2: #17171a;
  --paper: #f6f5f2;
  --white: #ffffff;
  --muted: #5d5d66;
  --muted-dark: #a3a3ad;
  --line: rgba(11, 11, 12, 0.12);
  --line-dark: rgba(255, 255, 255, 0.12);
  --accent: #2546f0;
  --accent-ink: #1a33c4;
  --accent-soft: #e6eafe;

  --display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --body: "DM Sans", "Segoe UI", system-ui, sans-serif;

  --radius: 22px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

.wrap { width: min(1220px, 100% - 40px); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip:focus { top: 16px; }

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

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: 15px 26px; border-radius: 999px;
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s, box-shadow .3s;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn--sm { padding: 10px 18px; font-size: .9rem; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-ink); transform: translateY(-2px); box-shadow: 0 10px 26px -10px rgba(37, 70, 240, .7); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .35s, box-shadow .35s, backdrop-filter .35s;
}
.header.scrolled {
  background: rgba(246, 245, 242, .86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header__inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { border-radius: 50%; transition: transform .6s var(--ease); }
@media (hover: hover) { .brand:hover img { transform: rotate(-12deg) scale(1.06); } }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { position: relative; font-weight: 500; font-size: .98rem; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.burger { display: none; }

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--header-h) + 56px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.hero__title { font-size: clamp(3rem, 7.4vw, 6.4rem); font-weight: 800; margin: 18px 0 22px; letter-spacing: -.045em; line-height: .95; }
.hero__title em { font-style: normal; color: var(--accent); }
.hero__lead { font-size: 1.2rem; color: var(--muted); max-width: 34ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 34px 0 40px; }
.hero__facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 32px; color: var(--muted); font-size: .95rem; }
.hero__facts strong { color: var(--ink); font-family: var(--display); }

.hero__media { position: relative; aspect-ratio: 1 / 1; max-width: 100%; }
.tile { position: absolute; margin: 0; overflow: hidden; border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgba(11,11,12,.45); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tile:hover img { transform: scale(1.05); }
.tile--main { inset: 0 0 18% 12%; }
.tile--a { left: 0; bottom: 0; width: 46%; aspect-ratio: 3 / 2; border: 6px solid var(--paper); }
.tile--b { right: 6%; bottom: -4%; width: 30%; aspect-ratio: 1; border: 6px solid var(--paper); }
.badge {
  position: absolute; left: 4%; top: 6%; width: 104px; height: 104px; border-radius: 50%;
  background: var(--ink); display: grid; place-items: center;
  box-shadow: 0 0 0 8px var(--paper); animation: spin 22s linear infinite;
}
.badge img { width: 100%; border-radius: 50%; animation: spin 22s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.ticker { margin-top: 84px; background: var(--ink); color: var(--paper); padding: 20px 0; overflow: hidden; transform: rotate(-1.2deg); width: 104%; margin-left: -2%; }
.ticker__track { display: flex; width: max-content; will-change: transform; animation: marquee 45s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker span { flex: none; font-family: var(--display); font-weight: 700; font-size: 1.5rem; padding-left: 28px; white-space: nowrap; display: flex; align-items: center; gap: 28px; }
.ticker span::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
@keyframes marquee { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(80px, 11vw, 140px); }
.section--dark { background: var(--ink); color: var(--paper); }
.section--dark .section__sub { color: var(--muted-dark); }
.section--accent { background: var(--accent); color: #fff; }
.section__head { max-width: 760px; margin-bottom: 56px; }
.section__head h2 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); font-weight: 700; margin-top: 14px; }
.section__sub { margin-top: 16px; color: var(--muted); font-size: 1.1rem; }
.section--dark .eyebrow { color: #8ea0ff; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.service {
  display: grid; grid-template-columns: 42% 1fr; background: var(--white);
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.service:hover { transform: translateY(-6px); box-shadow: 0 28px 50px -30px rgba(11,11,12,.4); }
.service__img { overflow: hidden; min-height: 260px; }
.service__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.service:hover .service__img img { transform: scale(1.06); }
.service__body { padding: 30px 28px; display: flex; flex-direction: column; gap: 12px; }
.service__num { font-family: var(--display); font-weight: 700; color: var(--accent); font-size: .9rem; }
.service h3 { font-size: 1.65rem; font-weight: 700; }
.service p { color: var(--muted); font-size: 1rem; }
.chips { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: .78rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Catalog ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filter {
  font: 600 .95rem var(--display); color: var(--paper); background: transparent;
  border: 1.5px solid var(--line-dark); border-radius: 999px; padding: 10px 20px; cursor: pointer;
  transition: background .3s, border-color .3s, color .3s;
}
.filter:hover { border-color: var(--paper); }
.filter.is-active { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 22px; }
@media (min-width: 1025px) { .catalog { grid-template-columns: repeat(3, 1fr); } }
.product {
  background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .45s var(--ease), border-color .45s, opacity .35s, scale .35s;
}
.product:hover { transform: translateY(-6px); border-color: rgba(142, 160, 255, .5); }
.product.is-hidden { display: none; }
.product__img { aspect-ratio: 4 / 3; overflow: hidden; }
.product__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.product:hover .product__img img { transform: scale(1.06); }
.product__body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product__cat { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8ea0ff; }
.product h3 { font-size: 1.3rem; font-weight: 600; }
.product p { color: var(--muted-dark); font-size: .95rem; }
.product__foot { margin-top: auto; padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-size: .9rem; color: var(--muted-dark); }
.price b { font-family: var(--display); font-size: 1.35rem; color: var(--paper); }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.step { padding: 30px 26px 34px; border-top: 2px solid var(--ink); position: relative; }
.step::before {
  content: ""; position: absolute; left: 0; top: -2px; height: 2px; width: 0; background: var(--accent);
  transition: width 1s var(--ease) .2s;
}
.step.is-visible::before { width: 100%; }
.step__n { font-family: var(--display); font-weight: 800; font-size: 3.4rem; color: var(--accent); line-height: 1; display: block; margin-bottom: 18px; }
.step h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: .98rem; }

/* ---------- Why ---------- */
.why { display: grid; grid-template-columns: 1fr 2fr; gap: 56px; align-items: start; }
.why h2 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 800; letter-spacing: -.04em; }
.why__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 40px; }
.why__grid h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: 8px; }
.why__grid p { color: rgba(255,255,255,.82); }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; }
.faq .section__head { position: sticky; top: calc(var(--header-h) + 24px); }
.faq__list details { border-bottom: 1px solid var(--line); }
.faq__list summary {
  list-style: none; cursor: pointer; padding: 24px 44px 24px 0; position: relative;
  font-family: var(--display); font-weight: 600; font-size: 1.2rem;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 1.3rem; transition: transform .35s var(--ease), background .3s, color .3s;
}
.faq__list details[open] summary::after { transform: translateY(-50%) rotate(45deg); background: var(--accent); color: #fff; }
.faq__list details p { padding: 0 44px 24px 0; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: stretch; }
.contact h2 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); font-weight: 700; margin: 14px 0 34px; }
.contact__list { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 20px; }
.contact__list span { display: block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-dark); margin-bottom: 4px; }
.contact__list a { font-family: var(--display); font-size: 1.25rem; font-weight: 500; transition: color .25s; }
.contact__list a:hover { color: #8ea0ff; }

.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: .88rem; color: var(--muted-dark); }
.form input, .form select, .form textarea {
  font: 400 1rem var(--body); color: var(--paper); background: var(--ink-2);
  border: 1.5px solid var(--line-dark); border-radius: var(--radius-sm); padding: 13px 15px;
  transition: border-color .25s;
}
.form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #a3a3ad 50%), linear-gradient(135deg, #a3a3ad 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form button { justify-self: start; }
.form__note { font-size: .9rem; color: #ff8f8f; min-height: 1.2em; }

.contact__map { border-radius: var(--radius); overflow: hidden; min-height: 420px; border: 1px solid var(--line-dark); }
.contact__map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; filter: grayscale(1) contrast(1.05); transition: filter .5s; }
.contact__map:hover iframe { filter: none; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--muted-dark); border-top: 1px solid var(--line-dark); padding: 44px 0 calc(44px + env(safe-area-inset-bottom, 0px)); font-size: .92rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 36px; }
.brand--light { color: var(--paper); font-size: 1.25rem; }
.footer__legal { display: flex; gap: 20px; margin-left: auto; }
.footer__legal a:hover, .footer a:hover { color: var(--paper); }
.footer__copy { width: 100%; }

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  width: 60px; height: 60px; border-radius: 50%; background: #25d366; display: grid; place-items: center;
  box-shadow: 0 12px 28px -8px rgba(37, 211, 102, .6); transition: transform .3s var(--ease);
}
.wa-float svg { width: 32px; height: 32px; fill: #fff; }
.wa-float:hover { transform: scale(1.08); }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366;
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; filter: none; }
.hero .reveal { transition-delay: calc(var(--i, 0) * 110ms); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__media { max-width: 620px; }
  .services { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .why, .faq, .contact { grid-template-columns: 1fr; gap: 40px; }
  .faq .section__head { position: static; }
}

@media (max-width: 860px) {
  .header__cta { display: none; }
  .burger {
    display: grid; gap: 6px; margin-left: auto; width: 44px; height: 44px; place-content: center;
    background: none; border: 0; cursor: pointer;
  }
  .burger span { width: 24px; height: 2px; background: var(--ink); transition: transform .3s var(--ease); }
  .burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: fixed; inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 auto; flex-direction: column; gap: 0;
    background: var(--paper); padding: 8px 20px 24px; box-shadow: 0 20px 30px -20px rgba(0,0,0,.25);
    transform: translateY(-120%); transition: transform .45s var(--ease); z-index: -1;
  }
  .nav.open { transform: none; }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.15rem; font-family: var(--display); }
  .header.menu-open { background: var(--paper); }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .hero { padding-top: calc(var(--header-h) + 28px); }
  .service { grid-template-columns: 1fr; }
  .service__img { min-height: 0; aspect-ratio: 16 / 10; }
  .steps { grid-template-columns: 1fr; }
  .why__grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .badge { width: 74px; height: 74px; }
  .ticker { margin-top: 56px; padding: 14px 0; }
  .ticker__track { animation-duration: 38s; }
  .ticker span { font-size: 1.1rem; padding-left: 20px; gap: 20px; }
  .hero__title { font-size: clamp(2.6rem, 12vw, 3.4rem); }
  .hero__lead { font-size: 1.05rem; }
  .hero__actions { margin: 26px 0 30px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .section__head { margin-bottom: 36px; }
  .service__body { padding: 24px 20px; }
  .faq__list summary { font-size: 1.05rem; }
  .contact__list a { font-size: 1.1rem; }
  .contact__map, .contact__map iframe { min-height: 300px; }
  .form button { justify-self: stretch; }
  .wa-float { width: 54px; height: 54px; right: 16px; }
  .footer__legal { margin-left: 0; }
}

/* Con "reducir movimiento" se mantienen las animaciones suaves (petición de la clienta);
   el JS desactiva parallax, tilt e intro, y aquí se frenan los bucles. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker__track { animation-duration: 60s; }
  .blob { animation: none; }
}

/* ---------- Páginas legales ---------- */
.legal-back { margin-left: auto; }
.legal { max-width: 820px; padding-block: calc(var(--header-h) + 56px) 96px; }
.legal h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 800; margin: 14px 0 32px; }
.legal h2 { font-size: 1.35rem; font-weight: 700; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 1.2em; display: grid; gap: 6px; }
.legal b { color: var(--ink); }
.legal mark { background: #fff3b0; color: var(--ink); padding: 0 4px; border-radius: 4px; }
.legal .table { overflow-x: auto; margin-top: 12px; }
.legal table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 520px; }
.legal th, .legal td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { font-family: var(--display); color: var(--ink); }

/* =========================================================
   ANIMACIONES E INTERACCIÓN
   ========================================================= */

/* Intro con el logo */
.intro {
  position: fixed; inset: 0; z-index: 200; background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .7s var(--ease) .15s, visibility 0s linear .85s;
}
.intro img { width: 96px; height: 96px; border-radius: 50%; animation: introPop .9s var(--ease) both; transition: transform .7s var(--ease), opacity .5s; }
.intro.done { opacity: 0; visibility: hidden; pointer-events: none; }
.intro.done img { transform: scale(1.6); opacity: 0; }
@keyframes introPop { from { transform: scale(.4) rotate(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* Barra de progreso de lectura */
.progress {
  position: fixed; top: 0; left: 0; z-index: 70; height: 3px; width: 100%;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
}

/* Header que se esconde al bajar y aparece al subir */
.header { transition: background .35s, box-shadow .35s, transform .45s var(--ease); }
.header.hide { transform: translateY(-110%); }
.nav a.active { color: var(--accent); }
.nav a.active::after { transform: scaleX(1); }

/* Fondo vivo del hero */
.hero { position: relative; isolation: isolate; }
.blob {
  position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none;
  animation: float 14s ease-in-out infinite alternate;
}
.blob--1 { width: 460px; height: 460px; background: #b9c4ff; right: -120px; top: 40px; }
.blob--2 { width: 320px; height: 320px; background: #dfe4ff; left: -120px; bottom: 120px; animation-delay: -6s; }
@keyframes float { to { transform: translate3d(-60px, 50px, 0) scale(1.12); } }

/* Título del hero palabra a palabra */
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .word { display: inline-block; transform: translateY(110%) rotate(6deg); opacity: 0; transition: transform 1s var(--ease), opacity 1s var(--ease); }
.is-loaded .hero__title .word { transform: none; opacity: 1; }
.hero__title .word:nth-child(1) { transition-delay: .15s; }
.hero__title .word:nth-child(2) { transition-delay: .25s; }
.hero__title .line + .line .word:nth-child(1) { transition-delay: .4s; }
.hero__title .line + .line .word:nth-child(2) { transition-delay: .5s; }
.hero__title .line + .line .word:nth-child(3) { transition-delay: .6s; }
.hero .reveal { transition-delay: calc(.5s + var(--i, 0) * 120ms); }
h1.eyebrow { margin: 0; font-family: var(--body); line-height: 1.4; letter-spacing: .14em; }

/* Fotos del hero: entrada con máscara + parallax */
.tile { clip-path: inset(100% 0 0 0 round var(--radius)); transition: clip-path 1.3s cubic-bezier(.7, 0, .2, 1), transform .8s var(--ease); will-change: transform; }
.is-loaded .tile { clip-path: inset(0 0 0 0 round var(--radius)); }
.is-loaded .tile--main { transition-delay: .35s; }
.is-loaded .tile--a { transition-delay: .65s; }
.is-loaded .tile--b { transition-delay: .85s; }
.tile img { transform: scale(1.25); transition: transform 1.8s var(--ease); }
.is-loaded .tile img { transform: scale(1); }
.is-loaded .tile:hover img { transform: scale(1.06); }

/* Sello giratorio */
.badge { width: 132px; height: 132px; animation: none; background: var(--paper); box-shadow: 0 18px 40px -18px rgba(11,11,12,.45); transform: scale(0); transition: transform .9s cubic-bezier(.3, 1.6, .5, 1) 1.1s; }
.is-loaded .badge { transform: scale(1); }
.badge img { position: absolute; top: 50%; left: 50%; width: 74px; height: 74px; margin: -37px 0 0 -37px; animation: none; }
.badge__ring { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; transform-origin: 50% 50%; animation: spin 18s linear infinite; }
.badge__ring text { font: 700 14px var(--display); fill: var(--ink); }

/* Títulos de sección: barrido palabra a palabra */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease); transition-delay: calc(var(--w) * 55ms); }
.split.is-visible .w > span { transform: none; }

/* Revelado escalonado de grupos */
.stagger > * { opacity: 0; transform: translateY(40px) scale(.97); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--s, 0) * 90ms); }
.stagger.is-visible > * { opacity: 1; transform: none; }

/* Imágenes que se descubren al entrar */
.service__img, .product__img { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s cubic-bezier(.7, 0, .2, 1) .15s; }
.is-visible .service__img, .is-visible .product__img { clip-path: inset(0 0 0 0); }

/* Tarjetas con inclinación 3D y brillo que sigue al ratón */
.service, .product { position: relative; }
.tilt { will-change: transform; }
.tilt::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(37, 70, 240, .14), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.tilt:hover::before { opacity: 1; }
.stagger.is-visible > .tilt:hover { transition: transform .15s linear, box-shadow .45s, border-color .45s; }

/* Chips */
.chips li { transition: transform .3s var(--ease), background .3s, color .3s; }
.chips li:hover { transform: translateY(-3px); background: var(--accent); color: #fff; }

/* Botones magnéticos */
.btn.magnetic { transition: transform .25s var(--ease), background .3s, color .3s, border-color .3s, box-shadow .3s; }

/* Filtro del catálogo animado */
.catalog.is-visible > .product.entering { animation: popIn .55s var(--ease) both; animation-delay: calc(var(--s, 0) * 60ms); }
@keyframes popIn { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }

/* Pasos: número que sube */
.step__n { display: inline-block; transform: translateY(30px); opacity: 0; transition: transform .9s var(--ease), opacity .9s; }
.step.is-visible .step__n { transform: none; opacity: 1; }
.step:hover .step__n { animation: bounce .6s var(--ease); }
@keyframes bounce { 40% { transform: translateY(-10px); } }

/* Sección azul: texto gigante de fondo en movimiento */
.section--accent { position: relative; overflow: hidden; }
.section--accent::after {
  content: "MALU · MALU · MALU · MALU · MALU · MALU · MALU · MALU ·"; position: absolute; left: 0; bottom: -0.18em; white-space: nowrap;
  font: 800 clamp(6rem, 18vw, 16rem)/1 var(--display); color: rgba(255,255,255,.07); pointer-events: none;
  animation: marquee 60s linear infinite;
}
.why { position: relative; z-index: 1; }
.why__grid > div { padding-left: 18px; border-left: 2px solid rgba(255,255,255,.25); transition: border-color .4s, transform .4s var(--ease); }
.why__grid > div:hover { border-color: #fff; transform: translateX(6px); }

/* FAQ: apertura suave */
.faq__list details[open] p { animation: faqIn .45s var(--ease); }
@keyframes faqIn { from { opacity: 0; transform: translateY(-8px); } }
.faq__list summary { transition: color .25s, padding-left .35s var(--ease); }
.faq__list summary:hover { color: var(--accent); padding-left: 8px; }

/* WhatsApp: aparece tras el scroll */
.wa-float { transform: scale(0); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.wa-float.show { transform: scale(1); }
.wa-float.show:hover { transform: scale(1.1) rotate(-8deg); }

/* Cursor personalizado (solo ratón) */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 300; width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border: 1.5px solid var(--accent); border-radius: 50%; pointer-events: none;
  transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background .3s, opacity .3s;
  opacity: 0;
}
.cursor.on { opacity: 1; }
.cursor.big { width: 70px; height: 70px; margin: -35px 0 0 -35px; background: rgba(37, 70, 240, .12); }
@media (hover: none) { .cursor { display: none; } }

@media (max-width: 640px) {
  .badge { width: 96px; height: 96px; }
  .badge img { width: 54px; height: 54px; margin: -27px 0 0 -27px; }
  h1.eyebrow { font-size: .72rem; letter-spacing: .1em; align-items: flex-start; }
  h1.eyebrow::before { flex: none; margin-top: .55em; }
  .blob--1 { width: 280px; height: 280px; }
}

.btn--block { width: 100%; }
.product__foot { padding-top: 18px; }

/* Servicio destacado a dos columnas (rotulación) */
.service--wide { grid-column: 1 / -1; grid-template-columns: 34% 1fr; }
.service--wide .service__body { padding: 36px 40px; }
.service--wide h3 { font-size: 2rem; }
@media (max-width: 640px) { .service--wide { grid-template-columns: 1fr; } .service--wide .service__body { padding: 24px 20px; } .service--wide h3 { font-size: 1.65rem; } }

/* Crédito del diseñador */
.footer__copy { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer__credit a { color: var(--paper); font-weight: 700; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat; transition: background-size .4s var(--ease), color .3s; }
.footer__credit a:hover { color: #8ea0ff; background-size: 100% 2px; }

@media (min-width: 641px) { .footer__sep { display: none; } }
@media (max-width: 640px) { .footer__copy { display: block; } .footer__copy .footer__credit { white-space: nowrap; } }

[hidden] { display: none !important; }

/* ---------- Trabajos reales ---------- */
.filters--light .filter { color: var(--ink); border-color: var(--line); }
.filters--light .filter:hover { border-color: var(--ink); }
.filters--light .filter.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.work {
  position: relative; display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.work:hover { box-shadow: 0 28px 50px -30px rgba(11,11,12,.4); }
.work.is-hidden { display: none; }
.works.is-visible > .work.entering { animation: popIn .55s var(--ease) both; animation-delay: calc(var(--s, 0) * 70ms); }

.work__open { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-2); }
.work__open img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.work:hover .work__open img { transform: scale(1.07); }
.work__open::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,11,12,.55), transparent 55%);
  opacity: .7; transition: opacity .4s;
}
.work:hover .work__open::after { opacity: 1; }
.work__count {
  position: absolute; top: 14px; right: 14px; z-index: 1;
  background: rgba(11,11,12,.72); color: #fff; font: 600 .78rem var(--display);
  padding: 6px 11px; border-radius: 999px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.work__zoom {
  position: absolute; left: 16px; bottom: 14px; z-index: 1; color: #fff;
  font: 600 .95rem var(--display); display: flex; align-items: center; gap: 8px;
  transform: translateY(6px); opacity: .9; transition: transform .4s var(--ease), opacity .4s;
}
.work__zoom::after { content: "→"; transition: transform .4s var(--ease); }
.work:hover .work__zoom { transform: none; opacity: 1; }
.work:hover .work__zoom::after { transform: translateX(4px); }

.work__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.work__type { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.work h3 { font-size: 1.3rem; font-weight: 700; }
.work p { color: var(--muted); font-size: .95rem; }
.work__place { margin-top: auto; padding-top: 8px; font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.work__place::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.works__more { display: flex; justify-content: center; margin-top: 36px; }

/* ---------- Visor de fotos ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 250; background: rgba(8, 8, 10, .94);
  display: flex; align-items: center; justify-content: center;
  padding: calc(64px + env(safe-area-inset-top, 0px)) 72px calc(64px + env(safe-area-inset-bottom, 0px));
  opacity: 0; transition: opacity .3s var(--ease);
}
.lightbox.open { opacity: 1; }
.lightbox__figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; max-height: 100%; }
.lightbox__figure img {
  max-width: min(1200px, 100%); max-height: calc(100dvh - 190px); width: auto; height: auto;
  border-radius: 14px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
  transform: scale(.96); transition: transform .4s var(--ease), opacity .3s;
}
.lightbox.open .lightbox__figure img { transform: none; }
.lightbox__figure img.loading { opacity: .3; }
.lightbox figcaption { display: flex; gap: 16px; color: #d8d8de; font: 500 .95rem var(--display); text-align: center; flex-wrap: wrap; justify-content: center; }
.lightbox figcaption span:last-child { color: #8ea0ff; }
.lightbox__close, .lightbox__nav {
  position: absolute; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff;
  font-size: 2rem; line-height: 1; cursor: pointer; transition: background .3s, transform .3s var(--ease);
}
.lightbox__close:hover, .lightbox__nav:hover { background: var(--accent); }
.lightbox__close { top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; }
.lightbox__nav { top: 50%; margin-top: -26px; }
.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; }

.contact__area { color: var(--paper); font-size: 1rem; line-height: 1.55; max-width: 46ch; }

@media (max-width: 1024px) { .works { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .works { grid-template-columns: 1fr; }
  .works__more .btn { width: 100%; }
  .lightbox { padding: calc(70px + env(safe-area-inset-top, 0px)) 12px calc(90px + env(safe-area-inset-bottom, 0px)); }
  .lightbox__figure img { max-height: calc(100dvh - 210px); }
  .lightbox__nav { top: auto; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); margin-top: 0; width: 48px; height: 48px; }
  .lightbox__nav--prev { left: calc(50% - 60px); }
  .lightbox__nav--next { right: calc(50% - 60px); }
}
