/* Home: una sola página con variante de hero (data-hero="a" | "b" en <html>).
   Todo lo que difiere entre A (hero blanco) y B (hero degradado) vive en las variables --hero-* y en
   los selectores [data-hero="b"]; el resto de la página es idéntico. */

/* ---------- variante B del hero ---------- */
[data-hero="b"] {
  --hero-ink: #ffffff;
  --hero-sig: var(--dua-amarillo-limon);
  --hero-lead: rgba(255, 255, 255, .88);
  --hero-cta-bg: var(--dua-amarillo-limon);
  --hero-cta-fg: var(--dua-marino);
}

/* ===================== LOADER ===================== */
.dua-loader {
  display: none; position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 1000; background: #ffffff; overflow: hidden;
  /* red de seguridad: si el JS no arranca, el overlay se retira solo a los 6 s (el JS cancela esta animación) */
  animation: dua-loader-failsafe .4s ease 6s forwards;
}
@keyframes dua-loader-failsafe { to { opacity: 0; visibility: hidden; } }
.js .dua-loader { display: block; }
.dua-loader [data-l="bg"] { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
[data-hero="b"] .dua-loader [data-l="bg"] { opacity: 0; }
.dua-loader [data-l="logo"] { position: absolute; left: 0; top: 0; width: 400.304px; height: 209.74px; transform-origin: 0 0; opacity: 0; }
.dua-loader [data-l="logo"] img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.dua-loader [data-l="wm-m"] { opacity: 0; }
.dua-loader [data-l="star"] { position: absolute; left: 0; top: 0; width: 461.391px; height: 525.833px; transform-origin: 0 0; perspective: 2400px; opacity: 0; }
.dua-loader [data-l="spin"] { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.dua-loader canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) { .dua-loader { display: none; } }

/* ===================== HERO ===================== */
.hero { position: relative; isolation: isolate; padding-bottom: 230px; }
.hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity .6s ease; }
[data-hero="b"] .hero__bg { opacity: 1; }
.hero__bg img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }

.hero__body {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 36px;
  padding-top: clamp(40px, 6.4vw, 88px); text-align: center;
}
.hero__title {
  margin: 0; font-size: clamp(50px, 8.4vw, 128px); line-height: 1.02; font-weight: 500; letter-spacing: -0.035em; position: relative;
}
.hero__ink { color: var(--hero-ink); transition: color .5s ease; }
.hero__sig {
  display: inline-block; margin-top: 0.04em; font-size: 1.2em; line-height: 0.9; color: var(--hero-sig); transition: color .5s ease;
}
.hero__lead {
  margin: 0; max-width: 650px; width: 100%; font-size: 19px; line-height: 1.55; color: var(--hero-lead); transition: color .5s ease;
}
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* estrellas 3D inline del titular */
.star3d { display: inline-block; width: .74em; height: .84em; margin: 0 .03em; vertical-align: -.06em; }
.star-float { display: block; width: 100%; height: 100%; perspective: 520px; animation: dua-float-soft 6.5s ease-in-out infinite; }
.star-float canvas { display: block; width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) { .star-float { animation: none; } }
@keyframes dua-float-soft { 0%, 100% { transform: translate3d(0, 0, 0); } 25% { transform: translate3d(1.5px, -3px, 0); } 50% { transform: translate3d(-1px, -5px, 0); } 75% { transform: translate3d(-2px, -2px, 0); } }

