/* ═══════════════════════════════════════════════
   AL TENEEN AL AHMAR KARATE — Red Dragon theme
   Palette: charcoal black / crimson red / gold
   ═══════════════════════════════════════════════ */

:root {
  --bg: #0c0c0f;
  --bg-soft: #131318;
  --bg-card: #17171d;
  --red: #c1121f;
  --red-bright: #e5383b;
  --gold: #d4af37;
  --text: #f2f0ec;
  --text-dim: #a8a49c;
  --line: rgba(255, 255, 255, 0.08);
  --font-head: "Bebas Neue", "Cairo", sans-serif;
  --font-body: "Inter", "Cairo", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* keep section headings clear of the fixed navbar when jumping to anchors */
  scroll-padding-top: 88px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Arabic mode */
html[dir="rtl"] body { font-family: "Cairo", sans-serif; }
html[dir="rtl"] .hero-title,
html[dir="rtl"] .section-title,
html[dir="rtl"] .cta-title { font-family: "Cairo", sans-serif; font-weight: 900; letter-spacing: 0; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: min(1140px, 92%); margin-inline: auto; }
.section { padding: 110px 0; position: relative; }

::selection { background: var(--red); color: #fff; }

/* ─────────── Scroll-reveal animation ─────────── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ─────────── Typography helpers ─────────── */
.section-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  color: var(--red-bright);
  font-weight: 700;
  margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin-bottom: 22px;
}
.section-lead { color: var(--text-dim); max-width: 560px; margin-inline: auto; }
.center { text-align: center; }

/* ─────────── Buttons ─────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s;
  will-change: transform;
}
.btn-primary {
  background: linear-gradient(135deg, var(--red-bright), var(--red));
  color: #fff;
  box-shadow: 0 8px 30px rgba(193, 18, 31, 0.35);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 14px 40px rgba(229, 56, 59, 0.5); }
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-3px); }
.btn-lg { padding: 19px 44px; font-size: 1.05rem; }

/* ─────────── Navbar ─────────── */
.navbar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  padding: 18px 0;
  transition: padding 0.4s var(--ease), background 0.4s, box-shadow 0.4s;
}
.navbar.scrolled {
  padding: 10px 0;
  background: rgba(12, 12, 15, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 22px rgba(229, 56, 59, 0.35), 0 0 0 2px rgba(255, 255, 255, 0.08);
  transition: transform 0.5s var(--ease), box-shadow 0.5s;
}
.brand:hover .brand-logo {
  transform: rotate(-12deg) scale(1.1);
  box-shadow: 0 0 30px rgba(229, 56, 59, 0.6), 0 0 0 2px rgba(212, 175, 55, 0.4);
}
.navbar.scrolled .brand-logo { width: 42px; height: 42px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-head); font-size: 1.15rem; letter-spacing: 0.09em; }
.brand-sub { font-size: 0.62rem; letter-spacing: 0.42em; color: var(--gold); font-weight: 600; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--red-bright);
  transform: scaleX(0);
  transform-origin: inline-start;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links .nav-cta {
  color: #fff;
  background: var(--red);
  padding: 9px 22px;
  border-radius: 999px;
  transition: background 0.3s, transform 0.3s;
}
.nav-links .nav-cta:hover { background: var(--red-bright); transform: translateY(-2px); }
.nav-links .nav-cta::after { display: none; }

.nav-actions { display: flex; align-items: center; gap: 14px; }
.lang-toggle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--gold);
  font-family: "Cairo", var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}
.lang-toggle:hover { border-color: var(--gold); background: rgba(212, 175, 55, 0.08); transform: translateY(-2px); }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.3s;
}
.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); }

/* ─────────── Hero ─────────── */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 75% 20%, rgba(193, 18, 31, 0.18), transparent 60%),
    radial-gradient(ellipse 55% 45% at 15% 85%, rgba(212, 175, 55, 0.07), transparent 60%),
    var(--bg);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-photo {
  position: absolute;
  inset: 0;
  background: url("../images/web/hero.jpg") center 35% / cover no-repeat;
  background-image: image-set(
    url("../images/web/hero.webp") type("image/webp"),
    url("../images/web/hero.jpg") type("image/jpeg")
  );
  opacity: 0.16;
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 95%);
  mask-image: linear-gradient(to bottom, #000 45%, transparent 95%);
  animation: heroZoom 22s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}
