/* =========================================================
   CAN TAO YOGA — Ibiza
   Design system + components
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg:        #FAF9F7;   /* ivory — hard rule, never pure white */
  --bg-alt:    #EAE0CC;   /* deeper sand */
  --bg-deep:   #2A241C;   /* dark sand for inverted sections */
  --ink:       #1C1712;   /* near-black, warm */
  --ink-soft:  #3A2F26;
  --clay:      #B04A28;   /* terracotta */
  --clay-dark: #8A3A1F;
  --gold:      #C99A5B;
  --olive:     #5A6345;   /* Ibiza pine */
  --muted:     #6B5E52;
  --line:      rgba(28, 23, 18, 0.14);
  --line-soft: rgba(28, 23, 18, 0.08);

  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1440px;
  --content: 1200px;
  --reading: 640px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --nav-h: 88px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: auto; /* Lenis handles smooth */
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}
img, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.display-xl {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 11vw, 11rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-weight: 400;
}
.display-xl em { font-style: italic; color: var(--clay); font-weight: 300; }
.display-lg {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.display-lg em { font-style: italic; color: var(--clay); font-weight: 300; }
.display-md {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.display-sm {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
  line-height: 1.15;
}
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: '';
  width: 1.6rem;
  height: 1px;
  background: var(--muted);
  display: block;
}
.lead {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1.35;
  color: var(--ink-soft);
  font-weight: 300;
  letter-spacing: -0.005em;
}
.body-lg { font-size: 1.125rem; line-height: 1.65; color: var(--ink-soft); }
.body    { font-size: 1rem; line-height: 1.7; color: var(--ink-soft); }
.body-sm { font-size: 0.875rem; line-height: 1.6; color: var(--muted); }
.mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}
.container-wide {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}
section { position: relative; }
.section-pad { padding: clamp(1.4rem, 3.375vw, 2.8rem) 0; }
.section-pad-sm { padding: clamp(1.95rem, 3.9vw, 3.4rem) 0; }
.divider { height: 1px; background: var(--line); width: 100%; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  will-change: transform, opacity;
}
.preloader.done { pointer-events: none; }
/* When the intro has already played this session, hide it instantly (no flash). */
.no-preloader .preloader { display: none !important; }
.preloader-logo {
  width: min(280px, 62vw);
  height: auto;
  opacity: 0;
  animation: preloaderFade 1.4s var(--ease) forwards;
}
@keyframes preloaderFade {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---------- Custom cursor ---------- */
.cursor, .cursor-dot {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(250, 249, 247, 0.8);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s var(--ease);
}
.cursor-dot {
  width: 5px;
  height: 5px;
  background: rgba(250, 249, 247, 0.95);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor.is-hover { width: 68px; height: 68px; border-color: rgba(250, 249, 247, 1); }
@media (max-width: 900px), (pointer: coarse) {
  .cursor, .cursor-dot { display: none !important; }
  * { cursor: auto !important; }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem clamp(1.5rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.5s var(--ease), padding 0.5s var(--ease), border-color 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(250, 249, 247, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 1rem clamp(1.5rem, 4vw, 3rem);
  border-bottom-color: var(--line);
}
.nav.is-light-hero:not(.is-solid) { color: var(--bg); }
.nav.is-light-hero:not(.is-solid) .nav-menu a { color: var(--bg); }
.nav.is-light-hero:not(.is-solid) .nav-menu a::after { background: var(--bg); }
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
}
.nav-brand .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ink);
}
.nav-brand .brand-logo {
  height: clamp(42px, 4vw, 54px);
  width: auto;
  display: block;
}
/* Default (solid nav / light-background pages): show dark logo */
.nav-brand .brand-logo--white { display: none; }
/* Over the dark hero: show white logo */
.nav.is-light-hero:not(.is-solid) .brand-logo--dark { display: none; }
.nav.is-light-hero:not(.is-solid) .brand-logo--white { display: block; }
.nav-menu {
  display: flex;
  gap: 2.2rem;
  align-items: center;
}
.nav-menu a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  position: relative;
  padding: 0.2rem 0;
  transition: color 0.3s var(--ease);
}
.nav-menu a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width 0.4s var(--ease);
}
.nav-menu a:hover::after,
.nav-menu a.active::after { width: 100%; }
.nav-cta {
  padding: 0.65rem 1.3rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.nav-cta:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.nav.is-light-hero:not(.is-solid) .nav-cta:hover { background: var(--bg); color: var(--ink); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
  z-index: 200;
}
.nav-toggle span {
  position: absolute;
  left: 10px; right: 10px;
  height: 1px;
  background: currentColor;
  transition: transform 0.4s var(--ease), top 0.4s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle.is-open span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* Mobile overlay menu */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 150;
  transform: translateY(-100%);
  transition: transform 0.7s var(--ease-in-out);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 2rem 3rem;
}
.nav-overlay.is-open { transform: translateY(0); }
.nav-overlay ul { display: flex; flex-direction: column; gap: 1rem; }
.nav-overlay a {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 9vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  display: block;
}
.nav-overlay a em { color: var(--clay); font-style: italic; font-weight: 300; }
.nav-overlay .overlay-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 860px) {
  .nav-menu { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.05rem 1.8rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), transform 0.25s var(--ease-out);
  position: relative;
  overflow: hidden;
  will-change: transform;
}
.btn::after {
  content: '';
  display: block;
  width: 14px; height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:hover::after { width: 24px; }
.btn.btn-clay { background: var(--clay); color: var(--bg); border-color: var(--clay); }
.btn.btn-clay:hover { background: var(--clay-dark); border-color: var(--clay-dark); }
.btn.btn-ghost { border-color: currentColor; }
.btn.btn-light { color: var(--bg); border-color: var(--bg); }
.btn.btn-light:hover { background: var(--bg); color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  color: var(--bg);
  display: flex;
  align-items: flex-end;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media video,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(15, 10, 6, 0.35) 0%,
    rgba(15, 10, 6, 0.15) 30%,
    rgba(15, 10, 6, 0.55) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 clamp(1.5rem, 4vw, 3rem) clamp(3rem, 8vh, 6rem);
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 2rem;
}
.hero-meta .meta-left {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.hero-meta .meta-right {
  text-align: right;
  max-width: 340px;
}
.hero-meta .eyebrow { color: rgba(250, 249, 247, 0.85); }
.hero-meta .eyebrow::before { background: rgba(250, 249, 247, 0.7); }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 12.5vw, 13rem);
  line-height: 0.88;
  letter-spacing: -0.03em;
  font-weight: 400;
  color: var(--bg);
  overflow: visible;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.18em; margin-bottom: -0.18em; }
