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

:root {
  --white: #ffffff;
  --off-white: #fdf7fc;
  --cream: #f2e6f7;
  --blush: #dfc2e8;
  --taupe: #b090ba;
  --warm-gray: #7a637a;
  --dark: #2d1f35;
  --accent: #c47abf;
}

/* ── DARK MODE ── (the .darkmode class is set on <html> by main.js) */
.darkmode {
  color-scheme: dark;
  --white: #1c1424;
  --off-white: #150f1b;
  --cream: #2b1f35;
  --blush: #4a3557;
  --taupe: #b090ba;
  --warm-gray: #c4b0cc;
  --dark: #f3e9f6;
  --accent: #d08fca;
}

.darkmode .hero::before {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, #3a2346 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 100%, #2c1a38 0%, transparent 60%);
}

.darkmode footer { background: #0e0813; }
.darkmode footer .footer-name { color: #fff; }

#theme-switch {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 200;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--blush);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s;
}

#theme-switch:hover { transform: scale(1.08); }

#theme-switch svg { fill: var(--dark); }

/* light mode shows the moon (first svg), dark mode shows the sun (last svg) */
#theme-switch svg:last-child { display: none; }
.darkmode #theme-switch svg:first-child { display: none; }
.darkmode #theme-switch svg:last-child { display: block; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--off-white);
  color: var(--dark);
  min-height: 100vh;
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--white);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, #f5dff8 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 100%, #ead5f5 0%, transparent 60%);
}

.hero-ornament {
  position: absolute;
  font-size: clamp(8rem, 40vw, 18rem);
  color: var(--cream);
  font-family: 'Cormorant Garamond', serif;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 12vw, 7rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--dark);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.35s forwards;
}

.hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-subtitle {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--warm-gray);
  letter-spacing: 0.05em;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.5s forwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--dark);
  color: var(--white);
  padding: 1rem 2.2rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s, transform 0.2s;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.65s forwards;
}

.hero-cta:hover { background: var(--accent); transform: translateY(-2px); }

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--taupe);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 1s ease 1.2s forwards;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--taupe), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--white) 95%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cream);
}

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

.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--dark);
  text-decoration: none;
  padding: 1rem 0;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-tabs {
  display: flex;
  gap: 0;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.nav-tabs li a {
  display: block;
  padding: 1rem 0.9rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-gray);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.nav-tabs li a:hover,
.nav-tabs li a.active {
  color: var(--dark);
  border-bottom-color: var(--accent);
}

/* ── SECTIONS ── */
section {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 3rem;
}

.section-title em { font-style: italic; color: var(--accent); }

.divider {
  width: 40px;
  height: 1px;
  background: var(--blush);
  margin: 2rem 0;
}

/* ── SOBRE MÍ ── */
#sobre {
  background: var(--white);
  max-width: 100%;
  padding: 0;
}

#sobre .inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.bio-photo-placeholder {
  aspect-ratio: 3/4;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--taupe);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.bio-photo-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, var(--blush) 100%);
}

.bio-photo-icon {
  font-size: 3rem;
  opacity: 0.4;
}

.bio-text p {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--warm-gray);
  margin-bottom: 1rem;
}

.bio-text p strong {
  color: var(--dark);
  font-weight: 500;
}

.bio-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--taupe);
}

/* ── SERVICIOS ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5px;
  background: var(--cream);
  border: 1.5px solid var(--cream);
  margin-top: 1rem;
}

.service-card {
  background: var(--white);
  padding: 2rem 1.8rem;
  transition: background 0.2s;
}

.service-card:hover { background: var(--off-white); }

.service-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.service-desc {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--warm-gray);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.service-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--accent);
}

.service-price span {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  color: var(--taupe);
  font-weight: 300;
}

/* ── GALERÍA ── */
.gallery-note {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--taupe);
  margin-bottom: 2rem;
  font-style: italic;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.gallery-item {
  aspect-ratio: 1;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--taupe);
  font-size: 2rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
}

