/* ==========================================================================
   YN Estética · portada hecha con bloques del editor
   Cada sección es un "Grupo" con una clase (section, home-hero, treat…).
   Si se cambia el texto o la foto en el editor, el diseño se mantiene.
   ========================================================================== */

/* ---------- Ajustes a los estilos por defecto de los bloques ---------- */
.yn-home p, .yn-home h1, .yn-home h2, .yn-home h3, .yn-home ul, .yn-home blockquote { margin: 0; }
.yn-home .wp-block-image { margin: 0; }
.yn-home .wp-block-image img { vertical-align: top; }
.yn-home .wp-block-buttons { margin: 0; }
.yn-home .wp-block-group { box-sizing: border-box; }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(3.5rem, 2rem + 6vw, 8rem); position: relative; scroll-margin-top: 3rem; }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
.section--sand { background: var(--sand); }
.section--white { background: var(--white); }
.section--ink { background: var(--ink); color: var(--ivory); }
.section-head { display: grid; justify-items: center; text-align: center; gap: 1rem; margin: 0 auto clamp(2rem, 4vw, 3.5rem); max-width: 52rem; }
.section-head .display { font-size: calc(var(--step-4) * var(--display-scale) * 0.82); }
.section-head--row { max-width: none; }
.section-head--row > .wp-block-group:first-child { display: grid; justify-items: center; gap: 1rem; max-width: 46rem; min-width: 0; }
.section--ink .eyebrow { color: rgb(250 247 242 / 0.75); }
.section--ink .display em { color: var(--beige); }

/* ---------- Portada ---------- */
.home-hero {
  position: relative; isolation: isolate; overflow: hidden; background: var(--ivory);
  padding-top: calc(var(--header-h) + clamp(1.5rem, 4vw, 3rem)); padding-bottom: clamp(3rem, 6vw, 5rem);
}
/* Arco de fondo en arena */
.home-hero::before {
  content: ""; position: absolute; z-index: -1; right: -6vw; top: 4vh; width: min(56vw, 46rem); aspect-ratio: 3 / 4;
  border-radius: 50% 50% 0 0 / 37.5% 37.5% 0 0;
  background: linear-gradient(180deg, var(--sand), color-mix(in srgb, var(--sand) 25%, var(--ivory)));
}
.home-hero__grid { display: grid; gap: 1.6rem; position: relative; z-index: 2; }
.home-hero__text { display: grid; gap: 0.9rem; }
.home-hero h1 { font-size: calc(clamp(3.8rem, 1rem + 13vw, 11rem) * var(--display-scale)); line-height: 0.9; }
/* Una palabra por línea y la segunda un poco metida, como en el prototipo */
.home-hero h1 .w { display: block; width: max-content; }
.home-hero h1 .w + .w { padding-left: 0.5em; }
.home-hero__kicker { font-size: 0.98rem; font-weight: 600; color: var(--ink-soft); }
.home-hero__place { margin-top: -0.4rem !important; font-size: 0.92rem; color: var(--ink-soft); }
.home-hero__cta { gap: 0.55rem; margin-top: 0.4rem !important; }
@media (max-width: 47.99em) {
  .home-hero__cta > .wp-block-button { width: 100%; }
  .home-hero__cta .wp-block-button__link { width: 100%; }
}
.home-hero__pro { justify-self: start; }
.home-hero__pro a { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; font-weight: 600; font-size: 0.92rem; padding: 0.7rem 1.1rem; border-radius: var(--radius-pill); background: var(--sand); color: var(--ink); transition: background-color 0.2s ease, scale 160ms var(--ease-out); }
.home-hero__pro a:active { scale: 0.97; }
.home-hero__pro strong { color: var(--taupe-deep); }
.home-hero__media { position: relative; margin: 1rem 0 0; }
.home-hero .arch { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--sand);
  border-radius: 50% 50% 0 0 / 40% 40% 0 0; clip-path: inset(0 round 50% 50% 0 0 / 40% 40% 0 0); }
