/* ==========================================================================
   BOREAL ARTS ACADEMY — Stylesheet
   Palette drawn from the brand mark: deep teal wave, warm gold star, navy ink.
   ========================================================================== */

:root {
  /* Brand palette */
  --teal-900: #0b3535;
  --teal-700: #0f4c4c;
  --teal-600: #17685f;
  --teal-400: #4fa89c;
  --teal-200: #a9d4cb;
  --teal-100: #dcefe9;
  --gold-500: #c9a15a;
  --gold-400: #d9b878;
  --gold-200: #f0dfb8;
  --navy-900: #131f2b;
  --navy-700: #1e3140;
  --cream-50: #faf7f1;
  --cream-100: #f3ede1;
  --white: #ffffff;

  /* Semantic tokens (light) */
  --bg: var(--cream-50);
  --bg-alt: var(--cream-100);
  --surface: var(--white);
  --text: var(--navy-900);
  --text-soft: #4a5a63;
  --text-inverse: var(--cream-50);
  --border: rgba(19, 31, 43, 0.1);
  --accent: var(--teal-600);
  --accent-strong: var(--teal-900);
  --accent-gold: var(--gold-500);
  --shadow: 0 20px 50px -20px rgba(11, 53, 53, 0.35);
  --shadow-sm: 0 8px 24px -12px rgba(11, 53, 53, 0.25);

  --font-display: "Playfair Display", "Iowan Old Style", "Georgia", serif;
  --font-body: "Jost", "Avenir Next", "Segoe UI", sans-serif;

  --container: 1180px;
  --radius: 18px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1a1c;
    --bg-alt: #0f2225;
    --surface: #112a2c;
    --text: #eef3f1;
    --text-soft: #a9bdbc;
    --text-inverse: #0c1a1c;
    --border: rgba(238, 243, 241, 0.12);
    --accent: var(--teal-400);
    --accent-strong: var(--teal-200);
    --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  }
}

/* ---------------------------------------------------------------------- */
/* Reset & base                                                           */
/* ---------------------------------------------------------------------- */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

section { position: relative; }

.section-pad { padding: clamp(4rem, 9vw, 7.5rem) 0; }

::selection { background: var(--gold-400); color: var(--navy-900); }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------------- */
/* Typography helpers                                                     */
/* ---------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent-gold);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
  max-width: 20ch;
}

.section-title em {
  font-style: italic;
  color: var(--accent);
}

.section-lede {
  margin-top: 1.1rem;
  max-width: 58ch;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.section-head {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head.center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-head.center .section-lede { text-align: center; }

/* ---------------------------------------------------------------------- */
/* Buttons                                                                */
/* ---------------------------------------------------------------------- */

.btn {
  --btn-fg: var(--text-inverse);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease), border-color .35s var(--ease);
  white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; flex: none; transition: transform 0.35s var(--ease); }

.btn-primary {
  background: linear-gradient(135deg, var(--teal-600), var(--teal-900));
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--navy-900);
  box-shadow: 0 14px 30px -12px rgba(201, 161, 90, 0.55);
}
.btn-gold:hover { transform: translateY(-3px); filter: brightness(1.04); }

.btn-ghost {
  background: transparent;
  color: var(--text-inverse);
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; transform: translateY(-3px); }

.btn-outline {
  background: transparent;
  color: var(--accent-strong);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }

.btn-block { width: 100%; justify-content: center; }

/* ---------------------------------------------------------------------- */
/* Header / Nav                                                           */
/* ---------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 1.4rem 0;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.site-header.is-scrolled {
  padding: 0.7rem 0;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px -18px rgba(11, 53, 53, 0.35);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand img { height: 80px; width: auto; max-width: none; transition: height 0.4s var(--ease); }
.is-scrolled .brand img { height: 66px; }
.brand-word { display: none; }

/* Swap to the white mark over the transparent/dark hero header, and to the
   full-colour mark once the header picks up its light, scrolled surface. */
.brand .logo-color { display: none; }
.site-header.is-scrolled .brand .logo-white { display: none; }
.site-header.is-scrolled .brand .logo-color { display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 1.6vw, 1.7rem);
}

.nav-links a {
  position: relative;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.1rem;
  color: var(--text-inverse);
  transition: color 0.3s ease;
}