.kanji-watermark {
  position: absolute;
  top: 50%;
  inset-inline-end: -2%;
  transform: translateY(-50%);
  font-size: clamp(14rem, 30vw, 26rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.028);
  writing-mode: vertical-rl;
  line-height: 1;
  user-select: none;
}
.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(229, 56, 59, 0.14), transparent 65%);
  top: -140px;
  inset-inline-start: -140px;
  animation: drift 12s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(70px, 60px) scale(1.15); }
}

.hero-content { position: relative; z-index: 2; padding-top: 70px; }
.hero-kicker {
  letter-spacing: 0.4em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 20px;
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(3.4rem, 10vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
  margin-bottom: 26px;
}
.hero-title .line { display: block; }
.hero-title .accent {
  background: linear-gradient(100deg, var(--red-bright) 10%, var(--gold) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { max-width: 520px; color: var(--text-dim); font-size: 1.06rem; margin-bottom: 38px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* staggered hero entrance */
.hero .reveal:nth-child(1) { --d: 0.05s; }
.hero .reveal:nth-child(2) { --d: 0.15s; }
.hero-title .reveal.accent { --d: 0.3s; }
.hero-sub { --d: 0.45s; }
.hero-actions { --d: 0.6s; }

.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.mouse {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  position: relative;
}
.mouse::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--red-bright);
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 0; transform: translateY(0); }
}

/* ─────────── Stats ─────────── */
.stats {
  border-block: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 56px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}
.stat-num, .stat-plus {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--text);
  line-height: 1;
}
.stat-plus { color: var(--red-bright); }
.stat-label { display: block; margin-top: 8px; color: var(--text-dim); font-size: 0.88rem; }
.stat:nth-child(1) { --d: 0s; } .stat:nth-child(2) { --d: 0.1s; }
.stat:nth-child(3) { --d: 0.2s; } .stat:nth-child(4) { --d: 0.3s; }

/* ─────────── About ─────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 70px;
  align-items: center;
}
.about-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: var(--bg-card);
}
.about-frame::before {
  content: "";
  position: absolute;
  inset: -14px auto auto -14px;
  width: 90px;
  height: 90px;
  border-top: 3px solid var(--red);
  border-inline-start: 3px solid var(--red);
  border-start-start-radius: 22px;
}
.about-frame::after {
  content: "";
  position: absolute;
  inset: auto -14px -14px auto;
  width: 90px;
  height: 90px;
  border-bottom: 3px solid var(--gold);
  border-inline-end: 3px solid var(--gold);
  border-end-end-radius: 22px;
}
.frame-kanji {
  position: absolute;
  top: -28px;
  inset-inline-end: 24px;
  font-size: 3.4rem;
  color: var(--red-bright);
  text-shadow: 0 0 30px rgba(229, 56, 59, 0.5);
  z-index: 2;
}
.frame-photo { border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 5; }
.frame-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(255,255,255,0.02) 14px 28px),
    linear-gradient(160deg, #1c1c24, #101014);
  color: var(--text-dim);
}
.photo-placeholder span { font-size: 4rem; filter: grayscale(0.3); }
.photo-placeholder small { letter-spacing: 0.1em; font-size: 0.75rem; }

.about-points { list-style: none; margin-top: 28px; display: grid; gap: 16px; }
.about-tagline {
  margin-top: 30px;
  font-family: var(--font-head);
  font-size: 1.45rem;
  letter-spacing: 0.06em;
  background: linear-gradient(100deg, var(--red-bright), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[dir="rtl"] .about-tagline { font-family: "Cairo", sans-serif; font-weight: 900; font-size: 1.2rem; letter-spacing: 0; }
.about-points li, .loc-list li { display: flex; align-items: flex-start; gap: 14px; }
.point-icon { font-size: 1.25rem; line-height: 1.5; }
.about-text > p.reveal:not(.section-kicker):not(.about-tagline) { color: var(--text-dim); }

/* ─────────── Programs ─────────── */
.programs { background: var(--bg-soft); border-block: 1px solid var(--line); }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  position: relative;
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.45s, box-shadow 0.45s;
}
.card-photo {
  aspect-ratio: 16 / 11;
  overflow: hidden;
  position: relative;
}
.card-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(23, 23, 29, 0.85), transparent 45%);
}
.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.card:hover .card-photo img { transform: scale(1.09); }
.card-body { padding: 24px 24px 30px; }
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-bright), var(--gold));
  transform: scaleX(0);
  transform-origin: inline-start;
  transition: transform 0.5s var(--ease);
}
.card:hover {
  transform: translateY(-10px);
  border-color: rgba(229, 56, 59, 0.4);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}
