:root {
  --ink: #030302;
  /* 0e0c0a */
  --paper: #f5f0e8;
  --red: #c41c06;
  /* d43c2c */
  --gold: #ddaf3b;
  /* #b8963e */
  --muted: #7a6f62;
  --light-paper: #faf7f1;
  --rice-paper: #c9c1b6;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Cormorant Garamond', serif;
  overflow-x: hidden;
}

/* ── NAV ─────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 4rem;
  background: rgba(18, 18, 29, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(184,150,62,0.2);
}

.nav-logo {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.4rem;
  color: var(--gold);
  letter-spacing: .12em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .7rem;
}

.nav-logo-img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.nav-links { display: flex; gap: 2.25rem; list-style: none; }
.nav-links a {
  color: #d4cdc2;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 1000;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: color .25s;
}
.nav-links a:hover { color: var(--gold); }

/* ── HERO ─────────────────────────────────────── */
.hero {
  min-height: 100vh;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-left {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 4rem 3.5rem;
  max-width: 1080px;
  width: 90%;
  background: rgba(29, 29, 46, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(184,150,62,0.2);
  position: relative; z-index: 2;
}

.hero-eyebrow {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.75rem;
  letter-spacing: .3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp .8s .2s forwards;
}

.hero-logo-img {
  height: 128px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
  animation: fadeUp .8s .3s forwards;
}

.hero-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(3.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  color: #f0ece3;
  margin-bottom: 0.4rem;
  opacity: 0;
  animation: fadeUp .8s .4s forwards;
}

.hero-title span { color: var(--red); }

.hero-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--rice-paper);
  letter-spacing: .06em;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp .8s .55s forwards;
}

.hero-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--rice-paper);
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp .8s .7s forwards;
}

.hero-cta {
  display: flex; gap: 1rem; flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp .8s .85s forwards;
}

.btn-primary, .btn-secondary {
  display: inline-block;
  padding: .85rem 2.2rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all .3s;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  border: 2px solid var(--red);
}
.btn-primary:hover { background: transparent; color: var(--red); }

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}
.btn-secondary:hover { background: var(--gold); color: var(--ink); }

/* Right panel — decorative */
.hero-right {
  position: absolute;
  inset: 0;
  background: #171410;
  z-index: 0;
}

.hero-right::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 60% 50%, rgba(192,57,43,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 80% 20%, rgba(184,150,62,0.12) 0%, transparent 60%);
}

.hero-kanji {
  position: absolute;
  font-family: 'Noto Serif SC', serif;
  font-weight: 900;
  line-height: 1;
  color: rgba(255,255,255,0.04);
  user-select: none;
  pointer-events: none;
}

.kanji-1 { font-size: 40vw; top: -10%; right: -15%; color: rgba(192,57,43,0.06); }
.kanji-2 { font-size: 18vw; bottom: 25%; left: 5%; }
.kanji-3 { font-size: 10vw; top: 10%; left: 25%; color: rgba(184,150,62,0.07); }
.kanji-4 { font-size: 12vw; bottom: 15%; right: 3%; color: rgba(184,150,62,0.07); }
.kanji-5 { font-size: 16vw; bottom: 3%; left: 40%; color: rgba(184,150,62,0.07); }

.hero-circle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 55%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(184,150,62,0.25);
  animation: rotate 30s linear infinite;
}

.hero-circle::after {
  content: '';
  position: absolute; inset: 10%;
  border-radius: 50%;
  border: 1px solid rgba(192,57,43,0.2);
  animation: rotate 20s linear infinite reverse;
}

.hero-yin-yang {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 160px; height: 160px;
  opacity: .12;
}

