/* =========================================================
   Kaya Pilates · sitio web
   Editorial crema · paleta y tipografías de la marca
   ========================================================= */

:root {
  --bg: #f7f5f0;
  --sand: #e8e1d3;
  --stone: #a8a296;
  --wine: #8b4a52;
  --wine-dark: #733c43;
  --blue: #4a6fa5;
  --ink: #2c2b28;
  --charcoal: #57574f;
  --paper: #fdfcf9;
  --line: rgba(44, 43, 40, 0.14);

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 5vw, 64px);
  --maxw: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --nav-h: 76px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  overflow-x: clip;
}
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
em { font-style: italic; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.center { text-align: center; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 13px 26px; border-radius: 999px;
  font: 500 16px/1.2 var(--sans); text-decoration: none; text-align: center;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-wine { background: var(--wine); color: #fff; }
.btn-wine:hover { background: var(--wine-dark); box-shadow: 0 10px 24px -12px rgba(139, 74, 82, .7); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #3d5e8d; }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--bg); }
.btn-light { background: var(--bg); color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-line-light { border-color: rgba(247, 245, 240, .6); color: var(--bg); }
.btn-line-light:hover { background: var(--bg); color: var(--ink); }

/* ---------- Tipografía editorial ---------- */
.kicker {
  font: 500 13px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  color: var(--charcoal); margin-bottom: 18px;
}
.section-title {
  font-family: var(--serif); font-size: clamp(2.1rem, 4.6vw, 3.9rem); line-height: 1.04;
  letter-spacing: -.01em; text-wrap: balance; max-width: 22ch;
}
.section-title em, .hero-title em { color: var(--wine); }
.label { font: 600 13px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--charcoal); margin-bottom: 16px; }
.lead { font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.22; margin-bottom: .8em; }

/* ---------- Revelado al hacer scroll ---------- */
.js .reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  animation: revealSafety .01s 5s forwards; /* si algo falla, el texto aparece solo */
}
.js .reveal.is-visible { opacity: 1; transform: none; animation: none; }
.reveal[data-split] { opacity: 1; transform: none; }
@keyframes revealSafety { to { opacity: 1; transform: none; } }

/* ---------- Navegación ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color .35s var(--ease), box-shadow .35s var(--ease); }
.nav.is-solid { background: rgba(247, 245, 240, .94); box-shadow: 0 1px 0 var(--line); }
@supports (backdrop-filter: blur(10px)) {
  .nav.is-solid { background: rgba(247, 245, 240, .8); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
}
.nav-in { max-width: var(--maxw); margin: 0 auto; height: var(--nav-h); padding: 0 var(--gutter); display: flex; align-items: center; gap: 28px; }
.nav-logo img { width: 118px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { text-decoration: none; font-size: 15px; color: var(--charcoal); position: relative; padding: 4px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--wine); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav-links a:hover, .nav-links a.is-active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.is-active::after { transform: scaleX(1); }
.nav-cta { min-height: 44px; padding: 10px 20px; font-size: 15px; }
.nav-burger { display: none; margin-left: auto; width: 46px; height: 46px; border: 0; background: transparent; border-radius: 50%; cursor: pointer; position: relative; }
.nav-burger span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), top .3s var(--ease); }
.nav-burger span:first-child { top: 18px; }
.nav-burger span:last-child { top: 27px; }
.nav-burger[aria-expanded="true"] span:first-child { top: 22.5px; transform: rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child { top: 22.5px; transform: rotate(-45deg); }
.menu { display: none; }

@media (max-width: 960px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: block; }
  .menu:not([hidden]) {
    display: flex; flex-direction: column; gap: 4px; padding: 12px var(--gutter) 28px;
    background: var(--bg); box-shadow: 0 18px 30px -24px rgba(0,0,0,.4);
  }
  .menu a:not(.btn) { font-family: var(--serif); font-size: 30px; text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .menu .btn { margin-top: 18px; }
  .nav.menu-open { background: var(--bg); }
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: calc(var(--nav-h) + clamp(24px, 6vw, 72px)) var(--gutter) clamp(40px, 6vw, 80px);
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 72px); align-items: center;
  min-height: 100vh; min-height: 100svh;
}
.hero-title {
  font-family: var(--serif); font-size: clamp(2.6rem, 4.9vw, 4.3rem); line-height: 1.03;
  letter-spacing: -.015em; text-wrap: balance; max-width: 17ch; margin-bottom: 24px;
}
.hero-sub { font-size: clamp(16px, 1.4vw, 18px); color: var(--charcoal); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-media { position: relative; margin: 0; border-radius: 220px 220px 24px 24px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--sand); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; animation: heroZoom 18s var(--ease) both; }
@keyframes heroZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero-badge {
  position: absolute; left: 18px; bottom: 18px; display: flex; align-items: center; gap: 10px;
  background: var(--bg); border-radius: 999px; padding: 8px 18px 8px 10px;
  box-shadow: 0 10px 30px -18px rgba(0,0,0,.5);
}
.hero-badge b { font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--wine); font-weight: 400; width: 52px; text-align: center; }
.hero-badge span { font-size: 13px; line-height: 1.25; color: var(--charcoal); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: calc(var(--nav-h) + 20px); }
  .hero-media { aspect-ratio: 4 / 4.4; border-radius: 160px 160px 20px 20px; }
  .hero-title { max-width: 17ch; }
}

/* ---------- Pilares ---------- */
.pillars {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) clamp(48px, 7vw, 96px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 40px);
}
.pillar { border-top: 1px solid var(--ink); padding-top: 22px; }
.pillar-num { font: 500 13px var(--sans); letter-spacing: .12em; color: var(--stone); }
.pillar h2 { font-family: var(--serif); font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1.1; margin: 10px 0 10px; }
.pillar p { color: var(--charcoal); margin: 0; }
.pillar:nth-child(2) { transition-delay: .12s; }
.pillar:nth-child(3) { transition-delay: .24s; }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; border-block: 1px solid var(--line); padding: 18px 0; background: var(--bg); }
.ticker-track { display: flex; width: max-content; gap: 28px; animation: ticker 38s linear infinite; }
.ticker-track span { font-family: var(--serif); font-style: italic; font-size: clamp(1.7rem, 3vw, 2.5rem); white-space: nowrap; }
.ticker-track i { font-style: normal; color: var(--wine); font-size: 1.8rem; align-self: center; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Para quién ---------- */
.forwho { padding: clamp(64px, 10vw, 140px) var(--gutter); }
.forwho-in { max-width: 980px; margin: 0 auto; }
.forwho-text { font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.75rem); line-height: 1.2; text-wrap: pretty; }
.forwho-text em { color: var(--wine); }

/* ---------- Banda CTA ---------- */
.band {
  background: var(--wine); color: var(--bg); text-align: center;
  padding: clamp(56px, 8vw, 104px) var(--gutter);
}
.band-title { font-family: var(--serif); font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.08; max-width: 18ch; margin: 0 auto 28px; text-wrap: balance; }

/* ---------- Secciones ---------- */
.section { max-width: none; padding: clamp(80px, 11vw, 150px) var(--gutter); scroll-margin-top: var(--nav-h); }
.section > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section-sand { background: var(--sand); }
.section-ink { background: var(--ink); color: var(--bg); }
.section-ink .kicker { color: var(--stone); }
.section-ink .section-title em { color: #d9b2b7; }
.section-head { margin-bottom: clamp(40px, 6vw, 80px); }
[id] { scroll-margin-top: calc(var(--nav-h) + 12px); }

/* Historia */
.story, .why, .method { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(28px, 6vw, 96px); align-items: center; }
.story-media, .why-media, .method-media { margin: 0; border-radius: 22px; overflow: hidden; background: var(--sand); }
.story-media img, .method-media img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; transition: transform 1.2s var(--ease); }
.why { grid-template-columns: 5fr 6fr; direction: rtl; }
.why > * { direction: ltr; }
.why { margin-top: clamp(64px, 9vw, 130px); }
.why-media img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; transition: transform 1.2s var(--ease); }
.story-media:hover img, .why-media:hover img, .method-media:hover img { transform: scale(1.04); }
.story-text p:not(.lead), .why-text p:not(.lead), .method-text p:not(.lead) { color: var(--charcoal); }

