/* =========================================================
   PI ACADEMIA — style.css
   Brand: #7a77e0  |  Light + Dark  |  Fully responsive
   ========================================================= */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  --brand: #7a77e0;
  --brand-dark: #5f5cc4;
  --brand-deep: #47448f;
  --brand-light: #9d9bf0;
  --brand-soft: rgba(122, 119, 224, 0.12);
  --brand-soft-2: rgba(122, 119, 224, 0.22);
  --brand-glow: rgba(122, 119, 224, 0.45);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --nav-h: 78px;
  --container: 1180px;
}

/* Light theme */
[data-theme="light"] {
  --bg: #f6f6fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f0fb;
  --text: #17162a;
  --text-muted: #5d5c74;
  --border: rgba(23, 22, 42, 0.09);
  --border-strong: rgba(23, 22, 42, 0.16);
  --shadow: 0 10px 30px -14px rgba(23, 22, 42, 0.22);
  --shadow-lg: 0 30px 70px -28px rgba(23, 22, 42, 0.35);
  --nav-bg: rgba(255, 255, 255, 0.78);
  --footer-bg: #17162a;
  --footer-text: #c7c6de;
  --footer-head: #ffffff;
  --footer-border: rgba(255, 255, 255, 0.1);
  --scrim: linear-gradient(90deg, rgba(18, 16, 40, 0.9) 0%, rgba(18, 16, 40, 0.62) 48%, rgba(18, 16, 40, 0.3) 100%);
}

/* Dark theme */
[data-theme="dark"] {
  --bg: #0d0c17;
  --bg-alt: #12111f;
  --surface: #191827;
  --surface-2: #201f31;
  --text: #eeedf7;
  --text-muted: #a3a1bb;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 30px 70px -28px rgba(0, 0, 0, 0.9);
  --nav-bg: rgba(13, 12, 23, 0.74);
  --footer-bg: #09080f;
  --footer-text: #b4b2cc;
  --footer-head: #ffffff;
  --footer-border: rgba(255, 255, 255, 0.08);
  --scrim: linear-gradient(90deg, rgba(8, 7, 18, 0.94) 0%, rgba(8, 7, 18, 0.7) 48%, rgba(8, 7, 18, 0.38) 100%);
}

/* ---------- 2. RESET & BASE ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 14px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.45s var(--ease), color 0.45s var(--ease);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; padding: 0; }

/* graceful fallback when an image is missing */
img[data-ph] {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 55%, #2a2848 100%);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-align: center;
  object-fit: cover;
}

::selection { background: var(--brand); color: #fff; }

/* ---------- 3. UTILITIES ---------- */
.container {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}

.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  max-width: 680px;
  margin: 0 auto clamp(2.5rem, 5vw, 3.8rem);
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.7rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 0.9rem;
}

.section-head p { color: var(--text-muted); font-size: 1.03rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.eyebrow-light {
  color: #dedcff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
}

.grad-text {
  background-image: linear-gradient(120deg, var(--brand-dark), var(--brand), var(--brand-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.88rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
  will-change: transform;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 14px 30px -14px var(--brand-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 42px -16px var(--brand-glow);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.btn:active { transform: translateY(-1px) scale(0.985); }

/* ---------- 4. PRELOADER ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2a2848 0%, #47448f 55%, #7a77e0 100%);
  background-size: 200% 200%;
  animation: preloaderShift 6s ease infinite;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

@keyframes preloaderShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.preloader.done { opacity: 0; visibility: hidden; }

.preloader-inner { display: grid; justify-items: center; gap: 1.2rem; }

.preloader-mark {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: contain;
  filter: brightness(0) invert(1) drop-shadow(0 6px 22px rgba(122, 119, 224, 0.6));
  animation: pulseMark 1.4s ease-in-out infinite;
}
.preloader-bar {
  width: 150px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.preloader-bar i {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 99px;
  background: linear-gradient(90deg, #ffffff, #d6d4ff);
  animation: slideBar 1.1s ease-in-out infinite;
}

@keyframes pulseMark {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.75; }
}

@keyframes slideBar {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(360%); }
}

/* ---------- 5. NAVBAR ---------- */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 900;
  background: transparent;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), backdrop-filter 0.4s;
}

.navbar.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 1px 0 var(--border), 0 14px 40px -24px rgba(0, 0, 0, 0.5);
}

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Logo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 3;
}

.logo-mark {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  transition: transform 0.4s var(--ease-out);
}

/* Invert logo → white when over the dark hero, OR whenever dark mode is on */
.navbar:not(.scrolled) .logo-mark,
[data-theme="dark"] .logo-mark {
  filter: brightness(0) invert(1);
}

.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }

.logo-text {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
  transition: color 0.4s var(--ease);
}

.logo-text em {
  font-style: normal;
  font-weight: 400;
  color: var(--brand);
}

/* Top hero is dark → white nav text until scrolled */
.navbar:not(.scrolled) .logo-text,
.navbar:not(.scrolled) .nav-link,
.navbar:not(.scrolled) .theme-toggle,
.navbar:not(.scrolled) .hamburger span { color: #fff; }
.navbar:not(.scrolled) .logo-text em { color: #c9c7ff; }
.navbar:not(.scrolled) .hamburger span { background: #fff; }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  position: relative;
  padding: 0.5rem 0.78rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: translateX(-50%);
  transition: width 0.35s var(--ease-out);
}

.nav-link:hover,
.nav-link.active { color: var(--brand); }

.nav-link:hover::after,
.nav-link.active::after { width: 46%; }

.navbar:not(.scrolled) .nav-link:hover,
.navbar:not(.scrolled) .nav-link.active { color: #cfcdff; }
.navbar:not(.scrolled) .nav-link::after { background: #cfcdff; }

/* Nav actions */
.nav-actions { display: flex; align-items: center; gap: 0.6rem; z-index: 3; }

.theme-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.35s var(--ease-out), border-color 0.3s, background 0.3s, color 0.3s;
}

.navbar:not(.scrolled) .theme-toggle {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.theme-toggle:hover { transform: rotate(18deg) scale(1.06); border-color: var(--brand); }

.theme-toggle svg { width: 19px; height: 19px; position: absolute; transition: opacity 0.35s, transform 0.5s var(--ease-out); }

.icon-moon { opacity: 0; transform: rotate(-70deg) scale(0.6); }
[data-theme="dark"] .icon-sun { opacity: 0; transform: rotate(70deg) scale(0.6); }
[data-theme="dark"] .icon-moon { opacity: 1; transform: none; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.navbar:not(.scrolled) .hamburger {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.4s var(--ease-out), opacity 0.25s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Scroll progress */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand-light));
  box-shadow: 0 0 12px var(--brand-glow);
  transition: width 0.1s linear;
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 850;
  background: rgba(8, 7, 18, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}

.nav-backdrop.show { opacity: 1; visibility: visible; }

/* ---------- 6. HERO SLIDER ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  background: #12102a;
}

.slider { position: absolute; inset: 0; }

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.1s var(--ease), visibility 1.1s;
}

.slide.is-active { opacity: 1; visibility: visible; z-index: 2; }

.slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  transition: transform 8s linear;
}

.slide.is-active .slide-img { transform: scale(1); }

.slide-scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
}

.slide-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 780px;
  padding-top: calc(var(--nav-h) / 2);
  color: #fff;
}

.slide-content h1 {
  font-size: clamp(2.1rem, 6vw, 4.3rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0.4rem 0 1.1rem;
}

.hero .grad-text {
  background-image: linear-gradient(115deg, #ffffff 0%, #d6d4ff 40%, #9d9bf0 100%);
}

.slide-content p {
  max-width: 540px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.98rem, 2vw, 1.1rem);
  margin-bottom: 2rem;
}

.hero-btns { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* staggered entrance */
.slide-content > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}

.slide.is-active .slide-content > * { opacity: 1; transform: none; }
.slide.is-active .slide-content > *:nth-child(1) { transition-delay: 0.15s; }
.slide.is-active .slide-content > *:nth-child(2) { transition-delay: 0.28s; }
.slide.is-active .slide-content > *:nth-child(3) { transition-delay: 0.41s; }
.slide.is-active .slide-content > *:nth-child(4) { transition-delay: 0.54s; }

/* Arrows */
.slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  transition: background 0.3s, transform 0.3s var(--ease-out), border-color 0.3s;
}

.slider-arrow svg { width: 22px; height: 22px; }
.slider-arrow.prev { left: clamp(0.8rem, 3vw, 2.2rem); }
.slider-arrow.next { right: clamp(0.8rem, 3vw, 2.2rem); }

.slider-arrow:hover {
  background: var(--brand);
  border-color: var(--brand);
  transform: scale(1.08);
}

/* Dots */
.slider-dots {
  position: absolute;
  left: 50%;
  bottom: 42px;
  translate: -50% 0;
  z-index: 5;
  display: flex;
  gap: 0.55rem;
}

.slider-dots button {
  width: 30px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  transition: width 0.4s var(--ease-out), background 0.3s;
}

.slider-dots button.active {
  width: 54px;
  background: linear-gradient(90deg, var(--brand-light), #fff);
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  right: clamp(0.8rem, 3vw, 2.2rem);
  bottom: 40px;
  z-index: 5;
  width: 24px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 99px;
  display: grid;
  place-items: start center;
  padding-top: 7px;
}

.scroll-hint span {
  display: block;
  width: 4px;
  height: 8px;
  border-radius: 99px;
  background: #fff;
  animation: scrollDot 1.8s ease-in-out infinite;
}

@keyframes scrollDot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(14px); opacity: 0.2; }
}

/* ---------- 7. ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.about-media { position: relative; }

.about-img-wrap {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3.4;
}

.about-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}

.about-media:hover .about-img-wrap img { transform: scale(1.05); }

.about-float {
  position: absolute;
  right: -14px;
  bottom: -22px;
  display: grid;
  gap: 0.1rem;
  padding: 1.1rem 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 22px 45px -20px var(--brand-glow);
  animation: floatY 5s ease-in-out infinite;
}

.about-float strong { font-size: 1.7rem; line-height: 1; font-weight: 800; }
.about-float span { font-size: 0.76rem; opacity: 0.9; letter-spacing: 0.03em; }

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.about-text h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 1.1rem;
}

.about-text p { color: var(--text-muted); margin-bottom: 1.5rem; }

.about-points { display: grid; gap: 0.8rem; margin-bottom: 2rem; }

.about-points li {
  position: relative;
  padding-left: 2rem;
  color: var(--text);
  font-weight: 500;
  font-size: 0.97rem;
}

.about-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  translate: 0 -50%;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a77e0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='m5 12 5 5L19 7'/></svg>") center / 13px no-repeat;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  padding: clamp(1.6rem, 4vw, 2.6rem) clamp(1rem, 3vw, 2rem);
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.stat { text-align: center; position: relative; }

.stat + .stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--border);
}

.stat strong {
  display: block;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.1;
  background-image: linear-gradient(120deg, var(--brand-dark), var(--brand-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  font-size: 0.84rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ---------- 8. CARDS ---------- */
.cards { display: grid; gap: clamp(1.2rem, 2.5vw, 1.8rem); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.2rem);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease), border-color 0.45s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease-out);
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--brand-soft-2);
  box-shadow: var(--shadow-lg);
}