.card:hover::before { transform: scaleX(1); }
.card-icon { font-size: 2.5rem; margin-bottom: 18px; }
.card h3 { font-family: var(--font-head); font-size: 1.5rem; letter-spacing: 0.05em; margin-bottom: 4px; }
html[dir="rtl"] .card h3 { font-family: "Cairo", sans-serif; font-weight: 700; }
.card-age { color: var(--gold); font-size: 0.8rem; letter-spacing: 0.12em; font-weight: 600; margin-bottom: 14px; }
.card-body p:last-child { color: var(--text-dim); font-size: 0.92rem; }
.cards-grid .card:nth-child(3n+1) { --d: 0s; }
.cards-grid .card:nth-child(3n+2) { --d: 0.1s; }
.cards-grid .card:nth-child(3n+3) { --d: 0.2s; }

/* ─────────── Chief instructor ─────────── */
.chief { overflow: hidden; }
.chief-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 70px;
  align-items: center;
}
.chief-visual { position: relative; max-width: 420px; }
.chief-photo {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(212, 175, 55, 0.15);
  position: relative;
}
.chief-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(193, 18, 31, 0.18), transparent 45%);
  z-index: 1;
  pointer-events: none;
}
.chief-photo {
  aspect-ratio: 4 / 5;
}
.chief-photo picture, .chief-photo img {
  width: 100%;
  height: 100%;
  display: block;
}
.chief-photo img {
  object-fit: cover;
  object-position: top center;
}
.chief-badge {
  position: absolute;
  bottom: 18px;
  inset-inline-start: -16px;
  background: linear-gradient(135deg, var(--gold), #b8912a);
  color: #16130a;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  padding: 10px 22px;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  z-index: 2;
}
.chief-role {
  color: var(--red-bright);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
  margin: -8px 0 18px;
  text-transform: uppercase;
}
.chief-text > p.reveal:not(.section-kicker):not(.chief-role) { color: var(--text-dim); }
.chief-points { margin-top: 26px; }
.chief-quote {
  margin-top: 30px;
  padding: 22px 26px;
  border-inline-start: 3px solid var(--gold);
  background: rgba(212, 175, 55, 0.05);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--text-dim);
}
html[dir="rtl"] .chief-quote { border-radius: 12px 0 0 12px; }
.chief-quote cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--gold);
}

/* ─────────── Accreditations ─────────── */
.accred-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 56px;
}
.accred-tile {
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 44px 22px 38px;
  text-align: center;
  transition: border-color 0.4s, transform 0.4s var(--ease), background 0.4s;
}
.accred-tile:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.02);
}
.accred-logo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #fff;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.4s var(--ease);
}
.accred-tile:hover .accred-logo { transform: scale(1.08); }
.accred-logo img {
  width: 84%;
  height: 84%;
  object-fit: contain;
}
.accred-tile h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.accred-tile p {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.55;
}
.accred-grid .accred-tile:nth-child(1) { --d: 0s; }
.accred-grid .accred-tile:nth-child(2) { --d: 0.1s; }
.accred-grid .accred-tile:nth-child(3) { --d: 0.2s; }
.accred-grid .accred-tile:nth-child(4) { --d: 0.3s; }

