/* =============================================================
   1. Tokens
   ============================================================= */
@font-face {
  font-family: 'Glacial Indifference';
  src: url('lib/fonts/GlacialIndifference-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Glacial Indifference';
  src: url('lib/fonts/GlacialIndifference-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:        #F1E9D8;
  --bg-2:      #E4DBC9;
  --bg-3:      #C7B98C;
  --paper:     #ffffff;
  --ink:       #292929;
  --ink-soft:  #3c3730;
  --ink-mute:  #756a5c;
  --accent:    #E67254;
  --accent-deep: #8F4522;
  --accent-2:  #7D583C;
  --accent-3:  #94B17B;
  --line:      rgba(41,41,41,0.14);

  --display: 'Unbounded', 'Glacial Indifference', sans-serif;
  --sans: 'Glacial Indifference', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --nav-h: 80px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
/* Full-viewport backdrop — fills the side gutters on wide screens with a
   subtle brand-colored texture instead of flat empty color. Sits behind
   everything; opaque cards/sections simply paint over it in the center. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: repeating-linear-gradient(11deg,
    rgba(41,41,41,0.035) 0px, rgba(41,41,41,0.035) 1px,
    transparent 1px, transparent 34px);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 520px 55% at 0% 12%, rgba(230,114,84,0.16), transparent 70%),
    radial-gradient(ellipse 520px 55% at 100% 38%, rgba(148,177,123,0.18), transparent 70%),
    radial-gradient(ellipse 480px 55% at 0% 64%, rgba(125,88,60,0.14), transparent 70%),
    radial-gradient(ellipse 480px 55% at 100% 88%, rgba(230,114,84,0.12), transparent 70%);
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  text-wrap: balance;
  line-height: 1.08;
  letter-spacing: -0.01em;
  font-weight: 700;
}
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--bg); }

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

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.kicker {
  position: relative;
  display: inline-block;
  font-family: var(--display);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 1rem;
  padding-left: .9rem;
}
.kicker::before {
  content: "";
  position: absolute;
  left: 0; top: .2em;
  width: .5rem; height: .5rem;
  background: var(--accent);
  transform: skewX(-12deg);
  border-radius: 1px;
}
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Scroll progress */
.progress-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: var(--line);
  z-index: 200;
}
.progress-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  transition: width .1s linear;
}

/* Compás — beat bars divider */
.compas {
  display: flex; align-items: center; justify-content: center;
  gap: .5rem;
  padding-block: 1.6rem;
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}
.compas span {
  display: block;
  width: 5px;
  height: 18px;
  border-radius: 3px;
  background: var(--accent-2);
  animation: beatPulse 2.2s ease-in-out infinite;
}
.compas span:nth-child(1) { animation-delay: 0s; background: var(--accent); }
.compas span:nth-child(2) { animation-delay: .15s; background: var(--accent-3); }
.compas span:nth-child(3) { animation-delay: .3s; background: var(--accent-2); }
.compas span:nth-child(4) { animation-delay: .45s; background: var(--accent); }
.compas span:nth-child(5) { animation-delay: .6s; background: var(--accent-3); }
.compas span:nth-child(6) { animation-delay: .75s; background: var(--accent-2); }
.compas span:nth-child(7) { animation-delay: .9s; background: var(--accent); }
@keyframes beatPulse {
  0%, 100% { height: 8px; opacity: .55; }
  50% { height: 26px; opacity: 1; }
}

/* Arch frame — brand photo motif */
.arch-frame {
  overflow: hidden;
  border-radius: 50% 50% 16px 16px / 22% 22% 16px 16px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.arch-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s var(--ease-out), filter .5s var(--ease-out);
}

/* =============================================================
   4. Typography
   ============================================================= */
h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
em { font-style: normal; color: var(--accent); font-weight: 700; }
strong { font-weight: 700; color: var(--ink); }

/* =============================================================
   5. Components
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .95rem 1.9rem;
  font-family: var(--display);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  transition: transform .35s var(--ease-out), background .35s var(--ease-out), color .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  position: relative;
}
.btn-primary:hover { transform: translateY(-2px); background: var(--accent-deep); box-shadow: 0 14px 30px -12px rgba(230,114,84,0.55); }
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }

/* Pulsing ring behind the hero's primary CTA */
.cta-pulse { position: relative; display: inline-flex; }
.cta-pulse::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  animation: ctaPulse 2.6s var(--ease-soft) infinite;
  pointer-events: none;
}
@keyframes ctaPulse {
  0% { transform: scale(1); opacity: .65; }
  100% { transform: scale(1.16); opacity: 0; }
}

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(241,233,216,0.7);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease-out), background .4s var(--ease-out);
}
.nav.is-scrolled { border-bottom-color: var(--line); background: rgba(241,233,216,0.92); }
.nav-inner {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.nav-logo {
  display: flex; align-items: center;
}
.nav-logo img {
  height: 44px; width: 44px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.footer .nav-logo img { height: 52px; width: 52px; }
.nav-menu {
  display: flex; align-items: center; gap: 1.8rem;
}
.nav-menu a:not(.nav-cta) {
  font-size: .85rem; letter-spacing: 0.01em;
  position: relative; padding-block: .3rem;
}
.nav-menu a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--accent);
  transition: right .35s var(--ease-out);
}
.nav-menu a:not(.nav-cta):hover::after { right: 0; }
.nav-cta {
  padding: .6rem 1.3rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-family: var(--display);
  font-size: .78rem; font-weight: 600;
  transition: background .3s var(--ease-out), transform .3s var(--ease-out);
}
.nav-cta:hover { background: var(--accent); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  padding: .5rem;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform .3s var(--ease-out), opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.section-head { margin-bottom: 3rem; }

/* Marquee */
.marquee {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  padding-block: 1.1rem;
  background: var(--bg-2);
}
.marquee-track {
  display: flex; gap: 1.2rem; white-space: nowrap;
  width: max-content;
  animation: marqueeScroll 26s linear infinite;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.marquee-track span.dot { color: var(--accent); }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Bento grid */
.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.bento-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2rem 1.8rem;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .4s var(--ease-out);
}
.bento-card:hover {
  transform: translateY(-6px) rotate(-0.6deg);
  border-color: transparent;
  box-shadow: 0 24px 48px -20px rgba(230,114,84,0.35);
}
.bento-card--note {
  background: var(--bg-3);
  border-color: transparent;
}
.bento-card--note .bento-name { color: var(--ink); }
.bento-card--note .bento-teachers { color: var(--accent-deep); }
.bento-name { font-family: var(--display); font-size: 1.3rem; font-weight: 700; color: var(--ink); margin-bottom: .3rem; }
.bento-teachers { color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 1rem; }
.bento-desc { color: var(--ink-mute); font-size: .95rem; line-height: 1.6; }

/* Schedule */
.schedule-table {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--paper);
}
.schedule-row {
  display: grid;
  grid-template-columns: 1fr;
}
.schedule-row + .schedule-row { border-top: 1px solid var(--line); }
.schedule-row--head { display: none; }
.schedule-cell { padding: 1rem 1.2rem; font-size: .92rem; }
.schedule-cell--time {
  font-family: var(--display); font-weight: 600; color: var(--accent-2);
  font-size: .92rem;
  background: var(--bg-2);
}
.schedule-cell--empty { color: var(--ink-mute); }
.schedule-cell span { display: block; color: var(--ink-mute); font-size: .8rem; margin-top: .15rem; }
.schedule-row[data-tag="Fuerza"] .schedule-cell:not(.schedule-cell--time) { color: var(--accent-deep); font-weight: 700; }

