/* =========================================================
   Cacao Tatuy – Luxury Boutique Stylesheet
   Palette: #0a0a0a (bg) · #c5a059 (gold) · #f4f1ea (cream)
   ========================================================= */

/* ── Google Fonts ─────────────────────────────────────────*/
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&family=Jost:wght@300;400;500;600&display=swap');

/* ── Reset & base ─────────────────────────────────────────*/
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0a0a0a;
  --gold:     #c5a059; /* Oro mate (contraste perfecto y elegancia) */
  --gold-lt:  #d4b878; /* Oro claro para hovers */
  --cream:    #f4f1ea;
  --cream-dim:#b5b0a6;
  --serif:    'Cormorant Garamond', Georgia, serif;
  --sans:     'Jost', system-ui, sans-serif;
  --radius:   4px;
  --trans:    0.4s ease;
}

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

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

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

/* ── Splash screen ────────────────────────────────────────*/
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.8s ease;
}

#splash img {
  width: 110px;
  animation: pulseGlow 1.6s ease-in-out infinite alternate;
}

#splash .splash-brand {
  font-family: var(--serif);
  font-size: 1.6rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
}

#splash .splash-dots span {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin: 0 4px;
  animation: dotPulse 1.2s ease-in-out infinite;
}
#splash .splash-dots span:nth-child(2) { animation-delay: 0.2s; }
#splash .splash-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulseGlow {
  from { opacity: 0.7; filter: drop-shadow(0 0 6px rgba(197,160,89,0)); }
  to   { opacity: 1;   filter: drop-shadow(0 0 18px rgba(197,160,89,0.55)); }
}

@keyframes dotPulse {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50%       { opacity: 1;   transform: translateY(-4px); }
}

/* ── Navigation ───────────────────────────────────────────*/
#main-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 5%;
  transition: background var(--trans), padding var(--trans), backdrop-filter var(--trans);
}

#main-nav.scrolled {
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  padding: 14px 5%;
  border-bottom: 1px solid rgba(197,160,89,0.15);
}

.nav-logo img {
  height: 72px;
  width: auto;
  filter: brightness(1.1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
  transition: color var(--trans);
  position: relative;
  padding-bottom: 3px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 1px;
  width: 0;
  background: var(--gold);
  transition: width var(--trans);
}

.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }

/* ── Hero / Video section ─────────────────────────────────*/
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dark overlay over the video */
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,10,0.55) 0%,
    rgba(10,10,10,0.2)  50%,
    rgba(10,10,10,0.75) 100%
  );
  z-index: 1;
}

/* Background video */
#bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 5%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.hero-logo-wrap img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 4px 20px rgba(197,160,89,0.4));
}

.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--cream);
  letter-spacing: 0.03em;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-tagline em {
  color: var(--gold);
  font-style: italic;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.hero-sub {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9), 0 1px 3px rgba(0, 0, 0, 1);
}

/* Gold divider */
.gold-divider {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto;
}

/* Explore button */
.btn-gold {
  display: inline-block;
  padding: 15px 44px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: background var(--trans), color var(--trans), transform var(--trans);
  position: relative;
  overflow: hidden;
}

.btn-gold::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateY(100%);
  transition: transform var(--trans);
}

.btn-gold span { position: relative; z-index: 1; }

.btn-gold:hover { color: var(--bg); transform: translateY(-2px); }
.btn-gold:hover::before { transform: translateY(0); }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-indicator span {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}

/* ── Section shared styles ────────────────────────────────*/
.section {
  padding: 100px 5%;
}

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 500;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--cream);
  margin-bottom: 24px;
}

.section-body {
  font-size: 1rem;
  color: var(--cream-dim);
  line-height: 1.9;
  max-width: 620px;
}

/* ── Scroll Reveal animation ──────────────────────────────*/
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal][data-delay="1"] { transition-delay: 0.1s; }
[data-reveal][data-delay="2"] { transition-delay: 0.2s; }
[data-reveal][data-delay="3"] { transition-delay: 0.35s; }
[data-reveal][data-delay="4"] { transition-delay: 0.5s; }

/* ── Historia section ─────────────────────────────────────*/
#historia {
  background: var(--bg);
  border-top: 1px solid rgba(197,160,89,0.12);
}

.historia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.historia-text .section-body { max-width: 100%; }

.historia-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.historia-images .img-card {
  overflow: hidden;
  position: relative;
}

