/* ============================================================
   ESTHER RUIZ PELUQUERÍA Y ESTÉTICA · Benicalap, València
   Demo de propuesta · Rivero Studio · versión «editorial»
   Su marca: el logotipo fino con el trazo lila. La web es crema y
   lila con titulares en serifa (Cormorant), vídeo vertical enmarcado
   como una portada de revista y la cita como una conversación.
   Nada de esto pide cita de verdad.
   ============================================================ */

@font-face { font-family: 'Inter'; src: url('fuentes/Inter.woff2') format('woff2'); font-weight: 300 800; font-display: swap; }

:root {
  --tinta: #2e2a3a; --humo: #6f6a7c; --linea: #2e2a3a1a;
  --crema: #faf7f2; --papel: #ffffff; --nube: #f1ebf7; --nube-honda: #e3d9ee;
  --lila: #8b6db3; --lila-claro: #c9b3e6; --lila-hondo: #6a4f93;
  --serifa: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --t-xs: .76rem; --t-s: .875rem; --t-m: 1rem;
  --t-l: clamp(1.05rem, .98rem + .35vw, 1.22rem);
  --t-2xl: clamp(2.2rem, 1.5rem + 3vw, 3.8rem);
  --t-3xl: clamp(3rem, 1.8rem + 5.5vw, 6.4rem);
  --s2: 1rem; --s3: 1.5rem; --s4: 2.5rem; --s5: 4rem; --s7: clamp(4.5rem, 9vw, 8.5rem);
  --ancho: 1180px; --radio: 8px; --radio-l: 22px;
  --sombra: 0 1px 2px #2e2a3a0f, 0 18px 40px -22px #2e2a3a40;
  --sombra-alta: 0 2px 8px #2e2a3a14, 0 44px 80px -36px #2e2a3a52;
  --curva: cubic-bezier(.22, 1, .36, 1); --suave: cubic-bezier(.4, 0, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--crema); color: var(--tinta); font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: var(--t-m); line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; padding-bottom: 3.4rem; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
::selection { background: var(--lila-claro); color: var(--tinta); }
:focus-visible { outline: 2.5px solid var(--lila-hondo); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-family: var(--serifa); font-weight: 600; line-height: 1.02; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: var(--t-2xl); max-width: 22ch; }
h3 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
.env { width: min(100% - 2.5rem, var(--ancho)); margin-inline: auto; }
.seccion { padding-block: var(--s7); }
section[id] { scroll-margin-top: 5rem; }
.sobre, .numero { display: block; font-size: var(--t-xs); font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--lila-hondo); margin-bottom: var(--s2); }
.numero { font-family: var(--serifa); font-size: 1.1rem; letter-spacing: .2em; }
.entradilla { font-size: var(--t-l); color: var(--humo); max-width: 56ch; }
.cabecera { margin-bottom: var(--s4); }
.enlace { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; border-bottom: 1.5px solid var(--lila); padding-bottom: .15rem; }
.enlace span { transition: transform .4s var(--curva); }
.enlace:hover span { transform: translateX(4px); }

/* ---------- carga ---------- */
.carga { position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; background: var(--crema); transition: opacity .7s var(--suave), visibility .7s; }
.carga.fuera { opacity: 0; visibility: hidden; }
.carga-caja { display: grid; justify-items: center; gap: 1.2rem; text-align: center; color: var(--tinta); }
.carga img { width: min(60vw, 300px); opacity: 0; animation: aparece 1s var(--suave) .3s forwards; }
@keyframes aparece { to { opacity: 1; } }
.raya { width: 0; height: 1.5px; background: var(--lila); animation: raya 1.4s var(--curva) .2s forwards; }
@keyframes raya { to { width: min(60vw, 300px); } }
.carga small { font-size: var(--t-xs); letter-spacing: .34em; text-transform: uppercase; color: var(--humo); opacity: 0; animation: aparece 1s var(--suave) .9s forwards; }

