/* ══════════════════════════════════════════════════════════
   LUMAJU ABERTURAS — hoja de estilos
   Profesional, cuidada, sin efectos de más.
   ══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #faf9f7;
  --surface: #ffffff;
  --ink:     #17181a;
  --muted:   #5c5e64;
  --line:    #e6e2db;

  --red:     #ad2019;
  --red-d:   #841812;
  --red-soft:#f5e6e3;
  --wa:      #25d366;

  --maxw: 1120px;
  --r: 10px;
  --r-sm: 6px;
  --shadow: 0 1px 2px rgba(23,24,26,.04), 0 8px 24px -12px rgba(23,24,26,.10);
  --shadow-md: 0 4px 10px rgba(23,24,26,.05), 0 16px 36px -14px rgba(23,24,26,.16);
  --ease: cubic-bezier(.22,.7,.28,1);
}

html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: "Archivo", "Inter", sans-serif;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.015em;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .7rem; }
h3 { font-size: 1.12rem; margin-bottom: .4rem; letter-spacing: -.01em; }
p { color: var(--muted); }
p + p { margin-top: .8rem; }

.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

/* ══════════ REVELADO DE TÍTULOS (letra por letra, corte vertical) ══════════
   Aplicado por script.js a todos los h1/h2. Cada letra queda dentro de un
   contenedor con overflow:hidden (.cut-char) y se desliza desde abajo
   (.cut-inner) con un delay creciente desde el centro del texto hacia afuera. */
.cut-word {
  display: inline-block;
  vertical-align: top;
}
.cut-char {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  line-height: 1;
}
.cut-inner {
  display: inline-block;
  transform: translateY(115%);
  transition: transform .56s cubic-bezier(.19,1.28,.32,1);
}
.is-revealed .cut-inner { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .cut-inner { transform: none !important; transition: none !important; }
}

/* ══════════ BOTONES (efecto "flow": flechas + círculo que se expande) ══════════ */
.btn {
  --fc: var(--red);
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--fc);
  font-weight: 700; font-size: .95rem;
  padding: .85rem 1.9rem; border-radius: 100px;
  text-decoration: none; border: 1.5px solid color-mix(in srgb, var(--fc) 45%, transparent);
  cursor: pointer; box-shadow: var(--shadow);
  transition: border-radius .6s cubic-bezier(.23,1,.32,1), border-color .6s, color .6s, box-shadow .2s, transform .15s;
}
.btn:hover { border-color: transparent; color: #fff; border-radius: 12px; box-shadow: var(--shadow-md); }
.btn:active { transform: scale(.96); }
.btn:focus-visible { outline: 2px solid #1a73e8; outline-offset: 2px; }
.btn--ghost { --fc: var(--ink); }
.btn--wa { --fc: var(--wa); }

.btn__arrow {
  position: absolute; width: 1rem; height: 1rem; z-index: 2;
  transition: left .8s cubic-bezier(.34,1.56,.64,1), right .8s cubic-bezier(.34,1.56,.64,1);
}
.btn__arrow svg { width: 100%; height: 100%; stroke: currentColor; fill: none; }
.btn__arrow--in { left: -25%; }
.btn:hover .btn__arrow--in { left: 1rem; }
.btn__arrow--out { right: 1rem; }
.btn:hover .btn__arrow--out { right: -25%; }

.btn__label {
  position: relative; z-index: 1;
  transform: translateX(-.7rem);
  transition: transform .8s ease;
}
.btn:hover .btn__label { transform: translateX(.7rem); }

.btn__circle {
  position: absolute; top: 50%; left: 50%; z-index: 0;
  width: 1rem; height: 1rem; border-radius: 50%;
  background: var(--fc); opacity: 0;
  transform: translate(-50%, -50%);
  transition: width .8s cubic-bezier(.19,1,.22,1), height .8s cubic-bezier(.19,1,.22,1), opacity .5s;
}
.btn:hover .btn__circle { width: 220px; height: 220px; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn__arrow, .btn__label, .btn__circle { transition-duration: .01ms !important; }
}

/* ══════════ HEADER ══════════ */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(250,249,247,.92);
  backdrop-filter: blur(8px); z-index: 40;
}
.site-header__inner {
  display: flex; align-items: center; gap: 2rem;
  padding-block: 1.05rem;
}
.logo { display: flex; align-items: center; gap: .65rem; text-decoration: none; margin-right: auto; }
.logo__img { height: 2.5rem; width: auto; border-radius: 5px; }
.site-footer .logo__img { height: 3.1rem; }
.nav-links { display: flex; gap: 1.7rem; }
.nav-links a {
  text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--muted);
  transition: color .15s; position: relative; padding-block: .2rem;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
  background: var(--red); transform: scaleX(0); transition: transform .2s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; }

