/* ==========================================================================
   MARÍA ÁLVAREZ — Peluquería y Estética
   Sistema de diseño

   Paleta:
     --ink        #1C1A17  negro cálido (texto principal, fondo hero)
     --cream      #FAF8F5  blanco cálido (fondo base)
     --stone      #EFEBE3  gris piedra claro (fondo secciones alternas)
     --taupe      #8B8272  gris topo (texto secundario)
     --gold       #B08D57  dorado apagado (acento, líneas, iconos)
     --gold-soft  #E4D7BE  dorado muy claro (fondos sutiles, hover)

   Tipografía:
     Display -> 'Cormorant Garamond' (titulares, elegante, con carácter)
     Cuerpo  -> 'Jost' (sans geométrica ligera, muy legible)
     Utility -> 'Jost' versalitas + tracking (etiquetas/eyebrows)

   Firma visual:
     Un trazo dorado tipo "mechón/balayage" (SVG) que actúa como
     separador entre secciones y elemento decorativo recurrente.
   ========================================================================== */

:root {
  --ink: #1c1a17;
  --ink-soft: #2c2823;
  --cream: #faf8f5;
  --stone: #efebe3;
  --stone-deep: #e3ddd0;
  --taupe: #8b8272;
  --gold: #b08d57;
  --gold-deep: #93713f;
  --gold-soft: #e4d7be;
  --white: #ffffff;

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  --container: 1240px;
  --gutter: clamp(1.5rem, 5vw, 4rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* -------------------- Reset -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body, h1, h2, h3, h4, p, figure { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Visible focus for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* -------------------- Tipografía -------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

.section-title {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin-top: 0.6rem;
}

.section-lede {
  max-width: 60ch;
  color: var(--taupe);
  font-size: 1.05rem;
  margin-top: 1.1rem;
}

.section-head {
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.section-head.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.section-head.center .section-lede { margin-left: auto; margin-right: auto; }
.section-head.center .eyebrow::before { display: none; }
.section-head.center .eyebrow::after {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

/* -------------------- Firma: trazo dorado (balayage stroke) -------------------- */
.stroke-divider {
  display: block;
  width: 140px;
  height: 34px;
  margin: 1.4rem 0;
}
.stroke-divider path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  transition: stroke-dashoffset 1.1s var(--ease);
}
.stroke-divider.center { margin-left: auto; margin-right: auto; }
.in-view .stroke-divider path { stroke-dashoffset: 0; }

/* -------------------- Botones -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 2.1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gold);
  color: var(--cream);
}
.btn-primary:hover { background: var(--gold-deep); }

.btn-ghost {
  background: transparent;
  border-color: rgba(250, 248, 245, 0.55);
  color: var(--cream);
}
.btn-ghost:hover { background: rgba(250, 248, 245, 0.12); border-color: var(--cream); }

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--cream); }

.btn-dark {
  background: var(--ink);
  color: var(--cream);
}
.btn-dark:hover { background: var(--ink-soft); }

/* -------------------- Header -------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 1.4rem 0;
  transition: background-color 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header.scrolled {
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(10px);
  padding: 0.85rem 0;
  box-shadow: 0 8px 30px rgba(28, 26, 23, 0.06);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--cream);
  transition: color 0.4s var(--ease);
}
.brand span { color: var(--gold); }
.site-header.scrolled .brand { color: var(--ink); }

.nav-links {
  display: none;
  align-items: center;
  gap: 2.4rem;
}
.nav-links a {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.4s var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.35s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.site-header.scrolled .nav-links a { color: var(--ink); }

.nav-actions { display: flex; align-items: center; gap: 1rem; }
.nav-phone {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--cream);
  transition: color 0.4s var(--ease);
}
.site-header.scrolled .nav-phone { color: var(--ink); }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.4rem;
  z-index: 110;
}
.nav-toggle span {
  width: 24px; height: 1.5px;
  background: var(--cream);
  transition: background-color 0.4s var(--ease), transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.site-header.scrolled .nav-toggle span { background: var(--ink); }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav-open .nav-toggle span { background: var(--ink) !important; }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 105;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease);
}
.nav-open .mobile-menu { transform: translateY(0); }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--ink);
}
.mobile-menu .nav-phone-mobile { font-family: var(--font-body); font-size: 1rem; color: var(--gold-deep); margin-top: 1rem; }

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-phone { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* -------------------- Hero -------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--cream);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media .img-placeholder {
  height: 100%;
  border-radius: 0;
}
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28,26,23,0.35) 0%, rgba(28,26,23,0.15) 40%, rgba(28,26,23,0.78) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 var(--gutter) clamp(3.5rem, 9vh, 6.5rem);
  width: 100%;
}
.hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-soft);
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.9s var(--ease) 0.2s forwards;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.02;
  max-width: 16ch;
  margin-top: 0.8rem;
  color: var(--white);
  opacity: 0;
  transform: translateY(18px);
  animation: rise 1s var(--ease) 0.4s forwards;
}
.hero-sub {
  margin-top: 1.3rem;
  max-width: 44ch;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: rgba(250, 248, 245, 0.85);
  opacity: 0;
  transform: translateY(18px);
  animation: rise 1s var(--ease) 0.6s forwards;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.3rem;
  opacity: 0;
  transform: translateY(18px);
  animation: rise 1s var(--ease) 0.8s forwards;
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: 2.4rem;
  z-index: 1;
  display: none;
  align-items: center;
  gap: 0.7rem;
  color: rgba(250,248,245,0.8);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.scroll-cue .line { width: 1px; height: 42px; background: rgba(250,248,245,0.5); position: relative; overflow: hidden; }
.scroll-cue .line::after {
  content: '';
  position: absolute; left: 0; top: -100%;
  width: 100%; height: 100%;
  background: var(--gold);
  animation: scrollline 2.2s ease-in-out infinite;
}
@keyframes scrollline { 50% { top: 100%; } 100% { top: 100%; } }
@media (min-width: 700px) { .scroll-cue { display: flex; } }

/* -------------------- Placeholder de imagen -------------------- */
.img-placeholder {
  position: relative;
  width: 100%;
  min-height: 220px;
  background: linear-gradient(135deg, var(--stone) 0%, var(--gold-soft) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.img-placeholder::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(28,26,23,0.045) 0 2px, transparent 2px 14px);
}
.img-placeholder .ph-label {
  position: relative;
  text-align: center;
  padding: 1.2rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: rgba(250,248,245,0.72);
  border: 1px solid rgba(176,141,87,0.4);
  border-radius: 6px;
  max-width: 80%;
}
.img-placeholder .ph-icon { display: block; margin: 0 auto 0.5rem; width: 26px; height: 26px; color: var(--gold-deep); }

/* -------------------- Sobre nosotros -------------------- */
.about {
  padding: clamp(5rem, 12vw, 9rem) 0;
  background: var(--cream);
}
.about-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.about-media { position: relative; }
.about-media .img-placeholder { aspect-ratio: 4 / 5; border-radius: 4px; }
.about-media .frame-line {
  position: absolute;
  inset: 18px;
  border: 1px solid var(--gold);
  pointer-events: none;
  z-index: 1;
}
.about-text p { color: var(--ink-soft); margin-top: 1.1rem; max-width: 52ch; }
.about-stats {
  display: flex;
  gap: clamp(1.6rem, 4vw, 3rem);
  margin-top: 2.4rem;
  flex-wrap: wrap;
}
.about-stats .stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold-deep);
}
.about-stats .stat span {
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  color: var(--taupe);
  text-transform: uppercase;
}
@media (min-width: 860px) {
  .about-grid { grid-template-columns: 0.9fr 1.1fr; }
  .about-grid.reverse .about-media { order: 2; }
}

/* -------------------- Servicios -------------------- */
.services { padding: clamp(5rem, 12vw, 9rem) 0; background: var(--stone); }
.services-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.service-card {
  background: var(--cream);
  border-radius: 6px;
  padding: 2.4rem 2rem;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  border: 1px solid rgba(176,141,87,0.16);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(28,26,23,0.07);
}
.service-icon {
  width: 40px; height: 40px;
  color: var(--gold-deep);
  margin-bottom: 1.4rem;
}
.service-card h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.service-card p { color: var(--taupe); font-size: 0.94rem; }

/* -------------------- Galería -------------------- */
.gallery { padding: clamp(5rem, 12vw, 9rem) 0; background: var(--cream); }
.masonry {
  columns: 1;
  column-gap: 1.1rem;
}
.masonry .item {
  break-inside: avoid;
  margin-bottom: 1.1rem;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
}
.masonry .item .img-placeholder { transition: transform 0.6s var(--ease); }
.masonry .item:hover .img-placeholder { transform: scale(1.05); }
.masonry .item .gallery-tag {
  position: absolute;
  left: 0.9rem; bottom: 0.9rem;
  z-index: 1;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(28,26,23,0.55);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.masonry .item:hover .gallery-tag { opacity: 1; transform: translateY(0); }
.masonry .item::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(28,26,23,0.35) 100%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.masonry .item:hover::after { opacity: 1; }

@media (min-width: 620px) { .masonry { columns: 2; } }
@media (min-width: 980px) { .masonry { columns: 3; } }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(28,26,23,0.94);
  display: flex; align-items: center; justify-content: center;
  padding: 4vh 4vw;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease);
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-inner { position: relative; width: min(720px, 100%); }
.lightbox-inner .img-placeholder { aspect-ratio: 4/5; border-radius: 6px; }
.lightbox-caption { color: var(--gold-soft); text-align: center; margin-top: 1rem; font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; }
.lightbox-close {
  position: absolute; top: -3rem; right: 0;
  background: none; border: none; color: var(--cream);
  font-size: 1.6rem; line-height: 1;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--cream);
  font-size: 2rem; padding: 0.5rem 1rem;
}
.lightbox-prev { left: -3.2rem; }
.lightbox-next { right: -3.2rem; }
@media (max-width: 780px) {
  .lightbox-prev { left: 0.2rem; }
  .lightbox-next { right: 0.2rem; }
}

/* -------------------- Opiniones -------------------- */
.reviews { padding: clamp(5rem, 12vw, 9rem) 0; background: var(--ink); color: var(--cream); }
.reviews .section-lede { color: rgba(250,248,245,0.65); }
.reviews .eyebrow { color: var(--gold-soft); }
.reviews-note {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--gold-soft);
  border: 1px solid rgba(228,215,190,0.35);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
}
.reviews-grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 3rem;
}
.review-card {
  background: rgba(250,248,245,0.04);
  border: 1px solid rgba(228,215,190,0.14);
  border-radius: 6px;
  padding: 2rem;
}
.review-stars { color: var(--gold); letter-spacing: 0.15em; font-size: 0.95rem; }
.review-card p { margin-top: 1rem; color: rgba(250,248,245,0.82); font-size: 0.96rem; }
.review-author { display: flex; align-items: center; gap: 0.8rem; margin-top: 1.4rem; }
.review-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--gold-soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); color: var(--ink); font-size: 1rem;
}
.review-author span { font-size: 0.82rem; color: var(--gold-soft); letter-spacing: 0.03em; }