/* ===================== MARCAS + PROYECTOS (panel de vidrio) ===================== */
.proyectos {
  position: relative; z-index: 2; margin-top: -170px; border-radius: var(--dua-r-seccion) var(--dua-r-seccion) 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0px, rgba(255, 255, 255, 0.86) 240px, #ffffff 430px);
  -webkit-backdrop-filter: blur(34px) saturate(1.6); backdrop-filter: blur(34px) saturate(1.6);
  border-top: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 -20px 50px -34px rgba(48, 49, 79, 0.3);
}
.proyectos__head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px 64px; padding-top: 88px; padding-bottom: 44px;
}
.proyectos__title { margin: 0; font-size: clamp(40px, 5vw, 72px); line-height: 1.04; font-weight: 500; letter-spacing: -0.03em; }
.chip-iso {
  --grain: .5; display: inline-flex; align-items: center; justify-content: center; width: 0.9em; height: 0.9em; border-radius: 0.22em; vertical-align: -0.1em;
}
.chip-iso img { width: 56%; height: 56%; object-fit: contain; }
.proyectos__intro { flex: 0 1 400px; display: flex; flex-direction: column; gap: 14px; }
.proyectos__intro p { margin: 0; font-size: 18px; line-height: 1.55; color: var(--dua-texto-2); }

.rail-wrap { position: relative; }
.rail {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: clamp(20px, 4vw, 60px);
  padding: 8px clamp(20px, 4vw, 60px) 44px; user-select: none; -webkit-user-select: none; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.proj {
  flex: 0 0 auto; width: clamp(260px, 26vw, 370px); margin: 0; scroll-snap-align: start; position: relative; aspect-ratio: 4 / 3;
  border-radius: var(--dua-r-imagen); overflow: hidden; box-shadow: 0 20px 40px -26px rgba(48, 49, 79, 0.45);
}
.proj--dark { background: #000000; }
.proj img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }
.proj figcaption {
  position: absolute; left: 12px; bottom: 12px; padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.8); font-size: 13px; font-weight: 500;
}
.drag-cursor {
  --grain: .28; position: absolute; left: 0; top: 0; z-index: 5; display: flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: var(--dua-r-drag); color: #ffffff; font-size: 15px; font-weight: 500; line-height: 1; letter-spacing: 0.01em;
  white-space: nowrap; pointer-events: none; opacity: 0; scale: 0.6; transform: translate3d(-400px, -400px, 0);
  transition: opacity 0.18s ease, scale 0.18s ease;
}
@media (hover: none), (pointer: coarse) { .drag-cursor { display: none; } }

.trust { padding-bottom: 96px; }
.trust__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px 36px; padding-top: 30px;
  border-top: 1px solid var(--dua-linea-suave);
}
.trust__label { flex: 1 1 100%; text-align: center; font-size: 11px; font-weight: 600; color: var(--dua-texto-3); }
.trust__name { font-size: 18px; font-weight: 700; letter-spacing: 0.01em; color: var(--dua-texto-3); }
.trust__row img { width: auto; filter: grayscale(1); opacity: 0.75; }

/* ===================== SERVICIOS (deck de cartas) ===================== */
.servicios { position: relative; padding-bottom: 110px; }
.servicios__head { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 24px; padding-bottom: 56px; text-align: center; }
.section-title { margin: 0; font-size: clamp(44px, 5.4vw, 80px); line-height: 1; font-weight: 500; letter-spacing: -0.03em; }