.site-header.is-scrolled .nav-links a { color: var(--text); }

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -2px;
  height: 2px;
  background: var(--accent-gold);
  transition: right 0.35s var(--ease);
}
.nav-links a:hover::after,
.nav-links a.is-active::after { right: 0; }

.nav-cta { display: flex; align-items: center; gap: 0.75rem; }
.nav-cta .btn { padding: 0.7rem 1.35rem; font-size: 0.84rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  height: 2px;
  background: var(--text-inverse);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.3s ease, background 0.3s ease;
}
.is-scrolled .nav-toggle span { background: var(--text); }

/* ---------------------------------------------------------------------- */
/* Hero                                                                   */
/* ---------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--text-inverse);
  overflow: hidden;
  isolation: isolate;
}

.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media video, .hero-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-media video {
  opacity: 0;
  transition: opacity 0.9s ease;
}
.hero-media video.is-active {
  opacity: 1;
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(6,18,20,0.85) 0%, rgba(6,18,20,0) 100%),
    linear-gradient(100deg, rgba(11,53,53,0.55), rgba(11,53,53,0) 55%);
}

.hero-sparkle {
  position: absolute;
  z-index: -1;
  opacity: 0.65;
  filter: drop-shadow(0 0 12px rgba(217, 184, 120, 0.5));
  animation: twinkle 3.6s ease-in-out infinite;
}
.hero-sparkle.s1 { top: 18%; left: 12%; width: 22px; animation-delay: 0s; }
.hero-sparkle.s2 { top: 32%; right: 16%; width: 14px; animation-delay: 1.1s; }
.hero-sparkle.s3 { top: 60%; left: 6%; width: 10px; animation-delay: 2s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.85) rotate(0deg); }
  50% { opacity: 0.9; transform: scale(1.15) rotate(8deg); }
}

.hero-inner {
  width: 100%;
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
  padding-top: 9rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-200);
  font-weight: 600;
  margin-bottom: 1.4rem;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.15s forwards;
}
.hero-eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--gold-400); }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  max-width: 16ch;
  opacity: 0;
  animation: rise 1s var(--ease) 0.3s forwards;
}

.hero h1 em {
  font-style: italic;
  background: linear-gradient(100deg, var(--gold-200), var(--gold-500) 60%, var(--teal-200));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 1.6rem;
  max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  color: rgba(250, 247, 241, 0.86);
  opacity: 0;
  animation: rise 1s var(--ease) 0.48s forwards;
}

.hero-actions {
  margin-top: 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  opacity: 0;
  animation: rise 1s var(--ease) 0.64s forwards;
}

.hero-scroll {
  position: absolute;
  right: clamp(1.25rem, 4vw, 2.5rem);
  bottom: 2.2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(250, 247, 241, 0.72);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.hero-scroll .line { width: 1px; height: 46px; background: linear-gradient(180deg, rgba(250,247,241,0.9), transparent); animation: dropline 2.2s ease-in-out infinite; }

@keyframes dropline { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 50.01% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.wave-divider { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; z-index: 1; pointer-events: none; }
.wave-divider svg { width: 100%; height: auto; display: block; }

/* ---------------------------------------------------------------------- */
/* Reveal on scroll                                                       */
/* ---------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1.is-visible { transition-delay: 0.1s; }
.reveal-delay-2.is-visible { transition-delay: 0.2s; }
.reveal-delay-3.is-visible { transition-delay: 0.3s; }
.reveal-delay-4.is-visible { transition-delay: 0.4s; }

/* ---------------------------------------------------------------------- */
/* Why Boreal / features strip                                            */
/* ---------------------------------------------------------------------- */

.features {
  background: #244b4c;
  color: var(--text-inverse);
  padding: clamp(3.5rem, 7vw, 5rem) 0;
  position: relative;
  overflow: hidden;
}
.features::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(201, 161, 90, 0.32) 100%);
}
.features .container { position: relative; }