/* -------------------- CTA -------------------- */
.cta {
  position: relative;
  padding: clamp(5rem, 14vw, 8rem) 0;
  text-align: center;
  background: var(--stone);
  overflow: hidden;
}
.cta h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.cta p { margin-top: 1rem; color: var(--taupe); }
.cta .btn { margin-top: 2.2rem; }
.cta-stroke {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 720px; max-width: 140%;
  opacity: 0.35;
  z-index: 0;
}
.cta .container { position: relative; z-index: 1; }

/* -------------------- Contacto -------------------- */
.contact { padding: clamp(5rem, 12vw, 9rem) 0; background: var(--cream); }
.contact-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
}
.contact-info dl {
  margin-top: 2rem;
  display: grid;
  gap: 1.6rem;
}
.contact-info .row { display: flex; gap: 1rem; align-items: flex-start; }
.contact-info .row svg { width: 22px; height: 22px; color: var(--gold-deep); flex-shrink: 0; margin-top: 2px; }
.contact-info dt { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--taupe); }
.contact-info dd { margin: 0.2rem 0 0; font-size: 1.05rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }
.map-frame {
  width: 100%;
  aspect-ratio: 4/3;
  border: 0;
  border-radius: 6px;
  filter: grayscale(0.3) contrast(1.05);
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1.15fr; }
  .map-frame { aspect-ratio: 1/1; }
}