/* Pricing */
.pricing-list { display: flex; flex-direction: column; gap: .8rem; }
.price-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  flex-wrap: wrap;
}
.price-row--featured { border-color: var(--accent); background: var(--paper); box-shadow: 0 14px 30px -18px rgba(230,114,84,0.5); }
.price-name { font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--ink); flex: 1 1 auto; }
.price-note { color: var(--ink-mute); font-size: .8rem; }
.price-value { font-weight: 700; font-size: 1.15rem; color: var(--accent); font-family: var(--display); }
.pricing-mxn { margin-top: 1rem; color: var(--ink-mute); font-size: .78rem; }

/* Teacher cards */
.teacher-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
}
.teacher-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.2rem 1.2rem 1.6rem;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.teacher-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -22px rgba(41,41,41,0.28);
}
.teacher-photo {
  aspect-ratio: 3 / 4;
  margin-bottom: 1.2rem;
}
.teacher-photo img { filter: grayscale(0.55) contrast(1.02); }
.teacher-card:hover .teacher-photo img { transform: scale(1.06); filter: grayscale(0); }
.teacher-name { font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--ink); margin-bottom: .2rem; }
.teacher-specialty { color: var(--accent); font-size: .78rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; margin-bottom: .9rem; }
.teacher-bio { color: var(--ink-mute); font-size: .92rem; line-height: 1.6; }

/* Location */
.location-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 2.4rem 1.8rem;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1.4rem;
  position: relative;
  overflow: hidden;
}
.location-pin { font-size: 2.4rem; }
.location-address { color: var(--ink-mute); margin-top: .4rem; }

