/* ============================================================
   HÄBITA FURNITURE — Landing 2026
   Paleta oficial (BrandBook 2026):
   teal #198675 · gold #EE9E17 · sage #94AC9D · dark #2F2F2F
   white #F8F4F4 · mint #C5DAD4 · beige #E7DFD5
   Tipografía: Garet (Bold, títulos) — sustituido por Poppins,
   fuente comercial sin archivo local disponible aún.
   Barlow (subtítulos) · Montserrat (texto) — ambas Google Fonts.
   ============================================================ */

:root {
  --teal: #198675;
  --teal-dark: #126257;
  --gold: #EE9E17;
  --gold-light: #f7c56b;
  --sage: #94AC9D;
  --dark: #2F2F2F;
  --white: #F8F4F4;
  --mint: #C5DAD4;
  --beige: #E7DFD5;

  --font-title: 'Poppins', 'Garet', sans-serif;
  --font-sub: 'Barlow', sans-serif;
  --font-text: 'Montserrat', sans-serif;

  --wrap: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-text);
  background: var(--white);
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-family: var(--font-sub);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
}

.section { padding: 100px 0; }
.section-alt { background: var(--beige); }

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 16px; }
.section-copy { color: #5c5c5c; font-size: 16px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sub);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
  padding: 15px 30px;
  border-radius: 100px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  cursor: pointer;
  border: none;
}
.btn-cta {
  background: var(--gold);
  color: var(--dark);
  box-shadow: 0 8px 24px rgba(238, 158, 23, 0.35);
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(238, 158, 23, 0.45); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(248, 244, 244, 0.5);
}
.btn-ghost:hover { background: rgba(248, 244, 244, 0.1); border-color: var(--white); }
.btn-dark {
  background: var(--dark);
  color: var(--white);
}
.btn-dark:hover { background: var(--teal-dark); }
.btn-small { padding: 10px 20px; font-size: 13px; }

/* ============ FÁBRICA ============ */
.fabrica { background: var(--beige); }
.fabrica-head .section-copy { max-width: 100%; }
.fabrica-stats { display: flex; gap: 30px; margin-top: 30px; flex-wrap: wrap; justify-content: center; }
.fabrica-stats div { border-left: 2px solid var(--gold); padding-left: 14px; text-align: left; }
.fabrica-stats strong { display: block; font-family: var(--font-title); font-size: 20px; color: var(--teal-dark); }
.fabrica-stats span { font-size: 12.5px; color: #7a7568; letter-spacing: 0.02em; }

/* Mosaico minimalista de fotos grandes, sin marco. En reposo estan quietas.
   Al pasar el mouse por TODO el mosaico, cada tarjeta flota en un
   circulito muy sutil (organico, duracion/retraso distintos por tarjeta).
   Al pasar el mouse sobre UNA tarjeta puntual, la foto hace zoom suave.
   Al hacer click, se abre en grande (lightbox) — "uno se mete a la foto". */
.fabrica-collage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 3px;
  margin-top: 64px;
}
.collage-card-big { grid-column: span 2; grid-row: span 2; }

.collage-card {
  position: relative;
  padding: 0;
  border: none;
  overflow: hidden;
  background: var(--dark);
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}
.collage-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform 0.7s ease;
}

/* Movimiento sutil al pasar el mouse por el mosaico completo */
.fabrica-collage:hover .collage-card { animation: collageOrbit ease-in-out infinite; }
.collage-card:nth-child(1) { animation-duration: 5.4s; animation-delay: 0s; }
.collage-card:nth-child(2) { animation-duration: 4.6s; animation-delay: -0.7s; }
.collage-card:nth-child(3) { animation-duration: 5s; animation-delay: -1.6s; }
.collage-card:nth-child(4) { animation-duration: 4.3s; animation-delay: -2.3s; }
.collage-card:nth-child(5) { animation-duration: 4.9s; animation-delay: -3s; }