/* ─────────── Lineage ─────────── */
.lineage { background: var(--bg-soft); border-block: 1px solid var(--line); }
.lineage-chain {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 56px;
}
.lineage-item {
  flex: 1;
  min-width: 0;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 14px 22px;
  transition: transform 0.45s var(--ease), border-color 0.45s, box-shadow 0.45s;
}
.lineage-item:hover {
  transform: translateY(-8px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}
.lineage-current { border-color: rgba(193, 18, 31, 0.5); }
.lineage-current:hover { border-color: var(--red-bright); }
.lineage-photo {
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}
.lineage-photo picture, .lineage-photo img {
  width: 100%;
  height: 100%;
  display: block;
}
.lineage-photo img {
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s var(--ease);
}
.lineage-item:hover .lineage-photo img { transform: scale(1.06); }
.lineage-rank {
  display: block;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.lineage-item h3 {
  font-family: var(--font-head);
  font-size: 1.12rem;
  letter-spacing: 0.05em;
  line-height: 1.2;
}
html[dir="rtl"] .lineage-item h3 { font-family: "Cairo", sans-serif; font-weight: 700; }
.lineage-item p {
  color: var(--text-dim);
  font-size: 0.76rem;
  line-height: 1.55;
  margin-top: 7px;
}
.lineage-arrow {
  align-self: center;
  flex: 0 0 auto;
  color: var(--red-bright);
  font-size: 1.15rem;
  text-shadow: 0 0 14px rgba(229, 56, 59, 0.5);
}
html[dir="rtl"] .lineage-arrow { transform: scaleX(-1); }
.lineage-chain .lineage-item:nth-child(1) { --d: 0s; }
.lineage-chain .lineage-item:nth-child(3) { --d: 0.12s; }
.lineage-chain .lineage-item:nth-child(5) { --d: 0.24s; }
.lineage-chain .lineage-item:nth-child(7) { --d: 0.36s; }
.lineage-chain .lineage-item:nth-child(9) { --d: 0.48s; }

/* ─────────── Gallery ─────────── */
.gallery { background: var(--bg-soft); border-block: 1px solid var(--line); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 56px;
}
.gallery-item {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: zoom-in;
  aspect-ratio: 3 / 4;
  position: relative;
}
.gallery-item::after {
  content: "⤢";
  position: absolute;
  inset-block-end: 12px;
  inset-inline-end: 14px;
  color: #fff;
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity 0.35s;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  z-index: 2;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.5s;
}
.gallery-item:hover img { transform: scale(1.08); filter: brightness(1.08); }
.gallery-item:hover::after { opacity: 1; }
.gallery-item:nth-child(1) { --d: 0s; } .gallery-item:nth-child(2) { --d: 0.1s; }
.gallery-item:nth-child(3) { --d: 0.2s; } .gallery-item:nth-child(4) { --d: 0.3s; }
.gallery-note { text-align: center; margin-top: 30px; }
.gallery-note a {
  color: var(--gold);
  font-weight: 600;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.4);
  transition: color 0.3s;
}
.gallery-note a:hover { color: var(--red-bright); }

/* ─────────── Lightbox ─────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 8, 10, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8);
  transform: scale(0.92);
  transition: transform 0.35s var(--ease);
}
.lightbox.open img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 20px;
  inset-inline-end: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.3s;
}
.lightbox-close:hover { opacity: 1; transform: rotate(90deg); }

/* ─────────── Schedule ─────────── */
.schedule { background: var(--bg-soft); border-block: 1px solid var(--line); }
.schedule-table {
  margin-top: 56px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
}
.sched-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.2fr;
  padding: 20px 30px;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
.sched-row:last-child { border-bottom: none; }
.sched-row:not(.sched-head):hover { background: rgba(229, 56, 59, 0.05); }
.sched-head {
  background: rgba(193, 18, 31, 0.12);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  text-transform: uppercase;
}
.sched-row span:first-child { font-weight: 600; }
.sched-row span:not(:first-child) { color: var(--text-dim); }
.schedule-note { text-align: center; margin-top: 24px; color: var(--gold); font-size: 0.9rem; }
.sched-span { grid-column: span 2; }
.phone-tag { color: var(--text-dim); font-size: 0.85rem; }

/* ─────────── Location ─────────── */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}
.location-text > p.reveal { color: var(--text-dim); }
.loc-list { list-style: none; margin-top: 26px; display: grid; gap: 15px; }
.loc-list a { color: var(--gold); border-bottom: 1px dashed rgba(212, 175, 55, 0.4); transition: color 0.3s; }
.loc-list a:hover { color: var(--red-bright); }
.map-wrap {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  aspect-ratio: 4 / 3;
}
.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.5) contrast(1.05);
  transition: filter 0.5s;
}
.map-wrap:hover iframe { filter: none; }