/* CTA final */
.cta-final { background: var(--bg-2); }
.cta-title { margin-block: .6rem 1rem; }
.cta-sub { color: var(--ink-mute); max-width: 34rem; margin-bottom: 2.4rem; }
.cta-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.cta-link {
  display: flex; flex-direction: column; gap: .3rem;
  padding: 1.2rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  min-width: 12rem;
  transition: transform .35s var(--ease-out), border-color .35s var(--ease-out);
}
a.cta-link:hover { transform: translateY(-4px); border-color: var(--accent); }
.cta-link-label { font-size: .72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-mute); font-family: var(--display); }
.cta-link-value { font-family: var(--display); font-weight: 600; font-size: 1.1rem; color: var(--ink); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding-block: 3rem 2rem; }
.footer-inner {
  max-width: 1280px; margin-inline: auto; padding-inline: 1.25rem;
  display: flex; flex-direction: column; gap: 1.2rem;
}
.footer-inner p { color: var(--ink-mute); font-size: .85rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer-nav a { font-size: .82rem; color: var(--ink-mute); }
.footer-nav a:hover { color: var(--accent); }
.footer-copy { font-size: .75rem; color: var(--ink-mute); opacity: .8; }

/* =============================================================
   6. Sections
   ============================================================= */
section { padding-inline: 1.25rem; }
.hero, .manifesto, .styles, .schedule-pricing, .teachers, .location, .cta-final {
  max-width: 1280px;
  margin-inline: auto;
}

.hero {
  position: relative;
  min-height: 92svh;
  display: flex; flex-direction: column; align-items: center;
  gap: 3rem;
  padding-block: calc(var(--nav-h) + 2rem) 3rem;
  overflow: clip;
}
.hero-halo {
  position: absolute; inset: -20% -10% -30% -10%;
  z-index: -2;
  background: radial-gradient(45% 45% at 70% 30%, rgba(230,114,84,0.28), transparent 70%),
              radial-gradient(35% 35% at 15% 75%, rgba(148,177,123,0.22), transparent 70%);
  filter: blur(40px);
}
.hero-grain {
  position: absolute; inset: 0; z-index: -1; opacity: .05; mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-inner { max-width: 40rem; }
.hero-title {
  font-size: clamp(2.4rem, 7.4vw, 4.8rem);
  line-height: 1.02;
  margin-bottom: 1.5rem;
}
.hero-title span { display: block; }
.hero-sub { color: var(--ink-mute); font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 32rem; margin-bottom: 2.2rem; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }

.hero-media {
  width: 100%;
  max-width: 22rem;
  transition-delay: .15s;
}
.hero-media .arch-frame {
  width: 100%;
  aspect-ratio: 2 / 3;
  box-shadow: 0 40px 70px -30px rgba(41,41,41,0.4);
}
.hero-logo-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 14%;
  box-shadow: 0 40px 70px -30px rgba(41,41,41,0.35);
  overflow: hidden;
}
.hero-logo-card::before {
  content: "";
  position: absolute; inset: -25%;
  background: radial-gradient(circle at 50% 42%, rgba(230,114,84,0.20), transparent 65%);
  pointer-events: none;
}
.hero-logo-card img {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.manifesto { padding-block: 4.5rem; }
.manifesto-text {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  line-height: 1.5;
  max-width: 44rem;
  color: var(--ink-soft);
}

.styles { padding-block: 5rem; }
.teachers { padding-block: 5rem; }
.location { padding-block: 5rem; }
.cta-final { padding-block: 6rem; }
.cta-inner { max-width: 46rem; }

.schedule-pricing {
  padding-block: 5rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

/* =============================================================
   7. Effects
   ============================================================= */

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-card--lg, .bento-card--wide { grid-column: span 2; }
  .teacher-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 720px) {
  section { padding-inline: 2rem; }
  .schedule-row { grid-template-columns: 8rem repeat(5, 1fr); }
  .schedule-row--head { display: grid; background: var(--bg-2); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-mute); }
  .schedule-cell--time { background: transparent; }
  .location-card { flex-direction: row; align-items: center; }
  .location-text { flex: 1 1 auto; }
}
@media (min-width: 960px) {
  .nav-toggle { display: none !important; }
  .hero { flex-direction: row; align-items: center; justify-content: space-between; gap: 4rem; text-align: left; }
  .hero-inner { flex: 1 1 0; }
  .hero-media { flex: 0 0 auto; max-width: 24rem; }
  .bento { grid-template-columns: repeat(3, 1fr); }
  .bento-card--lg { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; justify-content: center; }
  .bento-card--wide { grid-column: span 3; }
  .schedule-pricing { flex-direction: row; align-items: flex-start; }
  .schedule { flex: 1.4 1 0; }
  .pricing { flex: 1 1 0; }
  .teacher-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 959px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: flex-start;
    gap: 0;
    background: rgba(241,233,216,0.98);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem 1.5rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
  }
  .nav-menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-menu a:not(.nav-cta) { padding-block: .9rem; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-cta { margin-top: 1rem; align-self: flex-start; }
}

/* =============================================================
   9. Reduced motion — only intrusive
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation-duration: 60s; }
  .cta-pulse::before { animation: none; display: none; }
  .compas span { animation: none; height: 16px; opacity: .85; }
}
