/* ==========================================================================
   La Barbería de Arantxa — styles.css
   Sistema: editorial cálido (D-013)
   ========================================================================== */

/* Reset / base ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
img, svg, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; }

/* Tokens (D-013.1) --------------------------------------------------------- */
:root {
  --bg: #F7F2EA;
  --bg-alt: #EEE6D7;
  --ink: #1F1A14;
  --ink-soft: #4A4138;
  --accent: #B58A4A;
  --accent-bright: #E2C68A;
  --line: #D9CFBE;
  --whatsapp: #25D366;
  --whatsapp-hover: #1ebe5d;
  --whatsapp-glow: rgba(37, 211, 102, 0.35);
  --container: 1100px;
}

/* Tipografía (D-013.2) ----------------------------------------------------- */
body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
.serif, h1, h2, h3, h4, .logo { font-family: 'Playfair Display', Georgia, serif; }
h1 { font-weight: 700; letter-spacing: -0.5px; }
h2 { font-weight: 700; letter-spacing: -0.3px; }
h3 { font-weight: 700; }

a { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

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

/* Header (compartido) ------------------------------------------------------ */
header.site {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  padding: 18px 0;
}
header.site .nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
header.site .logo {
  font-size: 22px; color: var(--ink); text-decoration: none; letter-spacing: 0.5px;
  font-weight: 700;
}
header.site .menu { display: flex; gap: 32px; list-style: none; padding: 0; margin: 0; }
header.site .menu a {
  color: var(--ink-soft); text-decoration: none;
  font-size: 14px; letter-spacing: 1.2px; text-transform: uppercase;
}
header.site .menu a:hover, header.site .menu a.active { color: var(--accent); }

/* Botones (D-013.4) -------------------------------------------------------- */
.btn-wa-header {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--whatsapp); color: #fff;
  padding: 12px 22px; border-radius: 100px;
  text-decoration: none; font-weight: 700; font-size: 14px;
  letter-spacing: 0.4px;
  min-height: 44px;
  white-space: nowrap;
  transition: background .2s;
}
.btn-wa-header:hover { background: var(--whatsapp-hover); color: #fff; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--whatsapp); color: #fff;
  padding: 16px 30px; border-radius: 100px;
  text-decoration: none; font-weight: 700; font-size: 15px;
  letter-spacing: 0.4px;
  min-height: 48px;
  box-shadow: 0 8px 24px var(--whatsapp-glow);
  transition: background .2s, transform .2s;
}
.btn-primary:hover { background: var(--whatsapp-hover); color: #fff; transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex; align-items: center;
  background: transparent; color: #F2E9D8;
  border: 1.5px solid rgba(242, 233, 216, 0.7); padding: 16px 28px;
  border-radius: 100px; text-decoration: none; font-weight: 700;
  font-size: 15px; letter-spacing: 0.4px;
  min-height: 48px;
  transition: background .2s, border-color .2s;
}
.btn-ghost:hover { background: rgba(242, 233, 216, 0.1); border-color: #F2E9D8; color: #F2E9D8; }

.btn-primary.on-cream {
  background: var(--ink); color: var(--bg); box-shadow: none;
}
.btn-primary.on-cream:hover { background: var(--accent); color: #fff; }

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

/* Hero (D-013.3) ----------------------------------------------------------- */
.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  background: var(--ink) center/cover no-repeat;
  min-height: 78vh;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(20,17,14,0.88) 0%, rgba(20,17,14,0.62) 45%, rgba(20,17,14,0.25) 100%);
}
.hero-text {
  position: relative; z-index: 1;
  padding: 120px 0;
  width: 100%;
}
.hero-text-inner { max-width: 620px; }
.hero .eyebrow {
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent-bright); margin-bottom: 24px;
  font-family: 'Lato', sans-serif; font-weight: 700;
}
.hero h1 {
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 1.05;
  margin: 0 0 24px;
  color: #F2E9D8;
  text-shadow: 0 2px 24px rgba(0,0,0,0.35);
}
.hero p.lead {
  font-size: 19px; margin: 0 0 36px;
  color: rgba(242, 233, 216, 0.92);
  max-width: 520px;
  text-shadow: 0 1px 12px rgba(0,0,0,0.4);
}
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Secciones (D-013.5) ------------------------------------------------------ */
.section { padding: 100px 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: none; }
.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: 60px; }
.section-head.left { text-align: left; }
.section-head .eyebrow {
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
  font-weight: 700;
}
.section-head h2 { font-size: 42px; margin: 0; color: var(--ink); }
.section-head h1 { font-size: 42px; margin: 0; color: var(--ink); }
.section-head p.lead { color: var(--ink-soft); max-width: 600px; margin: 16px auto 0; }
.section-head.left p.lead { margin-left: 0; }

