/* ===== Design tokens ===== */
:root {
  --ink: #1c2541;
  --ink-soft: #3a4468;
  --gold: #b8934a;
  --gold-light: #e8d5a8;
  --cream: #faf6ee;
  --cream-deep: #f1e9d8;
  --red: #ac3b3b;
  --red-deep: #8f2f2f;
  --text: #2a2a28;
  --text-soft: #5c5a52;
  --white: #ffffff;
  --line: rgba(28, 37, 65, 0.12);
  --shadow: 0 20px 50px -20px rgba(28, 37, 65, 0.25);
  --shadow-sm: 0 8px 24px -12px rgba(28, 37, 65, 0.2);
  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-zh: 'Noto Serif SC', 'Songti SC', serif;
  --font-latin-display: 'Cormorant Garamond', 'Noto Serif SC', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.lang-zh { font-family: var(--font-zh), var(--font-sans); }
body.lang-zh .display, body.lang-zh h1, body.lang-zh h2, body.lang-zh h3 { font-family: var(--font-zh); }
body.lang-latin .display, body.lang-latin h1, body.lang-latin h2, body.lang-latin h3 { font-family: var(--font-latin-display); }

img { max-width: 100%; display: block; }
a { color: inherit; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { position: relative; }

h1, h2, h3 { margin: 0 0 0.5em; font-weight: 600; color: var(--ink); letter-spacing: 0.01em; }
h2 { font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem); }
p { margin: 0 0 1em; color: var(--text-soft); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--gold); }