.features-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2.6rem;
}
.features-head h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; }
.features-head p { color: var(--teal-200); max-width: 40ch; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-item {
  background: var(--teal-100);
  border-radius: var(--radius-sm);
  padding: 2.2rem 1.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}
.feature-item .icon { width: 40px; height: 40px; color: var(--teal-700); }
.feature-item span { font-weight: 500; font-size: 0.98rem; color: var(--navy-900); line-height: 1.4; }

/* ---------------------------------------------------------------------- */
/* About                                                                  */
/* ---------------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.about-media { position: relative; }
.about-media .frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}
.about-media .frame img { width: 100%; height: 100%; object-fit: cover; }

.about-media .accent-card {
  position: absolute;
  bottom: -1.6rem;
  right: -1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.4rem 1.7rem;
  box-shadow: var(--shadow);
  max-width: 240px;
}
.about-media .accent-card .num { font-family: var(--font-display); font-size: 2.1rem; color: var(--accent); font-weight: 600; }
.about-media .accent-card p { font-size: 0.85rem; color: var(--text-soft); margin-top: 0.2rem; }

.about-copy p + p { margin-top: 1.1rem; }
.about-copy p { color: var(--text-soft); }
.about-copy .section-title { margin-bottom: 1.4rem; }

.about-signoff {
  margin-top: 1.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--accent-strong);
}

/* ---------------------------------------------------------------------- */
/* Programs                                                                */
/* ---------------------------------------------------------------------- */

.programs { background: var(--bg-alt); }

.program-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.program-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.9rem;
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.program-card .icon-wrap {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--teal-100);
  color: var(--teal-700);
  margin-bottom: 1.1rem;
  flex: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .program-card .icon-wrap { background: rgba(79,168,156,0.16); color: var(--teal-400); }
}
.program-card .icon-wrap svg { width: 24px; height: 24px; }

.program-card h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin-bottom: 0.55rem; flex: none; }
.program-card p { color: var(--text-soft); font-size: 0.88rem; font-weight: 600; line-height: 1.45; }
.program-card .tag-list { margin-top: auto; padding-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.5rem; flex: none; }
.program-card .tag-list li {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: var(--bg-alt);
  color: var(--text-soft);
}

.program-card.featured {
  border-left: 3px solid var(--gold-500);
}
.program-card.featured .icon-wrap { background: var(--gold-200); color: var(--gold-500); }
.program-card.featured .tag-list li { background: var(--gold-200); color: var(--navy-900); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .program-card.featured .icon-wrap { background: rgba(217,184,120,0.16); color: var(--gold-400); }
  :root:not([data-theme="light"]) .program-card.featured .tag-list li { background: rgba(217,184,120,0.16); color: var(--gold-200); }
}

/* ---------------------------------------------------------------------- */
/* Faculty                                                                 */
/* ---------------------------------------------------------------------- */

.faculty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.7rem;
}

.faculty-card {
  text-align: center;
  padding: 2.4rem 1.6rem 2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.faculty-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-sm); }

.faculty-avatar {
  width: 108px; height: 108px;
  margin: 0 auto 1.4rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: conic-gradient(from 200deg, var(--teal-400), var(--teal-700) 40%, var(--gold-500) 75%, var(--teal-400));
  padding: 3px;
}
.faculty-avatar .inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-strong);
  overflow: hidden;
}
.faculty-avatar svg { width: 34px; height: 34px; color: var(--accent); }
.faculty-avatar .inner img { width: 100%; height: 100%; object-fit: cover; }

.faculty-card h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.faculty-card .role {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.faculty-card p.bio { margin-top: 0.9rem; font-size: 0.88rem; color: var(--text-soft); }
.faculty-card .bio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
  transition: gap 0.3s ease;
}
.faculty-card .bio-link:hover { gap: 0.55rem; }
.faculty-card .bio-link svg { width: 14px; height: 14px; }

.faculty-note {
  margin-top: 2.6rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-soft);
}

/* ---------------------------------------------------------------------- */
/* Schedule & Tuition                                                     */
/* ---------------------------------------------------------------------- */

.schedule {
  position: relative;
  color: var(--text-inverse);
  overflow: hidden;
}
.schedule-media { position: absolute; inset: 0; z-index: -2; }
.schedule-media img { width: 100%; height: 100%; object-fit: cover; }
.schedule-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(11,53,53,0.94) 30%, rgba(11,53,53,0.72) 65%, rgba(11,53,53,0.5));
}

.schedule-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.schedule-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.schedule-list li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(6px);
}
.schedule-list li svg { width: 22px; height: 22px; color: var(--gold-400); flex: none; }
.schedule-list li strong { display: block; font-size: 0.98rem; }
.schedule-list li span { font-size: 0.84rem; color: rgba(250,247,241,0.75); }