/* Servicios (D-013.5) ------------------------------------------------------ */
.services-list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.service {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--line);
  gap: 16px;
}
.service:nth-child(odd) { padding-right: 36px; border-right: 1px solid var(--line); }
.service:nth-child(even) { padding-left: 36px; }
.service .name { font-size: 19px; font-weight: 500; color: var(--ink); font-family: 'Playfair Display', serif; }
.service .price { font-size: 16px; font-weight: 700; color: var(--accent); white-space: nowrap; }

/* Especialidades --------------------------------------------------------- */
.especialidades-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}
.especialidad-card {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 30px 24px;
  text-align: center;
  border-radius: 4px;
  transition: transform .2s, border-color .2s;
}
.especialidad-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.especialidad-card .ico {
  width: 64px; height: 64px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.especialidad-card h3 { font-size: 20px; margin: 0 0 8px; color: var(--ink); }
.especialidad-card p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* Personal (D-013.5) ------------------------------------------------------ */
.personal {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}
.personal img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 4px;
}
.personal .eyebrow {
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px; font-weight: 700;
}
.personal h3 { font-size: 36px; margin: 0 0 20px; }
.personal p { color: var(--ink-soft); }

/* Reseñas (M-018) ---------------------------------------------------------- */
.reseñas-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.reseña {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 28px 24px;
  border-radius: 4px;
  display: flex; flex-direction: column; gap: 14px;
}
.reseña blockquote {
  margin: 0; padding: 0;
  font-family: 'Playfair Display', serif;
  font-size: 17px; line-height: 1.55;
  color: var(--ink);
  font-style: italic;
}
.reseña blockquote::before { content: "“"; font-size: 28px; color: var(--accent); margin-right: 4px; }
.reseña cite {
  font-style: normal; font-size: 14px; color: var(--ink-soft);
  display: block; border-top: 1px solid var(--line); padding-top: 12px;
}
.reseña cite strong { color: var(--ink); display: block; font-family: 'Lato', sans-serif; font-weight: 700; }

/* Cómo trabajamos (M-019) -------------------------------------------------- */
.como-trabajamos {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
}
.como-trabajamos h3 {
  font-size: 22px; margin: 0 0 12px;
  display: flex; align-items: center; gap: 12px;
}
.como-trabajamos .ico-circle {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  font-family: 'Lato', sans-serif;
}
.como-trabajamos .step p { margin: 0; color: var(--ink-soft); padding-left: 24px; }

/* Galería ----------------------------------------------------------------- */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.galeria-item {
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-alt);
}
.galeria-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.galeria-item:hover img { transform: scale(1.04); }

/* Contacto ---------------------------------------------------------------- */
.contacto-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
}
.contacto-info { padding-right: 20px; }
.contacto-info h3 { font-size: 22px; margin: 0 0 12px; }
.contacto-info p { margin: 0 0 16px; color: var(--ink-soft); }
.contacto-info a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
.contacto-info hr { border: none; border-top: 1px solid var(--line); margin: 28px 0; }
.map-frame {
  width: 100%; aspect-ratio: 4/3;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  text-align: center; padding: 24px;
  font-size: 14px;
}
.map-frame iframe {
  width: 100%; height: 100%; border: 0; border-radius: 4px;
  display: block;
}

/* Breadcrumbs (M-016) ----------------------------------------------------- */
.breadcrumbs {
  padding: 18px 0; border-bottom: 1px solid var(--line);
  background: var(--bg);
  font-size: 14px;
}
.breadcrumbs ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
  color: var(--ink-soft);
}
.breadcrumbs li:not(:last-child)::after { content: "›"; margin-left: 8px; color: var(--accent); }
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current="page"] { color: var(--ink); }

