@font-face {
  font-family: 'IranYekan';
  src: url('../fonts/iran-yekan-400.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IranYekan';
  src: url('../fonts/iran-yekan-700.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Pinar';
  src: url('../fonts/pinar-700.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0a0908;
  --bg-elev: #141210;
  --surface: #191613;
  --text: #cfc9bd;
  --text-soft: #8f887a;
  --heading: #f3efe6;
  --accent: #c9a15c;
  --accent-2: #e0bd7f;
  --accent-dim: #8b6f3f;
  --border: rgba(201,161,92,.16);
  --shadow: rgba(0,0,0,.5);
  --glass: rgba(255,255,255,.04);
  --glass-strong: rgba(255,255,255,.07);
}

[data-theme="light"] {
  --bg: #faf8f4;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --text: #4a453d;
  --text-soft: #948d80;
  --heading: #211d17;
  --accent: #a8792f;
  --accent-2: #8a611f;
  --accent-dim: #c9a15c;
  --border: rgba(168,121,47,.18);
  --shadow: rgba(60,50,30,.10);
  --glass: rgba(255,255,255,.55);
  --glass-strong: rgba(255,255,255,.75);
}

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

body {
  font-family: 'IranYekan', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  overflow-x: hidden;
  transition: background .5s ease, color .5s ease;
}

h1, h2, h3, h4 {
  font-family: 'Pinar', 'IranYekan', Tahoma, sans-serif;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -.01em;
}

a { color: var(--accent); text-decoration: none; }

::selection { background: var(--accent); color: var(--bg); }

/* ---------- Signature: string-vibration divider ---------- */
.string-divider {
  position: relative;
  height: 40px;
  max-width: 220px;
  margin: 0 auto;
}
.string-divider svg { width: 100%; height: 100%; display: block; }
.string-divider path {
  stroke: var(--accent);
  stroke-width: 1.4;
  fill: none;
  opacity: .8;
}

/* ---------- Theme toggle (plectrum switch) ---------- */
.theme-toggle {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 30px;
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(10px);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 3px;
  transition: background .35s ease, border-color .35s ease;
}
.theme-toggle .pick {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
  box-shadow: 0 2px 8px var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .4s cubic-bezier(.65,0,.35,1);
  transform: translateX(0);
  color: var(--bg);
}
[data-theme="light"] .theme-toggle .pick { transform: translateX(-22px); }
.theme-toggle svg { width: 12px; height: 12px; }

/* ---------- Header / Nav ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 24px;
  background: transparent;
  transition: background .4s ease, padding .4s ease, box-shadow .4s ease, border-color .4s ease;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: var(--glass-strong);
  backdrop-filter: blur(16px) saturate(140%);
  padding: 12px 24px;
  box-shadow: 0 8px 30px var(--shadow);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
}

.brand {
  font-family: 'Pinar', 'IranYekan', sans-serif;
  font-size: 1.05rem;
  color: #fff;
  transition: color .4s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}
.header.scrolled .brand { color: var(--heading); }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.4px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-list a {
  color: #fff;
  font-weight: bold;
  position: relative;
  padding-bottom: 4px;
  transition: color .3s ease;
}
.header.scrolled .nav-list a { color: var(--heading); }
.nav-list a::after {
  content: "";
  position: absolute;
  right: 0; bottom: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width .3s ease;
}
.nav-list a:hover::after,
.nav-list a.active::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: 18px; }

.nav-toggle {
  display: none;
  width: 26px; height: 20px;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.nav-toggle span {
  position: absolute; right: 0; width: 100%; height: 2px;
  background: #fff;
  transition: transform .3s ease, opacity .3s ease, background .4s ease;
}
.header.scrolled .nav-toggle span { background: var(--heading); }
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 9px; }
.nav-toggle span:nth-child(3) { top: 18px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('../img/hero.jpg');
  background-size: cover;
  background-position: center 20%;
  filter: grayscale(40%) contrast(1.12) brightness(.95) saturate(1.05);
  transform: scale(1.1) translateY(0);
  will-change: transform;
  animation: heroZoom 20s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1.1) translateY(0); }
  to   { transform: scale(1.0) translateY(-10px); }
}
.hero-tint {
  position: absolute; inset: 0;
  background: #120e08;
  mix-blend-mode: color;
  opacity: .55;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(10,9,8,.2) 0%, rgba(6,5,4,.78) 78%),
              linear-gradient(0deg, rgba(6,5,4,.85) 0%, rgba(6,5,4,.1) 48%);
}
.hero-grain {
  position: absolute; inset: 0;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; max-width: 820px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-2);
  font-size: .85rem;
  letter-spacing: .12em;
  margin-bottom: 22px;
  opacity: .9;
}
.hero-eyebrow .line { width: 30px; height: 1px; background: var(--accent-2); }
.hero-content h1 {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  margin-bottom: 16px;
  color: #fdfcf9;
  line-height: 1.1;
}
.hero-content .subtitle {
  color: #e7cf8f;
  font-size: 1.25rem;
  margin-bottom: 34px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 34px;
  border-radius: 40px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #1a1408;
  font-weight: bold;
  box-shadow: 0 10px 35px rgba(201,161,92,.28);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .35s ease;
}
.hero-cta:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 16px 45px rgba(201,161,92,.4);
  text-decoration: none;
}

.hero .string-divider { margin-top: 40px; opacity: .7; }

.scroll-hint {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-hint span {
  display: block;
  width: 22px; height: 34px;
  border: 2px solid rgba(255,255,255,.55);
  border-radius: 12px;
  position: relative;
}
.scroll-hint span::before {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollDot 1.6s ease infinite;
}
@keyframes scrollDot {
  0% { opacity: 1; top: 6px; }
  100% { opacity: 0; top: 18px; }
}

/* ---------- Reveal on scroll ---------- */
.reveal, .reveal-left, .reveal-right, .reveal-scale {
  opacity: 0;
  transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
  transition-delay: var(--d, 0s);
}
.reveal { transform: translateY(34px); }
.reveal-left { transform: translateX(-44px); }
.reveal-right { transform: translateX(44px); }
.reveal-scale { transform: scale(.94); }
.reveal.in-view, .reveal-left.in-view, .reveal-right.in-view, .reveal-scale.in-view {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

section:not(.hero) { padding: 110px 24px; max-width: 1080px; margin: 0 auto; }
.hero { width: 100vw; max-width: none; margin: 0; }

.section-head { text-align: center; margin-bottom: 54px; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--accent);
  font-size: .8rem;
  letter-spacing: .12em;
  margin-bottom: 14px;
}
.section-eyebrow .line { width: 26px; height: 1px; background: var(--accent); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }

/* ---------- About ---------- */
#about.about {
  display: flex;
  direction: ltr;
  align-items: stretch;
  width: 100vw;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 92vh;
  background: var(--bg-elev);
}
.about-photo {
  flex: 1 1 48%;
  position: relative;
  overflow: hidden;
  min-height: 420px;
}
.about-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: grayscale(75%) brightness(.92) contrast(1.05);
  transform: scale(1.05);
  transition: filter .7s ease, transform .9s ease;
}
.about-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,9,8,0) 55%, var(--bg-elev) 100%);
  pointer-events: none;
  transition: background .5s ease;
}
.about:hover .about-photo img {
  filter: grayscale(15%) brightness(1);
  transform: scale(1.1);
}