.home-hero .arch img { width: 100%; height: 115%; max-width: none; object-fit: cover; object-position: 50% 55%; will-change: transform; }
.home-hero .orb { position: absolute; left: -4%; bottom: -6%; width: 36%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  border: 6px solid var(--ivory); background: var(--sand); box-shadow: 0 30px 60px -30px rgb(36 30 27 / 0.45); }
.home-hero .orb img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 62%; }
@media (max-width: 55.99em) {
  .home-hero__media { width: min(80%, 22rem); margin: 0.5rem auto 0; }
  .home-hero .orb { width: 34%; left: -10%; }
}
@media (min-width: 56em) {
  .home-hero { min-height: 100svh; display: grid; align-items: center; }
  .home-hero__grid { grid-template-columns: 1.25fr 0.75fr; column-gap: var(--gutter); align-items: center; }
  .home-hero__text { gap: 1.8rem; }
  .home-hero__media { margin: 0; }
  .home-hero .orb { left: -22%; bottom: 10%; width: 38%; }
}

/* ---------- Franja de datos clave ---------- */
.facts { background: var(--ivory); border-block: 1px solid var(--line); }
.facts__list { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; padding-block: 1.3rem; text-align: center; font-size: 0.78rem; color: var(--ink-soft); line-height: 1.4; }
.facts__list li { display: grid; gap: 0.15rem; }
.facts__list strong { display: block; font-weight: 400; font-size: clamp(1.05rem, 0.8rem + 1.2vw, 1.7rem); letter-spacing: -0.02em; color: var(--taupe-deep); line-height: 1.2; }