/* Páginas legales --------------------------------------------------------- */
.legal-content {
  max-width: 760px; margin: 0 auto;
}
.legal-content h2 { font-size: 24px; margin-top: 32px; }
.legal-content p, .legal-content li { color: var(--ink-soft); }
.legal-content .pendiente {
  background: #FFF8E6; border: 1px dashed #C9A66B;
  padding: 18px 22px; border-radius: 4px;
  color: #6b5520; font-size: 15px;
  margin: 20px 0;
}

/* 404 --------------------------------------------------------------------- */
.notfound {
  min-height: 70vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 80px 28px;
}
.notfound .num {
  font-family: 'Playfair Display', serif;
  font-size: clamp(96px, 18vw, 220px);
  line-height: 1; margin: 0; color: var(--accent);
}
.notfound h1 {
  font-size: clamp(28px, 4vw, 44px); margin: 0 0 16px;
}
.notfound p { color: var(--ink-soft); margin: 0 0 32px; max-width: 480px; }
.notfound .cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* Lightbox (D-018) ------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 17, 14, 0.96);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 80px 70px;
  flex-direction: column;
  animation: lightbox-in .2s ease-out;
}
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: min(90vw, 1100px);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
  color: #F2E9D8;
  font-size: 15px;
  margin-top: 20px;
  text-align: center;
  max-width: 80vw;
  font-family: 'Lato', sans-serif;
  letter-spacing: 0.2px;
}
.lightbox-counter {
  color: rgba(242, 233, 216, 0.55);
  font-size: 12px;
  margin-top: 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'Lato', sans-serif;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(247, 242, 234, 0.08);
  color: #F2E9D8;
  border: 1px solid rgba(242, 233, 216, 0.25);
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Lato', sans-serif;
  line-height: 1;
  transition: background .2s, border-color .2s, transform .2s;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(247, 242, 234, 0.18);
  border-color: #F2E9D8;
}
.lightbox-close {
  top: 20px; right: 20px;
  width: 44px; height: 44px;
  font-size: 28px;
}
.lightbox-prev,
.lightbox-next {
  top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px;
  font-size: 36px;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover, .lightbox-next:hover { transform: translateY(-50%) scale(1.05); }

@keyframes lightbox-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Galería: la etiqueta <a> se sigue viendo como un item (no como link
 * feo de subrayar) gracias a este reset. */
.galeria-item {
  text-decoration: none;
  color: inherit;
  cursor: zoom-in;
}

@media (max-width: 760px) {
  .lightbox { padding: 70px 14px; }
  .lightbox-prev, .lightbox-next {
    width: 44px; height: 44px;
    font-size: 28px;
    top: auto; bottom: 20px;
    transform: none;
  }
  .lightbox-prev:hover, .lightbox-next:hover { transform: scale(1.05); }
  .lightbox-prev { left: 20px; }
  .lightbox-next { right: 20px; }
}

/* Footer (D-013.5) -------------------------------------------------------- */
footer.site {
  background: var(--ink); color: #D9CFBE;
  padding: 70px 0 32px;
}
footer.site .footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 40px;
}
footer.site h4 { color: #fff; font-size: 18px; margin: 0 0 14px; }
footer.site a {
  color: #D9CFBE; text-decoration: none;
  display: block; margin-bottom: 6px; font-size: 14px;
}
footer.site a:hover { color: var(--accent-bright); }
footer.site p { margin: 0; font-size: 14px; line-height: 1.7; }
footer.site .copy {
  font-size: 13px; color: #8a8278;
  border-top: 1px solid #2A2520; padding-top: 24px; text-align: center;
}

/* WhatsApp flotante (D-013.6) -------------------------------------------- */
.whatsapp-float {
  position: fixed; right: 22px; bottom: 22px;
  width: 60px; height: 60px;
  background: var(--whatsapp);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-decoration: none;
  box-shadow: 0 8px 24px var(--whatsapp-glow);
  z-index: 100;
  transition: transform .2s, background .2s;
}
.whatsapp-float:hover { background: var(--whatsapp-hover); transform: scale(1.06); color: #fff; }
.whatsapp-float svg { width: 30px; height: 30px; fill: currentColor; }

@supports (padding: max(0px)) {
  .whatsapp-float { right: max(22px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); }
}

/* Banner de cookies (M-015) --------------------------------------------- */
.cookies-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--ink); color: #D9CFBE;
  padding: 18px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  z-index: 200; box-shadow: 0 -4px 24px rgba(0,0,0,0.2);
  font-size: 14px;
}
.cookies-banner p { margin: 0; max-width: 70%; }
.cookies-banner a { color: var(--accent-bright); }
.cookies-banner .actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookies-banner button {
  background: var(--whatsapp); color: #fff;
  border: none; padding: 10px 20px; border-radius: 100px;
  font-weight: 700; font-size: 14px; min-height: 40px;
}
.cookies-banner button.reject {
  background: transparent; border: 1px solid #D9CFBE; color: #D9CFBE;
}
.cookies-banner button.reject:hover { background: rgba(217, 207, 190, 0.1); }
.cookies-banner.hidden { display: none; }

