/* ═══════════════════════════════════════════════
   KABA Salón de Belleza — Shared Styles
   Paleta: Gold (#c9a96e) · Carbon (#0e0e0e) · Cream (#f8f4ef)
   ═══════════════════════════════════════════════ */

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

/* ─── ROOT ─── */
:root {
  /* ── PALETA KABA (DESIGN SPEC v1) ── */
  --ivory:        #fffbf5;
  --beige-base:   #f5ede3;
  --cream-warm:   #eae0d0;
  --gold:         #c9a96e;
  --gold-light:   #e8d5b0;
  --rose-gold:    #dbb0a0;
  --blush:        #f0ded8;
  --blonde-beige: #d4c8b5;
  --espresso:     #2c241b;
  --dark-warm:    #1f1a14;
  --text-dark:    #2c241b;
  --text-soft:    #7a6b5d;
  --text-light:   #a89888;
  --border:       rgba(201, 169, 110, 0.25);
  --border-soft:  rgba(219, 176, 160, 0.3);
  --wa-green:     #25D366;
  --nav-height:   80px;

  /* Aliases retro */
  --black:    var(--espresso);
  --charcoal: var(--dark-warm);
  --warm-white: var(--ivory);
  --cream:    var(--beige-base);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Montserrat', sans-serif;
  background: var(--warm-white);
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--gold); }

/* ─── NOISE TEXTURE OVERLAY ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: transparent;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s ease;
}
nav.scrolled {
  background: rgba(31, 26, 20, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 40px rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nav-logo-img { height: 42px; width: auto; object-fit: contain; }
.nav-logo svg { height: 38px; }
.nav-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  font-weight: 400;
}
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.3s;
  position: relative;
  cursor: pointer;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active {
  color: var(--gold);
}
.nav-links a.active::after {
  transform: scaleX(1);
}
.nav-cta {
  background: var(--gold);
  color: var(--black) !important;
  padding: 8px 20px;
  letter-spacing: 0.15em;
  font-weight: 600 !important;
  border-radius: 0;
}
.nav-cta:hover { background: var(--gold-light) !important; color: var(--black) !important; }
.nav-cta::after { display: none !important; }
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  background: none;
  border: none;
}
.hamburger span {
  width: 24px;
  height: 1px;
  background: var(--gold);
  transition: all 0.3s;
}

/* ─── MOBILE NAV ─── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.1em;
  transition: color 0.3s;
}
.mobile-menu a:hover { color: var(--gold); }
.mobile-menu a.active { color: var(--gold); }
.close-menu {
  position: absolute;
  top: 28px;
  right: 4vw;
  font-size: 1.8rem;
  color: var(--gold);
  cursor: pointer;
  background: none;
  border: none;
}

/* ─── SECTION COMMON ─── */
section { position: relative; }
.section-tag {
  font-size: 0.6rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.2rem;
}
.section-tag::before {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--gold);
}
.section-tag.center {
  justify-content: center;
}
.section-tag.center::before,
.section-tag.center::after {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--gold);
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.section-title em { font-style: italic; color: var(--gold); }
.section-sub {
  font-size: 0.85rem;
  color: var(--text-light);
  max-width: 500px;
  line-height: 1.7;
  margin: 0 auto 1.5rem;
}

/* ─── BUTTONS ─── */
.btn-primary {
  background: var(--gold);
  color: var(--black);
  padding: 14px 36px;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  font-family: 'Montserrat', sans-serif;
  border: none;
  cursor: pointer;
  display: inline-block;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); }

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--wa-green);
  color: white;
  padding: 14px 32px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s;
  font-family: 'Montserrat', sans-serif;
}
.btn-wa:hover { background: #1da851; transform: translateY(-2px); }

.btn-outline {
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.7);
  padding: 14px 36px;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
  font-family: 'Montserrat', sans-serif;
  display: inline-block;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-outline-dark {
  border: 1px solid var(--border);
  color: var(--text-dark);
  padding: 14px 36px;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
  font-family: 'Montserrat', sans-serif;
  display: inline-block;
}
.btn-outline-dark:hover { border-color: var(--gold); color: var(--gold); }

/* ─── FOOTER ─── */
footer {
  background: var(--black);
  padding: 4rem 8vw 2rem;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3vw;
  margin-bottom: 3rem;
}
.footer-brand .footer-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: 1rem;
  display: block;
}
.footer-brand-desc {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.8;
  max-width: 260px;
}
.footer-col-title {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-links a {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color 0.3s;
  letter-spacing: 0.05em;
}
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.2);
}
.footer-credit {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.15);
  letter-spacing: 0.1em;
}
.footer-credit a {
  color: rgba(201,169,110,0.4);
  text-decoration: none;
  transition: color 0.3s;
}
.footer-credit a:hover { color: var(--gold); }

.nav-logo-img-white { display: none; }