@keyframes rotate { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── DISCIPLINES ───────────────────────────────── */
.disciplines {
  background: var(--light-paper);
  padding: 7rem 5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 5rem;
}

.section-tag {
  display: inline-block;
  font-size: 1.05rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.section-title::after {
  content: '';
  display: block;
  width: 100px;
  height: 2px;
  background: #d43d2c9c;
  margin: 1.2rem auto 0;
}

.section-header .section-title::after {
  margin: 1.2rem auto 0;
}

/* Left-aligned headings (About, Contact) get a left-aligned line */
.section-title[style*="text-align:left"]::after,
.about-content .section-title::after {
  margin: 1.2rem 0 0;
}

.section-title em {
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
  color: var(--muted);
}

.disciplines-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.disc-card {
  background: var(--ink);
  padding: 3.5rem 2.8rem;
  position: relative;
  overflow: hidden;
  transition: transform .4s;
}

.disc-card:hover { transform: translateY(-6px); }

.disc-card::before {
  content: '';
  position: absolute; bottom: 0; left: 0;
  height: 3px; width: 0;
  background: var(--red);
  transition: width .4s;
}
.disc-card:hover::before { width: 100%; }

.disc-hanzi {
  font-family: 'Noto Serif SC', serif;
  font-size: 5rem;
  color: rgba(255,255,255,0.06);
  position: absolute;
  top: 1rem; right: 1.5rem;
  line-height: 1;
  pointer-events: none;
}

.disc-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  letter-spacing: .3em;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.disc-name {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #f0ece3;
  margin-bottom: .6rem;
}

.disc-pinyin {
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.disc-desc {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--rice-paper);
}

/* ── ABOUT ─────────────────────────────────────── */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}

.about-visual {
  background: var(--ink);
  position: relative;
  overflow: hidden;
  min-height: 500px;
}

.about-visual-inner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}

.bagua-svg {
  width: 60%;
  opacity: .25;
  animation: rotate 60s linear infinite;
}

.about-content {
  padding: 7rem 5rem;
  background: var(--paper);
}

.about-quote {
  font-size: 1.55rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
  border-left: 3px solid var(--red);
  padding-left: 2rem;
  margin-bottom: 2.5rem;
}

.about-body {
  font-size: 1.1rem;
  line-height: 1.85;
  color: #4a4540;
  margin-bottom: 2rem;
}

.about-body + .about-body { margin-top: -1rem; }

/* ── CLASSES / TIMETABLE ───────────────────────── */
.classes {
  background: var(--ink);
  padding: 7rem 5rem;
  color: #f0ece3;
}

.classes .section-title { color: #f0ece3; }

.classes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 4rem;
}

.class-card {
  border: 1px solid rgba(184,150,62,.25);
  padding: 2.2rem;
  transition: border-color .3s, background .3s;
}

.class-card:hover {
  border-color: var(--gold);
  background: rgba(184,150,62,.05);
}

.class-day {
  font-size: .95rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .8rem;
}

.class-name {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.3rem;
  margin-bottom: .4rem;
}

.class-level {
  font-size: 1rem;
  font-style: italic;
  color: var(--rice-paper);
  margin-bottom: 1.2rem;
}

.class-meta {
  font-size: 1.1rem;
  color: var(--rice-paper);
  line-height: 1.5;
}

.class-meta strong { color: #cbc4b8; }

.class-value {
  font-size: 1.1rem;
  line-height: 1.4;
}

/* ── CONTACT ───────────────────────────────────── */
.contact {
  background: var(--light-paper);
  padding: 5rem 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.contact-info .section-title { text-align: left; margin-bottom: 2.5rem; }

.contact-detail {
  margin-bottom: 1.8rem;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid rgba(14,12,10,.1);
}

.contact-label {
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .3rem;
}

.contact-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--ink);
  padding-left: .9rem;
  line-height: 1.4;
}

.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }

.form-group { display: flex; flex-direction: column; gap: .4rem; }

.form-label {
  font-size: .85rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #2c2722;
}

.form-input, .form-textarea {
  background: #fff;
  border: 1px solid rgba(14,12,10,.15);
  padding: .9rem 1.1rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color .25s;
  outline: none;
}
.form-input:focus, .form-textarea:focus { border-color: var(--red); }
.form-textarea { resize: vertical; min-height: 180px; max-height: 340px;}

.char-counter {
  display: block;
  text-align: right;
  font-size: .9rem;
  color: var(--muted);
  margin-top: .3rem;
  font-style: italic;
  transition: color .2s;
}
 
.char-counter--near { color: var(--gold); }
.char-counter--full { color: var(--red); font-weight: 600; }

.facebook-link {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding-top: .5rem;
  padding-left: .9rem;
  color: var(--red);
  text-decoration: none;
  font-size: 1.05rem;
  transition: opacity .2s;
}
.facebook-link:hover { opacity: .7; }

.facebook-icon {
  width: 32px;
  height: 32px;
  fill: #1877F2;
  flex-shrink: 0;
}

.wechat-link {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding-top: .5rem;
  padding-left: .9rem;
  text-decoration: none;
  transition: opacity .2s;
}
.wechat-link:hover { opacity: .7; }