/* ══════════ HERO ══════════ */
.hero { padding: clamp(3rem, 6.5vw, 5rem) 0 clamp(2.5rem, 5vw, 3.5rem); }
.hero__kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--red); font-weight: 700; font-size: .84rem;
  letter-spacing: .04em; text-transform: uppercase; margin-bottom: .9rem;
}
.hero__kicker::before { content: ""; width: 18px; height: 2px; background: var(--red); border-radius: 2px; }
.hero__sub { font-size: 1.08rem; max-width: 46ch; margin-top: 1.1rem; }
.hero__cta { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 1.8rem; }

.hero__facts {
  display: flex; gap: clamp(1.6rem, 4vw, 2.6rem); flex-wrap: wrap;
  margin-top: 2.4rem; padding-top: 1.8rem; border-top: 1px solid var(--line);
}
.hero__facts div b {
  display: block; font-family: "Archivo", sans-serif; font-weight: 800; font-size: 1.05rem;
}
.hero__facts div span { font-size: .84rem; color: var(--muted); }

/* ── Hero de portada: fondo fotográfico a pantalla completa con
   crossfade entre dos fotos, sin zoom ni movimiento. ── */
.hero--cover {
  position: relative; min-height: 88vh; display: flex; align-items: flex-end;
  overflow: hidden; padding: 0 0 clamp(3rem, 7vw, 5rem); color: #fff;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.8s ease;
}
.hero__bg-img.is-active { opacity: 1; }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,18,17,.32) 0%, rgba(20,18,17,.5) 55%, rgba(20,18,17,.9) 100%);
}
.hero__content { position: relative; z-index: 1; max-width: 640px; }
.hero--cover .hero__kicker { color: #ffb4ae; }
.hero--cover .hero__kicker::before { background: #ffb4ae; }
.hero--cover h1 { color: #fff; }
.hero--cover .hero__sub { color: rgba(255,255,255,.86); }
.hero--cover .hero__facts { border-top-color: rgba(255,255,255,.25); }
.hero--cover .hero__facts div b { color: #fff; }
.hero--cover .hero__facts div span { color: rgba(255,255,255,.72); }

.hero__scroll {
  position: absolute; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  color: rgba(255,255,255,.78); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
}
.hero__scroll span {
  width: 1px; height: 32px; background: rgba(255,255,255,.4); position: relative; overflow: hidden;
}
.hero__scroll span::after {
  content: ""; position: absolute; left: 0; top: -100%; width: 100%; height: 100%; background: #fff;
  animation: heroScrollLine 1.8s ease-in-out infinite;
}
@keyframes heroScrollLine { 0% { top: -100%; } 60% { top: 100%; } 100% { top: 100%; } }
@media (max-width: 720px) {
  .hero--cover { min-height: 78vh; }
}

/* ══════════ SECCIONES ══════════ */
.sec { padding: clamp(3rem, 6vw, 4.4rem) 0; }
.sec--alt { background: var(--surface); border-block: 1px solid var(--line); }
.sec__head { max-width: 620px; margin-bottom: 2.4rem; }
.sec__lead { margin-top: .6rem; font-size: 1.02rem; }
.eyebrow {
  color: var(--red); font-weight: 700; font-size: .84rem;
  letter-spacing: .04em; text-transform: uppercase; margin-bottom: .6rem; display: block;
}

/* ══════════ MEDIOS DE PAGO (franja unificada con divisores) ══════════ */
.pay-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
}
.pay-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.7rem 1.6rem;
  border-left: 1px solid var(--line);
  transition: background .2s;
}
.pay-item:first-child { border-left: 0; }
.pay-item:hover { background: var(--bg); }
.pay-item__icon {
  width: 2.9rem; height: 2.9rem; flex: none; border-radius: 50%;
  background: var(--red-soft); color: var(--red); display: grid; place-items: center;
}
.pay-item__icon svg { width: 1.4rem; height: 1.4rem; stroke: currentColor; fill: none; }
.pay-item h3 { font-size: 1rem; margin-bottom: .15rem; }
.pay-item p { font-size: .87rem; }

@media (max-width: 760px) {
  .pay-strip { grid-template-columns: 1fr; }
  .pay-item { border-left: 0; border-top: 1px solid var(--line); }
  .pay-item:first-child { border-top: 0; }
}

/* ══════════ GALERÍA DE OBRAS ══════════ */
.gallery-head { text-align: center; max-width: 560px; margin-inline: auto; }
.gallery-head__icon {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem;
  margin: 0 auto .9rem; color: var(--red);
}
.gallery-head__icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery__item { position: relative; overflow: hidden; border-radius: var(--r); cursor: pointer; }
.gallery img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block;
  border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow);
}