/* Aniversario */
.anniv {
  display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: clamp(28px, 6vw, 96px); align-items: center;
  margin-top: clamp(64px, 9vw, 130px); padding: clamp(24px, 4vw, 48px); background: var(--sand); border-radius: 28px;
}
.anniv-video { margin: 0; border-radius: 18px; overflow: hidden; background: var(--ink); aspect-ratio: 9 / 16; }
.anniv-video video { width: 100%; height: 100%; object-fit: cover; }
.anniv-quote { font-family: var(--serif); font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.12; text-wrap: balance; margin: 0; }
.anniv-quote em { color: var(--wine); }

/* Equipo */
.team { margin-top: clamp(64px, 9vw, 130px); }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2.4vw, 32px); }
.person { background: var(--paper); border-radius: 22px; padding: 26px 24px 24px; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.person:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -30px rgba(139, 74, 82, .55); }
.person-mono { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--sand); color: var(--wine); font-family: var(--serif); font-style: italic; font-size: 34px; margin-bottom: 18px; }
.person h4 { font-family: var(--serif); font-size: 30px; line-height: 1.1; }
.person p { font-size: 14px; color: var(--charcoal); margin: 4px 0 0; line-height: 1.45; }
.person:nth-child(2) { transition-delay: .08s; } .person:nth-child(3) { transition-delay: .16s; } .person:nth-child(4) { transition-delay: .24s; }
@media (max-width: 860px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }

/* Galería */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-top: clamp(64px, 9vw, 120px); margin-bottom: clamp(40px, 6vw, 72px);
}
.gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; background: var(--sand); }
.gallery img:nth-child(odd) { margin-top: 36px; }
@media (max-width: 860px) {
  .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding: 0 var(--gutter) 8px; scrollbar-width: none; }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery img { flex: 0 0 68%; scroll-snap-align: center; }
  .gallery img:nth-child(odd) { margin-top: 0; }
}

/* Método y pasos */
.method { margin-bottom: clamp(64px, 9vw, 120px); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { display: flex; gap: 18px; align-items: flex-start; padding: 16px 0; border-top: 1px solid var(--line); }
.steps li span { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--wine); color: var(--wine); display: grid; place-items: center; font-family: var(--serif); font-size: 22px; }
.steps li p { margin: 6px 0 0; }

/* Horarios */
.block { margin-top: clamp(48px, 7vw, 96px); }
.block-title { font-family: var(--serif); font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 24px; }
.table-scroll { overflow-x: auto; overflow-y: visible; }
.schedule { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 22px; overflow: hidden; }
.schedule th, .schedule td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.schedule thead th { font: 600 12px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--charcoal); background: var(--bg); }
.schedule tbody th { font-family: var(--serif); font-size: 24px; font-weight: 400; white-space: nowrap; width: 1%; }
.schedule tbody tr:last-child th, .schedule tbody tr:last-child td { border-bottom: 0; }
.schedule td { display: table-cell; }
.slot {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 88px; padding: 8px 12px; margin: 4px 6px 4px 0; border-radius: 999px;
  background: var(--charcoal); color: #fff; font-weight: 600; font-size: 15px; line-height: 1.15;
}
.slot small { font-weight: 400; font-size: 12px; opacity: .85; }
.none { color: var(--stone); }
.schedule tr.is-today th { color: var(--wine); }
.schedule tr.is-today th::after { content: "hoy"; display: inline-block; margin-left: 10px; font: 600 11px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #fff; background: var(--wine); border-radius: 99px; padding: 3px 9px; vertical-align: middle; }
@media (max-width: 640px) {
  .schedule, .schedule tbody, .schedule tr, .schedule th, .schedule td { display: block; width: auto; }
  .schedule thead { display: none; }
  .schedule tr { padding: 16px 18px; border-bottom: 1px solid var(--line); }
  .schedule tbody tr:last-child { border-bottom: 0; }
  .schedule th, .schedule td { padding: 0; border: 0; }
  .schedule tbody th { margin-bottom: 8px; }
  .schedule td + td { margin-top: 2px; }
  .schedule td:has(.none) { display: none; }
  .slot { min-width: 82px; }
}

/* Paquetes */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan {
  background: var(--paper); border-radius: 22px; padding: 26px 26px 24px; border: 1px solid transparent;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.plan:hover { transform: translateY(-6px); box-shadow: 0 26px 40px -30px rgba(44, 43, 40, .45); border-color: var(--line); }
.plan h4 { font-family: var(--serif); font-size: 34px; line-height: 1.1; }
.plan-classes { margin: 2px 0 14px; color: var(--charcoal); }
.plan-price { font-size: 32px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 4px; }
.plan-meta { font-size: 14px; color: var(--charcoal); margin: 0; }
.plan-first { background: var(--wine); color: var(--bg); }
.plan-first .plan-classes, .plan-first .plan-meta { color: #ead6d8; }
.plan-tag { display: inline-block; font: 600 11px var(--sans); letter-spacing: .14em; text-transform: uppercase; background: var(--bg); color: var(--wine); border-radius: 99px; padding: 4px 10px; margin-bottom: 12px; }
@media (max-width: 900px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .plans { grid-template-columns: 1fr; } .plan { padding: 22px; } }

.good { margin-top: 28px; padding: 24px 28px; border: 1px dashed var(--stone); border-radius: 22px; }
.good h4 { font: 600 13px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--charcoal); margin-bottom: 10px; }
.good ul { margin: 0; padding-left: 20px; columns: 2; column-gap: 40px; }
.good li { margin: 4px 0; break-inside: avoid; }
@media (max-width: 700px) { .good ul { columns: 1; } }

.cta-pair { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: clamp(40px, 6vw, 64px); }
.cta-left { justify-content: flex-start; }

/* Preguntas */
.faq { max-width: 880px !important; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 48px 22px 0; position: relative;
  font-family: var(--serif); font-size: clamp(1.4rem, 2.2vw, 1.75rem); line-height: 1.25;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  background: linear-gradient(var(--wine), var(--wine)) center / 100% 1.5px no-repeat, linear-gradient(var(--wine), var(--wine)) center / 1.5px 100% no-repeat;
  transition: transform .35s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--charcoal); max-width: 64ch; padding-bottom: 22px; margin: 0; }
.faq details a { color: var(--wine); }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: stretch; }
.contact address { font-style: normal; font-size: 18px; margin: 26px 0 24px; color: #e6e1d7; }
.channels { list-style: none; margin: 0; padding: 0; }
.channels li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid rgba(247, 245, 240, .16); }
.channels li span { color: var(--stone); font-size: 14px; }
.channels a { text-decoration: none; text-align: right; overflow-wrap: anywhere; }
.channels a:hover { text-decoration: underline; }
.contact-map { border-radius: 22px; overflow: hidden; min-height: 380px; background: #3a3936; }
.contact-map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; filter: grayscale(.35) contrast(1.02); }
@media (max-width: 860px) {
  .story, .why, .method, .anniv, .contact { grid-template-columns: 1fr; }
  .why { direction: ltr; }
  .anniv { padding: 20px; }
  .anniv-video { max-width: 320px; }
}

/* Pie */
.foot { background: var(--ink); color: var(--stone); text-align: center; padding: 48px var(--gutter) 120px; border-top: 1px solid rgba(247,245,240,.1); font-size: 14px; }
.foot img { width: 110px; margin: 0 auto 16px; opacity: .9; }
.foot p { margin: 6px 0; }
.foot a { color: var(--bg); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot-small { font-size: 12px; opacity: .8; }
@media (min-width: 961px) { .foot { padding-bottom: 48px; } }

/* Barra fija en celular */
.mobile-bar { display: none; }
@media (max-width: 960px) {
  .mobile-bar {
    display: flex; gap: 10px; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
    transform: translateY(140%); transition: transform .45s var(--ease);
  }
  .mobile-bar.is-on { transform: none; }
  .mobile-bar .btn { flex: 1; box-shadow: 0 14px 30px -14px rgba(0,0,0,.45); }
  .mobile-wa { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--ink); box-shadow: 0 14px 30px -14px rgba(0,0,0,.45); }
}

/* Movimiento: solo se desactiva lo intrusivo */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation-duration: 90s; }
  .hero-media img { animation: none; }
}