.gallery-item:first-child { grid-row: span 2; aspect-ratio: auto; }

/* Fotos: llenan el recuadro sin deformarse (recorte centrado en el ojo) */
.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item:nth-child(1) img { object-position: 55% 50%; }
.gallery-item:nth-child(3) img { object-position: 75% 50%; }

.gallery-item:hover { transform: scale(0.98); }

.gallery-item::after {
  content: 'Ver foto';
  position: absolute;
  inset: 0;
  background: rgba(45,31,53,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover::after,
.gallery-item:focus-visible::after { opacity: 1; }

.gallery-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── FOTO AMPLIADA ── */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  padding: 0;
  border: none;
  background: transparent;
}

/* flex solo cuando está abierta; si no, <dialog> no se ocultaría */
.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}

.lightbox::backdrop { background: rgba(21, 15, 27, 0.92); }

.lightbox img {
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(21, 15, 27, 0.6);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox-close:hover { background: var(--accent); }

/* con la foto abierta, la página de atrás no se desplaza */
body:has(.lightbox[open]) { overflow: hidden; }

/* ── CONTACTO ── */
#contacto {
  background: var(--white);
  max-width: 100%;
  padding: 0;
}

#contacto .inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info p {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--warm-gray);
  line-height: 1.9;
  margin-bottom: 2.5rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

a.contact-item:hover { opacity: 0.7; }

.maps-link {
  display: block;
  font-size: 0.72rem;
  color: var(--accent);
  margin-top: 0.2rem;
  letter-spacing: 0.03em;
}

.contact-item-icon {
  width: 42px;
  height: 42px;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.contact-item-text {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--warm-gray);
}

.contact-item-text strong {
  display: block;
  font-weight: 500;
  color: var(--dark);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  background: #25D366;
  color: white;
  padding: 1.1rem 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  margin-top: 2.5rem;
  transition: opacity 0.2s, transform 0.2s;
  width: 100%;
  text-align: center;
}

.whatsapp-btn:hover { opacity: 0.9; transform: translateY(-2px); }

.hours-box {
  background: var(--off-white);
  padding: 2rem;
}

.hours-title {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: 1.5rem;
}

.hours-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--cream);
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--warm-gray);
}

.hours-row:last-child { border-bottom: none; }

.hours-row strong { color: var(--dark); font-weight: 400; }

/* ── FOOTER ── */
footer {
  background: var(--dark);
  color: var(--taupe);
  text-align: center;
  padding: 3rem 1.5rem;
}

footer .footer-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

footer p {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 1.5rem;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50%       { opacity: 0.4; transform: scaleY(0.7); }
}

/* ── RESPONSIVE MÓVIL ── */
@media (max-width: 680px) {
  section { padding: 4rem 1.2rem; }

  #sobre .inner,
  #contacto .inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 4rem 1.2rem;
  }

  /* Foto primero en móvil: imagen arriba, texto abajo */
  #sobre .inner { grid-template-areas: "foto" "texto"; }
  .bio-photo-placeholder { grid-area: foto; max-height: 280px; }
  .bio-text { grid-area: texto; }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  .gallery-item:first-child { grid-row: auto; }
  /* 5 fotos en 2 columnas: la última ocupa todo el ancho para no dejar un hueco */
  .gallery-item:last-child { grid-column: 1 / -1; aspect-ratio: 2 / 1; }

  .nav-tabs li a { padding: 1rem 0.65rem; font-size: 0.63rem; }

  .bio-stats { gap: 1.5rem; }

  .services-grid { grid-template-columns: 1fr; }

  .section-title { margin-bottom: 2rem; }
}

@media (max-width: 400px) {
  .nav-brand { font-size: 0.95rem; }
  .nav-tabs li a { padding: 1rem 0.5rem; font-size: 0.6rem; letter-spacing: 0.06em; }
}