.hero-title .word { display: inline-block; }
.hero-title em { font-style: italic; font-weight: 300; color: #F0CDB3; }
.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: rgba(250, 249, 247, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  z-index: 2;
}
.hero-scroll .line-v {
  width: 1px; height: 42px;
  background: linear-gradient(180deg, rgba(250,249,247,0), rgba(250,249,247,0.8));
  animation: scrollLine 2.2s var(--ease) infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  padding: 1.8rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.marquee-track {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  will-change: transform;
}
.marquee-track span {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 3rem;
}
.marquee-track span em { color: var(--clay); font-style: italic; font-weight: 300; }
.marquee-track span::after {
  content: '✦';
  display: inline-block;
  margin-left: 3rem;
  color: var(--clay);
  font-size: 1.2rem;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- Section header ---------- */
.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 2rem;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.section-head .section-num {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  color: var(--muted);
  padding-top: 0.5rem;
}
.section-head .section-title { font-size: clamp(2rem, 5vw, 4rem); }
.section-head .section-note {
  max-width: 280px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}
@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; gap: 0.8rem; }
  .section-head .section-note { max-width: 100%; }
}

/* ---------- Manifesto / intro ---------- */
.manifesto {
  padding: clamp(1.4rem, 3.375vw, 2.8rem) 0;
  text-align: center;
  background: var(--bg);
}
.manifesto h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.2vw, 5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin: 0 auto;
  font-weight: 400;
}
.manifesto h2 em { color: var(--clay); font-style: italic; font-weight: 300; }
.manifesto h2 .word { display: inline-block; }
.manifesto-icon {
  display: block;
  margin: 0 auto 2rem;
  width: 44px;
  height: 44px;
  color: var(--clay);
}

/* ---------- Intro dual-column ---------- */
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.intro-left { position: sticky; top: calc(var(--nav-h) + 2rem); }
.intro-right p { font-size: 1.1rem; line-height: 1.7; color: var(--ink-soft); margin: 0 0 1.2rem; }
.intro-right p.first {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  line-height: 1.35;
  color: var(--ink);
  font-weight: 300;
  margin-bottom: 2rem;
}
@media (max-width: 860px) {
  .intro { grid-template-columns: 1fr; }
  .intro-left { position: static; }
}

/* ---------- Image frames & reveals ---------- */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
}
.frame img, .frame video {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 1.2s var(--ease-out);
}
.frame.revealed img, .frame.revealed video { transform: scale(1); }
/* Subjects sit left-of-centre in these photos — bias the crop left so they aren't cut. */
.frame img[src$="deva.jpg"] { object-position: left center; }
.frame img[src$="melina.jpg"] { object-position: 6% center; }
.frame::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--bg);
  z-index: 2;
  transform-origin: top;
  transition: transform 1.2s var(--ease-in-out);
}
.frame.revealed::before { transform: scaleY(0); }
.frame.ratio-portrait { aspect-ratio: 3/4; }
.frame.ratio-square { aspect-ratio: 1/1; }
.frame.ratio-landscape { aspect-ratio: 4/3; }
.frame.ratio-wide { aspect-ratio: 16/9; }
.frame.ratio-tall { aspect-ratio: 2/3; }