.card:hover::before { transform: scaleX(1); }

.card-tag {
  align-self: flex-start;
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}

.card-tag-solid {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.card-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  color: var(--brand);
  background: var(--brand-soft);
  margin-bottom: 1.1rem;
  transition: transform 0.45s var(--ease-out), background 0.4s, color 0.4s;
}

.card-icon svg { width: 26px; height: 26px; }

.card:hover .card-icon {
  transform: translateY(-4px) rotate(-6deg) scale(1.06);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.card h3 {
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.1rem; }

.card-list { display: grid; gap: 0.5rem; margin-bottom: 1.5rem; }

.card-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--brand);
}

.card-link svg { width: 17px; height: 17px; transition: transform 0.35s var(--ease-out); }
.card-link:hover svg { transform: translateX(5px); }

/* Media cards (Music / Programming) */
.media-card { padding: 0; }

.media-card-img { overflow: hidden; aspect-ratio: 16 / 9; }

.media-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.media-card:hover .media-card-img img { transform: scale(1.07); }

.media-card-body { padding: clamp(1.4rem, 3vw, 2rem); display: flex; flex-direction: column; flex: 1; }
.media-card-body .card-tag { margin-bottom: 0.9rem; }

/* Free cards */
.free-card { padding-top: clamp(2rem, 4vw, 2.6rem); }