.wechat-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.wechat-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.wechat-modal-box {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  position: relative;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.wechat-modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.9rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
  line-height: 1;
}
.wechat-modal-close:hover { color: #333; }

.wechat-modal-title {
  font-weight: bold;
  margin-bottom: 1rem;
  color: #07C160;
}

.wechat-modal-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.xhs-link {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding-top: .5rem;
  padding-left: .9rem;
  text-decoration: none;
  transition: opacity .2s;
}
.xhs-link:hover { opacity: .7; }

.xhs-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.xhs-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.xhs-modal-box {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  position: relative;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.xhs-modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.9rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
  line-height: 1;
}
.xhs-modal-close:hover { color: #333; }

.xhs-modal-title {
  font-weight: bold;
  margin-bottom: 1rem;
  color: #FF2442;
}

.xhs-modal-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ── FOOTER ─────────────────────────────────────── */
footer {
  background: rgba(18, 18, 29);
  border: 1px solid rgba(184,150,62,0.2);
  padding: 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: 'Noto Serif SC', serif;
  font-size: 0.9rem;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: .7rem;
}

.footer-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  opacity: .85;
}

.footer-copy {
  font-size: .85rem;
  color: var(--muted);
}

/* ── GALLERY ───────────────────────────────────── */
.gallery-section {
  background: var(--ink);
  padding: 7rem 5rem;
  color: #f0ece3;
}

.gallery-section .section-title { color: #f0ece3; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 4rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: #1a1714;
  aspect-ratio: 4 / 3;
}

/* Make video items span 2 columns so they stand out */
.gallery-item--video {
  grid-column: span 2;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s, opacity .3s;
  opacity: .88;
}
.gallery-item:hover .gallery-img {
  transform: scale(1.04);
  opacity: 1;
}

/* Placeholder shown when image file isn't found yet */
.gallery-item--photo:not(:has(img[src=""]))::after { display: none; }
.gallery-img[src=""], .gallery-img:not([src]) {
  display: none;
}
.gallery-item--photo:empty,
.gallery-item--photo:not(:has(.gallery-img)) {
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.2);
  font-size: .85rem;
  letter-spacing: .2em;
}

.gallery-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── EVENTS ────────────────────────────────────── */
.events-section {
  background: var(--light-paper);
  padding: 7rem 5rem;
}

.events-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 4rem;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.event-card {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  background: #fff;
  padding: 2.2rem 2.5rem;
  border-left: 4px solid var(--red);
  transition: box-shadow .3s, transform .3s;
}
.event-card:hover {
  box-shadow: 0 8px 32px rgba(14,12,10,.1);
  transform: translateX(4px);
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  padding-top: .2rem;
}

.event-day {
  font-family: 'Noto Serif SC', serif;
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--red);
  line-height: 1;
}

.event-month {
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .2rem;
}

.event-info { flex: 1; }

.event-tag {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .5rem;
}

.event-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .4rem;
}

.event-meta {
  font-size: .9rem;
  font-style: italic;
  color: var(--muted);
  margin-bottom: .6rem;
}

.event-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: #4a4540;
}

/* ── EVENTS EMPTY STATE ─────────────────────────── */
.events-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
  color: var(--muted);
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

.events-empty-icon {
  width: 56px;
  height: 56px;
  opacity: .3;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.events-empty-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: .6rem;
}

.events-empty-sub {
  font-size: 1rem;
  font-style: italic;
  color: var(--muted);
}

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 900px) {
  nav { padding: 1rem 1.8rem; }
  .nav-links { display: none; }

  .hero-left { padding: 3rem 2rem; width: 95%; }

  .disciplines { padding: 5rem 1.5rem; }
  .disciplines-grid { grid-template-columns: 1fr; gap: 2px; }

  .about { grid-template-columns: 1fr; }
  .about-visual { display: none; }
  .about-content { padding: 4rem 2rem; }

  .gallery-section { padding: 5rem 1.5rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item--video { grid-column: span 1; }

  .events-section { padding: 5rem 1.5rem; }
  .event-card { flex-direction: column; gap: 1rem; }

  .classes { padding: 5rem 1.5rem; }
  .contact { grid-template-columns: 1fr; padding: 5rem 2rem; gap: 3rem; }
  footer { padding: 2.5rem 2rem; flex-direction: column; text-align: center; }
}