/* móvil / tablet: lista vertical sin animación, con las dos cartas de cada servicio visibles (principal primero) */
.deck-stage { position: relative; width: 100%; display: flex; flex-direction: column; gap: 32px; padding: 0 16px; box-sizing: border-box; max-width: 640px; margin: 0 auto; }
.svc { display: flex; flex-direction: column; gap: 12px; }
.svc-main {
  box-sizing: border-box; padding: 36px 40px; border-radius: var(--dua-r-carta); background: var(--dua-superficie-1); color: var(--dua-marino);
  display: flex; flex-direction: column; justify-content: space-between; gap: 20px; min-height: 300px;
  box-shadow: 0 30px 60px -38px rgba(48, 49, 79, 0.5);
}
.svc-main--white { background: #ffffff; border: 1px solid var(--dua-linea-suave); }
.svc-main--cta { --grain: .35; background: var(--dua-cta); color: #ffffff; }
.svc-side {
  --grain: .3; box-sizing: border-box; padding: 18px; border-radius: var(--dua-r-carta); background: var(--side-bg); color: var(--side-fg, var(--dua-marino));
  display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 60px -36px rgba(48, 49, 79, 0.55);
}
.svc-float { flex: none; height: 220px; border-radius: 16px; overflow: hidden; box-shadow: 0 22px 40px -22px rgba(20, 6, 13, 0.55); }
.svc-float img { width: 100%; height: 100%; object-fit: cover; display: block; }
.svc-incluye { display: flex; flex-direction: column; gap: 4px; padding: 0 6px 2px; }
.svc-incluye .mono { font-size: 10px; font-weight: 600; }
.svc-incluye ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; font-weight: 500; }
.svc-incluye li { padding: 7px 0; }
.svc-main__top { display: flex; flex-direction: column; gap: 16px; }
.svc-main h3 { margin: 0; font-size: clamp(34px, 3.3vw, 46px); line-height: 1.02; font-weight: 400; letter-spacing: -0.025em; }
.svc-main h3 span { color: var(--dua-texto-4); }
.svc-main--cta h3 span { color: rgba(255, 255, 255, 0.72); }
.svc-main p { margin: 0; max-width: 460px; font-size: 17px; line-height: 1.5; color: var(--dua-texto-2); }
.svc-main--cta p { color: #ffffff; }
.svc-main__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; }
.svc-link { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 500; text-decoration: none; }
.svc-hint { display: none; align-items: center; gap: 8px; font-size: 10px; font-weight: 600; color: var(--dua-texto-3); }
.svc-main--cta .svc-hint { color: rgba(255, 255, 255, 0.88); }

/* escritorio: deck apilado que se despliega (composición de 1084 px centrada; cabe desde 1101 px) */
@media (min-width: 1101px) {
  .svc-hint { display: flex; }
  .deck-stage { display: block; max-width: 1180px; height: 1656px; padding: 0; gap: 0; }
  .svc {
    --y: 0px; display: block; position: absolute; top: 0; left: calc(50% - 542px); width: 1084px; height: 360px;
    transform: translate3d(0, var(--y), 0);
  }
  .js .deck-stage:not(.is-spread) .svc { transform: translate3d(0, var(--y0, 0px), 0); }
  .js .svc { transition: transform 1.2s var(--dua-ease-deck) var(--d, 0s); }
  .svc-main, .svc-side { position: absolute; top: 0; height: 360px; transition: transform .6s var(--dua-ease-hover), opacity .4s ease; }
  .svc-main { z-index: 2; left: 242px; width: 600px; min-height: 0; }
  .svc-side { z-index: 1; left: 624px; width: 460px; opacity: 0; transform: translateX(-200px) scale(.94); pointer-events: none; }
  .svc-float { flex: 1 1 auto; height: auto; min-height: 0; }
  .svc.open, .svc:has(.svc-main:focus-visible) { z-index: 300 !important; }
  .svc.open .svc-main, .svc:has(.svc-main:focus-visible) .svc-main { transform: translateX(-242px); }
  .svc.open .svc-side, .svc:has(.svc-main:focus-visible) .svc-side { opacity: 1; transform: none; pointer-events: auto; }
  .svc-float { animation: dua-float 7s ease-in-out infinite; animation-play-state: paused; }
  .svc.open .svc-float, .svc:has(.svc-main:focus-visible) .svc-float { animation-play-state: running; }
}
@keyframes dua-float { 0%, 100% { transform: translate3d(0, 0, 0); } 25% { transform: translate3d(3px, -5px, 0); } 50% { transform: translate3d(-2px, -8px, 0); } 75% { transform: translate3d(-4px, -3px, 0); } }
@media (prefers-reduced-motion: reduce) {
  .js .svc, .svc-main, .svc-side { transition: none; }
  .svc-float { animation: none !important; }
  .js .deck-stage:not(.is-spread) .svc { transform: translate3d(0, var(--y), 0); }
}

/* ===================== NOSOTRAS ===================== */
.nosotras { position: relative; isolation: isolate; overflow: hidden; padding-top: 104px; padding-bottom: 104px; }
.cover-bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.nosotras__wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 64px; }
.nosotras__fig { flex: 1 1 480px; min-width: 0; margin: 0; position: relative; }
.nosotras__fig img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: 55% 45%; border-radius: 24px; }
.nosotras__cap {
  position: absolute; left: 18px; bottom: 18px; padding: 12px 18px; border-radius: 18px; background: rgba(255, 255, 255, 0.84);
  display: flex; flex-direction: column; gap: 4px;
}
.nosotras__cap span:first-child { font-size: 17px; font-weight: 500; }
.nosotras__cap .mono { font-size: 10px; font-weight: 600; color: var(--dua-texto-2); }
.nosotras__text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.nosotras__title { margin: 0; font-size: clamp(44px, 5vw, 76px); line-height: 1; font-weight: 500; letter-spacing: -0.03em; color: #ffffff; }
.nosotras__title .sig { display: block; margin-top: 0.04em; font-size: 1.08em; line-height: 1; white-space: nowrap; color: var(--dua-amarillo-limon); }
.nosotras__text p { margin: 0; font-size: 17px; line-height: 1.6; color: rgba(255, 255, 255, 0.72); }
.nosotras__text p strong { font-weight: 500; color: #ffffff; }
.chips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; font-size: 14px; }
.chips li { padding: 9px 16px; border-radius: 999px; border: 1px solid #ffffff; color: #ffffff; background-color: #ffffff19; }
.nosotras__atomo {
  position: absolute; left: 69.5%; top: 49.8%; width: clamp(260px, 40.6vw, 585px); height: auto; opacity: 0.2; pointer-events: none;
}

/* ===================== LAB NOTES ===================== */
.notes { padding-top: 100px; padding-bottom: 100px; background: var(--dua-superficie-2); }
.notes__wrap { display: flex; flex-direction: column; gap: 48px; }
.notes__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.btn-glass--sm { gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-size: 15px; border-color: rgba(48, 49, 79, 0.14); cursor: default; }
.notes__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.note {
  display: flex; flex-direction: column; gap: 16px; padding: 12px 12px 26px; border-radius: var(--dua-r-tarjeta); background: #ffffff;
  color: var(--dua-marino); box-shadow: 0 20px 50px -38px rgba(48, 49, 79, 0.5);
}
.note__media { position: relative; height: 240px; border-radius: var(--dua-r-imagen); overflow: hidden; }
.note__media--soft { background: var(--dua-superficie-3); display: flex; align-items: center; justify-content: center; }
.note__media--soft img { height: 78%; width: auto; }
.note__media--flor { background: #ffffff; }
.note__media--flor img { position: absolute; left: -10%; top: -6%; width: 125%; height: auto; }
.note__media--foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; display: block; }
.note__tag { position: absolute; left: 12px; top: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.8); font-size: 13px; font-weight: 500; }
.note__body { display: flex; flex-direction: column; gap: 10px; padding: 0 10px; }
.note__meta { font-size: 11px; font-weight: 500; color: var(--dua-texto-3); }
.note h3 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 500; letter-spacing: -0.01em; }