/* ---------- Tratamientos: pestañas en el móvil, tarjetas abiertas en escritorio ---------- */
.treat-grid { display: grid; gap: 0.7rem; align-items: start; }
@media (min-width: 48em) { .treat-grid { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; align-items: stretch; } }
@media (min-width: 75em) { .treat-grid { grid-template-columns: repeat(4, 1fr); } }
.treat { background: var(--white); box-shadow: 0 0 0 1px var(--line); overflow: hidden; scroll-margin-top: 5rem; display: grid; align-content: start; transition: box-shadow 0.3s var(--ease-out); }
.treat .treat__img { overflow: hidden; background: var(--sand); aspect-ratio: 4 / 3; }
.treat .treat__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.treat__title { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: calc(var(--step-1) * var(--display-scale)); line-height: 1.12; }
.treat__sum { color: var(--ink-soft); font-size: 0.86rem; line-height: 1.35; }
.treat__group { margin-top: 0.2rem !important; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--taupe-deep); }
.treat ul { padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.treat li { font-size: 0.84rem; line-height: 1.4; padding: 0.32rem 0.68rem; border-radius: var(--radius-pill); background: var(--ivory); color: var(--ink-soft); }
.treat__note { font-size: 0.82rem; line-height: 1.5; color: var(--ink-soft); }
.treat__more a { font-weight: 600; font-size: 0.92rem; color: var(--taupe-deep); text-decoration: none; }

/* Sin JavaScript (y en el editor): tarjeta abierta con todo a la vista */
.treat:not(.is-ready) { gap: 0.7rem; padding-bottom: 1.3rem; }
.treat:not(.is-ready) > :not(.treat__img) { padding-inline: 1.2rem; }
.treat:not(.is-ready) > .treat__title { padding-top: 0.6rem; }

/* Con JavaScript: cabecera (foto + título) y panel desplegable */
.treat__summary { position: relative; }
.treat__head { display: grid; gap: 0.2rem; }
.treat__btn { all: unset; cursor: pointer; display: inline; }
.treat__btn::after { content: ""; position: absolute; inset: 0; }
.treat__btn:focus-visible { outline: 2px solid var(--taupe-deep); outline-offset: 3px; }
.treat__panel { display: grid; gap: 0.7rem; }
.treat__panel[hidden] { display: none; }
@media (max-width: 47.99em) {
  .treat__summary { display: grid; grid-template-columns: 6rem 1fr 1rem; align-items: center; gap: 0.9rem; padding-right: 1rem; -webkit-tap-highlight-color: transparent; }
  .treat__summary::after { content: ""; width: 0.5rem; height: 0.5rem; border-right: 1.5px solid var(--taupe-deep); border-bottom: 1.5px solid var(--taupe-deep); rotate: 45deg; translate: 0 -2px; transition: rotate 0.25s var(--ease-out), translate 0.25s var(--ease-out); }
  .treat.is-open .treat__summary::after { rotate: -135deg; translate: 0 2px; }
  .treat.is-ready .treat__img { aspect-ratio: auto; height: 6rem; }
  .treat.is-ready .treat__head { padding-block: 0.7rem; }
  .treat.is-ready .treat__title { font-size: 1.2rem; }
  .treat__panel { padding: 0.9rem 1rem 1.1rem; border-top: 1px solid var(--line); }
}
@media (min-width: 48em) {
  .treat__sum { display: none; }
  .treat__btn { cursor: default; }
  .treat__head { padding: 1.2rem 1.2rem 0; }
  .treat__panel { padding: 0.8rem 1.2rem 1.3rem; }
}

/* ---------- Alquiler de salas ---------- */
.rooms { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.rooms__media { display: grid; gap: 0.9rem; min-width: 0; }

/* Carrusel de fotos de las salas: se desliza con el dedo; flechas y puntos los añade home.js */
.carrusel {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  aspect-ratio: 4 / 5; border-radius: 50% 50% 0 0 / 40% 40% 0 0; background: var(--sand);
}
.carrusel::-webkit-scrollbar { display: none; }
.carrusel > figure { position: relative; flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; }
.carrusel > figure img { width: 100%; height: 100%; object-fit: cover; }
.carrusel figcaption { position: absolute; left: 50%; bottom: 1rem; translate: -50% 0; margin: 0; white-space: nowrap; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; background: rgb(250 247 242 / 0.92); color: var(--ink); padding: 0.4rem 0.8rem; border-radius: var(--radius-pill); }
/* En el móvil, casi vertical como las fotos: así se ven enteras (camilla, sofá…) y con poco techo */
@media (max-width: 55.99em) { .carrusel { aspect-ratio: 4 / 5; border-radius: 16px; } }
/* Fotos de la fachada: apaisadas */
.carrusel.carrusel--fachada { aspect-ratio: 16 / 9; border-radius: 16px; }
@media (min-width: 56em) { .carrusel.carrusel--fachada { aspect-ratio: 21 / 9; } }
.contact__fotos { display: grid; gap: 0.9rem; min-width: 0; }
@media (min-width: 56em) { .contact__fotos { grid-column: 1 / -1; } }
.carrusel-nav { display: flex; align-items: center; justify-content: center; gap: 0.8rem; }
.carrusel-dots { display: flex; gap: 0.15rem; }
.carrusel-dots button { width: 1.6rem; height: 1.6rem; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.carrusel-dots button::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--beige); transition: background-color 0.2s ease, scale 0.2s var(--ease-out); }
.carrusel-dots button[aria-current="true"]::before { background: var(--taupe-deep); scale: 1.25; }
.rooms__text { display: grid; gap: 1.2rem; }
.rooms__text .display { font-size: calc(var(--step-4) * var(--display-scale) * 0.78); }
.rooms__text > p:not(.eyebrow) { color: var(--ink-soft); max-width: 56ch; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li { padding: 0.5rem 0.95rem; border-radius: var(--radius-pill); background: var(--sand); font-size: 0.9rem; font-weight: 500; line-height: 1.3; }
@media (min-width: 56em) { .rooms { grid-template-columns: 0.9fr 1.1fr; } }

/* ---------- Aparatología: nombre en negrita + para qué ---------- */
.tech-chips { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
@media (min-width: 48em) { .tech-chips { grid-template-columns: repeat(3, 1fr); gap: 0.8rem; } }
.tech-chips li { display: grid; gap: 0.2rem; align-content: start; padding: 0.9rem 1rem; border: 1px solid rgb(250 247 242 / 0.18); border-radius: 12px; font-size: 0.82rem; line-height: 1.4; color: rgb(250 247 242 / 0.72); }
.tech-chips strong { display: block; font-weight: 500; font-size: 1rem; letter-spacing: -0.01em; color: var(--ivory); }

/* ---------- El centro (galería) ---------- */
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
.gallery > figure { overflow: hidden; background: var(--sand); position: relative; }
.gallery > figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.gallery figcaption { position: absolute; left: 0.8rem; bottom: 0.8rem; margin: 0; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; background: rgb(250 247 242 / 0.9); color: var(--ink); padding: 0.35rem 0.7rem; border-radius: var(--radius-pill); }
.gallery > figure:nth-child(1) { grid-column: span 2; aspect-ratio: 4 / 3; border-radius: 50% 50% 0 0 / 38% 38% 0 0; }
.gallery > figure:nth-child(2), .gallery > figure:nth-child(3) { aspect-ratio: 3 / 4; }
.gallery > figure:nth-child(4) { grid-column: span 2; aspect-ratio: 16 / 9; }
@media (min-width: 56em) {
  .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 15rem; }
  .gallery > figure:nth-child(1) { grid-column: 1 / span 2; grid-row: span 3; aspect-ratio: auto; border-radius: 50% 50% 0 0 / 26% 26% 0 0; }
  .gallery > figure:nth-child(2) { grid-column: 3; grid-row: span 2; aspect-ratio: auto; }
  .gallery > figure:nth-child(3) { grid-column: 4; grid-row: span 2; aspect-ratio: auto; }
  .gallery > figure:nth-child(4) { grid-column: 3 / span 2; aspect-ratio: auto; }
}

/* ---------- Quiénes somos ---------- */
.team { display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.team__img .frame { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 50% 50% 0 0 / 40% 40% 0 0; background: var(--beige); }
.team__img .frame img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 55.99em) { .team__img { width: min(78%, 20rem); margin-inline: auto; } }
.team__text { display: grid; gap: 1.4rem; }
.team__text .display { font-size: calc(var(--step-4) * var(--display-scale) * 0.8); }
.team__text > p:not(.eyebrow) { color: var(--ink-soft); max-width: 54ch; }
@media (min-width: 56em) { .team { grid-template-columns: 0.85fr 1fr; } }

/* ---------- Opiniones ---------- */
.reviews { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; scrollbar-width: thin; }
.review.wp-block-quote { flex: 0 0 min(86%, 24rem); scroll-snap-align: start; background: var(--white); padding: clamp(1.5rem, 3vw, 2.2rem); margin: 0; border: 0; display: grid; gap: 1rem; align-content: space-between; box-shadow: 0 0 0 1px var(--line); }
.review::before { content: "★★★★★"; content: "★★★★★" / "5 de 5 estrellas"; color: var(--taupe-deep); letter-spacing: 0.2em; font-size: 0.95rem; }
.review p { font-family: var(--font-display); font-weight: var(--display-weight); font-size: calc(var(--step-1) * var(--display-scale)); line-height: 1.35; }
.review cite { display: block; font-style: normal; font-size: 0.85rem; color: var(--ink-soft); }
.review cite strong { color: var(--ink); font-weight: 600; }
.reviews-nav { display: flex; gap: 0.5rem; justify-content: center; }
.section-head--row { justify-items: center; }

/* ---------- Instagram y Facebook ---------- */
.section-head .ig-handle { font-size: clamp(1.5rem, 0.7rem + 3.6vw, 3.4rem); overflow-wrap: anywhere; }
.social-btns { justify-content: center; gap: 0.55rem; }
.insta { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 56em) { .insta { grid-template-columns: repeat(4, 1fr); } }
.insta > figure { aspect-ratio: 1; overflow: hidden; position: relative; background: var(--sand); }
.insta > figure a { display: block; height: 100%; }
.insta > figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out), opacity 0.2s ease; }