.section-head { max-width: 640px; margin: 0 0 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--red); color: var(--white); box-shadow: 0 12px 28px -10px rgba(172, 59, 59, 0.55); }
.btn-primary:hover { background: var(--red-deep); transform: translateY(-2px); box-shadow: 0 16px 32px -10px rgba(172, 59, 59, 0.6); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* ===== Header ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 0;
  transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled { padding: 12px 0; background: rgba(250, 246, 238, 0.92); backdrop-filter: blur(10px); box-shadow: 0 4px 20px -8px rgba(28,37,65,0.15); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; white-space: nowrap; flex: none; }
.brand .mark { font-family: var(--font-latin-display); font-style: italic; font-size: 1.5rem; color: var(--red); font-weight: 600; }
.brand .brand-zh { font-family: var(--font-zh); font-size: 1.05rem; color: var(--ink); font-weight: 600; }

.nav-desktop { display: flex; align-items: center; gap: 34px; }
.nav-desktop a { text-decoration: none; font-size: 0.92rem; font-weight: 500; color: var(--ink-soft); position: relative; padding: 4px 0; }
.nav-desktop a:hover { color: var(--red); }

.header-actions { display: flex; align-items: center; gap: 18px; }
.lang-switch { display: flex; align-items: center; gap: 2px; font-size: 0.8rem; font-weight: 600; }
.lang-switch a { padding: 5px 9px; border-radius: 7px; text-decoration: none; color: var(--text-soft); }
.lang-switch a.active { background: var(--ink); color: var(--white); }
.lang-switch span { color: var(--line); }

.menu-toggle {
  display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; background: none; border: none; cursor: pointer; padding: 8px; width: 40px; height: 40px;
}
.menu-toggle span {
  width: 24px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform 0.38s cubic-bezier(0.65,0,0.35,1), opacity 0.3s ease, width 0.38s ease, background 0.3s ease;
  transform-origin: center;
}
.menu-toggle span:nth-child(2) { width: 15px; align-self: flex-start; margin-left: 2px; background: var(--gold); }
.menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { width: 24px; opacity: 0; transform: rotate(90deg); }
.menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-mobile { display: none; flex-direction: column; gap: 4px; background: var(--white); margin-top: 14px; padding: 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.nav-mobile a { padding: 12px 10px; text-decoration: none; color: var(--ink); font-weight: 500; border-radius: 8px; }
.nav-mobile a:hover { background: var(--cream-deep); }
.nav-mobile.open { display: flex; }
.nav-mobile-meta { display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--line); margin-top: 6px; }
.nav-mobile-meta .lang-switch { font-size: 0.85rem; }

/* ===== Hero ===== */
.hero {
  padding: 168px 0 100px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fdfbf6 0%, var(--cream) 60%);
}
.hero .mountains {
  position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: auto;
  opacity: 0.55; pointer-events: none;
}
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem); line-height: 1.28; }
.hero .quote { font-family: var(--font-latin-display); font-style: italic; font-size: 1.2rem; color: var(--ink-soft); border-left: 3px solid var(--gold); padding-left: 18px; margin: 26px 0 34px; }
body.lang-zh .hero .quote { font-family: var(--font-zh); font-style: normal; font-size: 1.05rem; }
.hero .cta-row { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-visual { position: relative; }
.hero-visual .ring {
  position: absolute; inset: -22px; border: 1.5px solid var(--gold-light); border-radius: 50% / 38%; z-index: 0;
}
.hero-visual .photo-wrap {
  position: relative; z-index: 1; border-radius: 50% / 38%; overflow: hidden;
  box-shadow: var(--shadow); aspect-ratio: 4 / 5;
}
.hero-visual .photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual .badge {
  position: absolute; bottom: -18px; left: -18px; z-index: 2;
  background: var(--white); border-radius: 16px; padding: 14px 20px; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 12px;
}
.hero-visual .badge .num { font-family: var(--font-latin-display); font-size: 1.8rem; font-weight: 700; color: var(--red); line-height: 1; }
.hero-visual .badge .lbl { font-size: 0.72rem; color: var(--text-soft); max-width: 110px; line-height: 1.3; }

/* ===== Stats band ===== */
.stats-band { padding: 0; margin-top: -40px; position: relative; z-index: 3; }
.stats-band .container { background: var(--ink); border-radius: var(--radius); padding: 40px 30px; box-shadow: var(--shadow); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; color: var(--white); }
.stat .n { font-family: var(--font-latin-display); font-size: clamp(1.8rem, 1.5rem + 1vw, 2.4rem); font-weight: 700; color: var(--gold-light); }
.stat .l { font-size: 0.8rem; opacity: 0.85; margin-top: 4px; line-height: 1.4; }

/* ===== Page banner (inner pages) ===== */
.page-banner {
  padding: 168px 0 70px;
  background: linear-gradient(180deg, #fdfbf6 0%, var(--cream) 60%);
  position: relative;
  overflow: hidden;
}
.page-banner .container { max-width: 760px; }
.page-banner h1 { font-size: clamp(1.9rem, 1.5rem + 2vw, 2.8rem); }
.page-banner p { font-size: 1.05rem; margin-top: 10px; }
.page-banner.dark { background: var(--ink); }
.page-banner.dark .eyebrow, .page-banner.dark h1, .page-banner.dark p { color: var(--cream); }
.page-banner.dark .eyebrow::before { background: var(--gold-light); }
.page-banner.with-image { padding: 168px 0 0; }
.page-banner.with-image .container { padding-bottom: 60px; position: relative; z-index: 2; }
.page-banner .banner-photo {
  width: 100%; height: 320px; object-fit: cover; object-position: 50% 25%;
  margin-top: 40px; border-radius: 0;
}

/* ===== Home teasers ===== */
.teasers { padding: 90px 0; }
.teasers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.teaser-card {
  display: block; text-decoration: none; color: inherit; background: var(--white);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.teaser-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.teaser-img { aspect-ratio: 4/3; overflow: hidden; }
.teaser-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.teaser-card:hover .teaser-img img { transform: scale(1.05); }
.teaser-body { padding: 26px 26px 28px; }
.teaser-body h3 { margin-bottom: 8px; }
.teaser-body p { font-size: 0.9rem; margin-bottom: 14px; }
.teaser-link { font-size: 0.85rem; font-weight: 700; color: var(--red); }

/* ===== About ===== */
.about { padding: 40px 0 100px; }
.about .container { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 70px; align-items: start; }
.about-photo { position: relative; }
.about-photo img { border-radius: var(--radius); box-shadow: var(--shadow); }
.about-photo::before {
  content: ''; position: absolute; top: -20px; right: -20px; bottom: 20px; left: 20px;
  border: 1.5px solid var(--gold-light); border-radius: var(--radius); z-index: -1;
}
.about-photo-secondary {
  position: absolute; width: 46%; bottom: -34px; left: -34px; z-index: 2;
  border: 5px solid var(--cream); box-shadow: var(--shadow-sm); border-radius: 14px;
}
.pull-quote {
  margin: 28px 0; padding: 20px 24px; background: var(--cream-deep); border-radius: var(--radius-sm);
  font-style: italic; color: var(--ink-soft); font-size: 0.98rem; border-left: 3px solid var(--red);
}
.cred-list { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
.cred-list li { display: flex; gap: 14px; align-items: flex-start; font-size: 0.94rem; color: var(--text-soft); }
.cred-list .ico { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--cream-deep); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; }

/* ===== Programs ===== */
.programs { padding: 90px 0; background: var(--cream-deep); }
.programs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.prog-card {
  background: var(--white); border-radius: var(--radius); padding: 34px 30px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.prog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.prog-card .tag { display: inline-block; align-self: flex-start; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--red); background: rgba(172,59,59,0.08); padding: 5px 12px; border-radius: 999px; margin-bottom: 16px; }
.prog-card.soon { background: var(--ink); color: var(--cream); }
.prog-card.soon h3, .prog-card.soon p, .prog-card.soon li { color: var(--cream); }
.prog-card.soon .tag { background: rgba(232,213,168,0.15); color: var(--gold-light); }
.prog-card ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.prog-card ul li { font-size: 0.88rem; color: var(--text-soft); padding-left: 20px; position: relative; }
.prog-card ul li::before { content: '·'; position: absolute; left: 4px; color: var(--gold); font-weight: 700; }
.prog-card .pillars { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.prog-card .pillar b { color: var(--ink); font-size: 0.85rem; }
.prog-card .pillar span { display: block; font-size: 0.82rem; color: var(--text-soft); margin-top: 2px; }
.prog-card .foot-stat { margin-top: auto; padding-top: 18px; font-size: 0.85rem; color: var(--gold); font-weight: 600; }

/* ===== Why ===== */
.why { padding: 100px 0; }
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.why-item { display: flex; gap: 18px; padding: 26px; border-radius: var(--radius-sm); background: var(--white); border: 1px solid var(--line); }
.why-item .num { font-family: var(--font-latin-display); font-size: 2rem; color: var(--gold); font-weight: 700; line-height: 1; flex: none; }
.why-item h3 { margin-bottom: 6px; font-size: 1.05rem; }
.why-item p { margin: 0; font-size: 0.9rem; }

/* ===== Gallery ===== */
.gallery { padding: 100px 0; background: var(--ink); color: var(--cream); }
.gallery.gallery-page { padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); }
.gallery .section-head h2, .gallery .eyebrow { color: var(--cream); }
.gallery .section-head p { color: rgba(250,246,238,0.7); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.gallery-card { background: rgba(255,255,255,0.04); border-radius: var(--radius-sm); overflow: hidden; border: 1px solid rgba(255,255,255,0.08); cursor: pointer; transition: transform 0.3s ease; }
.gallery-card:hover { transform: translateY(-6px); }
.gallery-card .img-wrap { aspect-ratio: 4/3; overflow: hidden; }
.gallery-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-card:hover .img-wrap img { transform: scale(1.06); }
.gallery-card .cap { padding: 18px 18px 20px; }
.gallery-card .cap h3 { color: var(--cream); font-size: 0.95rem; margin-bottom: 8px; }
.gallery-card .cap p { color: rgba(250,246,238,0.65); font-size: 0.82rem; margin: 0; }

.lightbox { position: fixed; inset: 0; background: rgba(10,13,25,0.92); z-index: 200; display: none; align-items: center; justify-content: center; padding: 30px; }
.lightbox.open { display: flex; }
.lightbox-inner { max-width: 780px; width: 100%; background: var(--cream); border-radius: var(--radius); overflow: hidden; }
.lightbox-inner img { width: 100%; }
.lightbox-inner .lb-cap { padding: 24px 28px 28px; }
.lightbox-inner .lb-cap h3 { color: var(--ink); }
.lightbox-close { position: absolute; top: 26px; right: 30px; color: var(--cream); font-size: 2rem; background: none; border: none; cursor: pointer; line-height: 1; }

/* ===== Contact ===== */
.contact { padding: 110px 0; text-align: center; }
.contact.contact-page { padding-top: 20px; }
.contact .section-head { margin-left: auto; margin-right: auto; }
.contact .cta-row { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 50px; }
.social-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 620px; margin: 0 auto; align-items: start; }
.social-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px; text-align: left; display: flex; gap: 14px; align-items: center; }
.social-card .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--cream-deep); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex: none; }
.social-card .plat { font-size: 0.75rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.social-card .handle { font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.social-card.with-qr { flex-direction: column; text-align: center; padding: 26px 22px 24px; }
.social-card.with-qr .qr-img { width: 148px; height: 148px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 14px; }
.social-card.with-qr .qr-hint { font-size: 0.78rem; color: var(--gold); margin-top: 6px; font-weight: 600; }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: rgba(250,246,238,0.75); padding: 50px 0 30px; }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.site-footer .brand .mark { color: var(--gold-light); }
.site-footer .brand .brand-zh { color: var(--cream); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; font-size: 0.85rem; color: rgba(250,246,238,0.75); }
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 34px; padding-top: 22px; text-align: center; font-size: 0.78rem; color: rgba(250,246,238,0.45); }