/* -------------------- Floating actions -------------------- */
.floating-actions {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.floating-actions a {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 25px rgba(28,26,23,0.22);
  transition: transform 0.3s var(--ease);
}
.floating-actions a:hover { transform: scale(1.08); }
.floating-actions a svg { width: 24px; height: 24px; }
.fab-call { background: var(--ink); color: var(--cream); }
.fab-whatsapp { background: #3fae5a; color: #fff; }

/* -------------------- Footer -------------------- */
.site-footer { background: var(--ink); color: rgba(250,248,245,0.72); padding: 3.4rem 0 2rem; }
.footer-top {
  display: grid;
  gap: 2.4rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid rgba(228,215,190,0.14);
}
.footer-brand .brand { color: var(--cream); }
.footer-brand p { margin-top: 0.8rem; max-width: 34ch; font-size: 0.9rem; color: rgba(250,248,245,0.55); }
.footer-col h4 { font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: 1rem; }
.footer-col ul { display: grid; gap: 0.6rem; }
.footer-col a { font-size: 0.9rem; transition: color 0.3s var(--ease); }
.footer-col a:hover { color: var(--gold-soft); }
.footer-social { display: flex; gap: 0.8rem; margin-top: 1rem; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(228,215,190,0.3);
  display: flex; align-items: center; justify-content: center;
}
.footer-social a svg { width: 17px; height: 17px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between;
  padding-top: 1.6rem;
  font-size: 0.8rem;
  color: rgba(250,248,245,0.45);
}
.footer-bottom ul { display: flex; gap: 1.4rem; flex-wrap: wrap; }

@media (min-width: 780px) {
  .footer-top { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
}

/* -------------------- Reveal on scroll -------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* -------------------- 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: 0;
}