/* Encuadre de algunas fotos (clase en el bloque de imagen) */
.foco-abajo img { object-position: 50% 72% !important; }
.foco-medio img { object-position: 50% 62% !important; }
.foco-izq img { object-position: 30% 50% !important; }
.foco-alto img { object-position: 50% 38% !important; }

/* Efectos al pasar el ratón: solo con ratón */
@media (hover: hover) and (pointer: fine) {
  .home-hero__pro a:hover { background: var(--beige); }
  .treat:hover { box-shadow: 0 0 0 1px var(--beige), 0 30px 60px -40px rgb(36 30 27 / 0.45); }
  .treat:hover .treat__img img { transform: scale(1.04); }
  .gallery > figure:hover img { transform: scale(1.03); }
  .insta > figure:hover img { transform: scale(1.04); opacity: 0.88; }
}

/* ---------- Contacto ---------- */
.contact { display: grid; gap: clamp(2rem, 5vw, 4rem); }
.contact__sign { overflow: hidden; background: var(--ink); }
.contact__sign img { width: 100%; height: 5.5rem; object-fit: cover; object-position: 0 50%; }
.contact__card { background: var(--white); padding: clamp(1.6rem, 3vw, 2.8rem); display: grid; gap: 1.8rem; box-shadow: 0 0 0 1px var(--line); align-content: start; }
.contact__card .display { font-size: calc(var(--step-4) * var(--display-scale) * 0.78); }
.contact__list { display: grid; gap: 1.2rem; }
.contact__item { display: grid; gap: 0.2rem; }
.contact__dt { font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.contact__dd { font-size: var(--step-1); line-height: 1.35; overflow-wrap: anywhere; }
.contact__dd a { text-decoration: none; }
.contact__small { font-size: 0.8rem; color: var(--ink-soft); }
@media (min-width: 56em) {
  .contact { grid-template-columns: 1fr 1fr; align-items: start; }
  .contact__sign { grid-column: 1 / -1; }
  .contact__sign img { height: auto; aspect-ratio: 10 / 1; }
}

/* ---------- Formulario de contacto ---------- */
.contact-form { background: var(--white); box-shadow: 0 0 0 1px var(--line); padding: clamp(1.5rem, 3vw, 2.6rem); display: grid; gap: 1.6rem; }
.contact-form__head { display: grid; gap: 0.5rem; }
.contact-form__head p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }
.contact-form h3 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); font-size: calc(var(--step-3) * var(--display-scale) * 0.8); letter-spacing: var(--display-tracking); line-height: 1.05; }
.fields { display: grid; gap: 1rem 1.2rem; }
@media (min-width: 48em) { .fields { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.88rem; font-weight: 600; }
.field input, .field select {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--ivory);
  border: 1px solid var(--beige); border-radius: 6px; padding: 0.8rem 0.9rem; min-height: 3rem; width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus-visible, .field select:focus-visible { outline: none; border-color: var(--taupe-deep); box-shadow: 0 0 0 3px color-mix(in srgb, var(--taupe) 30%, transparent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.checks-legal { display: grid; gap: 0.8rem; }
.check { display: grid; grid-template-columns: 1.25rem 1fr; gap: 0.7rem; align-items: start; font-size: 0.92rem; color: var(--ink-soft); cursor: pointer; }
.check input { width: 1.2rem; height: 1.2rem; margin: 0.15rem 0 0; accent-color: var(--taupe-deep); }
.check a, .legal-basic a { color: var(--taupe-deep); }
.legal-basic { font-size: 0.85rem; color: var(--ink-soft); background: var(--ivory); padding: 0.9rem 1rem; border-radius: 6px; }
.legal-basic summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.legal-basic dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; margin: 0.8rem 0 0; }
.legal-basic dt { font-weight: 600; color: var(--ink); }
.legal-basic dd { margin: 0; }
@media (max-width: 30em) { .legal-basic dl { grid-template-columns: 1fr; } .legal-basic dd { margin-bottom: 0.4rem; } }
.contact-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.form-status { margin: 0; font-size: 0.92rem; }
.form-status:empty { display: none; }
.form-status.is-error { color: #8A2E1E; }
.form-status.is-ok { color: #2F4A28; }

/* ---------- Animaciones de entrada (solo si hay movimiento y JavaScript) ---------- */
.js-motion :is(.section-head > *, .treat, .rooms__media, .rooms__text > *, .tech-chips, .gallery > figure, .team__img, .team__text > *, .reviews, .insta > figure, .contact__fotos, .contact__card, .contact-form) { opacity: 0; transform: translateY(1.25rem); }
.js-motion .home-hero h1, .js-motion .home-hero__text > :not(h1), .js-motion .home-hero__media { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  .treat:hover .treat__img img, .gallery > figure:hover img, .insta > figure:hover img { transform: none; }
  .home-hero__pro a:active { scale: none; }
}