/* ===== Newsletter popup ===== */
.nl-popup {
  position: fixed; inset: 0; z-index: 300; background: rgba(15,19,35,0.55);
  display: none; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity 0.4s ease;
}
.nl-popup.show { display: flex; }
.nl-popup.in { opacity: 1; }
.nl-card {
  position: relative; background: var(--cream); border-radius: var(--radius);
  max-width: 560px; width: 100%; display: grid; grid-template-columns: 0.8fr 1.2fr;
  overflow: hidden; box-shadow: var(--shadow); transform: translateY(16px) scale(0.98);
  transition: transform 0.4s ease;
}
.nl-popup.in .nl-card { transform: translateY(0) scale(1); }
.nl-img { background: var(--cream-deep); }
.nl-img img { width: 100%; height: 100%; object-fit: cover; }
.nl-close {
  position: absolute; top: 10px; right: 12px; z-index: 2; background: rgba(255,255,255,0.85);
  border: none; width: 30px; height: 30px; border-radius: 50%; font-size: 1.3rem; line-height: 1;
  cursor: pointer; color: var(--ink);
}
.nl-body { padding: 34px 30px; display: flex; flex-direction: column; justify-content: center; }
.nl-body h3 { font-size: 1.25rem; margin-bottom: 10px; }
.nl-body p { font-size: 0.9rem; margin-bottom: 18px; }
#nl-form { display: flex; flex-direction: column; gap: 10px; }
#nl-form input {
  padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line);
  font-family: var(--font-sans); font-size: 0.92rem; background: var(--white);
}
#nl-form input:focus { outline: 2px solid var(--gold-light); border-color: var(--gold); }
#nl-form .btn { justify-content: center; }
.nl-fine { font-size: 0.72rem; color: var(--text-soft); opacity: 0.8; margin: 12px 0 0; }
.nl-state-success h3 { color: var(--red); }
@media (max-width: 640px) {
  .nl-card { grid-template-columns: 1fr; }
  .nl-img { display: none; }
}

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .nav-desktop { display: none; }
  .menu-toggle { display: flex; }
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { max-width: 360px; margin: 0 auto; }
  .about .container { grid-template-columns: 1fr; }
  .about-photo { max-width: 340px; margin: 0 auto; }
  .programs-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .social-cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-actions .lang-switch,
  .header-actions > .btn-primary { display: none; }
}
@media (max-width: 560px) {
  .hero { padding-top: 140px; }
  .hero-visual .badge { left: 0; bottom: -14px; padding: 10px 14px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .site-footer .container { flex-direction: column; text-align: center; }
}