.free-badge {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
  padding: 0.34rem 0.78rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 10px 22px -12px var(--brand-glow);
  animation: badgePulse 2.6s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* Online cards */
.online-card { background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%); }

/* ---------- 9. GALLERY ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.75s var(--ease-out), filter 0.5s;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(12, 10, 30, 0.85) 100%);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

.gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 1rem 1.1rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  transform: translateY(110%);
  transition: transform 0.45s var(--ease-out);
}

.gallery-item:hover img { transform: scale(1.09); }
.gallery-item:hover::after { opacity: 1; }
.gallery-item:hover figcaption { transform: none; }

/* ---------- 10. CONTACT ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 720px;
  margin-inline: auto;
}

.contact-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.info-item {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease-out), border-color 0.4s;
}

.info-item:hover {
  transform: translateX(6px);
  border-color: var(--brand-soft-2);
}

/* clickable contact cards (phone / email) */
.info-item.info-action {
  position: relative;
  cursor: pointer;
  padding-right: 3rem;
}

.info-item.info-action:hover {
  transform: translateX(0) translateY(-4px);
  border-color: var(--brand);
  box-shadow: 0 18px 40px -22px var(--brand-glow);
}

.info-item.info-action:hover .info-icon {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.info-item.info-action:hover .info-arrow {
  opacity: 1;
  transform: translateX(0);
}

.info-arrow {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  opacity: 0.55;
  transform: translateX(-4px);
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease-out);
}

.info-arrow svg { width: 15px; height: 15px; }

.info-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: var(--brand);
  background: var(--brand-soft);
}

.info-icon svg { width: 21px; height: 21px; }

.info-item h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.1rem; }
.info-item p { font-size: 0.9rem; color: var(--text-muted); }
.info-item a:hover { color: var(--brand); }

