/* =============================================================
   MAIN.CSS — JM Fotografías
   Variables · Reset · Tipografía · Utilidades · Navbar · Footer
   ============================================================= */

/* ---- 1. VARIABLES ---- */
:root {
  --gold:           #c9a96e;
  --gold-light:     #e8c98a;
  --gold-dark:      #a8853e;
  --gold-subtle:    rgba(201, 169, 110, 0.14);
  --dark:           #050505;
  --onyx:           #0a0a0a;
  --charcoal:       #111111;
  --smoke:          #1a1a1a;
  --graphite:       #222222;
  --text-primary:   #ffffff;
  --text-secondary: #aaaaaa;
  --text-muted:     #666666;
  --text-subtle:    #444444;
  --wa-green:       #25D366;
  --font-serif:     'Cormorant Garamond', Georgia, serif;
  --font-sans:      'Raleway', Arial, sans-serif;
  --section-y:      5.5rem;
  --section-y-lg:   8rem;
  --container-max:  1300px;
  --container-pad:  clamp(1.25rem, 4vw, 2.5rem);
  --ease:           0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-slow:      0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --border-faint:   1px solid rgba(255, 255, 255, 0.055);
  --border-gold:    1px solid rgba(201, 169, 110, 0.32);
}

/* ---- 2. RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--onyx);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img  { display: block; max-width: 100%; height: auto; }
a    { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---- 3. TIPOGRAFÍA ---- */
.t-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.52em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1;
  display: block;
}

.t-xl {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 1.0;
}

.t-lg {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.08;
}

.t-md {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
}

.t-sm {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  font-weight: 400;
  line-height: 1.2;
}

.t-italic  { font-style: italic; color: var(--gold); font-weight: 300; }
.t-gold    { color: var(--gold); }

.t-body {
  font-family: var(--font-sans);
  font-size: clamp(0.875rem, 1.6vw, 1rem);
  font-weight: 300;
  line-height: 1.85;
  color: var(--text-secondary);
}

.t-small {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-muted);
}

/* ---- 4. LAYOUT ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section      { padding: var(--section-y) 0; }
.section--lg  { padding: var(--section-y-lg) 0; }
.section--dark     { background: var(--dark); }
.section--charcoal { background: var(--charcoal); }

.section__header            { text-align: center; margin-bottom: 4rem; }
.section__header .t-label   { margin-bottom: 1rem; }

.gold-line {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin-top: 1.25rem;
}
.gold-line--center { margin-left: auto; margin-right: auto; }
.gold-line--left   { margin-left: 0; }

/* ---- 5. BOTONES ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 13px 38px;
  transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary           { background: var(--gold); color: var(--dark); }
.btn--primary:hover     { background: var(--gold-light); }

.btn--outline           { border: 1px solid var(--gold); color: var(--gold); background: transparent; }
.btn--outline:hover     { background: var(--gold); color: var(--dark); }

.btn--ghost             { border: 1px solid rgba(255,255,255,0.22); color: var(--text-primary); }
.btn--ghost:hover       { border-color: var(--gold); color: var(--gold); }

.btn--sm  { font-size: 9px; padding: 10px 24px; letter-spacing: 0.24em; }
.btn--lg  { font-size: 11px; padding: 17px 52px; letter-spacing: 0.32em; }

/* ---- 6. NAVBAR ---- */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 300;
  padding: 1.6rem 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--ease), padding var(--ease), border-color var(--ease), backdrop-filter var(--ease);
}
.navbar.scrolled {
  background: rgba(5, 5, 5, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 0.9rem 0;
  border-bottom-color: var(--gold-subtle);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* LOGO — mejorado */
.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  text-decoration: none;
  flex-shrink: 0;
}
.logo__jm {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.05em;
  line-height: 1;
  display: block;
}
.logo__sep {
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, var(--gold) 60%, transparent);
  margin: 5px 0 6px;
  opacity: 0.75;
  transition: opacity var(--ease);
}
.logo__text {
  font-family: var(--font-sans);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.52em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.9;
  display: block;
}
.logo:hover .logo__sep { opacity: 1; }

/* NAV LINKS */
.navbar__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  transition: color var(--ease);
  position: relative;
  padding-bottom: 2px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--ease);
}
.nav-link:hover,
.nav-link.active { color: var(--gold); }
.nav-link.active::after,
.nav-link:hover::after { width: 100%; }

/* NAV ACTIONS */
.navbar__actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-left: 1.5rem;
  border-left: 1px solid rgba(255,255,255,0.1);
}

.nav-icon {
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--ease);
}
.nav-icon:hover { color: var(--gold); }
.nav-icon img, .nav-icon svg { width: 18px; height: 18px; }

/* HAMBURGER */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 300;
}
.hamburger__bar {
  display: block;
  width: 24px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.8);
  transition: transform var(--ease), opacity var(--ease);
}
.hamburger.open .hamburger__bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open .hamburger__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open .hamburger__bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* MOBILE MENU — full-screen overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #050505;
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s cubic-bezier(.4,0,.2,1);
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
@media (min-width: 901px) { .mobile-menu { display: none !important; } }

/* Overlay nav links */
.mob-link {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 9vw, 3.8rem);
  line-height: 1.25;
  padding: 8px 0;
  letter-spacing: .03em;
  color: rgba(255,255,255,0.55);
  text-align: center;
  display: block;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .45s ease, transform .45s ease, color .25s ease;
}
.mobile-menu.open .mob-link { opacity: 1; transform: none; }
.mobile-menu.open nav > .mob-link:nth-child(1) { transition-delay: .08s; }
.mobile-menu.open nav > .mob-link:nth-child(2) { transition-delay: .16s; }
.mobile-menu.open nav > .mob-link:nth-child(3) { transition-delay: .24s; }
.mobile-menu.open nav > .mob-link:nth-child(4) { transition-delay: .32s; }
.mobile-menu.open nav > .mob-link:nth-child(5) { transition-delay: .40s; }
.mob-link:hover, .mob-link.active { color: var(--gold); }