@keyframes collageOrbit {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(5px, -4px); }
  50%  { transform: translate(0, -7px); }
  75%  { transform: translate(-5px, -4px); }
  100% { transform: translate(0, 0); }
}

/* Una tarjeta puntual: la foto hace zoom, sin mover el mosaico entero */
.fabrica-collage .collage-card:hover {
  animation-play-state: paused;
  z-index: 2;
}
.fabrica-collage .collage-card:hover img { transform: scale(1.1); }

@media (max-width: 760px) {
  .fabrica-collage { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .collage-card-big { grid-column: span 2; grid-row: span 1; }
}

/* Lightbox — "entrar" a la foto */
.collage-lightbox {
  position: fixed; inset: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(24, 22, 18, 0.92);
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  padding: 40px;
}
.collage-lightbox.is-open { opacity: 1; visibility: visible; }
.collage-lightbox img {
  max-width: min(90vw, 920px);
  max-height: 85vh;
  border-radius: 10px;
  transform: scale(0.86);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}
.collage-lightbox.is-open img { transform: scale(1); }
.collage-lightbox-close {
  position: absolute; top: 22px; right: 26px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(248, 244, 244, 0.14); color: var(--white); border: none;
  font-size: 26px; line-height: 1; cursor: pointer;
  transition: background 0.2s ease;
}
.collage-lightbox-close:hover { background: rgba(248, 244, 244, 0.28); }

/* ============ HEADER ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  background: rgba(248, 244, 244, 0.92);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand-logo { height: 78px; width: auto; transition: filter 0.3s ease, height 0.3s ease; }
.site-header.scrolled .brand-logo { height: 60px; }
.site-header:not(.scrolled) .brand-logo { filter: brightness(0) invert(1); }

.main-nav { display: flex; gap: 32px; }
.main-nav a {
  font-family: var(--font-sub);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--white);
  transition: color 0.3s ease;
  position: relative;
}
.site-header.scrolled .main-nav a { color: var(--dark); }
.main-nav a:hover { color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--white);
  transition: background 0.3s ease;
}
.site-header.scrolled .nav-toggle span { background: var(--dark); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--dark);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,20,20,0.55) 0%, rgba(20,20,20,0.35) 40%, rgba(20,20,20,0.75) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  color: var(--white);
  padding-top: 80px;
}
.hero-title {
  font-size: clamp(38px, 6vw, 68px);
  color: var(--white);
  margin-bottom: 22px;
  max-width: 780px;
}
.hero-title .accent-word { color: var(--gold-light); }
.hero-sub {
  font-size: 18px;
  max-width: 520px;
  color: rgba(248,244,244,0.88);
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
  color: rgba(248,244,244,0.75);
}
.scroll-cue span {
  display: block;
  width: 1px; height: 40px;
  background: rgba(248,244,244,0.5);
  margin: 0 auto 10px;
  animation: scrollPulse 2s ease-in-out infinite;
}
.scroll-cue p { font-family: var(--font-sub); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
@keyframes scrollPulse { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }

/* ============ VALUE STRIP ============ */
.value-strip {
  background: var(--dark);
  padding: 56px 0;
}
.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.value-item { color: var(--white); }
.value-num, .value-text {
  font-family: var(--font-title);
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}
.value-item p {
  font-family: var(--font-sub);
  font-size: 13px;
  color: rgba(248,244,244,0.75);
  margin-top: 6px;
  letter-spacing: 0.3px;
}
.value-item p:first-child {
  margin-top: 0;
  margin-bottom: 6px;
}

/* ============ GALERÍA ============ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
}
.g-item {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.g-item:hover img { transform: scale(1.06); }
.g-large { grid-column: span 3; grid-row: span 2; }
.g-med { grid-column: span 3; grid-row: span 1; }
.g-small { grid-column: span 2; grid-row: span 1; }

/* ============ PLACEHOLDER (fotos por venir) ============ */
.img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  border-radius: 14px;
  border: 1.5px dashed var(--sage);
  background: repeating-linear-gradient(
    135deg,
    var(--beige),
    var(--beige) 10px,
    #eee6db 10px,
    #eee6db 20px
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--teal-dark);
  text-align: center;
  padding: 20px;
}
.img-placeholder svg { width: 30px; height: 30px; opacity: 0.6; }
.img-placeholder span {
  font-family: var(--font-sub);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.8;
}

