:root {
  --sage: #6b8f71;
  --sage-dark: #557259;
  --sand: #f4efe6;
  --ink: #2b2b2b;
  --terracotta: #c8775a;
  --white: #fff;
  --line: #ddd5c6;
  --sage-soft: #e7eee6;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--sage-dark); }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

.section { padding: 2.5rem 0; }

.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }

.text-center { text-align: center; }
.mt { margin-top: 1.5rem; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .6rem 1.4rem;
  border: 2px solid var(--terracotta);
  border-radius: 999px;
  background: var(--terracotta);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #b5654a; border-color: #b5654a; }
.btn-secondary { background: transparent; color: var(--sage-dark); border-color: var(--sage); }
.btn-secondary:hover { background: var(--sage); color: var(--white); border-color: var(--sage); }

/* Demo banner */
.demo-banner {
  background: var(--ink);
  color: var(--sand);
  font-size: .85rem;
  text-align: center;
  padding: .4rem 1rem;
}

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: relative; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 60px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink); }
.logo-text { font-family: var(--serif); font-size: 1.3rem; }

.menu-toggle {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
}

.main-nav { display: none; flex-basis: 100%; flex-direction: column; padding-bottom: .5rem; }
.main-nav.open { display: flex; }
.main-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.main-nav a[aria-current="page"] { color: var(--sage-dark); font-weight: 600; }

.country-switch { display: flex; gap: .25rem; }
.country-switch button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.country-switch button[aria-pressed="true"] { border-color: var(--sage); background: var(--sand); }

@media (max-width: 399px) {
  .country-switch button > span:first-child { display: none; }
}