/* Bottom section */
.mob-bottom {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease .52s, transform .45s ease .52s;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.mobile-menu.open .mob-bottom { opacity: 1; transform: none; }

/* Responsive nav */
@media (max-width: 900px) {
  .navbar__links, .navbar__actions { display: none; }
  .hamburger { display: flex; }
}

/* ---- 7. FOOTER ---- */
.footer {
  background: var(--dark);
  border-top: var(--border-faint);
  padding-top: 4.5rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3.5rem;
  border-bottom: var(--border-faint);
}
@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}

.footer__brand .logo__jm   { font-size: 2.6rem; }
.footer__brand .logo__text { font-size: 9px; }

.footer__desc {
  margin-top: 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 290px;
}

.footer__social {
  display: flex;
  gap: 0.65rem;
  margin-top: 1.75rem;
}
.footer__social-link {
  width: 36px; height: 36px;
  border: 1px solid var(--graphite);
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--ease), color var(--ease);
  color: var(--text-subtle);
}
.footer__social-link:hover { border-color: var(--gold); color: var(--gold); }
.footer__social-link--wa:hover { border-color: var(--gold); color: var(--gold); }
.footer__social-link img,
.footer__social-link svg { width: 16px; height: 16px; }

.footer__title {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.footer__links { display: flex; flex-direction: column; gap: 0.7rem; }
.footer__link {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text-secondary);
  transition: color var(--ease), padding-left var(--ease);
}
.footer__link:hover { color: var(--gold); padding-left: 4px; }

.footer__contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text-secondary);
  transition: color var(--ease);
  margin-bottom: 0.85rem;
}
.footer__contact-item:hover { color: var(--gold); }
.footer__contact-icon { width: 15px; height: 15px; flex-shrink: 0; color: var(--gold); }

.footer__bottom {
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer__copy {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

/* Footer legal links */
.footer__legal {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 0.5rem;
}
.footer__legal-link {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  transition: color var(--ease);
}
.footer__legal-link:hover { color: var(--gold); }
.footer__legal-sep {
  color: rgba(255,255,255,0.3);
  font-size: 10px;
}

/* ---- 8. WHATSAPP FLOAT ---- */
.wa-float {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 999;
  width: 54px; height: 54px;
  background: var(--wa-green);
  border-radius: 50%;
  display: flex;
  align-items: center; justify-content: center;
  box-shadow: 0 4px 22px rgba(37, 211, 102, 0.35);
  transition: transform var(--ease), box-shadow var(--ease);
  color: #fff;
}
.wa-float:hover {
  transform: scale(1.1) translateY(-2px);
  background: var(--gold);
  box-shadow: 0 8px 30px rgba(201,169,110,0.45);
}
.wa-float:hover img { filter: brightness(0); }
.wa-float img,
.wa-float svg { width: 27px; height: 27px; }
/* Icono blanco para fondo verde */
.wa-float img { filter: brightness(0) invert(1); }

/* Icono Instagram en navbar: negro por defecto → blanco al hacer scroll → dorado en hover */
.nav-icon img { filter: brightness(0); transition: filter var(--ease); }
.navbar.scrolled .nav-icon img { filter: brightness(0) invert(1); }
.nav-icon:hover img { filter: invert(75%) sepia(17%) saturate(842%) hue-rotate(1deg) brightness(100%) contrast(92%); }

/* Icono Instagram en menú móvil (mob-bottom) */
.ig-nav-icon { filter: brightness(0) invert(0.55); transition: filter .3s; }
a:hover .ig-nav-icon { filter: invert(75%) sepia(17%) saturate(842%) hue-rotate(1deg) brightness(100%) contrast(92%); }

/* Iconos sociales del footer */
.footer__social-link img { filter: brightness(0) invert(0.27); transition: filter var(--ease); }
.footer__social-link:hover img { filter: invert(75%) sepia(17%) saturate(842%) hue-rotate(1deg) brightness(100%) contrast(92%); }
.footer__social-link--wa:hover img { filter: invert(75%) sepia(17%) saturate(842%) hue-rotate(1deg) brightness(100%) contrast(92%); }

/* Iconos de contacto del footer (color dorado fijo, solo para img) */
img.footer__contact-icon { filter: invert(75%) sepia(17%) saturate(842%) hue-rotate(1deg) brightness(100%) contrast(92%); }

/* Logo imagen: ajuste en navbar y footer */
.logo img { display: block; }
.navbar .logo img   { width: 90px;  height: 90px;  }
.footer__brand .logo img { width: 95px;  height: 95px;  }

/* ---- 9. PAGE HERO (páginas interiores) ---- */
.page-hero {
  position: relative;
  height: 52vh;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  padding-bottom: 4rem;
  overflow: hidden;
}
.page-hero__bg {
  position: absolute; inset: 0;
}
.page-hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.page-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(5,5,5,0.42) 0%, rgba(5,5,5,0.88) 100%);
}
.page-hero__content { position: relative; z-index: 2; }
.page-hero__content .t-label { margin-bottom: 0.9rem; }

/* ---- 10. UTILIDADES ---- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
.overflow-hidden { overflow: hidden; }

/* Responsive general */
@media (max-width: 640px) {
  :root {
    --section-y:    3.5rem;
    --section-y-lg: 5rem;
  }
  .btn--lg { padding: 14px 32px; }
}