.schedule-card {
  background: rgba(250,247,241,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 2.4rem;
  backdrop-filter: blur(10px);
}
.schedule-card .eyebrow { color: var(--gold-400); }
.schedule-card .eyebrow::before { background: var(--gold-400); }
.schedule-card h3 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; margin-bottom: 0.9rem; }
.schedule-card p { color: rgba(250,247,241,0.82); font-size: 0.96rem; margin-bottom: 1.6rem; }

/* ---------------------------------------------------------------------- */
/* Studio rentals                                                         */
/* ---------------------------------------------------------------------- */

.rentals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}

.rentals-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}
.rentals-gallery img {
  border-radius: var(--radius-sm);
  aspect-ratio: 1;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease);
}
.rentals-gallery img:hover { transform: scale(1.03); }
.rentals-gallery .tall { aspect-ratio: 1 / 1.35; grid-row: span 2; }

.perfect-list {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}
.perfect-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.92rem;
  color: var(--text-soft);
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.perfect-list li svg { width: 18px; height: 18px; color: var(--accent); flex: none; }

/* ---------------------------------------------------------------------- */
/* Events                                                                  */
/* ---------------------------------------------------------------------- */

.events { background: var(--bg-alt); }

.events-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: stretch;
}

.event-list { display: grid; gap: 1rem; }
.event-row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.2rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .35s ease, transform .35s var(--ease);
}
.event-row:hover { transform: translateX(6px); border-color: var(--accent); }
.event-row .icon {
  width: 44px; height: 44px; flex: none;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--teal-100); color: var(--teal-700);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .event-row .icon { background: rgba(79,168,156,0.18); color: var(--teal-400); }
}
.event-row .icon svg { width: 22px; height: 22px; }
.event-row strong { display: block; font-size: 1rem; }
.event-row span { font-size: 0.85rem; color: var(--text-soft); }

.event-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: relative; min-height: 320px; }
.event-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.event-media .caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.6rem;
  background: linear-gradient(0deg, rgba(11,25,27,0.85), transparent);
  color: #fff;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
}

/* ---------------------------------------------------------------------- */
/* Gallery                                                                 */
/* ---------------------------------------------------------------------- */

.gallery-carousel {
  position: relative;
}

.gallery-grid {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.2rem 0.1rem 0.8rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.gallery-grid::-webkit-scrollbar { display: none; }

.gallery-item {
  scroll-snap-align: start;
  flex: 0 0 calc((100% - 3 * 0.85rem) / 4);
  aspect-ratio: 1 / 1;
  min-width: 0;
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg-alt);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(11,25,27,0.55), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-item .zoom-icon {
  position: absolute; right: 12px; bottom: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(250,247,241,0.9);
  color: var(--accent-strong);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.7);
  transition: all 0.35s var(--ease);
}
.gallery-item .zoom-icon svg { width: 15px; height: 15px; }
.gallery-item:hover .zoom-icon { opacity: 1; transform: scale(1); }