.gallery__zoom {
  position: absolute; inset: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
  background: rgba(173,32,25,.82); color: #fff; font-weight: 700; font-size: .9rem;
  border: none; cursor: pointer; font-family: inherit;
  opacity: 0; transition: opacity .2s;
}
.gallery__zoom svg { width: 1.6rem; height: 1.6rem; fill: none; stroke: currentColor; }
.gallery__item:hover .gallery__zoom { opacity: 1; }
@media (hover: none) {
  .gallery__zoom { opacity: 1; background: rgba(173,32,25,.55); }
}

.lightbox {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 3rem; background: rgba(20,18,17,.92);
  opacity: 0; visibility: hidden; transition: opacity .2s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img {
  max-width: 100%; max-height: 100%; border-radius: var(--r); box-shadow: var(--shadow);
  cursor: default;
}
.lightbox__close {
  position: absolute; top: 1.2rem; right: 1.5rem; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  border: none; background: rgba(255,255,255,.12); color: #fff; font-size: 1.6rem; line-height: 1;
  display: grid; place-items: center; cursor: pointer; transition: background .15s;
}
.lightbox__close:hover { background: rgba(255,255,255,.22); }

/* ══════════ SUCURSALES ══════════ */
.branches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; margin-bottom: 1rem; }
.branches--single { grid-template-columns: minmax(0, 320px); margin-bottom: 2rem; }
.branches--single .branch { cursor: default; }
.branches--single .branch:hover { transform: none; box-shadow: var(--shadow); }
.branch {
  border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem;
  background: var(--surface); box-shadow: var(--shadow);
  display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.branch:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.branch.is-selected { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), var(--shadow-md); }
.branch__tag { display: block; font-size: .74rem; font-weight: 700; color: var(--red); margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .04em; }
.branch p { font-size: .92rem; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2.5rem; align-items: start; }
.contact-list { display: grid; gap: 1.2rem; margin-top: 1.6rem; }
.contact-list dt { font-size: .8rem; color: var(--muted); margin-bottom: .18rem; }
.contact-list dd { font-weight: 700; }
.contact-list a { color: var(--red); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.map { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.map iframe { width: 100%; height: 320px; border: 0; }

/* ══════════ CATÁLOGO COMPLETO (grilla + detalle estilo ficha de producto) ══════════ */
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  font-size: .85rem; font-weight: 600; padding: .5rem 1.05rem; border-radius: 100px;
  cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--red); color: var(--red); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.1rem; }