/* ===================== NEWSLETTER ===================== */
.news { position: relative; isolation: isolate; overflow: hidden; padding-top: 130px; padding-bottom: 130px; }
.news__card {
  width: min(780px, 100%); box-sizing: border-box; padding: clamp(28px, 4.4vw, 60px); border-radius: 36px;
  display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; background-color: #ffffff22;
}
.news__eyebrow { font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.72); }
.news__card h2 { margin: 0; font-size: clamp(40px, 4.6vw, 64px); line-height: 1.02; font-weight: 500; letter-spacing: -0.03em; text-wrap: balance; color: #ffffff; }
.news__card > p { margin: 0; max-width: 548px; font-size: 18px; line-height: 1.55; color: #ffffff; }
.news__form { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 12px; text-align: left; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 10px; font-weight: 600; color: #ffffff; }
.pill-input {
  height: 54px; padding: 0 20px; border-radius: 999px; border: 1px solid rgba(48, 49, 79, 0.2); background: rgba(255, 255, 255, 0.85);
  color: var(--dua-marino); font: 16px var(--dua-font-sans); box-sizing: border-box; width: 100%;
}
.news__submit {
  align-self: end; height: 54px; border: 0; border-radius: 999px; color: var(--dua-marino); font: 500 16px var(--dua-font-sans);
  cursor: pointer; background-color: var(--dua-amarillo-limon);
}
.news__fine { font-size: 10px; font-weight: 500; letter-spacing: 0.05em; color: #ffffff; }
.news .pill-input:focus-visible, .news .news__submit:focus-visible { outline-color: #ffffff; }

/* ===================== CTA FINAL ===================== */
.cta-final { padding-top: 96px; padding-bottom: 110px; text-align: center; overflow: hidden; }
.cta-final__wrap { display: flex; flex-direction: column; align-items: center; gap: 28px; z-index: 2; position: relative; }
.cta-final h2 { margin: 0 0 0.12em; font-size: clamp(48px, 7vw, 108px); line-height: 1; font-weight: 400; letter-spacing: -0.035em; width: 100%; max-width: 740px; }
.cta-final h2 .sig { margin-left: 0.08em; font-size: 1.2em; color: var(--dua-rosa-firma); }
.cta-final p { margin: 0; max-width: 520px; font-size: 19px; line-height: 1.55; color: var(--dua-texto-2); }
.cta-final__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.cta-final .btn-cta { min-height: 56px; padding: 0 30px; background-color: var(--dua-cta); color: #ffffff; }
.cta-final .btn-outline {
  display: flex; align-items: center; min-height: 56px; padding: 0 28px; border-radius: 999px; border: 1px solid rgba(48, 49, 79, 0.18);
  font-size: 16px; font-weight: 500; text-decoration: none; box-sizing: border-box;
}

/* ===================== FOOTER (home) ===================== */
.footer__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 40px; padding-top: 72px; padding-bottom: 48px;
}
.footer__about { margin: 0; max-width: 280px; font-size: 18px; line-height: 1.5; color: var(--dua-footer-texto); }
.footer__col { display: flex; flex-direction: column; gap: 12px; font-size: 12px; font-weight: 500; color: var(--dua-footer-texto); }
.footer__col > span:first-child { color: #ffffff; font-weight: 600; }
.footer__col a { text-decoration: none; color: var(--dua-footer-texto); }
.footer__col a.is-mail { text-transform: none; letter-spacing: 0.02em; }
.footer__big { padding-bottom: 28px; }
.footer__big img { display: block; width: 100%; height: auto; margin-bottom: 8px; }
.has-hero-switch .footer__big { padding-bottom: 84px; }
@media (max-width: 479px) { .has-hero-switch .footer__big { padding-bottom: 156px; } }

/* ===================== AJUSTES MÓVIL ===================== */
@media (max-width: 720px) {
  .hero { padding-bottom: 150px; }
  .proyectos { margin-top: -110px; }
  .proyectos__head { padding-top: 64px; padding-bottom: 32px; }
  .servicios { padding-bottom: 72px; }
  .servicios__head { padding-bottom: 40px; }
  .nosotras { padding-top: 72px; padding-bottom: 72px; }
  .nosotras__wrap { gap: 40px; position: relative; z-index: 1; }
  .notes { padding-top: 72px; padding-bottom: 72px; }
  .notes__wrap { gap: 32px; }
  .news { padding-top: 72px; padding-bottom: 72px; }
  .cta-final { padding-top: 72px; padding-bottom: 80px; }
  .svc-main { padding: 28px 24px; }
  .footer__grid { padding-top: 56px; }
  .trust { padding-bottom: 64px; }
}