/* ============ SERVICIOS ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 16px 36px rgba(0,0,0,0.09); }
.service-media { height: 200px; }
.service-body { padding: 22px 20px 26px; }
.service-body h3 { font-size: 18px; margin-bottom: 8px; }
.service-body p { font-size: 14px; color: #6b6b6b; }

/* ============ PROCESO ============ */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  counter-reset: step;
}
.process-item { position: relative; padding-top: 8px; }
.process-num {
  font-family: var(--font-title);
  font-size: 42px;
  font-weight: 700;
  color: var(--mint);
  margin-bottom: 12px;
}
.process-item h3 { font-size: 17px; margin-bottom: 8px; }
.process-item p { font-size: 14px; color: #6b6b6b; }
.process-time {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-sub);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--teal);
  background: rgba(25,134,117,0.08);
  padding: 4px 12px;
  border-radius: 100px;
}

/* ============ EQUIPO ============ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 320px));
  gap: 24px;
  justify-content: center;
}
.team-card {
  background: var(--dark);
  color: var(--white);
  border-radius: 18px;
  padding: 32px 26px;
  text-align: center;
}
.team-role {
  font-family: var(--font-sub);
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.team-name { font-family: var(--font-title); font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.team-count { font-size: 13px; color: rgba(248,244,244,0.7); }

/* ============ CONTACTO ============ */
.contact-section {
  background: var(--teal);
  color: var(--white);
  padding: 100px 0;
  text-align: center;
}
.contact-section .eyebrow { color: var(--gold-light); }
.contact-section h2 { color: var(--white); font-size: clamp(28px, 4vw, 44px); margin-bottom: 18px; }
.contact-section p { max-width: 520px; margin: 0 auto 34px; color: rgba(248,244,244,0.85); font-size: 16px; }
.contact-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.contact-details {
  margin-top: 46px;
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  font-family: var(--font-sub);
  font-size: 14px;
  color: rgba(248,244,244,0.85);
}
.contact-details strong { display: block; color: var(--white); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }

/* ============ WHATSAPP FLOATING ============ */
.wa-float {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 90;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4);
  transition: transform 0.25s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; fill: white; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--dark);
  color: rgba(248,244,244,0.6);
  padding: 40px 0;
  text-align: center;
  font-size: 13px;
}
.site-footer .footer-logo { height: 62px; margin: 0 auto 16px; filter: brightness(0) invert(1); opacity: 0.85; }

/* ============ REVEAL ANIMATIONS ============
   Hidden only once JS confirms it's running (html.js-ready) — if JS
   fails or is disabled, content stays visible by default. */
html.js-ready .reveal-up { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
html.js-ready .reveal-up.in-view { opacity: 1; transform: translateY(0); }
html.js-ready .reveal-scale { opacity: 0; transform: scale(0.96); transition: opacity 0.7s ease, transform 0.7s ease; }
html.js-ready .reveal-scale.in-view { opacity: 1; transform: scale(1); }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .main-nav {
    display: none;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 10px 24px 20px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  }
  .main-nav.open { display: flex; }
  .main-nav a { color: var(--dark); padding: 12px 0; border-bottom: 1px solid var(--beige); }
  .nav-toggle { display: flex; }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .g-large { grid-column: span 2; grid-row: span 2; }
  .g-med, .g-small { grid-column: span 1; grid-row: span 1; }
}

@media (max-width: 560px) {
  .section { padding: 70px 0; }
  .services-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .contact-details { flex-direction: column; gap: 20px; }
}