.pcard {
  display: block; width: 100%; text-align: left; font: inherit; color: inherit;
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow); cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pcard__img { width: 100%; aspect-ratio: 1/1; object-fit: contain; background: #fff; padding: .9rem; border-bottom: 1px solid var(--line); }
.pcard__body { padding: .9rem 1rem 1.1rem; }
.pcard__name { font-size: .87rem; font-weight: 600; line-height: 1.35; margin-bottom: .4rem; }
.pcard__price { font-family: "Archivo", sans-serif; font-weight: 800; font-size: .95rem; color: var(--red); }

.pcard--door {
  display: flex; flex-direction: column; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.pcard--door:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pcard--door .pcard__body { display: flex; flex-direction: column; gap: .4rem; }
.pcard__price--link { display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; cursor: pointer; width: fit-content; }
.pcard__price--link:hover { text-decoration: underline; }

/* ── Ficha de puerta (modal con foto + descripción) ── */
.door-modal {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; background: rgba(20,18,17,.7);
  opacity: 0; visibility: hidden; transition: opacity .2s;
}
.door-modal.is-open { opacity: 1; visibility: visible; }
.door-modal__box {
  position: relative; width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto;
  background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-md);
  display: grid; grid-template-columns: 1fr;
}
.door-modal__img { width: 100%; max-height: 320px; object-fit: contain; background: #fff; border-bottom: 1px solid var(--line); }
.door-modal__info { padding: 1.4rem 1.6rem 1.6rem; }
.door-modal__name { margin-bottom: .7rem; }
.door-modal__desc { color: var(--muted); margin-bottom: 1.3rem; }
.door-modal__close {
  position: absolute; top: .8rem; right: .8rem; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  border: none; background: rgba(20,18,17,.55); color: #fff; font-size: 1.4rem; line-height: 1;
  display: grid; place-items: center; cursor: pointer; z-index: 1;
}
@media (min-width: 640px) {
  .door-modal__box { grid-template-columns: 1fr 1fr; max-height: 80vh; }
  .door-modal__img { max-height: 100%; height: 100%; }
}

.catalog-note { color: var(--muted); font-size: .86rem; margin-top: 2rem; }

/* ── Ficha de producto (se muestra al tocar un modelo) ── */
.detail-back {
  background: none; border: 0; cursor: pointer; font: inherit;
  font-weight: 700; font-size: .9rem; color: var(--red); padding: 0; margin-bottom: 1.6rem;
}
.detail-back:hover { text-decoration: underline; }
.detail-layout { display: grid; gap: 2.2rem; }
.detail-img {
  width: 100%; max-width: 380px; aspect-ratio: 1/1; object-fit: contain;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 1.4rem; margin-inline: auto;
}
.detail-info h2 { margin-bottom: 1.4rem; }
.detail-step { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .8rem; }
.detail-lineas { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.8rem; }
.detail-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .7rem; margin-bottom: 1.8rem; }
.size-box {
  border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  padding: .8rem .6rem; text-align: center; cursor: pointer; transition: all .15s;
}
.size-box__size { display: block; font-size: .85rem; font-weight: 700; margin-bottom: .3rem; }
.size-box__price { display: block; font-family: "Archivo", sans-serif; font-weight: 800; font-size: .95rem; color: var(--red); }
.size-box:hover { border-color: var(--red); }
.size-box.is-active { border-color: var(--red); background: var(--red-soft); box-shadow: 0 0 0 1px var(--red); }

@media (min-width: 640px) {
  .detail-layout { grid-template-columns: 380px 1fr; align-items: start; }
}

/* ══════════ CTA ══════════ */
.cta { padding: clamp(2.4rem, 5vw, 3.6rem) 0; }
.cta__box {
  background: var(--ink); color: #fff; padding: clamp(2.2rem, 5vw, 3.2rem); text-align: center;
  border-radius: var(--r);
}
.cta h2 { color: #fff; }
.cta p { color: #c8c8cc; max-width: 46ch; margin-inline: auto; }
.cta .hero__cta { justify-content: center; margin-top: 1.5rem; }

/* ══════════ FOOTER ══════════ */
.site-footer { border-top: 1px solid var(--line); padding: 2.4rem 0; background: var(--surface); }
.site-footer__inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.2rem;
}
.site-footer nav { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.site-footer a { text-decoration: none; color: var(--muted); font-size: .88rem; }
.site-footer a:hover { color: var(--ink); }
.site-footer__copy { font-size: .82rem; color: var(--muted); width: 100%; margin-top: 1.3rem; border-top: 1px solid var(--line); padding-top: 1.3rem; }

/* ══════════ WHATSAPP FLOTANTE ══════════ */
.fab {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 60;
  width: 3.1rem; height: 3.1rem; border-radius: 50%;
  background: var(--wa); color: #06331b;
  display: grid; place-items: center; text-decoration: none;
  box-shadow: 0 8px 22px rgba(0,0,0,.2);
  transition: transform .15s var(--ease);
}
.fab:hover { transform: scale(1.06); }
.fab svg { width: 1.5rem; height: 1.5rem; fill: currentColor; }

/* ══════════ RESPONSIVE ══════════ */
@media (max-width: 860px) {
  .branches { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nav-links { position: fixed; inset: 66px 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 1rem 1.5rem; gap: 1rem; display: none;
    box-shadow: var(--shadow-md); max-height: calc(100vh - 66px); overflow-y: auto; }
  .site-header.is-open .nav-links { display: flex; }
  .nav-burger { display: block; }
  .branches, .gallery { grid-template-columns: 1fr; }
  .hero__facts { flex-direction: column; gap: 1.1rem; }

  /* Deja libre la esquina inferior derecha (ahí flota el botón de WhatsApp)
     para que ningún texto ni precio quede tapado. */
  .contact-list, .hero__facts, .detail-info { padding-right: 3.6rem; }
  .fab { width: 2.8rem; height: 2.8rem; right: 1rem; bottom: 1rem; }
  .fab svg { width: 1.35rem; height: 1.35rem; }

  .lightbox { padding: 1.2rem; }
  .door-modal { padding: 0; align-items: flex-end; }
  .door-modal__box { max-width: 100%; max-height: 92vh; border-radius: var(--r) var(--r) 0 0; }
}