/* ---------- Gallery / mosaic ---------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
.mosaic .tile { overflow: hidden; }
.mosaic .t-a { grid-column: 1 / span 7; aspect-ratio: 4/3; }
.mosaic .t-b { grid-column: 8 / span 5; aspect-ratio: 3/4; }
.mosaic .t-c { grid-column: 1 / span 4; aspect-ratio: 3/4; }
.mosaic .t-d { grid-column: 5 / span 4; aspect-ratio: 1/1; }
.mosaic .t-e { grid-column: 9 / span 4; aspect-ratio: 3/4; }
.mosaic .t-f { grid-column: 1 / span 5; aspect-ratio: 4/3; }
.mosaic .t-g { grid-column: 6 / span 7; aspect-ratio: 16/9; }
@media (max-width: 760px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); }
  .mosaic .tile { grid-column: auto !important; aspect-ratio: 3/4 !important; }
  .mosaic .t-a, .mosaic .t-g { grid-column: 1 / -1 !important; aspect-ratio: 4/3 !important; }
}

/* ---------- Teachers ---------- */
.teachers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
}
@media (max-width: 1000px) { .teachers-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .teachers-grid { grid-template-columns: 1fr; } }
.teacher-card {
  display: block;
  cursor: pointer;
  position: relative;
}
.teacher-card .frame { aspect-ratio: 3/4; }
.teacher-card img { transition: transform 1.1s var(--ease-out), filter 0.6s var(--ease); filter: saturate(0.92); }
.teacher-card:hover img { transform: scale(1.06); filter: saturate(1.05); }
.teacher-card .meta {
  margin-top: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.teacher-card .name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: -0.005em;
}
.teacher-card .role {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 0.4rem;
}
.teacher-card .arrow {
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.4s var(--ease);
  flex-shrink: 0;
}
.teacher-card:hover .arrow { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: rotate(-45deg); }

/* ---------- Teacher row (detailed) ---------- */
.teacher-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding: clamp(2.25rem, 4.5vw, 3.9rem) 0;
  border-bottom: 1px solid var(--line);
}
.teacher-row:last-of-type { border-bottom: 0; }
.teacher-row.reverse .teacher-row-media { order: 2; }
.teacher-row .frame { aspect-ratio: 3/4; }
.teacher-row-body h3 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}
.teacher-row-body h3 em { color: var(--clay); font-style: italic; font-weight: 300; }
.teacher-row-body .role {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 1.8rem;
  display: block;
}
.teacher-row-body p { font-size: 1.02rem; line-height: 1.7; color: var(--ink-soft); margin: 0 0 1rem; }
.teacher-row-body .class-box {
  margin-top: 2rem;
  padding: 1.2rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
}
.teacher-row-body .class-box .ck-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--clay);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  display: block;
}
.teacher-row-body .class-box .ck-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.2;
}
.teacher-row-body .links {
  margin-top: 1.8rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.teacher-row-body .link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.teacher-row-body .link-pill:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (max-width: 860px) {
  .teacher-row { grid-template-columns: 1fr; gap: 2rem; }
  .teacher-row.reverse .teacher-row-media { order: 0; }
}

/* ---------- Schedule ---------- */
.schedule {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
@media (max-width: 860px) { .schedule { grid-template-columns: 1fr; } }

.schedule-days {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}
@media (max-width: 860px) {
  .schedule-days { position: static; flex-direction: row; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; overflow-x: auto; }
}
.schedule-day-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  text-align: left;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
  font-family: var(--font-body);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  font-weight: 500;
  white-space: nowrap;
}
.schedule-day-btn .count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.schedule-day-btn.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.schedule-day-btn.active .count { color: rgba(250, 249, 247, 0.6); }
.schedule-day-btn:not(.active):hover { border-color: var(--ink); }

.schedule-list {
  display: grid;
  gap: 0.6rem;
}
.schedule-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.6rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color 0.3s var(--ease), transform 0.4s var(--ease-out), background 0.3s var(--ease);
}
.schedule-item:hover { border-color: var(--ink); background: var(--bg-alt); }
.schedule-item .time {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.schedule-item .title h4 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.15;
  margin: 0 0 0.2rem;
}
.schedule-item .title p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
  letter-spacing: 0.04em;
}
.schedule-item .teacher {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.schedule-item .teacher img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.schedule-item.empty {
  padding: 2.5rem 1.6rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--muted);
  font-style: italic;
  display: block;
}
@media (max-width: 640px) {
  .schedule-item { grid-template-columns: 1fr; gap: 0.7rem; }
}