/* ─────────── CTA ─────────── */
.cta {
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 70% at 50% 110%, rgba(193, 18, 31, 0.28), transparent 65%),
    var(--bg-soft);
  border-top: 1px solid var(--line);
}
.cta-bg { position: absolute; inset: 0; pointer-events: none; }
.cta-bg .kanji-watermark { font-size: clamp(10rem, 22vw, 18rem); inset-inline-end: auto; inset-inline-start: -1%; }
.cta-inner { position: relative; z-index: 2; }
.cta-title {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  letter-spacing: 0.03em;
  margin-bottom: 16px;
}
.cta p { color: var(--text-dim); max-width: 460px; margin: 0 auto 36px; }
.cta-alt { margin-top: 26px !important; margin-bottom: 0 !important; font-size: 0.92rem; }
.cta-alt a {
  color: var(--gold);
  border-bottom: 1px dashed rgba(212, 175, 55, 0.4);
  transition: color 0.3s;
  margin-inline-start: 6px;
}
.cta-alt a:hover { color: var(--red-bright); }

/* ─────────── Footer ─────────── */
.footer { border-top: 1px solid var(--line); padding: 44px 0; background: var(--bg); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.footer-brand .brand-logo { width: 40px; height: 40px; }
.footer-social { display: flex; gap: 18px; }
.footer-social a { color: var(--text-dim); transition: color 0.3s, transform 0.3s; }
.footer-social a:hover { color: var(--red-bright); transform: translateY(-3px); }
.footer-copy { color: var(--text-dim); font-size: 0.82rem; }

/* ─────────── Floating WhatsApp ─────────── */
.wa-float {
  position: fixed;
  bottom: 26px;
  inset-inline-end: 26px;
  z-index: 90;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
  animation: pulse 2.6s ease-out infinite;
}
.wa-float:hover { transform: scale(1.12); box-shadow: 0 14px 40px rgba(37, 211, 102, 0.6); }
@keyframes pulse {
  0% { box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.45); }
  70% { box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45), 0 0 0 20px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45), 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ─────────── Dragon-ember cursor ─────────── */
#emberCanvas {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  display: none;
}
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 301;
  pointer-events: none;
  border-radius: 50%;
  translate: -50% -50%;
  display: none;
}
.cursor-dot {
  width: 7px;
  height: 7px;
  background: var(--red-bright);
  box-shadow: 0 0 12px rgba(229, 56, 59, 0.9), 0 0 26px rgba(229, 56, 59, 0.45);
}
.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(229, 56, 59, 0.65);
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
              border-color 0.25s, background 0.25s;
}
.cursor-ring.hovering {
  width: 58px;
  height: 58px;
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
}
.cursor-ring.pressing { width: 26px; height: 26px; border-color: var(--gold); }

/* only on precise pointers, and never for reduced-motion users */
@media (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body.ember-cursor, body.ember-cursor a, body.ember-cursor button,
  body.ember-cursor .gallery-item {
    cursor: none;
  }
  body.ember-cursor #emberCanvas,
  body.ember-cursor .cursor-dot,
  body.ember-cursor .cursor-ring { display: block; }
}

/* ─────────── Responsive ─────────── */
@media (max-width: 960px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .location-grid, .chief-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-visual { max-width: 420px; margin-inline: auto; }
  .chief-visual { margin-inline: auto; }
  .chief-badge { inset-inline-start: 14px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .accred-grid { grid-template-columns: repeat(2, 1fr); }
  .lineage-chain { flex-direction: column; align-items: center; }
  .lineage-item { width: min(340px, 100%); flex: none; }
  .lineage-arrow { transform: rotate(90deg) !important; padding: 2px 0; }
}

@media (max-width: 760px) {
  .section { padding: 80px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 36px 16px; }
  .hamburger { display: block; }
  .nav-links {
    position: fixed;
    top: 0;
    inset-inline-end: 0;
    height: 100svh;
    width: min(320px, 82vw);
    background: rgba(15, 15, 19, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    gap: 34px;
    transform: translateX(105%);
    transition: transform 0.5s var(--ease);
    box-shadow: -20px 0 60px rgba(0,0,0,0.5);
  }
  html[dir="rtl"] .nav-links { transform: translateX(-105%); }
  .nav-links.open { transform: translateX(0) !important; }
  .nav-links a { font-size: 1.1rem; }
  .sched-row { grid-template-columns: 1fr; gap: 4px; padding: 16px 22px; }
  .sched-head { display: none; }
  .sched-row span:not(:first-child)::before { content: "• "; color: var(--red-bright); }
  .cards-grid { grid-template-columns: 1fr; }
  .kanji-watermark { font-size: 12rem; opacity: 0.6; }
}