/* Imágenes externas (mapa, etc.) ----------------------------------------- */
.consent-gated { display: none; }
body.cookies-ok .consent-gated { display: block; }
.consent-placeholder {
  background: var(--bg-alt); border: 1px dashed var(--line);
  border-radius: 4px; padding: 30px;
  text-align: center; color: var(--ink-soft); font-size: 14px;
}
body.cookies-ok .consent-placeholder { display: none; }

/* 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;
}
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }

/* Responsive (D-013.7) --------------------------------------------------- */
@media (max-width: 760px) {
  header.site { padding: 14px 0; }
  header.site .nav { gap: 12px; }
  header.site .container { padding: 0 20px; }
  header.site .logo { font-size: 18px; letter-spacing: 0; max-width: 50%; }
  header.site .menu { display: none; }
  header.site .menu.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 20px 28px;
    gap: 16px;
  }
  header.site .nav-toggle {
    display: flex; background: transparent; border: none;
    width: 44px; height: 44px; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  header.site .nav-toggle span {
    width: 22px; height: 2px; background: var(--ink); position: relative;
  }
  header.site .nav-toggle span::before,
  header.site .nav-toggle span::after {
    content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--ink);
  }
  header.site .nav-toggle span::before { top: -7px; }
  header.site .nav-toggle span::after { top: 7px; }

  /* Botón WhatsApp del header: en escritorio muestra texto;
     en móvil se reduce a icono. */
  header.site .btn-wa-header .wa-icon { display: none; }
  header.site .btn-wa-header .label { display: inline; }

  /* Botón WhatsApp del header: en móvil se reduce a icono (el texto
     sigue disponible para lectores de pantalla vía aria-label). */
  header.site .btn-wa-header {
    padding: 0;
    width: 44px; height: 44px;
    min-height: 44px;
    border-radius: 50%;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
  }
  header.site .btn-wa-header .label { display: none; }
  header.site .btn-wa-header .wa-icon { display: inline-block; }

  .hero { min-height: 70vh; }
  .hero::before {
    background: linear-gradient(180deg, rgba(20,17,14,0.78) 0%, rgba(20,17,14,0.55) 100%);
  }
  .hero-text { padding: 80px 0; }

  .section { padding: 60px 0; }
  .section-head h2 { font-size: 32px; }
  .section-head h1 { font-size: 32px; }

  .services-list { grid-template-columns: 1fr; }
  .service:nth-child(odd) { padding-right: 0; border-right: none; }
  .service:nth-child(even) { padding-left: 0; }

  .especialidades-grid { grid-template-columns: 1fr 1fr; gap: 16px; }

  .personal { grid-template-columns: 1fr; gap: 40px; }

  .reseñas-grid { grid-template-columns: 1fr; gap: 16px; }

  .como-trabajamos { grid-template-columns: 1fr; gap: 32px; }

  .galeria-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

  .contacto-grid { grid-template-columns: 1fr; gap: 40px; }
  .contacto-info { padding-right: 0; }

  footer.site .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  .cookies-banner {
    flex-direction: column; align-items: stretch;
    padding: 16px 20px;
  }
  .cookies-banner p { max-width: 100%; }
  .cookies-banner .actions { justify-content: stretch; }
  .cookies-banner button { flex: 1; }
}

@media (max-width: 420px) {
  .especialidades-grid { grid-template-columns: 1fr; }
  .galeria-grid { grid-template-columns: 1fr; }
}

/* Print ------------------------------------------------------------------ */
@media print {
  header.site, footer.site, .whatsapp-float, .cookies-banner { display: none; }
  body { background: #fff; color: #000; }
}