/* ============================================================
   BASE DE PÁGINAS DE SERVICIO · Tintorería La Puebla
   Usado por: servicios.html, trajes.html, vestidos.html,
   abrigos.html, alfombras.html, edredones.html
   (el index conserva su CSS embebido propio)
   ============================================================ */

/* ============================================================
   1. TOKENS
   ============================================================ */
:root {
  --color-primary: #FFD000;
  --color-bg:      #FFD000;
  --color-ink:     #0a0a0f;
  --color-ink-2:   #000000;
  --color-paper:   #ffffff;
  --color-dark:    #0c0e1a;
  --color-muted:   rgba(10, 10, 15, .68);
  --color-line:    rgba(10, 10, 15, .22);

  --nav-h: 72px;
  --container: 64rem;
  --pad-x: clamp(1.25rem, 5vw, 4rem);

  --font-display: "Barlow Condensed", sans-serif;
  --font-ui:      "Outfit", sans-serif;
  --font-label:   "Nunito", sans-serif;

  --ease: cubic-bezier(.22,.7,.2,1);
}

/* ============================================================
   2. RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-ui);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* ============================================================
   3. NAVBAR (idéntica a la home · se solidifica al hacer scroll)
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s var(--ease);
}
.nav.is-scrolled {
  background: rgba(255, 208, 0, .85);
  border-bottom-color: var(--color-line);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
}
.nav__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  line-height: 1;
  color: var(--color-ink);
  white-space: nowrap;
}
.wordmark__kicker {
  font-family: var(--font-label);
  font-weight: 300;
  font-size: .62rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  margin-bottom: 4px;
  opacity: .85;
}
.wordmark__name {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.nav__menu { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); }
.nav__menu a:not(.nav__cta) {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-muted);
  position: relative;
  padding: 4px 0;
  transition: color .25s var(--ease);
}
.nav__menu a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--color-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__menu a:not(.nav__cta):hover { color: var(--color-ink); }
.nav__menu a:not(.nav__cta):hover::after { transform: scaleX(1); }

.nav__cta {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-bg);
  background: var(--color-ink);
  padding: .6rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), backdrop-filter .25s var(--ease);
}
.nav__cta:hover {
  transform: translateY(-2px);
  color: var(--color-ink);
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 10px 26px rgba(10, 10, 15, .18), inset 0 1px 0 rgba(255, 255, 255, .4);
}

.nav__burger {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  z-index: 110;
}
.nav__burger span {
  width: 26px; height: 2px;
  background: var(--color-ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav__checkbox:checked ~ .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__checkbox:checked ~ .nav__burger span:nth-child(2) { opacity: 0; }
.nav__checkbox:checked ~ .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav__burger { display: flex; }
  .nav__menu {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem var(--pad-x) 3rem;
    background: rgba(255, 208, 0, .62);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
    border-bottom: 1px solid rgba(255, 255, 255, .35);
    box-shadow: 0 24px 48px rgba(10, 10, 15, .14);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform .35s var(--ease), opacity .35s var(--ease), visibility .35s var(--ease);
  }
  .nav__checkbox:checked ~ .nav__menu {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav__menu a:not(.nav__cta) { font-size: 1rem; color: var(--color-ink); }
}

/* ============================================================
   4. HERO DE SERVICIO · compacto, nunca a pantalla completa
   ============================================================ */
.hero-svc {
  position: relative;
  padding: calc(var(--nav-h) + clamp(1.5rem, 6vh, 3.5rem)) 0 clamp(1.6rem, 5vh, 3rem);
}
.hero-svc .container {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
@media (min-width: 880px) {
  .hero-svc .container { grid-template-columns: 1.25fr .9fr; }
  .hero-svc .icon-stage { justify-self: end; }
}
/* Móvil: icono primero y todo más compacto (nada a pantalla completa) */
@media (max-width: 879px) {
  .hero-svc { padding-top: calc(var(--nav-h) + 1.25rem); }
  .hero-svc .container { gap: 1.1rem; }
  .hero-svc .icon-stage { order: -1; width: clamp(128px, 36vw, 185px); }
  .svc-title { font-size: clamp(2.1rem, 10.5vw, 3.4rem); }
  .svc-lead { margin-bottom: .9rem; }
  .svc-points { margin-bottom: 1.1rem; }
}

/* Peana del icono · cristal circular */
.icon-stage {
  width: clamp(170px, 38vw, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: 0 20px 50px rgba(10, 10, 15, .12), inset 0 1px 0 rgba(255, 255, 255, .5);
  display: grid;
  place-items: center;
  justify-self: center;
}
.icon-stage .ic { width: 58%; height: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-label);
  font-weight: 300;
  font-size: clamp(.7rem, 2.3vw, .82rem);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(10, 10, 15, .82);
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-ink);
  box-shadow: 0 0 0 0 rgba(10, 10, 15, .5);
  animation: pulse 2.4s infinite;
  flex: none;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(10, 10, 15, .45); }
  70%  { box-shadow: 0 0 0 10px rgba(10, 10, 15, 0); }
  100% { box-shadow: 0 0 0 0 rgba(10, 10, 15, 0); }
}