/* ---------- botones ---------- */
.btn { --bg: var(--tinta); --fg: #fff; display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .95rem 1.7rem; border: 0; border-radius: 100px; background: var(--bg); color: var(--fg); font-weight: 600; font-size: var(--t-s); letter-spacing: .04em; cursor: pointer; transition: transform .5s var(--curva), box-shadow .5s var(--curva), background .3s; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--sombra-alta); background: var(--lila-hondo); }
.btn-lila { --bg: var(--lila); }

/* ---------- cabecera ---------- */
.cab { position: fixed; inset: 0 0 auto; z-index: 90; padding-block: 1rem; background: transparent; transition: background .45s, box-shadow .45s, padding .45s var(--curva); }
.cab.fija { padding-block: .55rem; background: #faf7f2f0; backdrop-filter: blur(16px); box-shadow: 0 1px 0 var(--linea); }
.cab-fila { display: flex; align-items: center; gap: var(--s3); }
.marca img { width: clamp(120px, 12vw, 160px); }
.nav { display: flex; gap: .2rem; margin-inline: auto; }
.nav a { padding: .5rem .8rem; font-size: var(--t-xs); font-weight: 600; letter-spacing: .18em; text-transform: uppercase; opacity: .75; transition: opacity .3s; }
.nav a:hover { opacity: 1; }
.cab .btn { padding: .7rem 1.3rem; }

/* ---------- portada editorial ---------- */
.portada { padding: 8rem 0 4rem; background: var(--crema); overflow: clip; }
.portada-rej { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.portada h1 { font-size: var(--t-3xl); margin-bottom: var(--s3); }
.portada h1 em { font-style: italic; font-weight: 500; color: var(--lila-hondo); }
.linea { display: block; overflow: hidden; }
.linea > span { display: block; transform: translateY(105%); animation: subir 1s var(--curva) both; animation-delay: calc(var(--i) * 120ms + 200ms); }
@keyframes subir { to { transform: translateY(0); } }
.portada .entradilla { margin-bottom: var(--s3); }
.portada-botones { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; }
.cifras { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s4); margin: var(--s4) 0 0; padding-top: var(--s3); border-top: 1px solid var(--linea); }
.cifras div { display: grid; }
.cifras dt { font-family: var(--serifa); font-size: 2.4rem; font-weight: 600; line-height: 1; }
.cifras dd { margin: 0; font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--humo); }
.portada-video { position: relative; }
.marco { border-radius: 200px 200px var(--radio-l) var(--radio-l); overflow: hidden; aspect-ratio: 4/5; box-shadow: var(--sombra-alta); background: var(--nube); animation: entra-marco 1.2s var(--curva) .3s both; }
@keyframes entra-marco { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.marco video { width: 100%; height: 100%; object-fit: cover; }
.tarjeta-flotante { position: absolute; display: grid; padding: .8rem 1.1rem; border-radius: 14px; background: #fff; box-shadow: var(--sombra-alta); animation: flota 6s ease-in-out infinite; }
.tarjeta-flotante b { font-family: var(--serifa); font-size: 1.15rem; font-weight: 600; }
.tarjeta-flotante small { font-size: var(--t-xs); color: var(--humo); }
.tarjeta-flotante.t1 { left: -1.5rem; top: 14%; }
.tarjeta-flotante.t2 { right: -1.2rem; bottom: 12%; animation-delay: -3s; }
.tarjeta-flotante.t2::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3fbf7f; margin-right: .4rem; }
@keyframes flota { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ---------- especialidades ---------- */
.especialidades { background: var(--papel); }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding: var(--s4) 0; border-top: 1px solid var(--linea); }
.fila.invertida .fila-foto { order: 2; }
.fila-foto { border-radius: var(--radio-l); overflow: hidden; aspect-ratio: 4/5; max-width: 460px; }
.fila.invertida .fila-foto { margin-left: auto; }
.fila-foto img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform 1s var(--curva); }
.fila:hover .fila-foto img { transform: scale(1.04); }
.fila-texto .numero { color: var(--lila); margin-bottom: .6rem; }
.fila-texto h3 { margin-bottom: .8rem; }
.fila-texto p { color: var(--humo); font-size: var(--t-l); max-width: 40ch; }

/* ---------- cita conversacional ---------- */
.cita { background: var(--nube); }
.cita-rej { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.cita-intro h2 { margin-bottom: var(--s3); }
.notas { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: .5rem; }
.notas li { padding-left: 1.4rem; position: relative; font-size: var(--t-s); color: var(--humo); }
.notas li::before { content: '—'; position: absolute; left: 0; color: var(--lila); }
.charla { background: var(--papel); border-radius: var(--radio-l); box-shadow: var(--sombra-alta); overflow: hidden; position: sticky; top: 5.5rem; }
.charla-cab { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.3rem; background: var(--tinta); color: #fff; }
.charla-cab i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--lila); font-family: var(--serifa); font-style: normal; font-size: 1.3rem; font-weight: 700; }
.charla-cab b { display: block; font-size: var(--t-s); }
.charla-cab small { font-size: var(--t-xs); color: #ffffff9c; }
.charla-cuerpo { padding: 1.2rem; display: grid; gap: .6rem; align-content: start; min-height: 420px; max-height: 560px; overflow-y: auto; scrollbar-width: thin; }
.burbuja { max-width: 86%; padding: .75rem 1rem; border-radius: 18px; font-size: var(--t-s); line-height: 1.5; animation: llega .45s var(--curva) both; }
.burbuja.ella { background: var(--nube); border-bottom-left-radius: 6px; justify-self: start; }
.burbuja.yo { background: var(--tinta); color: #fff; border-bottom-right-radius: 6px; justify-self: end; }
.burbuja.ok { background: #e6f5ec; }
@keyframes llega { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; justify-self: end; max-width: 100%; animation: llega .45s var(--curva) both; }
.chip { display: grid; padding: .5rem .9rem; border-radius: 100px; border: 1.5px solid var(--lila); background: #fff; color: var(--tinta); font-size: var(--t-s); font-weight: 600; cursor: pointer; text-align: left; line-height: 1.2; transition: all .25s var(--suave); }
.chip small { font-size: .68rem; font-weight: 500; color: var(--humo); }
.chip:hover { background: var(--lila); color: #fff; }
.chip:hover small { color: #ffffffb0; }
.chip.lleno { background: var(--lila); color: #fff; }
.chip:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

/* ---------- equipo ---------- */
.equipo { background: var(--papel); }
.equipo-rej { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.persona { padding-top: var(--s3); border-top: 1px solid var(--linea); display: grid; gap: .4rem; align-content: start; }
.persona > span { font-family: var(--serifa); font-size: 4rem; line-height: 1; color: var(--lila-claro); font-weight: 600; }
.persona small { font-size: var(--t-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--humo); }
.persona q { font-family: var(--serifa); font-size: 1.25rem; font-style: italic; line-height: 1.35; margin-top: .6rem; quotes: '«' '»'; }

/* ---------- trabajos ---------- */
.galeria { columns: 3; column-gap: 1rem; }
.galeria figure { margin: 0 0 1rem; break-inside: avoid; }
.galeria img { width: 100%; border-radius: var(--radio); }
.galeria figcaption { font-family: var(--serifa); font-size: 1.15rem; font-style: italic; margin-top: .4rem; color: var(--humo); }

/* ---------- opiniones ---------- */
.opiniones { overflow: hidden; background: var(--tinta); color: #fff; }
.opiniones .numero { color: var(--lila-claro); }
.op-carrusel { -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.op-pista { display: flex; gap: var(--s3); width: max-content; animation: pasa var(--dur, 80s) linear infinite; }
.op-carrusel:hover .op-pista { animation-play-state: paused; }
@keyframes pasa { to { transform: translateX(calc(-100% / 3)); } }
.op-tarjeta { width: min(80vw, 420px); flex: none; padding: 1.6rem 1.8rem; border-left: 1px solid #ffffff33; display: grid; gap: .5rem; align-content: start; }
.comilla { font-family: var(--serifa); font-size: 3.5rem; line-height: .6; color: var(--lila-claro); }
.op-tarjeta p { font-family: var(--serifa); font-size: 1.35rem; line-height: 1.35; margin: 0; }
.op-tarjeta footer { display: grid; margin-top: .4rem; }
.op-tarjeta footer b { font-size: var(--t-s); }
.op-tarjeta footer small { font-size: var(--t-xs); color: #ffffff9c; }

/* ---------- dónde ---------- */
.donde-rej { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.donde-foto { border-radius: var(--radio-l); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--sombra-alta); }
.donde-foto img { width: 100%; height: 100%; object-fit: cover; }
.datos { display: grid; gap: .3rem; margin: var(--s3) 0; }
.datos div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--linea); font-size: var(--t-s); }
.datos dt { color: var(--humo); }
.datos dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------- pie ---------- */
.pie { background: var(--tinta); color: #ffffffab; padding-block: var(--s5) var(--s4); }
.pie-rej { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s4); }
.pie img { width: 160px; margin-bottom: var(--s2); }
.pie h4 { margin: 0 0 .6rem; font-family: var(--serifa); font-size: 1.3rem; font-weight: 600; color: var(--lila-claro); }
.pie p { font-size: var(--t-s); margin: 0 0 .5rem; }
.pie a:hover { color: #fff; }
.pie-fin { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid #ffffff26; display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: space-between; font-size: var(--t-xs); color: #ffffff70; }

.barra-demo { position: fixed; inset: auto 0 0; z-index: 95; background: var(--tinta); color: #fff; padding: .7rem 1.2rem calc(.7rem + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; justify-content: center; font-size: var(--t-xs); text-align: center; border-top: 1px solid #ffffff14; }
.barra-demo b { letter-spacing: .12em; text-transform: uppercase; color: var(--lila-claro); }

@supports (animation-timeline: view()) {
  .entra, .entra-escala { animation: sube linear both; animation-timeline: view(); animation-range: entry 4% entry 46%; }
  .entra-escala { animation-name: sube-escala; }
}
@keyframes sube { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes sube-escala { from { opacity: 0; transform: scale(.97) translateY(16px); } to { opacity: 1; transform: none; } }

@media (max-width: 980px) {
  .portada { padding-top: 6.5rem; }
  .portada-rej, .cita-rej, .donde-rej { grid-template-columns: 1fr; }
  .portada-video { max-width: 420px; }
  .tarjeta-flotante.t1 { left: 0; }
  .tarjeta-flotante.t2 { right: 0; }
  .charla { position: static; }
  .fila { grid-template-columns: 1fr; }
  .fila.invertida .fila-foto { order: 0; margin-left: 0; }
  .equipo-rej { grid-template-columns: 1fr; }
  .galeria { columns: 2; }
  .nav { display: none; }
  .cab .btn { margin-left: auto; }
}
@media (max-width: 620px) {
  .env { width: min(100% - 2rem, var(--ancho)); }
  .pie-rej { grid-template-columns: 1fr; }
  .cifras { gap: var(--s2) var(--s3); }
  .cifras dt { font-size: 1.8rem; }
  .op-tarjeta { width: min(84vw, 320px); }
  .charla-cuerpo { min-height: 360px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .carga { display: none; }
}