.about-text {
  direction: rtl;
  flex: 1 1 52%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 70px 80px;
}
.about-text .section-eyebrow { justify-content: flex-start; }
.about-text h2 {
  text-align: right;
  position: relative;
  display: inline-block;
  margin-bottom: 8px;
}
.about-text h3 { color: var(--text-soft); font-weight: normal; margin-bottom: 26px; font-size: 1.1rem; }
.about-text p { color: var(--text); text-align: justify; margin-bottom: 14px; }

.stat-row {
  display: flex;
  gap: 34px;
  margin-top: 32px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.stat { text-align: center; }
.stat-num {
  font-family: 'Pinar', sans-serif;
  font-size: 2.1rem;
  color: var(--accent);
  display: block;
  line-height: 1;
}
.stat-label {
  font-size: .82rem;
  color: var(--text-soft);
  margin-top: 6px;
  display: block;
}

@media (max-width: 900px) {
  #about.about { flex-direction: column; direction: rtl; min-height: auto; }
  .about-photo { min-height: 55vh; }
  .about-photo::after { background: linear-gradient(0deg, var(--bg-elev) 0%, rgba(10,9,8,0) 30%); }
  .about-text { padding: 50px 24px; }
  .stat-row { justify-content: center; flex-wrap: wrap; }
}

/* ---------- Academies ---------- */
.academy-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.academy-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 38px 28px;
  text-align: center;
  box-shadow: 0 8px 30px var(--shadow);
  transition: transform .4s cubic-bezier(.16,1,.3,1), border-color .4s ease, box-shadow .4s ease;
  overflow: hidden;
}
.academy-card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(201,161,92,.12), transparent 70%);
  opacity: 0;
  transition: opacity .4s ease;
}
.academy-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
  box-shadow: 0 20px 50px var(--shadow);
}
.academy-card:hover::before { opacity: 1; }
.academy-icon {
  width: 54px; height: 54px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: var(--bg);
  position: relative;
  z-index: 1;
}
.academy-icon svg { width: 24px; height: 24px; }
.academy-card h3 { margin-bottom: 14px; position: relative; z-index: 1; }
.academy-card a {
  position: relative; z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: .92rem;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, gap .3s ease;
}
.academy-card a:hover { border-color: var(--accent); gap: 10px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px 24px;
  text-align: center;
  transition: transform .35s ease, border-color .35s ease;
}
.contact-card:hover { transform: translateY(-6px); border-color: var(--accent); }
.contact-card .c-icon {
  width: 44px; height: 44px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.contact-card .c-icon svg { width: 20px; height: 20px; }
.contact-card h4 { color: var(--accent); margin-bottom: 8px; font-family: 'IranYekan'; font-size: 1rem; }
.contact-card p { color: var(--text); font-size: .95rem; }

.social-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--accent);
  padding: 11px 26px;
  border-radius: 30px;
  color: var(--accent);
  font-weight: bold;
  transition: background .35s ease, color .35s ease, transform .35s ease, box-shadow .35s ease;
}
.social-links a svg { width: 16px; height: 16px; }
.social-links a:hover {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--bg);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(201,161,92,.25);
  text-decoration: none;
}

