/* ============================================================
   MARIO CARABAJAL — Costura & Diseño
   ============================================================ */

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

:root {
  --white:   #ffffff;
  --off:     #fafaf8;
  --light:   #f2f0ec;
  --gray:    #8a8680;
  --dark:    #1a1714;
  --black:   #0d0c0b;
  --gold:    #b8975a;
  --gold-lt: #d4b880;
  --serif:   'Cormorant Garamond', Georgia, serif;
  --sans:    'Raleway', system-ui, sans-serif;
  --trans:   cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--white);
  color: var(--dark);
  font-family: var(--serif);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--white); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--trans), box-shadow .4s var(--trans);
}
#navbar.scrolled {
  border-color: rgba(184,151,90,.2);
  box-shadow: 0 2px 30px rgba(0,0,0,.06);
}

.nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo { display: flex; align-items: center; }
.nav-icon  { height: 62px; width: auto; opacity: .9; transition: opacity .3s; }
.nav-icon:hover { opacity: 1; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  align-items: center;
}
.nav-links a {
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dark);
  position: relative;
  transition: color .3s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width .3s var(--trans);
}
.nav-links a:hover,
.nav-links a.active-nav { color: var(--gold); }
.nav-links a:hover::after,
.nav-links a.active-nav::after { width: 100%; }

.nav-cta {
  border: 1px solid var(--dark) !important;
  padding: .45rem 1.2rem !important;
  transition: background .3s, color .3s, border-color .3s !important;
}
.nav-cta:hover {
  background: var(--dark) !important;
  color: var(--white) !important;
  border-color: var(--dark) !important;
}
.nav-cta::after { display: none !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--dark);
  transition: transform .3s, opacity .3s;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid var(--light);
  gap: .5rem;
}
.nav-mobile a {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: .6rem 0;
  border-bottom: 1px solid var(--light);
  color: var(--dark);
}
.nav-mobile.open { display: flex; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  background: var(--white);
}

.hero-content { max-width: 680px; }

.hero-logo-wrap { margin-bottom: 2.5rem; }
.hero-logo {
  width: clamp(240px, 45vw, 480px);
  height: auto;
  margin: 0 auto;
}

/* Oculto visualmente pero legible por lectores de pantalla y Google */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.hero-tagline {
  font-family: var(--sans);
  font-size: clamp(.65rem, 1.2vw, .8rem);
  font-weight: 400;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 2.8rem;
}

.hero-btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--dark);
  padding: .9rem 2.6rem;
  border: 1px solid var(--dark);
  transition: background .35s var(--trans), color .35s var(--trans);
}
.hero-btn:hover {
  background: var(--white);
  color: var(--dark);
}

/* scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
}
.hero-scroll span {
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--gold));
  margin: 0 auto;
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: .3; transform: scaleY(.6); transform-origin: top; }
  50%       { opacity: 1;  transform: scaleY(1);   transform-origin: top; }
}

/* ============================================================
   DIVIDERS
   ============================================================ */
.ornament-divider {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.ornament-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to var(--dir, right), transparent, rgba(184,151,90,.4));
}
.ornament-divider .line:first-child { --dir: right; }
.ornament-divider .line:last-child  { --dir: left; }
.ornament-icon { height: 40px; width: auto; opacity: .35; }

.thin-divider {
  max-width: 120px;
  height: 1px;
  background: var(--gold);
  opacity: .4;
  margin: 0 auto;
}

/* ============================================================
   COLLECTION SECTIONS
   ============================================================ */
.collection-section {
  padding: 5rem 2rem 6rem;
}
.atelier-section {
  padding: 5rem 2rem 6rem;
  background: var(--off);
}
.alt-bg {
  background: var(--off);
}

.section-header {
  max-width: 720px;
  margin: 0 auto 4rem;
  text-align: center;
}
.section-label {
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .8rem;
  display: block;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: .02em;
  color: var(--black);
  margin-bottom: 1.5rem;
}
.section-text {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 300;
  line-height: 1.85;
  color: var(--gray);
}

/* ============================================================
   GALLERIES
   ============================================================ */

/* Masonry 3-col — grilla uniforme para evitar huecos */
.gallery-masonry {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.gallery-masonry .gallery-item { aspect-ratio: 3/4; }

/* Featured 4-col equal */
.gallery-featured {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* Strip 4-col (experiencias) */
.gallery-strip {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* Common item styles */
.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--light);
  border-radius: 10px;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--trans);
  display: block;
}
.gallery-featured .gallery-item { aspect-ratio: 3/4; }
.gallery-strip .gallery-item    { aspect-ratio: 1/1; }

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,12,11,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .4s var(--trans);
}
.gallery-item .overlay span {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.6);
  padding: .4rem 1rem;
}
.gallery-item:hover img      { transform: scale(1.06); }
.gallery-item:hover .overlay { opacity: 1; }

