/* ============================================================
   Carré Peluqueros — demo de renovación (heaptech)
   Concepto: "El carré perfecto" — precisión geométrica, elegancia
   francesa sobria. Paleta 60-30-10: marfil (60) / grafito (30) /
   latón (10). Tipografía: Cormorant Garamond + Jost.
   ============================================================ */

:root {
  /* Color: 60% marfil · 30% grafito · 10% latón */
  --ivory: #f4f0e9;
  --ivory-soft: #ece6dc;
  --ink: #23211f;
  --ink-muted: #57534d;
  --graphite: #1e2022;
  --graphite-soft: #2a2d30;
  --graphite-line: rgba(244, 240, 233, 0.16);
  --ivory-muted: #c9c4bb;
  --brass: #c0a062;        /* acento sobre grafito */
  --brass-deep: #755830;   /* acento sobre marfil (AA 5.8:1) */
  --overlay: rgba(24, 26, 28, 0.78);
  --overlay-soft: rgba(24, 26, 28, 0.55);

  /* Tipografía */
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Jost", "Helvetica Neue", Arial, sans-serif;

  /* Espaciado y forma */
  --space: clamp(4rem, 9vw, 8.5rem);
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --maxw: 72rem;
  --square: 0.6rem;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--brass-deep);
  outline-offset: 3px;
}

/* ---------- Utilidades de composición ---------- */

.wrap {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-deep);
}

.kicker::before {
  content: "";
  width: var(--square);
  height: var(--square);
  background: currentColor;
  flex: none;
}

.dark .kicker { color: var(--brass); }

.num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
  color: var(--brass-deep);
  display: block;
  margin-bottom: 0.75rem;
}
.dark .num { color: var(--brass); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.9rem, 8vw, 5.6rem); }
h2 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); }

.lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink-muted);
  max-width: 34rem;
}
.dark .lead { color: var(--ivory-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0.8rem 1.9rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-solid { background: var(--graphite); color: var(--ivory); }
.btn-solid:hover { background: #6f532d; color: #fff; }

.btn-light { background: var(--ivory); color: var(--ink); }
.btn-light:hover { background: var(--brass); color: #1e2022; }

.btn-ghost { background: transparent; color: var(--ivory); border-color: rgba(244, 240, 233, 0.55); }
.btn-ghost:hover { border-color: var(--brass); color: var(--brass); }

/* ---------- Revelado al hacer scroll (CSS; JS añade .visible) ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--d, 0s);
}
html.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 240, 233, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(35, 33, 31, 0.12);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand img { height: 2.6rem; width: auto; }

.site-nav ul {
  display: none;
  list-style: none;
  align-items: center;
  gap: 2.25rem;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.site-nav a[aria-current="page"] { color: var(--brass-deep); }
.site-nav a:hover { color: var(--brass-deep); }

.header-tel { display: none; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 3rem;
  height: 3rem;
  padding: 0.6rem;
  background: none;
  border: 1px solid rgba(35, 33, 31, 0.25);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 52rem) {
  .site-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--ivory);
    border-bottom: 1px solid rgba(35, 33, 31, 0.12);
    display: none;
    padding: 1.25rem var(--gutter) 1.75rem;
  }
  .site-nav.open { display: block; }
  .site-nav ul { display: block; }
  .site-nav li + li { border-top: 1px solid rgba(35, 33, 31, 0.1); }
  .site-nav a { display: block; padding: 0.9rem 0; }
}

@media (min-width: 52.01rem) {
  .site-nav ul { display: flex; }
  .nav-toggle { display: none; }
  .header-tel { display: inline-flex; }
}

/* ---------- Hero a sangre (index) ---------- */

.hero {
  position: relative;
  color: var(--ivory);
  background: var(--graphite);
  min-height: min(92svh, 56rem);
  display: grid;
  align-items: end;
}

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 26, 28, 0.62) 0%, rgba(24, 26, 28, 0.8) 70%, rgba(24, 26, 28, 0.92) 100%);
}

.hero-inner {
  position: relative;
  padding-block: clamp(6rem, 16vh, 11rem) clamp(4.5rem, 10vh, 7rem);
  display: grid;
  gap: 1.4rem;
}

.hero-inner .kicker { color: var(--brass); }

.hero h1 { max-width: 14ch; }

.hero .lead { color: rgba(244, 240, 233, 0.88); max-width: 30rem; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.5rem;
}

.hero-note {
  font-size: 0.9rem;
  color: var(--ivory-muted);
}

/* ---------- Sellos de confianza ---------- */

.trust { background: var(--ivory); padding-block: clamp(3rem, 7vw, 5.5rem); }

.trust ul {
  list-style: none;
  display: grid;
  gap: 1.5rem 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 40rem) { .trust ul { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .trust ul { grid-template-columns: repeat(4, 1fr); } }

.trust li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
}

.trust .sq {
  width: var(--square);
  height: var(--square);
  background: var(--brass-deep);
  margin-top: 0.55rem;
}

.trust strong {
  display: block;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.trust span { font-size: 0.92rem; color: var(--ink-muted); }

/* ---------- Bandas verticales alternas (protagonista) ---------- */

.banda { display: grid; grid-template-columns: 1fr; background: var(--ivory); }
.banda + .banda { border-top: 1px solid rgba(35, 33, 31, 0.1); }

.banda-media { position: relative; min-height: 18rem; }
.banda-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.banda-body { padding: clamp(3rem, 7vw, 6rem) var(--gutter); }
.banda-body .wrap { padding: 0; max-width: 34rem; margin-inline: 0; }
.banda-body > .inner { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.banda-body .inner > * { max-width: 34rem; }

.banda:nth-child(even) .banda-media { order: 1; }

.banda h3 { margin-block: 0.5rem 1rem; }

.banda p { color: var(--ink-muted); }

.banda .data {
  list-style: none;
  margin-top: 1.4rem;
  display: grid;
  gap: 0.55rem;
  font-size: 1rem;
}

.banda .data a { color: var(--brass-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.banda .data .na { color: var(--ink-muted); font-style: italic; }

@media (min-width: 56rem) {
  .banda { grid-template-columns: 1fr 1fr; }
  .banda-media { min-height: 32rem; }
  .banda .banda-media { order: 0; }
  .banda:nth-of-type(even) .banda-media { order: 1; }
  .banda:nth-of-type(odd) .banda-media { order: -1; }
}

/* Variante oscura de banda */
.banda.dark { background: var(--graphite); color: var(--ivory); border-top: none; }
.banda.dark + .banda { border-top: none; }
.banda.dark p { color: var(--ivory-muted); }
.banda.dark .data a { color: var(--brass); }

/* ---------- Cita / propuesta de valor ---------- */

.quote {
  background: var(--graphite);
  color: var(--ivory);
  padding-block: clamp(4rem, 9vw, 7.5rem);
  text-align: center;
}
.quote blockquote p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 1.2;
  max-width: 22ch;
  margin-inline: auto;
}
.quote blockquote::before,
.quote .sq-row { display: block; }
.quote .sq-row {
  width: var(--square);
  height: var(--square);
  background: var(--brass);
  margin: 1.75rem auto 0;
}
.quote footer {
  margin-top: 1.25rem;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory-muted);
}

/* ---------- Testimonios ---------- */

.reviews { background: var(--ivory-soft); padding-block: var(--space); }

.reviews-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.75rem;
}

@media (min-width: 48rem) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }

.review {
  background: var(--ivory);
  border: 1px solid rgba(35, 33, 31, 0.12);
  padding: 1.9rem;
  display: grid;
  gap: 1.1rem;
  align-content: start;
}
.review p { color: var(--ink-muted); font-size: 0.98rem; }
.review .who { font-weight: 500; letter-spacing: 0.06em; font-size: 0.85rem; text-transform: uppercase; }
.review .stars { color: var(--brass-deep); letter-spacing: 0.3em; font-size: 0.8rem; }

/* ---------- Galería scroll-snap ---------- */

.gallery { background: var(--ivory); padding-block: var(--space); }

.gallery-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78%;
  gap: 1.1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-top: 2.5rem;
  padding-bottom: 0.75rem;
  scrollbar-width: thin;
}

.gallery-track figure {
  scroll-snap-align: start;
  position: relative;
}
.gallery-track img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gallery-track figcaption {
  font-size: 0.88rem;
  color: var(--ink-muted);
  padding-top: 0.6rem;
}