footer {
  text-align: center;
  padding: 30px;
  color: var(--text-soft);
  border-top: 1px solid var(--border);
  font-size: .9rem;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  bottom: 28px; left: 28px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--glass-strong);
  backdrop-filter: blur(10px);
  color: var(--heading);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px var(--shadow);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity .35s ease, transform .35s ease, background .3s ease, visibility .35s;
  z-index: 90;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--bg); }

/* ---------- Mobile nav ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-list {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: 72%;
    max-width: 300px;
    background: var(--glass-strong);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 34px;
    transform: translateX(100%);
    transition: transform .45s cubic-bezier(.16,1,.3,1);
    box-shadow: -10px 0 40px var(--shadow);
  }
  .nav-list.open { transform: translateX(0); }
  .nav-list a { color: var(--heading) !important; font-size: 1.1rem; }
  .about-text { padding: 50px 22px; }
}

/* ---------- Performances (student videos) ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px var(--shadow);
  transition: transform .4s cubic-bezier(.16,1,.3,1), border-color .4s ease, box-shadow .4s ease;
}
.video-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 20px 50px var(--shadow);
}
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.video-info { padding: 20px 22px; }
.video-info h3 { font-size: 1.05rem; margin-bottom: 8px; }
.video-info p { color: var(--text-soft); font-size: .9rem; text-align: justify; }

/* ---------- Comments ---------- */
.comment-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 46px;
}
.comment-card {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  transition: transform .35s ease, border-color .35s ease;
}
.comment-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.comment-avatar {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Pinar', sans-serif;
  font-weight: 700;
}
.comment-body strong { color: var(--heading); display: block; margin-bottom: 6px; }
.comment-body p { color: var(--text); font-size: .92rem; text-align: justify; }
.comment-empty { text-align: center; color: var(--text-soft); margin-bottom: 40px; }

.comment-form-wrap {
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 34px 30px;
}
.comment-form-wrap h3 { text-align: center; margin-bottom: 22px; font-size: 1.15rem; }
.comment-form { display: flex; flex-direction: column; gap: 16px; }
.comment-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: .88rem;
  color: var(--text-soft);
}
.comment-form input[type="text"],
.comment-form textarea {
  font-family: inherit;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: .95rem;
  resize: vertical;
  transition: border-color .3s ease;
}
.comment-form input[type="text"]:focus,
.comment-form textarea:focus { outline: none; border-color: var(--accent); }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.comment-submit {
  align-self: center;
  min-width: 160px;
  margin-top: 6px;
}
.admin-btn-primary.comment-submit {
  padding: 13px 30px;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--bg);
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease;
}
.admin-btn-primary.comment-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(201,161,92,.3);
}
.comment-flashes { max-width: 560px; margin: 0 auto 24px; }
.comment-flashes .flash {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: .9rem;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}
.comment-flashes .flash-success { background: rgba(120,200,120,.12); color: #9ad89a; border-color: rgba(120,200,120,.3); }
.comment-flashes .flash-error { background: rgba(220,110,110,.12); color: #e39a9a; border-color: rgba(220,110,110,.3); }

@media (max-width: 600px) {
  .comment-form-wrap { padding: 26px 20px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; }
  .reveal, .reveal-left, .reveal-right, .reveal-scale { transition: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