/* ---------- Inverted / dark section ---------- */
.section-dark {
  background: var(--bg-deep);
  color: var(--bg);
}
.section-dark .eyebrow { color: rgba(250, 249, 247, 0.7); }
.section-dark .eyebrow::before { background: rgba(250, 249, 247, 0.5); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--bg); }
.section-dark .body, .section-dark .body-lg { color: rgba(250, 249, 247, 0.75); }
.section-dark .section-head { border-bottom-color: rgba(250, 249, 247, 0.2); }
.section-dark .section-head .section-num,
.section-dark .section-head .section-note { color: rgba(250, 249, 247, 0.6); }

/* ---------- Quote ---------- */
.quote {
  padding: clamp(1.4rem, 3.375vw, 2.8rem) 0;
  text-align: center;
}
.quote blockquote {
  margin: 0 auto;
  max-width: 26ch;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: inherit;
  font-weight: 300;
  font-style: italic;
  position: relative;
}
.quote cite {
  display: block;
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
  font-style: normal;
}
.section-dark .quote cite,
.section-dark.quote cite { color: rgba(250, 249, 247, 0.9); }

/* ---------- Events grid ---------- */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
}
@media (max-width: 900px) { .events-grid { grid-template-columns: 1fr; } }
.event-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color 0.3s var(--ease), transform 0.4s var(--ease-out);
}
.event-card:hover { border-color: var(--ink); transform: translateY(-3px); }
.event-card .frame { aspect-ratio: 4/3; border-radius: 4px; }
.event-card .date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--clay);
  text-transform: uppercase;
}
.event-card h3 { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.15; margin: 0; }
.event-card p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* ---------- Stats / numbers ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: clamp(1.7rem, 3.4vw, 2.8rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; } }
.stat { text-align: center; }
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
  color: var(--clay);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.stat .label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 0.7rem;
  display: block;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-deep);
  color: var(--bg);
  padding: clamp(2.25rem, 4.5vw, 3.9rem) 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(250, 249, 247, 0.15);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem 2rem; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: rgba(250, 249, 247, 0.55);
  text-transform: uppercase;
  margin: 0 0 1.2rem;
  font-weight: 500;
}
.footer ul { display: flex; flex-direction: column; gap: 0.55rem; }
.footer ul a {
  font-size: 0.95rem;
  color: rgba(250, 249, 247, 0.85);
  transition: color 0.3s var(--ease);
}
.footer ul a:hover { color: var(--clay); }
.footer-brand .mark {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}
.footer-brand p {
  color: rgba(250, 249, 247, 0.7);
  font-size: 0.95rem;
  max-width: 34ch;
  line-height: 1.55;
}
.footer-bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: rgba(250, 249, 247, 0.5);
  text-transform: uppercase;
}
.newsletter {
  display: flex;
  gap: 0;
  margin-top: 1rem;
  border: 1px solid rgba(250, 249, 247, 0.25);
  border-radius: 999px;
  overflow: hidden;
  max-width: 380px;
  transition: border-color 0.3s var(--ease);
}
.newsletter:focus-within { border-color: var(--bg); }
.newsletter input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 0.85rem 1.2rem;
  color: var(--bg);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}
.newsletter input::placeholder { color: rgba(250, 249, 247, 0.5); }
.newsletter button {
  padding: 0 1.4rem;
  background: var(--clay);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 0.3s var(--ease);
}
.newsletter button:hover { background: var(--clay-dark); }

/* ---------- Contact block ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-item:last-child { border-bottom: 0; }
.contact-item .label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  display: block;
}
.contact-item .value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.contact-item .value a { transition: color 0.3s var(--ease); }
.contact-item .value a:hover { color: var(--clay); }

.map-frame {
  aspect-ratio: 4/5;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-alt);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.2) contrast(1.05); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  padding: calc(var(--nav-h) + 5rem) 0 clamp(1.7rem, 3.4vw, 2.8rem);
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { margin-bottom: 1.5rem; }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-weight: 400;
  margin: 0 0 1.5rem;
}
.page-hero h1 em { color: var(--clay); font-style: italic; font-weight: 300; }
.page-hero .lead { max-width: 56ch; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-clay { color: var(--clay); }
.italic { font-style: italic; }
.sp-1 { height: 1rem; } .sp-2 { height: 2rem; } .sp-3 { height: 3rem; } .sp-4 { height: 4rem; } .sp-6 { height: 6rem; }

/* reveals: elements get .reveal, animated via JS or IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-line { overflow: hidden; }
.reveal-line > * {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease);
}
.reveal-line.in > * { transform: translateY(0); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none !important; }
  .reveal, .reveal-line > *, .frame, .frame::before, .frame img, .frame video { opacity: 1 !important; transform: none !important; }
  .cursor, .cursor-dot { display: none !important; }
}