/* Footer */
.site-footer { background: var(--sage-dark); color: var(--sand); padding: 2rem 0; margin-top: 2rem; }
.site-footer a { color: var(--sand); }
.footer-brand { font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-credit { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(244, 239, 230, .25); font-size: .875rem; }
.footer-credit a { display: inline-flex; align-items: center; gap: .75rem; min-height: 44px; }
.credit-logo { display: inline-flex; padding: .35rem .5rem; border-radius: 10px; background: var(--sand); }
.credit-logo img { display: block; }

@media (min-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.8rem; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .menu-toggle { display: none; }
  .header-inner { flex-wrap: nowrap; }
  .main-nav { display: flex; flex-basis: auto; flex-direction: row; gap: 1rem; padding: 0; }
  .main-nav a { border-bottom: 0; }
}

/* ---------- Home ---------- */
.eyebrow { margin: 0 0 .75rem; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--sage-dark); }
.lead { font-size: 1.1rem; color: #4a4a4a; }
.section-title { font-family: var(--serif); font-weight: 500; }
.section-head { max-width: 40rem; margin: 0 auto 2rem; text-align: center; }
.section-alt { background: var(--white); }
.section-sage { background: var(--sage-soft); }
.muted { color: #6b665c; font-size: .9rem; }
.btn-lg { min-height: 52px; padding: .75rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

.hero {
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  background: linear-gradient(rgba(244, 239, 230, .78), rgba(244, 239, 230, .92)), url("../img/ambiente.svg") center / cover no-repeat;
}
.hero h1 { max-width: 14ch; margin: 0 auto .5em; font-family: var(--serif); font-weight: 500; font-size: 2.4rem; }
.hero .lead { max-width: 36rem; margin: 0 auto 1.75rem; }
.hero-points { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.25rem; margin: 1.25rem 0 0; padding: 0; list-style: none; font-size: .9rem; color: #4a4a4a; }

.live-card { max-width: 44rem; margin: 0 auto; padding: 2rem 1.25rem; text-align: center; border-radius: 20px; box-shadow: 0 12px 40px rgba(85, 114, 89, .12); }
.live-date { margin: 0 0 .25rem; font-family: var(--serif); font-size: 1.5rem; }
.live-date::first-letter { text-transform: uppercase; }
.live-card .muted { margin-bottom: 1.25rem; }

.countdown { display: flex; justify-content: center; gap: .5rem; margin: 1.25rem 0 1.5rem; }
.countdown[hidden] { display: none; }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 4.2rem; padding: .6rem .25rem; border-radius: 12px; background: var(--sand); }
.cd-unit strong { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cd-unit span { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: #6b665c; }

.split { display: grid; gap: 1.5rem; align-items: center; grid-template-columns: 1fr; }
.thumb { position: relative; display: block; border-radius: 16px; overflow: hidden; line-height: 0; }
.thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.thumb .play {
  position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); display: flex; align-items: center; justify-content: center; color: var(--sage-dark); font-size: 1.5rem; line-height: 1;
}
.thumb .duration { position: absolute; right: .75rem; bottom: .75rem; padding: .15rem .6rem; border-radius: 999px; background: rgba(43, 43, 43, .75); color: var(--white); font-size: .8rem; line-height: 1.5; }

.offer { display: flex; flex-direction: column; }
.offer h3 { font-family: var(--serif); font-weight: 500; }
.offer .btn { margin-top: auto; }
.facts { margin: 0 0 1.25rem; padding: 0; list-style: none; }
.facts li { padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.facts li:last-child { border-bottom: 0; }
.price { font-family: var(--serif); font-size: 1.6rem; margin: 0 0 .25rem; }
.sub-card { padding: 2rem 1.25rem; border-radius: 20px; }

.person { text-align: center; }
.person img { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; display: block; }
.person .role { color: var(--sage-dark); font-weight: 600; margin-bottom: .75rem; }

.quote { max-width: 46rem; margin: 0 auto; text-align: center; }
.quote blockquote { margin: 0 0 1.25rem; font-family: var(--serif); font-size: 1.4rem; line-height: 1.5; }
.quote cite { display: block; margin-bottom: 1.5rem; font-style: normal; color: #6b665c; }

.testimonial { margin: 0; border-style: dashed; }
.testimonial .ph-line { height: .6rem; margin-bottom: .6rem; border-radius: 999px; background: var(--sand); }
.testimonial .ph-line.short { width: 60%; }
.testimonial .tag { margin: 1rem 0 0; font-size: .85rem; font-weight: 600; color: var(--terracotta); }

.faq { max-width: 46rem; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; min-height: 56px; padding: .5rem 0; font-weight: 600; cursor: pointer; }
.faq details p { margin: 0 0 1rem; color: #4a4a4a; }

.final-cta { padding: 4rem 0; text-align: center; background: var(--sage-dark); color: var(--white); }
.final-cta h2 { font-family: var(--serif); font-weight: 500; font-size: 2rem; }
.final-cta p { opacity: .9; }
.final-cta .btn { background: var(--white); color: var(--sage-dark); border-color: var(--white); }
.final-cta .btn:hover { background: var(--sand); border-color: var(--sand); }

@media (min-width: 768px) {
  .section { padding: 4.5rem 0; }
  .hero { padding: 7rem 0 5.5rem; }
  .hero h1 { font-size: 3.6rem; }
  .live-card { padding: 3rem; }
  .cd-unit { min-width: 5.5rem; }
  .cd-unit strong { font-size: 2.2rem; }
  .split { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

/* ---------- Account ---------- */
.auth-section { padding-top: 2.5rem; }
.auth-card { max-width: 34rem; margin: 0 auto; padding: 1.5rem 1.25rem; border-radius: 20px; box-shadow: 0 12px 40px rgba(85, 114, 89, .12); }

.tabs { display: flex; gap: .25rem; margin-bottom: 1.5rem; padding: .25rem; border-radius: 999px; background: var(--sand); }
.tab { flex: 1; min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: #6b665c; font: inherit; font-weight: 600; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--white); color: var(--sage-dark); box-shadow: 0 1px 4px rgba(43, 43, 43, .12); }

.alert { margin: 0 0 1rem; padding: .75rem 1rem; border: 1px solid var(--terracotta); border-radius: 10px; background: #fbeee9; color: #8a3f26; font-size: .95rem; }
.alert[hidden], .form[hidden] { display: none; }

.field { margin-bottom: 1rem; }
.field-row { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
.field label { display: block; margin-bottom: .3rem; font-size: .9rem; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .6rem .85rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--white); color: var(--ink); font: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--sage); outline-offset: 1px; border-color: var(--sage); }
.check { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1rem; font-size: .9rem; }
.check input { flex: none; width: 22px; height: 22px; margin: .1rem 0 0; accent-color: var(--sage-dark); }
.form .btn { margin-top: .5rem; }

.space-head { padding: 3rem 0 1rem; }
.space-head .lead { max-width: 36rem; margin-bottom: 0; }
.space-grid { align-items: stretch; }
.audio-card { display: flex; flex-direction: column; justify-content: center; }
.audio-card h2 { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; }
.audio-card audio { width: 100%; margin: .5rem 0 .75rem; }
.audio-card .muted { margin: 0; }
.free-card { max-width: none; margin: 0; padding: 1.75rem 1.25rem; }
.status {
  display: inline-block; margin: 0 0 1rem; padding: .3rem 1rem; border-radius: 999px;
  background: var(--sage-soft); color: var(--sage-dark); font-weight: 600;
}
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.offer .facts a { font-weight: 600; }

@media (min-width: 768px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 2rem; }
  .space-head { padding: 4rem 0 1.5rem; }
  .free-card { padding: 2rem; }
}

/* ---------- Sala, suscripción, programas ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(43, 43, 43, .6); }
.modal-backdrop[hidden] { display: none; }
.modal { width: 100%; max-width: 28rem; padding: 1.75rem 1.25rem; text-align: center; border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal h2 { font-family: var(--serif); font-weight: 500; font-size: 1.35rem; }

.hero-compact { padding: 3rem 0 2.5rem; }
.hero-compact h1 { max-width: 24ch; font-size: 2rem; }
.page-card { max-width: 44rem; margin: 0 auto; padding: 1.75rem 1.25rem; border-radius: 20px; box-shadow: 0 12px 40px rgba(85, 114, 89, .12); }
.page-card .live-date { font-size: 1.3rem; }
.page-card .btn { margin-top: .25rem; }
.page-card .price { margin: 0; }

.prose { max-width: 46rem; margin: 0 auto; }
.prose h2 { font-family: var(--serif); font-weight: 500; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .5rem; }
.prose .facts { padding-left: 0; }
.prose .facts li { margin-bottom: 0; }
.ticks { list-style: none; padding-left: 0 !important; }
.ticks li { position: relative; padding-left: 1.75rem; }
.ticks li::before { content: "\2713"; position: absolute; left: 0; color: var(--sage-dark); font-weight: 700; }
.pending-tag { margin-left: .5rem; font-size: .85rem; font-weight: 600; color: var(--terracotta); white-space: nowrap; }
.teachers { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.teacher { display: flex; align-items: center; gap: 1rem; }
.teacher img { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.teacher p { margin: 0; }

.room-card { max-width: 56rem; margin: 0 auto; padding: 2rem 1.25rem; text-align: center; border-radius: 20px; box-shadow: 0 12px 40px rgba(85, 114, 89, .12); }
.room-card[hidden], .room-stage[hidden] { display: none; }
.room-card .btn + .btn, .room-card p + .btn { margin-top: .5rem; }
.room-stage { max-width: 46rem; margin: 0 auto; padding: .75rem; border-radius: 20px; background: #1f2a22; color: var(--white); }
.tile { position: relative; overflow: hidden; border-radius: 12px; background: #2f3d33; }
.tile-label { position: absolute; left: .5rem; bottom: .4rem; padding: .05rem .5rem; border-radius: 999px; background: rgba(0, 0, 0, .55); font-size: .75rem; line-height: 1.5; }
.tile-teacher { aspect-ratio: 16 / 9; background: var(--sage-soft); }
.tile-teacher img { width: 100%; height: 100%; object-fit: cover; display: block; }
.room-grid { display: grid; gap: .5rem; grid-template-columns: repeat(3, 1fr); margin: .5rem 0; }
.tile-guest { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; }
.avatar { display: flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--sage); color: var(--white); font-weight: 600; }
.tile-me .avatar { background: var(--terracotta); }
.room-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; padding: .5rem 0; }
.room-controls .btn { min-width: 6.5rem; background: #3a4a3f; border-color: #3a4a3f; }
.room-controls .btn[aria-pressed="false"] { background: #5a3a30; border-color: #5a3a30; }
.room-controls .btn-leave { background: var(--terracotta); border-color: var(--terracotta); }
.room-note { margin: .5rem 0 0; font-size: .85rem; text-align: center; opacity: .8; }

@media (min-width: 768px) {
  .hero-compact { padding: 4.5rem 0 3.5rem; }
  .hero-compact h1 { font-size: 3rem; }
  .page-card { padding: 2.25rem; }
  .teachers { grid-template-columns: 1fr 1fr; }
  .room-card { padding: 3rem; }
  .room-stage { padding: 1rem; }
  .room-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ---------- Nosotros, contacto, legal ---------- */
.field textarea { min-height: 9rem; resize: vertical; }
.success { margin: 0 0 1rem; padding: .75rem 1rem; border: 1px solid var(--sage); border-radius: 10px; background: var(--sage-soft); color: var(--sage-dark); font-weight: 600; }
.success[hidden] { display: none; }

.bio { text-align: left; }
.bio img { margin-left: auto; margin-right: auto; }
.bio h3 { text-align: center; font-family: var(--serif); font-weight: 500; }
.bio .role { text-align: center; }
.bio h4 { margin: 1rem 0 .5rem; font-size: 1rem; }
.bio ul { margin: 0; padding-left: 1.25rem; }
.bio li { margin-bottom: .35rem; }

.contact-list { margin: 0 0 1.25rem; }
.contact-list li { display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.contact-list li > span:first-child { min-width: 6rem; font-weight: 600; }

.draft-box { max-width: 46rem; margin: 0 auto 2rem; padding: 1rem 1.25rem; border: 2px dashed var(--terracotta); border-radius: 12px; background: #fbeee9; color: #8a3f26; font-weight: 700; text-align: center; }
.legal h1 { font-family: var(--serif); font-weight: 500; }
.legal h2 { margin-top: 2rem; font-size: 1.3rem; }
.legal p, .legal li { overflow-wrap: anywhere; }