.svc-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 8.5vw, 5.2rem);
  line-height: .92;
  text-transform: uppercase;
  margin: .4rem 0 clamp(.8rem, 2.4vh, 1.4rem);
}
.acc {
  display: inline-block;
  background: var(--color-ink);
  color: var(--color-bg);
  padding: 0 .18em;
  border-radius: 6px;
  margin: -.02em 0;
}

.svc-lead {
  max-width: 46ch;
  font-size: clamp(.98rem, 2.4vw, 1.12rem);
  line-height: 1.6;
  color: var(--color-muted);
  margin-bottom: clamp(1rem, 3vh, 1.6rem);
}

/* Chips de puntos clave */
.svc-points {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: clamp(1.2rem, 3.4vh, 2rem);
}
.svc-points li {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .42rem .85rem;
  border-radius: 999px;
  background: rgba(10, 10, 15, .07);
  border: 1px solid rgba(10, 10, 15, .1);
  font-size: .8rem;
  font-weight: 600;
}
.svc-points li::before { content: "✓"; font-weight: 700; }

.cta { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ============================================================
   5. BOTONES (mismo lenguaje que la home · hover glass)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .01em;
  padding: 1rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              background .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), backdrop-filter .3s var(--ease);
}
.btn svg { width: 17px; height: 17px; flex: none; }

.btn--primary { background: var(--color-ink); color: var(--color-bg); }
.btn--ghost   { background: transparent; color: var(--color-ink); border-color: var(--color-ink); }
.btn--call    { background: var(--color-primary); color: var(--color-ink); }
.btn--ghostw  { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .8); }