.gallery-item.big, .gallery-item.wide { flex-basis: calc((100% - 3 * 0.85rem) / 4 * 2 + 0.85rem); }

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent-strong);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.3s ease, opacity 0.3s ease, transform 0.3s var(--ease);
}
.gallery-nav svg { width: 18px; height: 18px; }
.gallery-nav:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.gallery-nav.prev { left: -8px; }
.gallery-nav.next { right: -8px; }
.gallery-nav:disabled { opacity: 0.3; pointer-events: none; }

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.8rem;
}
.gallery-dots button {
  width: 8px; height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s var(--ease);
}
.gallery-dots button.is-active {
  background: var(--accent);
  transform: scale(1.35);
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(6, 18, 20, 0.94);
  display: flex; align-items: center; justify-content: center;
  padding: 4vh 4vw;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease, transform .3s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-nav svg, .lightbox-close svg { width: 18px; height: 18px; }
.lightbox-nav.prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-nav.next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-nav.prev:hover, .lightbox-nav.next:hover { transform: translateY(-50%) scale(1.06); }

/* ---------------------------------------------------------------------- */
/* Testimonials                                                           */
/* ---------------------------------------------------------------------- */

.testimonials {
  background: var(--accent-strong);
  color: var(--text-inverse);
  position: relative;
  overflow: hidden;
}
.testimonials::before {
  content: "\201C";
  position: absolute;
  top: -4rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 26rem;
  line-height: 1;
  color: rgba(255,255,255,0.04);
  pointer-events: none;
}

.testimonial-carousel {
  position: relative;
}

.testimonial-track {
  position: relative;
  display: flex;
  gap: 1.6rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.3rem 0.1rem 0.8rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.testimonial-track::-webkit-scrollbar { display: none; }

.testimonial-card {
  scroll-snap-align: start;
  flex: 0 0 calc((100% - 2 * 1.6rem) / 3);
  min-width: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: 2.1rem 1.9rem;
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.testimonial-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.3s ease, opacity 0.3s ease, transform 0.3s var(--ease);
}
.testimonial-nav svg { width: 18px; height: 18px; }
.testimonial-nav:hover { background: rgba(255,255,255,0.2); }
.testimonial-nav.prev { left: -8px; }
.testimonial-nav.next { right: -8px; }
.testimonial-nav:disabled { opacity: 0.3; pointer-events: none; }

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.8rem;
}
.testimonial-dots button {
  width: 8px; height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s var(--ease);
}
.testimonial-dots button.is-active {
  background: var(--gold-400);
  transform: scale(1.35);
}
.testimonial-card .stars { display: flex; gap: 0.25rem; color: var(--gold-400); }
.testimonial-card .stars svg { width: 15px; height: 15px; }
.testimonial-card p.quote { font-size: 1.02rem; line-height: 1.6; color: rgba(250,247,241,0.92); font-style: italic; font-family: var(--font-display); }
.testimonial-card .who { display: flex; align-items: center; gap: 0.8rem; margin-top: auto; }
.testimonial-card .avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-400), var(--gold-500));
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.85rem; color: var(--navy-900);
  flex: none;
}
img.testimonial-card-avatar,
.testimonial-card img.avatar {
  object-fit: cover;
  background: var(--teal-700);
}
.testimonial-card .who strong { display: block; font-size: 0.92rem; }
.testimonial-card .who span { font-size: 0.78rem; color: var(--teal-200); }

.google-rating-summary {
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
  font-size: 0.92rem;
  color: rgba(250,247,241,0.82);
}
.google-rating-summary .stars svg { width: 16px; height: 16px; color: var(--gold-400); vertical-align: -3px; }
.google-rating-summary strong { color: #fff; font-size: 1.05rem; }
.google-rating-summary a { color: var(--gold-400); font-weight: 600; text-underline-offset: 3px; }
.google-rating-summary a:hover { text-decoration: underline; }

.testimonial-note {
  margin-top: 2rem;
  font-size: 0.78rem;
  color: rgba(250,247,241,0.5);
  text-align: center;
}
.testimonial-note code {
  background: rgba(255,255,255,0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ---------------------------------------------------------------------- */
/* FAQ                                                                    */
/* ---------------------------------------------------------------------- */

.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.9rem; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.faq-q .plus {
  width: 26px; height: 26px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: transform 0.4s var(--ease), background 0.4s ease, border-color .4s ease;
}
.faq-q .plus::before, .faq-q .plus::after {
  content: "";
  position: absolute;
  background: var(--accent);
  transition: transform 0.4s var(--ease), opacity .4s ease;
}
.faq-q .plus::before { width: 10px; height: 1.5px; }
.faq-q .plus::after { width: 1.5px; height: 10px; }

.faq-item.is-open .faq-q .plus { background: var(--accent); border-color: var(--accent); }
.faq-item.is-open .faq-q .plus::before,
.faq-item.is-open .faq-q .plus::after { background: var(--white); }
.faq-item.is-open .faq-q .plus::after { transform: rotate(90deg); opacity: 0; }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease);
}
.faq-a-inner { padding: 0 1.5rem 1.5rem; color: var(--text-soft); font-size: 0.95rem; max-width: 68ch; }

/* ---------------------------------------------------------------------- */
/* Contact                                                                 */
/* ---------------------------------------------------------------------- */

.contact { background: var(--bg-alt); }

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2.5rem, 5vw, 4rem);
}

.contact-info { display: flex; flex-direction: column; gap: 1.1rem; }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.3rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.contact-card .icon {
  width: 42px; height: 42px; flex: none;
  border-radius: 12px;
  background: var(--teal-100);
  color: var(--teal-700);
  display: flex; align-items: center; justify-content: center;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .contact-card .icon { background: rgba(79,168,156,0.18); color: var(--teal-400); }
}
.contact-card .icon svg { width: 20px; height: 20px; }
.contact-card strong { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-soft); margin-bottom: 0.25rem; }
.contact-card a, .contact-card p { font-size: 0.98rem; color: var(--text); font-weight: 500; }