/* ============================================================
   CONTACTO
   ============================================================ */
.contact-section {
  background: var(--white);
  padding: 6rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
}
.contact-inner {
  text-align: center;
  max-width: 620px;
}
.contact-sub {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--gray);
  line-height: 1.9;
  margin: 1.2rem 0 2.5rem;
}
.contact-links {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .85rem 2rem;
  border: 1px solid var(--dark);
  color: var(--dark);
  transition: background .3s, color .3s;
}
.contact-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.contact-btn:hover { background: var(--dark); color: var(--white); }
.contact-btn.whatsapp { border-color: #25d366; color: #25d366; }
.contact-btn.whatsapp:hover { background: #25d366; color: var(--white); }
.contact-btn.instagram { border-color: #e1306c; color: #e1306c; }
.contact-btn.instagram:hover { background: #e1306c; color: var(--white); }
.contact-btn.facebook { border-color: #1877f2; color: #1877f2; }
.contact-btn.facebook:hover { background: #1877f2; color: var(--white); }
.contact-btn.email { border-color: var(--gold); color: var(--gold); }
.contact-btn.email:hover { background: var(--gold); color: var(--white); }

.firma-wrap { text-align: center; }
.firma-img {
  width: clamp(200px, 35vw, 380px);
  height: auto;
  margin: 0 auto;
  opacity: .8;
}

/* ============================================================
   PARALLAX BANDS
   ============================================================ */
.parallax-band {
  position: relative;
  height: 480px;
  background-image: var(--pbg);
  background-attachment: fixed;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
}
/* Fallback para mobile (fixed no funciona bien en iOS) */
@supports (-webkit-overflow-scrolling: touch) {
  .parallax-band { background-attachment: scroll; }
}
@media (max-width: 768px) {
  .parallax-band { background-attachment: scroll; height: 340px; }
}

.parallax-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(10,9,8,.25) 0%,
    rgba(10,9,8,.55) 50%,
    rgba(10,9,8,.25) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}
.parallax-text {
  text-align: center;
  color: var(--white);
  padding: 0 2rem;
}
.parallax-label {
  display: block;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--gold-lt);
  margin-bottom: 1rem;
}
.parallax-heading {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: .03em;
  text-shadow: 0 2px 24px rgba(0,0,0,.4);
  max-width: 700px;
  margin: 0 auto;
}

/* ============================================================
   TESTIMONIOS
   ============================================================ */
.testimonios-section {
  padding: 5rem 2rem 6rem;
  background: var(--off);
}
.testimonios-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.testimonio-card {
  background: var(--white);
  padding: 2.2rem 2rem 1.8rem;
  border-top: 2px solid var(--gold);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: box-shadow .3s var(--trans), transform .3s var(--trans);
}
.testimonio-card:hover {
  box-shadow: 0 8px 40px rgba(0,0,0,.08);
  transform: translateY(-4px);
}
.stars {
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: .1em;
}
.testimonio-card blockquote {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.85;
  color: var(--dark);
  margin: 0;
  flex: 1;
}
.testimonio-footer {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  border-top: 1px solid var(--light);
  padding-top: 1rem;
}
.testimonio-footer strong {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dark);
}
.testimonio-categoria {
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .1em;
  color: var(--gold);
  text-transform: uppercase;
}
@media (max-width: 900px) {
  .testimonios-grid { grid-template-columns: 1fr; max-width: 560px; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--black);
  padding: 2.5rem 2rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.footer-icon {
  height: 32px;
  width: auto;
  filter: invert(1);
  opacity: .5;
}
.footer-copy {
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .12em;
  color: rgba(255,255,255,.35);
  text-align: center;
}
.footer-social {
  display: flex;
  gap: .8rem;
  align-items: center;
}
.footer-social a {
  color: rgba(255,255,255,.3);
  transition: color .3s;
  display: flex;
}
.footer-social a:hover { color: var(--gold); }
.footer-social svg { width: 16px; height: 16px; }
.footer-credit {
  width: 100%;
  text-align: center;
  padding: .8rem 0 0;
  border-top: 1px solid rgba(255,255,255,.08);
  font-family: var(--sans);
  font-size: .62rem;
  letter-spacing: .12em;
  color: rgba(255,255,255,.2);
}
.footer-credit a {
  color: rgba(255,255,255,.35);
  transition: color .3s;
}
.footer-credit a:hover { color: var(--gold); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10,9,8,.96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.open { display: flex; }

.lb-img-wrap {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img-wrap img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 20px 80px rgba(0,0,0,.6);
  transition: opacity .3s;
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  transition: color .2s, transform .2s;
  line-height: 1;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: var(--white); }
.lb-close { top: 1.5rem; right: 1.5rem; font-size: 2rem; }
.lb-prev   { left: 1.5rem;  top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lb-next   { right: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lb-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lb-next:hover { transform: translateY(-50%) translateX(3px); }

/* ============================================================
   WHATSAPP FLOTANTE
   ============================================================ */
.wa-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 62px;
  height: 62px;
  background: var(--dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 28px rgba(0,0,0,.22);
  transition: transform .35s var(--trans), box-shadow .35s var(--trans), background .3s;
  color: var(--white);
}
.wa-float:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 36px rgba(0,0,0,.28);
  background: var(--gold);
}
.wa-icon {
  width: 34px;
  height: 34px;
  color: var(--white);
  transition: color .3s;
}
.wa-tooltip {
  position: absolute;
  right: 72px;
  background: var(--dark);
  color: var(--white);
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: .45rem .9rem;
  pointer-events: none;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity .3s var(--trans), transform .3s var(--trans);
}
.wa-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right: none;
  border-left-color: var(--dark);
}
.wa-float:hover .wa-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* pulso de atención */
@keyframes waPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184,151,90,.5); }
  50%       { box-shadow: 0 0 0 12px rgba(184,151,90,0); }
}
.wa-float { animation: waPulse 2.8s ease-in-out infinite; }
.wa-float:hover { animation: none; }

/* ============================================================
   GALLERY CTA — "Ver galería completa"
   ============================================================ */
.gallery-cta-wrap {
  text-align: center;
  margin-top: 2.5rem;
}
.gallery-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dark);
  border-bottom: 1px solid var(--gold);
  padding-bottom: .3rem;
  transition: color .3s, gap .3s;
}
.gallery-cta-btn:hover { color: var(--gold); gap: .9rem; }
.gallery-cta-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ============================================================
   GALLERY PAGE — hero y layout
   ============================================================ */