/* Hover glass (frosted) compartido */
.btn:hover {
  transform: translateY(-3px);
  color: var(--color-ink);
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  box-shadow: 0 14px 34px rgba(10, 10, 15, .22), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.btn:active { transform: translateY(-1px); }
/* Sobre fondo oscuro, el glass mantiene el texto claro */
.finale .btn:hover { color: #fff; }

/* ============================================================
   6. SECCIONES Y GALERÍA
   ============================================================ */
.section { padding: clamp(1.4rem, 4.5vh, 2.75rem) 0; }

/* Páginas de servicio (body.svc): tras el hero amarillo, el resto en blanco
   para una lectura más cómoda (las olas suben sobre el blanco hacia el final oscuro) */
.svc { background: var(--color-dark); }          /* el sobrante bajo el finale queda oscuro */
.svc .hero-svc { background: var(--color-bg); }  /* el hero conserva su amarillo */
.svc .section { background: #ffffff; padding-top: clamp(2rem, 6vh, 3.25rem); }
.svc .wavecut { background: #ffffff; margin-top: 0; }
.svc .gallery__item { background: #f4f4f2; }
.svc .gallery__item.is-pending {
  background:
    repeating-linear-gradient(135deg, rgba(10, 10, 15, .045) 0 12px, transparent 12px 24px),
    #f7f7f5;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  margin-bottom: clamp(1rem, 3vh, 1.6rem);
}
.section-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: clamp(1.3rem, 3.6vw, 1.8rem);
  letter-spacing: -.01em;
}
.section-note {
  font-family: var(--font-label);
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .68rem;
  color: rgba(10, 10, 15, .55);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(.6rem, 1.6vw, 1rem);
}
@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

.gallery__item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(10, 10, 15, .16);
  background: rgba(255, 255, 255, .22);
  cursor: zoom-in;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s var(--ease);
}
.gallery__item:hover img { transform: scale(1.05); }

/* Hueco pendiente de foto (la imagen aún no existe) */
.gallery__item.is-pending {
  cursor: default;
  border-style: dashed;
  background:
    repeating-linear-gradient(135deg, rgba(10, 10, 15, .05) 0 12px, transparent 12px 24px),
    rgba(255, 255, 255, .25);
}
.gallery__item.is-pending img { display: none; }
.gallery__ph { display: none; }
.is-pending .gallery__ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font-label);
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .64rem;
  color: rgba(10, 10, 15, .55);
}
.gallery__ph::before {
  content: "";
  width: 26px; height: 20px;
  border: 2px solid currentColor;
  border-radius: 5px;
  background:
    radial-gradient(circle at 50% 55%, currentColor 3px, transparent 3.5px);
  opacity: .7;
}

/* ============================================================
   7. LIGHTBOX · overlay fijo: al ampliar, NADA se desplaza
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(8, 9, 15, .8);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox__img {
  max-width: min(92vw, 1100px);
  max-height: 84vh;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .14);
  transform: scale(.94);
  transition: transform .35s var(--ease);
}
.lightbox.open .lightbox__img { transform: scale(1); }
.lightbox__close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .4);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.lightbox__close:hover { background: rgba(255, 208, 0, .92); color: var(--color-ink); transform: rotate(90deg); }

/* ============================================================
   8. WAVE DIVISOR (amarillo → sección oscura) · mismas 3 capas
   ============================================================ */
.wavecut {
  position: relative;
  height: clamp(50px, 11vw, 150px);   /* crestas altas en desktop, suaves en móvil (vw) */
  overflow: hidden;
  line-height: 0;
  margin-top: clamp(1rem, 4vh, 2rem);
}
.wavecut svg, .wavecut .w-glass {
  position: absolute;
  left: 0; bottom: 0;
  width: 200%;
  height: 100%;
  display: block;
  will-change: transform;
}
.wavecut .wave-defs { width: 0; height: 0; }
.wavecut .w-back  { animation: waveX 24s linear infinite; }
.wavecut .w-glass,
.wavecut .w-glass-edge { animation: waveR 17s linear infinite; }
.wavecut .w-front { animation: waveX 12s linear infinite; }
.w-glass {
  clip-path: url(#waveGlassClip);
  -webkit-clip-path: url(#waveGlassClip);
  background: linear-gradient(to top, rgba(255, 255, 255, .04), rgba(255, 255, 255, .12));
  -webkit-backdrop-filter: blur(11px) saturate(135%);
  backdrop-filter: blur(11px) saturate(135%);
}
@keyframes waveX { from { transform: translateX(0);    } to { transform: translateX(-50%); } }
@keyframes waveR { from { transform: translateX(-50%); } to { transform: translateX(0);    } }

/* ---- Variante SUAVE · transición hero (amarillo) → galería (blanco) ----
   4 olas desincronizadas en tonos crema + capa glass intermedia que
   difumina y suaviza el cruce. Sutil, como las del index. */
.wavecut--soft { height: clamp(46px, 10vw, 140px); margin-top: 0; }
.svc .wavecut--soft { background: var(--color-bg); }   /* arranca sobre el amarillo del hero */
.wavecut--soft .w-s1 { animation: waveX 26s linear infinite; }
.wavecut--soft .w-s2 { animation: waveR 19s linear infinite; }
.wavecut--soft .w-glass,
.wavecut--soft .w-glass-edge { animation: waveX 14s linear infinite; }
.wavecut--soft .w-front { animation: waveR 11s linear infinite; }

/* ============================================================
   9. FINALE · CTA de llamada sobre fondo oscuro
   ============================================================ */
.finale {
  background: var(--color-dark);
  color: #fff;
  text-align: center;
  padding: clamp(2.2rem, 7vh, 4rem) 0 clamp(1.8rem, 5vh, 2.75rem);
}
.finale h2 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: clamp(1.5rem, 4.6vw, 2.3rem);
  margin-bottom: .5rem;
}
.finale > .container > p:not(.footline) {
  color: rgba(255, 255, 255, .66);
  margin-bottom: clamp(1.2rem, 3.5vh, 1.8rem);
}
.finale .cta { justify-content: center; margin-bottom: clamp(1.6rem, 4vh, 2.4rem); }
.footline {
  font-family: var(--font-label);
  font-weight: 300;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .66rem;
  color: rgba(255, 255, 255, .45);
}

/* ============================================================
   10. ACCESIBILIDAD · reduce motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