@media (min-width: 56rem) { .gallery-track { grid-auto-columns: calc((100% - 2.2rem) / 3); } }

/* ---------- CTA final ---------- */

.cta-final {
  background: var(--graphite);
  color: var(--ivory);
  padding-block: clamp(4rem, 9vw, 7rem);
}
.cta-final .wrap { display: grid; gap: 1.5rem; justify-items: start; }
.cta-final h2 { max-width: 16ch; }
.cta-final .lead { color: var(--ivory-muted); }
.cta-final .hero-actions { margin-top: 0.5rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--graphite);
  color: var(--ivory-muted);
  border-top: 1px solid var(--graphite-line);
  padding-block: clamp(3rem, 7vw, 5rem) 2rem;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 56rem) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }

.site-footer .brand img { height: 2.4rem; }

.site-footer h2 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory);
  margin-bottom: 1rem;
}

.site-footer ul { list-style: none; display: grid; gap: 0.6rem; }
.site-footer a { color: var(--ivory-muted); text-underline-offset: 3px; }
.site-footer a:hover { color: var(--brass); }

.footer-legal {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--graphite-line);
  display: grid;
  gap: 0.4rem;
  font-size: 0.82rem;
}

/* ---------- Barra CTA sticky móvil ---------- */

.sticky-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--ivory);
  border-top: 1px solid rgba(35, 33, 31, 0.18);
  padding-bottom: env(safe-area-inset-bottom);
}

.sticky-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.85rem;
  text-decoration: none;
}
.sticky-bar a:first-child { color: var(--ivory); background: var(--graphite); }
.sticky-bar a:last-child { color: var(--ink); background: var(--ivory); }

@media (min-width: 56rem) { .sticky-bar { display: none; } }

@media (max-width: 55.99rem) {
  body { padding-bottom: 3.75rem; }
}

/* ---------- Páginas interiores ---------- */

.page-hero {
  background: var(--ivory);
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(2.5rem, 5vw, 4rem);
}
.page-hero h1 { margin-block: 0.9rem 1.1rem; max-width: 16ch; }

.page-hero-split { background: var(--ivory); }
.page-hero-split .split {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 60svh;
}
.page-hero-split .split-body {
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter);
  display: grid;
  gap: 1.3rem;
  align-content: center;
}
.page-hero-split .split-media { position: relative; min-height: 20rem; }
.page-hero-split .split-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 56rem) {
  .page-hero-split .split { grid-template-columns: 1.15fr 1fr; }
  .page-hero-split .split-media { min-height: 0; }
}

/* ---------- Contacto ---------- */

.contact-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding-block: var(--space);
  background: var(--ivory);
}

@media (min-width: 56rem) { .contact-grid { grid-template-columns: 1fr 1.2fr; } }

.contact-data { display: grid; gap: 1.6rem; align-content: start; }
.contact-data .item { display: grid; gap: 0.2rem; }
.contact-data .item .kicker { margin-bottom: 0.35rem; }
.contact-data .item a { font-size: 1.15rem; font-family: var(--font-display); color: var(--ink); }
.contact-data .item span { color: var(--ink-muted); }
.contact-data .na { color: var(--ink-muted); font-style: italic; }

.contact-form {
  background: var(--ivory-soft);
  border: 1px solid rgba(35, 33, 31, 0.12);
  padding: clamp(1.75rem, 4vw, 3rem);
  display: grid;
  gap: 1.35rem;
}

.field { display: grid; gap: 0.45rem; }
.field label {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.field input,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid rgba(35, 33, 31, 0.25);
  padding: 0.85rem 1rem;
  min-height: 3rem;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--brass-deep); outline-offset: 1px; }

.form-note { font-size: 0.88rem; color: var(--ink-muted); }

.form-ok {
  display: none;
  border: 1px solid var(--brass-deep);
  padding: 1.1rem 1.25rem;
  color: var(--ink);
  background: var(--ivory);
}
.form-ok.visible { display: block; }

/* ---------- Accesibilidad / movimiento ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .nav-toggle span { transition: none; }
}

/* ---------- Contenido largo below the fold ---------- */

.below-fold { content-visibility: auto; contain-intrinsic-size: auto 900px; }