/* Form */
.contact-form {
  padding: clamp(1.6rem, 4vw, 2.6rem);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.contact-form h3 { font-size: 1.35rem; font-weight: 700; }
.form-sub { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.6rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.field { display: grid; gap: 0.4rem; margin-bottom: 1rem; }

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.82rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.field textarea { resize: vertical; min-height: 110px; }

.field input::placeholder,
.field textarea::placeholder { color: var(--text-muted); opacity: 0.7; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.field.invalid input,
.field.invalid textarea { border-color: #e05a72; box-shadow: 0 0 0 4px rgba(224, 90, 114, 0.14); }

.contact-form .btn { width: 100%; margin-top: 0.4rem; }

.form-status {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.2em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.35s, transform 0.35s;
}

.form-status.show { opacity: 1; transform: none; }
.form-status.ok { color: #2fae7a; }
.form-status.err { color: #e05a72; }

/* ---------- 11. FOOTER ---------- */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding-top: clamp(3rem, 6vw, 4.5rem);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.2rem;
  padding-bottom: 2.8rem;
}
.footer .logo-text { color: var(--footer-head); }
.footer .logo-text em { color: var(--brand-light); }

.footer-brand p { font-size: 0.9rem; margin: 1rem 0 1.4rem; max-width: 280px; }

.socials { display: flex; gap: 0.6rem; }

.socials a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: var(--footer-text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--footer-border);
  transition: transform 0.35s var(--ease-out), background 0.3s, color 0.3s;
}

.socials svg { width: 18px; height: 18px; }

.socials a:hover {
  transform: translateY(-4px);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
}

.footer-col h4 {
  color: var(--footer-head);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-col ul { display: grid; gap: 0.6rem; }
.footer-col li { font-size: 0.9rem; }
.footer-col a { transition: color 0.3s, padding-left 0.3s; }

.footer-col a:hover { color: var(--brand-light); padding-left: 4px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 1.4rem 0;
  border-top: none;
  font-size: 0.84rem;
}

.heart { color: var(--brand-light); }

/* ---------- 12. LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(8, 7, 18, 0.92);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}

.lightbox.open { opacity: 1; visibility: visible; }

.lightbox img {
  max-width: min(1000px, 92vw);
  max-height: 82vh;
  border-radius: var(--radius);
  box-shadow: 0 40px 100px -30px #000;
  transform: scale(0.94);
  transition: transform 0.45s var(--ease-out);
}

.lightbox.open img { transform: scale(1); }

.lightbox-close {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  line-height: 1;
  color: #fff;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: background 0.3s, transform 0.3s;
}

.lightbox-close:hover { background: var(--brand); transform: rotate(90deg); }

/* ---------- 13. BACK TO TOP ---------- */
.to-top {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 800;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 16px 34px -14px var(--brand-glow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 0.4s, visibility 0.4s, transform 0.4s var(--ease-out);
}

.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-4px); }
.to-top svg { width: 21px; height: 21px; }

/* ---------- 14. SCROLL REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.in { opacity: 1; transform: none; }

/* stagger sibling reveals inside grids */
.cards .reveal:nth-child(2),
.gallery-grid .reveal:nth-child(2),
.stats .reveal:nth-child(2) { transition-delay: 0.09s; }
.cards .reveal:nth-child(3),
.gallery-grid .reveal:nth-child(3),
.stats .reveal:nth-child(3) { transition-delay: 0.18s; }
.gallery-grid .reveal:nth-child(4),
.stats .reveal:nth-child(4) { transition-delay: 0.27s; }
.gallery-grid .reveal:nth-child(5) { transition-delay: 0.06s; }
.gallery-grid .reveal:nth-child(6) { transition-delay: 0.15s; }
.gallery-grid .reveal:nth-child(7) { transition-delay: 0.24s; }
.gallery-grid .reveal:nth-child(8) { transition-delay: 0.33s; }


/* ---------- 15. TEACHERS GALLERY ---------- */
.teachers-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(65% 60% at 10% 0%, var(--brand-soft) 0%, transparent 62%),
    radial-gradient(55% 55% at 92% 100%, var(--brand-soft) 0%, transparent 62%),
    var(--bg-alt);
}

.teachers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: clamp(0.85rem, 2vw, 1.35rem);
}

.teachers-grid[hidden] { display: none; }

.teacher-card {
  position: relative;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition:
    transform 0.5s var(--ease-out),
    box-shadow 0.45s var(--ease),
    border-color 0.45s var(--ease),
    opacity 0.6s var(--ease);
}

.teacher-card img {
  display: block;
  width: 100%;
  height: auto;          /* never crop — the artwork holds the info */
}

/* brand ring on hover — keeps every pixel of the card readable */
.teacher-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px transparent;
  pointer-events: none;
  transition: box-shadow 0.4s var(--ease);
}

.teacher-card:hover,
.teacher-card:focus-visible {
  transform: translateY(-7px);
  border-color: var(--brand-soft-2);
  box-shadow: var(--shadow-lg);
}

.teacher-card:hover::after,
.teacher-card:focus-visible::after {
  box-shadow: inset 0 0 0 2px var(--brand);
}

.teacher-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.teacher-zoom {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  background: rgba(18, 16, 40, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.35s var(--ease), transform 0.4s var(--ease-out);
  pointer-events: none;
}

.teacher-zoom svg { width: 16px; height: 16px; }

.teacher-card:hover .teacher-zoom,
.teacher-card:focus-visible .teacher-zoom {
  opacity: 1;
  transform: none;
}

.teachers-empty {
  padding: 2rem 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.teachers-empty[hidden] { display: none; }

@media (max-width: 560px) {
  .teachers-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .teacher-card { border-radius: var(--radius); }
  .teacher-zoom { display: none; }
}

/* ---------- 16. RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .contact-info { grid-template-columns: 1fr; }
}

/* keep the 9-item navbar on a single line between 1081px – 1280px */
@media (min-width: 1081px) and (max-width: 1280px) {
  .nav-links { gap: 0.1rem; }
  .nav-link { padding: 0.5rem 0.58rem; font-size: 0.875rem; }
  .logo-text { font-size: 0.95rem; }
}

@media (max-width: 1080px) {
  :root { --nav-h: 70px; }

  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 2;
    height: 100vh;
    height: 100svh;
    width: min(320px, 82vw);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.2rem;
    padding: 6rem 1.6rem 2rem;
    background: var(--surface);
    box-shadow: -30px 0 60px -30px rgba(0, 0, 0, 0.5);
    transform: translateX(105%);
    transition: transform 0.5s var(--ease-out);
    overflow-y: auto;
  }

  .nav-links.open { transform: none; }

  .nav-link {
    padding: 0.9rem 1rem;
    font-size: 1.02rem;
    color: var(--text);
    border-radius: var(--radius-sm);
  }

  .nav-link::after { display: none; }
  .nav-link:hover { background: var(--brand-soft); }

  /* panel is light — force readable text */
  .navbar:not(.scrolled) .nav-link { color: var(--text); }
  .navbar:not(.scrolled) .nav-link:hover,
  .navbar:not(.scrolled) .nav-link.active { color: var(--brand); background: var(--brand-soft); }

  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 560px; }
  .about-float { right: 10px; bottom: -18px; }

  .cards-3 { grid-template-columns: 1fr 1fr; }
  .cards-3 .card:last-child { grid-column: 1 / -1; }

  .contact-grid { grid-template-columns: 1fr; }

  .scroll-hint { display: none; }
}

@media (max-width: 760px) {
  .container { width: calc(100% - 2rem); }

  .section { padding: 3.6rem 0; }

  .hero { min-height: 560px; }
  .slide-content { padding-top: var(--nav-h); }
  .slider-arrow { width: 42px; height: 42px; }
  .slider-arrow svg { width: 18px; height: 18px; }
  .slider-dots { bottom: 30px; }

  .stats { grid-template-columns: 1fr 1fr; gap: 1.4rem 0.6rem; }
  .stat + .stat::before { display: none; }
  .stat:nth-child(odd)::before { display: block; }

  .cards-3,
  .cards-2 { grid-template-columns: 1fr; }
  .cards-3 .card:last-child { grid-column: auto; }

  .form-row { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.8rem; }
  .footer-brand { grid-column: 1 / -1; }

  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
  .gallery-item figcaption { font-size: 0.78rem; padding: 0.7rem; }
}

@media (max-width: 480px) {
  .hero-btns { width: 100%; }
  .hero-btns .btn { flex: 1 1 100%; }

  .gallery-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }

  .about-float { padding: 0.85rem 1.1rem; }
  .about-float strong { font-size: 1.4rem; }
}

/* ---------- 17. ACCESSIBILITY ---------- */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}