.historia-images .img-card:first-child {
  grid-column: 1 / -1;
}

.historia-images img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.historia-images .img-card:first-child img {
  height: 320px;
}

.historia-images .img-card:hover img {
  transform: scale(1.05);
}

.img-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(10,10,10,0.85));
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

/* ── Filosofia / danza quote ──────────────────────────────*/
#filosofia {
  background: #0e0e0e;
  border-top: 1px solid rgba(197,160,89,0.12);
  border-bottom: 1px solid rgba(197,160,89,0.12);
}

.filosofia-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.filosofia-img {
  overflow: hidden;
}

.filosofia-img img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.filosofia-text .section-title { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }

blockquote {
  border-left: 2px solid var(--gold);
  padding-left: 20px;
  margin: 28px 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--cream);
  line-height: 1.6;
}

/* ── Productos section ────────────────────────────────────*/
#productos {
  background: var(--bg);
}

.productos-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.productos-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.productos-header .section-body { margin: 0 auto; text-align: center; }

/* Product hero banner */
.product-banner {
  position: relative;
  height: 480px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.product-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.product-banner:hover img { transform: scale(1.04); }

.product-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,10,10,0.08) 0%, rgba(10,10,10,0.7) 55%);
}

.product-banner-text {
  position: relative;
  z-index: 2;
  max-width: 480px;
  margin-left: auto;
  margin-right: 8%;
  text-align: left;
}

.product-banner-text h3 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.2;
  margin-bottom: 12px;
}

.product-banner-text h3 em {
  color: var(--gold);
  font-style: italic;
}

.product-banner-text p {
  font-size: 0.95rem;
  color: var(--cream-dim);
  line-height: 1.8;
  margin-bottom: 10px;
}

/* ── Contacto / Footer ────────────────────────────────────*/
#contacto {
  background: #080808;
  border-top: 1px solid rgba(197,160,89,0.12);
  padding: 100px 5% 80px;
}

.contacto-inner {
  max-width: 900px;
  margin: 0 auto;
}

.contacto-header {
  text-align: center;
  margin-bottom: 52px;
}

.contacto-header .section-body {
  margin: 0 auto;
  text-align: center;
}

.contacto-email {
  display: block;
  text-align: center;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--gold);
  margin-top: 16px;
  letter-spacing: 0.06em;
  transition: color var(--trans);
}
.contacto-email:hover { color: var(--gold-lt); }

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 48px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.form-field input,
.form-field textarea {
  background: transparent;
  border: 1px solid rgba(197,160,89,0.25);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--cream);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  outline: none;
  transition: border-color var(--trans);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(180,176,166,0.4);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--gold);
}

.form-field textarea {
  resize: vertical;
  min-height: 140px;
}

.form-submit {
  text-align: center;
  margin-top: 12px;
}

.btn-submit {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 16px 56px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color var(--trans);
}

.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateY(100%);
  transition: transform var(--trans);
}

.btn-submit span { position: relative; z-index: 1; }

.btn-submit:hover { color: var(--bg); }
.btn-submit:hover::before { transform: translateY(0); }

/* PHP form feedback */
.form-msg {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 16px;
  text-align: center;
}
.form-msg.ok  { border: 1px solid #4caf50; color: #4caf50; }
.form-msg.err { border: 1px solid #e53935; color: #e53935; }

/* Footer bar */
.footer-bar {
  max-width: 1200px;
  margin: 64px auto 0;
  padding-top: 32px;
  border-top: 1px solid rgba(197,160,89,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bar img { 
  height: 48px; 
  /* Convierte la imagen roja/negra en color blanco sólido para que contraste en el footer oscuro */
  filter: brightness(0) invert(1) opacity(0.6); 
  transition: opacity var(--trans);
}

.footer-bar img:hover {
  opacity: 1;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(180,176,166,0.4);
  letter-spacing: 0.1em;
}

/* ── Galería Filtros ── */
.gallery-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 48px;
}
.filter-btn {
  background: none;
  border: none;
  color: var(--cream-dim);
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color var(--trans), border-color var(--trans);
}
.filter-btn:hover, .filter-btn.active {
  color: var(--gold);
  border-bottom: 1px solid var(--gold);
}

/* ── Galería Masonry & Lightbox ── */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  grid-auto-flow: dense;
  padding: 0 6%;
}

.masonry-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4/5;
  background: #111;
  cursor: pointer;
}

.masonry-item:nth-child(even) {
  aspect-ratio: 1/1;
}

.masonry-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6) grayscale(0.5);
  transition: transform 0.6s ease, filter var(--trans);
}