.gallery-page-hero {
  padding: 9rem 2rem 3.5rem;
  text-align: center;
  background: var(--white);
  max-width: 860px;
  margin: 0 auto;
}
.gallery-page-section {
  padding: 3rem 2rem 6rem;
}
.gallery-page-section .gallery-masonry,
.gallery-page-section .gallery-featured,
.gallery-page-section .gallery-strip {
  max-width: 1320px;
  margin: 0 auto;
}

/* ============================================================
   OTRAS COLECCIONES — tarjetas en páginas de galería
   ============================================================ */
.otras-section {
  padding: 5rem 2rem 6rem;
  background: var(--light);
}
.otras-section .section-header {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  margin-bottom: 3rem;
}
.otras-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.otras-card {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.otras-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--trans);
}
.otras-card:hover img { transform: scale(1.06); }
.otras-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,23,20,.75) 0%, rgba(26,23,20,.1) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--white);
  transition: background .35s;
}
.otras-card:hover .otras-card-overlay {
  background: linear-gradient(to top, rgba(26,23,20,.85) 0%, rgba(26,23,20,.2) 60%, transparent 100%);
}
.otras-card-label {
  font-family: var(--sans);
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-lt);
  margin-bottom: .4rem;
}
.otras-card-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1.1rem;
  line-height: 1.2;
}
.otras-card-cta {
  font-family: var(--sans);
  font-size: .62rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.55);
  padding: .4rem 1.2rem;
  color: var(--white);
  transition: background .3s, border-color .3s;
}
.otras-card:hover .otras-card-cta {
  background: var(--gold);
  border-color: var(--gold);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp .9s var(--trans) forwards;
}
.delay-1 { animation-delay: .2s; }
.delay-2 { animation-delay: .4s; }
.delay-3 { animation-delay: .6s; }
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .8s var(--trans), transform .8s var(--trans);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: .15s; }
.reveal.delay-2 { transition-delay: .3s;  }
.reveal.delay-3 { transition-delay: .45s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .gallery-masonry { columns: 2; }
  .gallery-strip   { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .gallery-masonry  { columns: 2; }
  .gallery-featured { grid-template-columns: repeat(2, 1fr); }
  .gallery-strip    { grid-template-columns: repeat(2, 1fr); }

  .otras-grid { grid-template-columns: repeat(2, 1fr); }

  .lb-prev { left: .5rem; font-size: 2rem; }
  .lb-next { right: .5rem; font-size: 2rem; }
}
@media (max-width: 480px) {
  .gallery-masonry  { columns: 1; }
  .gallery-featured { grid-template-columns: 1fr 1fr; }
  .gallery-strip    { grid-template-columns: 1fr 1fr; }
  .contact-links    { flex-direction: column; align-items: center; }
  .otras-grid       { grid-template-columns: 1fr; }
}