.social-row { display: flex; gap: 0.8rem; margin-top: 0.4rem; }
.social-row a {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.35s ease, transform 0.35s var(--ease), color .35s ease, border-color .35s ease;
  color: var(--accent-strong);
}
.social-row a svg { width: 19px; height: 19px; }
.social-row a:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-3px); }

.contact-map { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.contact-map iframe { width: 100%; height: 220px; border: 0; display: block; filter: grayscale(0.15) contrast(1.02); }

.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3vw, 2.6rem);
  box-shadow: var(--shadow-sm);
}
.contact-form-wrap h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; }
.contact-form-wrap > p { color: var(--text-soft); font-size: 0.94rem; margin-bottom: 1.8rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.5rem; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 0.82rem; font-weight: 600; color: var(--text-soft); }
.form-field input,
.form-field select,
.form-field textarea {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.form-note { margin-top: 1rem; font-size: 0.8rem; color: var(--text-soft); text-align: center; }

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer {
  background: var(--navy-900);
  color: rgba(250,247,241,0.75);
  padding: 3.5rem 0 2rem;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand { display: flex; align-items: center; gap: 0.8rem; }
.footer-brand img { height: 42px; max-width: none; }
.footer-brand-text { font-family: var(--font-display); font-size: 1.2rem; color: #fff; }
.footer-tag { margin-top: 0.7rem; max-width: 32ch; font-size: 0.88rem; }

.footer-cols { display: flex; gap: clamp(2rem, 5vw, 5rem); flex-wrap: wrap; }
.footer-col h4 { color: #fff; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a { font-size: 0.9rem; transition: color 0.3s ease; }
.footer-col a:hover { color: var(--gold-400); }

.footer-bottom {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: rgba(250,247,241,0.5);
}
.footer-bottom a:hover { color: var(--gold-400); }

/* ---------------------------------------------------------------------- */
/* Back to top                                                            */
/* ---------------------------------------------------------------------- */

.back-to-top {
  position: fixed;
  right: 1.6rem;
  bottom: 1.6rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent-strong);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 90;
  box-shadow: var(--shadow-sm);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s var(--ease), visibility 0.35s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------------- */
/* Responsive                                                             */
/* ---------------------------------------------------------------------- */

@media (max-width: 980px) {
  .about-grid, .schedule-grid, .rentals-grid, .events-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 420px; margin: 0 auto; }
  .testimonial-card { flex-basis: calc((100% - 1.6rem) / 2); }
  .gallery-item { flex-basis: calc((100% - 2 * 0.85rem) / 3); }
  .gallery-item.big, .gallery-item.wide { flex-basis: calc((100% - 2 * 0.85rem) / 3 * 2 + 0.85rem); }
  .program-grid { grid-template-columns: repeat(2, 1fr); }
  .faculty-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  body.nav-open .nav-links {
    display: flex;
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.6rem;
    background: var(--accent-strong);
    z-index: 99;
  }
  body.nav-open .nav-links a { color: #fff; font-size: 1.2rem; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  body.nav-open .nav-toggle span { background: #fff; }

  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .faculty-grid { grid-template-columns: 1fr; }
  .testimonial-card { flex-basis: 100%; }
  .testimonial-nav.prev { left: -6px; }
  .testimonial-nav.next { right: -6px; }
  .gallery-nav.prev { left: -6px; }
  .gallery-nav.next { right: -6px; }
  .gallery-item { flex-basis: calc((100% - 0.85rem) / 2); }
  .gallery-item.big, .gallery-item.wide { flex-basis: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .perfect-list { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2.5rem; }
  .program-grid { grid-template-columns: 1fr; }
  .program-card { aspect-ratio: auto; }
}

/* ---------------------------------------------------------------------- */
/* Bio subpages (e.g. /karol)                                            */
/* ---------------------------------------------------------------------- */

.subpage-top { padding-top: calc(9rem + clamp(1.5rem, 4vw, 2.5rem)); }

.role-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--teal-100);
  color: var(--teal-700);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .role-tag { background: rgba(79,168,156,0.16); color: var(--teal-400); }
}

.video-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  background: var(--navy-900);
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