.masonry-item:hover img {
  filter: brightness(1) grayscale(0);
  transform: scale(1.05);
}

.masonry-item.hidden {
  display: none;
}

.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5,5,5,0.95);
  padding: 40px;
  align-items: center;
  justify-content: center;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border: 1px solid rgba(197,160,89,0.2);
}

.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  color: var(--gold);
  font-size: 3rem;
  font-weight: 300;
  cursor: pointer;
  transition: color var(--trans), transform var(--trans);
  user-select: none;
}

.lightbox-close {
  top: 32px;
  right: 48px;
}

.lightbox-prev {
  left: 40px;
}

.lightbox-next {
  right: 40px;
}

.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  color: var(--gold-lt);
  transform: scale(1.1);
}

/* ── Responsive ───────────────────────────────────────────*/

/* Prevent horizontal scroll globally */
html, body { overflow-x: hidden; }

@media (max-width: 900px) {
  .historia-grid,
  .filosofia-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .historia-images { grid-template-columns: 1fr 1fr; }
  .historia-images .img-card:first-child { grid-column: span 1; }

  .filosofia-img img { height: 380px; }

  .product-banner-text {
    margin-right: 5%;
    max-width: 90%;
  }

  .form-row { grid-template-columns: 1fr; }

  .footer-bar { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
  /* ── Global section padding ── */
  .section { padding: 56px 6%; }

  /* ── Nav: adapt to mobile instead of hiding ── */
  #main-nav { 
    flex-direction: row;
    flex-wrap: wrap;
    padding: 16px 5%; 
    gap: 12px;
  }
  .nav-logo {
    flex: 1 1 100%;
    text-align: left;
  }
  .nav-logo img {
    height: 16px;
    opacity: 0.7;
  }
  .nav-links { 
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px; 
    font-size: 0.70rem; 
    width: 100%;
  }

  /* ── Hero ── */
  #hero { height: 100svh; } /* svh = small viewport height for mobile browsers */

  .hero-content { padding: 0 7%; gap: 16px; }
  .hero-logo-wrap img { width: 80px; height: 80px; }
  .hero-tagline { font-size: 2rem; }
  .hero-sub { font-size: 0.72rem; letter-spacing: 0.15em; }

  .btn-gold { padding: 13px 32px; font-size: 0.72rem; }

  .scroll-indicator { bottom: 20px; }
  .scroll-indicator span { height: 32px; }

  /* ── Historia ── */
  .historia-grid { gap: 32px; }
  .historia-images { grid-template-columns: 1fr; gap: 12px; }
  .historia-images .img-card:first-child { grid-column: span 1; }
  .historia-images img,
  .historia-images .img-card:first-child img { height: 220px; }

  /* ── Filosofia ── */
  .filosofia-inner { gap: 32px; }
  .filosofia-img img { height: 280px; }
  blockquote { font-size: 1rem; padding-left: 16px; }

  /* ── Productos ── */
  .productos-header { margin-bottom: 32px; }
  .product-banner {
    height: auto;
    min-height: 360px;
    padding: 40px 0;
  }
  .product-banner-overlay {
    background: rgba(10,10,10,0.6);
  }
  .product-banner-text {
    margin: 0 auto;
    padding: 0 7%;
    max-width: 100%;
    text-align: center;
  }
  .product-banner-text .btn-gold { margin-top: 16px; }

  /* ── Contacto ── */
  #contacto { padding: 56px 6% 48px; }
  .contacto-header { margin-bottom: 32px; }
  .contacto-email { font-size: 1rem; }
  .contact-form { gap: 16px; }
  .form-field input,
  .form-field textarea { padding: 12px 14px; font-size: 0.9rem; }
  .form-field textarea { min-height: 110px; }
  .btn-submit { padding: 14px 40px; font-size: 0.72rem; width: 100%; }

  /* ── Footer bar ── */
  .footer-bar { margin-top: 40px; padding-top: 24px; }
  .footer-bar img { height: 24px; }
}

/* ── Extra small (≤360px) ── */
@media (max-width: 360px) {
  .hero-tagline { font-size: 1.7rem; }
  .hero-sub { font-size: 0.65rem; }
  .section-title { font-size: 1.6rem; }
  .section-body { font-size: 0.9rem; }
  .product-banner { min-height: 300px; }
}