/* ─── SOCIAL LINKS ─── */
.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}
.social-link {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-dark);
  font-size: 1rem;
  transition: all 0.3s;
}
.social-link:hover {
  background: var(--black);
  color: var(--gold);
  border-color: var(--gold);
}
.social-link-light {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgba(255,255,255,0.4);
  font-size: 1rem;
  transition: all 0.3s;
}
.social-link-light:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ─── WA FLOATING ─── */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: var(--wa-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: waPulse 4s ease-in-out infinite;
}
.wa-float:hover { transform: scale(1.05); animation: none; box-shadow: 0 6px 30px rgba(37,211,102,0.6); }
@keyframes waPulse { 0%{box-shadow:0 4px 20px rgba(37,211,102,0.3)} 50%{box-shadow:0 6px 30px rgba(37,211,102,0.5)} 100%{box-shadow:0 4px 20px rgba(37,211,102,0.3)} }
.wa-float svg { width: 30px; height: 30px; fill: white; }
.wa-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--dark-warm);
  color: white;
  padding: 8px 14px;
  font-size: 0.7rem;
  white-space: nowrap;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-family: 'Montserrat', sans-serif;
}
.wa-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid var(--dark-warm);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

/* ─── BEFORE/AFTER COMPONENT ─── */
.before-after {
  position: relative;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--dark-warm);
}
.before-after .before,
.before-after .after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.before-after .after {
  clip-path: inset(0 50% 0 0);
}
.before-after .divider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background: var(--gold);
  transform: translateX(-50%);
  z-index: 2;
  transition: left 0.05s ease;
}
.before-after .divider::before {
  content: '↔';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-warm);
  font-size: 0.9rem;
  font-weight: bold;
}
.before-after .label {
  position: absolute;
  bottom: 12px;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 14px;
  background: rgba(31, 26, 20, 0.8);
  color: white;
  z-index: 3;
}
.before-after .label-before { left: 12px; }
.before-after .label-after { right: 12px; }

@media (max-width: 768px) {
  .wa-float {
    bottom: 16px;
    right: 16px;
    animation-duration: 6s;
    width: 48px;
    height: 48px;
  }
}
@media (hover: none) {
  .btn-primary:hover,
  .btn-wa:hover {
    transform: none;
    box-shadow: none;
  }
}
.wa-float:hover .wa-tooltip { opacity: 1; }

/* ─── ANIMATIONS BASE ─── */
.fade-in,
.fade-in-up,
.fade-in-left,
.fade-in-right,
.scale-in {
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in         { transform: translateY(24px); }
.fade-in-up      { transform: translateY(30px); }
.fade-in-left    { transform: translateX(-30px); }
.fade-in-right   { transform: translateX(30px); }
.scale-in        { transform: scale(0.95); }

.fade-in.is-visible,
.fade-in-up.is-visible,
.fade-in-left.is-visible,
.fade-in-right.is-visible,
.scale-in.is-visible {
  opacity: 1;
  transform: none;
}

/* ─── PAGE HEADER ─── */
.page-header {
  padding: calc(var(--nav-height) + 4rem) 8vw 4rem;
  background: var(--black);
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,169,110,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,169,110,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.page-header-content {
  position: relative;
  z-index: 1;
}
.page-header-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  color: var(--warm-white);
  line-height: 1.05;
  margin-bottom: 1rem;
}
.page-header-title em {
  font-style: italic;
  color: var(--gold);
  display: block;
}
.page-header-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  max-width: 500px;
  line-height: 1.8;
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.breadcrumb a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color 0.3s;
}
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span {
  color: rgba(255,255,255,0.15);
}
.breadcrumb .current {
  color: var(--gold);
}

/* ─── CONTACT FORM ─── */
.contact-form {
  background: white;
  padding: 2.5rem;
  border: 1px solid var(--border);
}
.form-group {
  margin-bottom: 1.2rem;
}
.form-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}
.form-input,
.form-textarea {
  width: 100%;
  background: var(--cream);
  border: 1px solid var(--border);
  padding: 12px 16px;
  font-size: 0.85rem;
  font-family: 'Montserrat', sans-serif;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.3s;
}
.form-input:focus,
.form-textarea:focus {
  border-color: var(--gold);
}
.form-textarea {
  min-height: 130px;
  resize: vertical;
}
.form-submit {
  background: var(--black);
  color: var(--gold);
  border: 1px solid var(--border);
  padding: 14px 40px;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  transition: all 0.3s;
  width: 100%;
}
.form-submit:hover {
  background: var(--gold);
  color: var(--black);
}

/* ─── GALLERY FILTER BUTTONS ─── */
.filter-btn {
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in, .fade-in-up, .fade-in-left, .fade-in-right, .scale-in,
  .stagger-item {
    opacity: 1 !important;
    transform: none !important;
  }
  .service-card:hover { transform: none !important; box-shadow: none !important; }
  .wa-float { animation: none !important; }
  .nav-links a::after { transform: scaleX(1) !important; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --nav-height: 64px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .page-header { padding: calc(var(--nav-height) + 3rem) 6vw 3rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .btn-primary, .btn-wa, .btn-outline, .btn-outline-dark { text-align: center; }
}
