/* ===== 红楼遗梦 · Honglou Yimeng ===== */
/* Classical Chinese Aesthetic */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red-primary: #8B0000;
  --red-light: #A52A2A;
  --red-dark: #5C0000;
  --gold: #C9A96E;
  --gold-light: #E8D5A3;
  --gold-dark: #A8884A;
  --ink: #1A1A1A;
  --ink-soft: #2D2D2D;
  --ink-light: #4A4A4A;
  --parchment: #F5F0E8;
  --parchment-light: #FAF7F0;
  --parchment-dark: #EDE5D5;
  --cream: #FFFDF5;
  --white: #FFFFFF;
  --font-cn: 'Noto Serif SC', 'STSong', 'SimSun', 'Songti SC', Georgia, serif;
  --font-en: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-cn);
  background: var(--parchment);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.8;
}

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

::selection { background: color-mix(in srgb, var(--red-primary) 20%, transparent); color: var(--red-dark); }

/* --- Typography --- */
.text-gold { color: var(--gold); }
.text-gold-light { color: var(--gold-light); }
.text-gold-dark { color: var(--gold-dark); }
.text-ink-light { color: var(--ink-light); }
.text-white-70 { color: rgba(255,255,255,0.7); }
.text-white-50 { color: rgba(255,255,255,0.5); }
.text-white-30 { color: rgba(255,255,255,0.3); }

/* --- Layout --- */
.max-w-7xl { max-width: 1280px; margin: 0 auto; }
.max-w-4xl { max-width: 900px; margin: 0 auto; }
.max-w-3xl { max-width: 768px; margin: 0 auto; }
.max-w-2xl { max-width: 650px; margin: 0 auto; }

.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-12 { padding-left: 3rem; padding-right: 3rem; }

/* --- Pattern Border --- */
.pattern-border {
  height: 2px;
  background-image: repeating-linear-gradient(90deg, transparent, transparent 15px, var(--gold) 15px, var(--gold) 16px, transparent 16px, transparent 30px);
}
.pattern-border.gold-30 { opacity: 0.3; }
.pattern-border.gold-40 { opacity: 0.4; }
.pattern-border.gold-50 { opacity: 0.5; }
.pattern-border.mx-auto { margin-left: auto; margin-right: auto; }

/* --- Corner Decoration --- */
.corner-decoration { position: relative; }
.corner-decoration::before {
  content: '◆'; position: absolute; top: -8px; left: -8px;
  color: var(--gold); font-size: 10px;
}
.corner-decoration::after {
  content: '◆'; position: absolute; bottom: -8px; right: -8px;
  color: var(--gold); font-size: 10px;
}

/* --- Section Divider --- */
.section-divider {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  padding: 4rem 0;
}
.section-divider .line { height: 1px; width: 3rem; background: var(--gold); opacity: 0.3; }
.section-divider .diamond {
  width: 10px; height: 10px; transform: rotate(45deg);
  border: 1px solid var(--gold); opacity: 0.5;
}

/* --- Navbar --- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: all 0.5s ease;
}
.navbar.scrolled { background: rgba(26,26,26,0.95); backdrop-filter: blur(12px); box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 5rem; max-width: 1280px; margin: 0 auto; padding: 0 1.5rem;
}
@media (min-width: 1024px) { .navbar-inner { height: 5.5rem; padding: 0 3rem; } }

.navbar .logo { display: flex; align-items: center; gap: 0.75rem; }
.navbar .logo-icon {
  font-size: 1.75rem; font-weight: 900; color: var(--gold);
  transition: color 0.3s;
}
.navbar .logo-icon:hover { color: var(--gold-light); }
.navbar .logo-text { display: none; }
@media (min-width: 640px) { .navbar .logo-text { display: block; } }
.navbar .logo-text h1 { font-size: 1.125rem; font-weight: 700; color: var(--white); letter-spacing: 0.05em; }
.navbar .logo-text p { font-size: 0.625rem; letter-spacing: 0.3em; color: var(--gold); opacity: 0.6; text-transform: uppercase; }

.nav-links { display: none; }
@media (min-width: 1024px) {
  .nav-links { display: flex; align-items: center; gap: 0.25rem; }
  .nav-links a {
    padding: 0.5rem 0.75rem; font-size: 0.85rem; letter-spacing: 0.05em;
    color: rgba(255,255,255,0.8); transition: color 0.3s; white-space: nowrap;
  }
  .nav-links a:hover, .nav-links a.active { color: var(--gold); }
  .nav-links .lang-divider {
    margin-left: 1rem; padding-left: 1rem;
    border-left: 1px solid rgba(255,255,255,0.1);
  }
}

.lang-btn {
  background: none; border: none; cursor: pointer;
  font-size: 0.85rem; letter-spacing: 0.05em;
  color: var(--gold); font-family: var(--font-cn);
  transition: color 0.3s;
  padding: 0;
}
.lang-btn:hover { color: var(--gold-light); }

/* Mobile menu */
.mobile-toggle {
  display: flex; align-items: center; gap: 0.75rem;
}
@media (min-width: 1024px) { .mobile-toggle .lang-btn { display: none; } }
.hamburger {
  background: none; border: none; cursor: pointer;
  width: 24px; height: 24px; position: relative;
  display: block;
}
@media (min-width: 1024px) { .hamburger { display: none; } }
.hamburger span {
  display: block; width: 100%; height: 1.5px;
  background: rgba(255,255,255,0.8); transition: all 0.3s;
  position: absolute; left: 0;
}
.hamburger span:nth-child(1) { top: 5px; }
.hamburger span:nth-child(2) { top: 11px; }
.hamburger span:nth-child(3) { top: 17px; }
.hamburger.open span:nth-child(1) { top: 11px; transform: rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

.mobile-menu {
  display: none; background: rgba(26,26,26,0.98); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 0.75rem 1.5rem 1rem;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; padding: 0.75rem 1rem;
  font-size: 0.875rem; letter-spacing: 0.05em;
  color: rgba(255,255,255,0.7); transition: all 0.3s;
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--gold); background: rgba(255,255,255,0.05); }

/* --- Hero Section --- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: linear-gradient(to bottom, var(--ink), rgba(26,26,26,0.95));
}
.hero-bg {
  position: absolute; inset: 0; opacity: 0.08;
  background-image: radial-gradient(circle at 25% 25%, var(--gold) 1px, transparent 1px);
  background-size: 240px 240px;
}
.hero-circle1 {
  position: absolute; top: 5rem; left: 2.5rem;
  width: 16rem; height: 16rem; border-radius: 50%;
  border: 1px solid rgba(201,169,110,0.05);
}
.hero-circle2 {
  position: absolute; bottom: 5rem; right: 2.5rem;
  width: 24rem; height: 24rem; border-radius: 50%;
  border: 1px solid rgba(201,169,110,0.05);
}

.hero-content {
  position: relative; z-index: 10;
  text-align: center; padding: 0 1.5rem; max-width: 64rem;
}

.hero-cloud {
  width: 12rem; margin: 0 auto 2rem;
  color: rgba(201,169,110,0.4);
}

.hero h1 {
  font-size: 4rem; font-weight: 900; color: var(--white);
  letter-spacing: 0.1em; margin-bottom: 1rem;
}
@media (min-width: 768px) { .hero h1 { font-size: 6rem; } }
@media (min-width: 1024px) { .hero h1 { font-size: 7rem; } }

.hero .subtitle {
  font-size: 1.125rem; color: rgba(201,169,110,0.8);
  letter-spacing: 0.1em; margin-bottom: 1rem;
}
@media (min-width: 768px) { .hero .subtitle { font-size: 1.25rem; } }

.hero-divider { width: 5rem; height: 1px; background: rgba(201,169,110,0.4); margin: 2rem auto; }

.hero .tagline {
  font-size: 1rem; color: rgba(255,255,255,0.6);
  font-style: italic; max-width: 36rem; margin: 0 auto 3rem;
  line-height: 1.8;
}
@media (min-width: 768px) { .hero .tagline { font-size: 1.125rem; } }

.hero-buttons { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
@media (min-width: 640px) { .hero-buttons { flex-direction: row; justify-content: center; } }

.btn-outline {
  display: inline-block; padding: 1rem 2.5rem;
  border: 1px solid var(--gold); color: var(--gold);
  letter-spacing: 0.1em; font-size: 0.875rem; font-family: var(--font-cn);
  transition: all 0.5s; cursor: pointer; background: none;
}
.btn-outline:hover { background: var(--gold); color: var(--ink); }

.btn-ghost {
  display: inline-block; padding: 1rem 2.5rem;
  color: rgba(255,255,255,0.6); letter-spacing: 0.1em;
  font-size: 0.875rem; font-family: var(--font-cn);
  transition: all 0.5s; border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--gold); border-color: rgba(201,169,110,0.3); }

.btn-dark {
  display: inline-block; padding: 1rem 2.5rem;
  border: 1px solid var(--gold-dark); color: var(--gold-dark);
  letter-spacing: 0.1em; font-size: 0.875rem; font-family: var(--font-cn);
  transition: all 0.5s; cursor: pointer; background: none;
}
.btn-dark:hover { background: var(--gold-dark); color: var(--white); }

/* Scroll indicator */
.scroll-indicator {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
}
.scroll-indicator .scroll-line {
  width: 1px; height: 3rem;
  background: linear-gradient(to bottom, rgba(201,169,110,0.5), transparent);
}

/* --- Section Styles --- */
.section { padding: 6rem 0; }
@media (min-width: 1024px) { .section { padding: 8rem 0; } }

.section-header {
  text-align: center; margin-bottom: 4rem;
}
.section-header .pattern-border { max-width: 5rem; margin: 0 auto 1.5rem; }
.section-header .section-label {
  font-size: 0.75rem; letter-spacing: 0.3em;
  color: rgba(201,169,110,0.6); text-transform: uppercase; margin-bottom: 0.75rem;
}
.section-header h2 {
  font-size: 1.75rem; font-weight: 700; letter-spacing: 0.05em;
}
@media (min-width: 1024px) { .section-header h2 { font-size: 2.25rem; } }

.bg-parchment { background: var(--parchment); }
.bg-cream { background: var(--cream); }
.bg-ink { background: var(--ink); }
.bg-white { background: var(--white); }

/* --- Card Grid --- */
.grid-3 {
  display: grid; grid-template-columns: 1fr; gap: 3rem;
}
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.grid-2 {
  display: grid; grid-template-columns: 1fr; gap: 4rem;
}
@media (min-width: 1024px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

.grid-4 {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
}
@media (min-width: 640px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--cream); border: 1px solid rgba(201,169,110,0.1);
  padding: 2.5rem 3rem; transition: all 0.5s;
}
.card:hover { border-color: rgba(201,169,110,0.4); }
.card-number {
  font-size: 1.5rem; font-weight: 700; color: var(--gold);
  display: block; margin-bottom: 1rem;
}
.card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: 0.05em; }
.card p { font-size: 0.875rem; color: rgba(74,74,74,0.7); line-height: 1.8; }
.card-icon { font-size: 1.75rem; margin-bottom: 1rem; display: block; }

/* --- Page Header --- */
.page-header {
  position: relative; padding: 8rem 0 4rem;
  background: var(--ink); overflow: hidden;
}
@media (min-width: 1024px) { .page-header { padding: 10rem 0 5rem; } }

.page-header-bg {
  position: absolute; inset: 0; opacity: 0.03;
  background-image: radial-gradient(circle at 25% 25%, var(--gold) 1px, transparent 1px);
  background-size: 40px 40px;
}

.page-header-content { position: relative; text-align: center; }
.page-header-content .pattern-border { max-width: 200px; margin: 0 auto 1.5rem; opacity: 0.5; }
.page-header-content .page-subtitle {
  color: rgba(201,169,110,0.6); font-size: 0.75rem;
  letter-spacing: 0.3em; text-transform: uppercase; margin-bottom: 0.75rem;
}
.page-header-content h1 {
  font-size: 2rem; font-weight: 700; color: var(--white); letter-spacing: 0.05em;
}
@media (min-width: 1024px) { .page-header-content h1 { font-size: 3rem; } }

/* --- Footer --- */
.footer { background: var(--ink); color: rgba(255,255,255,0.7); }
.footer-content {
  max-width: 1280px; margin: 0 auto; padding: 4rem 1.5rem;
  display: grid; grid-template-columns: 1fr; gap: 3rem;
}
@media (min-width: 768px) { .footer-content { grid-template-columns: repeat(3, 1fr); } }

.footer-brand .logo { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.footer-brand .logo-icon { font-size: 1.75rem; font-weight: 900; color: var(--gold); }
.footer-brand .logo-text h3 { font-size: 1.125rem; font-weight: 700; color: var(--white); letter-spacing: 0.05em; }
.footer-brand .logo-text p { font-size: 0.625rem; letter-spacing: 0.3em; color: rgba(201,169,110,0.5); text-transform: uppercase; }
.footer-brand .tagline { font-size: 0.875rem; color: rgba(255,255,255,0.5); font-style: italic; margin-top: 1rem; line-height: 1.6; }

.footer h4 { color: var(--white); font-weight: 600; margin-bottom: 1rem; letter-spacing: 0.05em; }
.footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.footer-links a { font-size: 0.875rem; color: rgba(255,255,255,0.5); transition: color 0.3s; }
.footer-links a:hover { color: var(--gold); }
.footer-contact p { font-size: 0.875rem; color: rgba(255,255,255,0.5); margin-bottom: 0.5rem; }
.footer-contact .small { font-size: 0.75rem; letter-spacing: 0.05em; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 1.5rem; text-align: center;
}
.footer-bottom p { font-size: 0.75rem; color: rgba(255,255,255,0.3); letter-spacing: 0.05em; }

/* --- Welcome Section --- */
.welcome-section {
  padding: 6rem 0; text-align: center;
}
@media (min-width: 1024px) { .welcome-section { padding: 8rem 0; } }

.welcome-section .label {
  font-size: 0.75rem; letter-spacing: 0.3em;
  color: rgba(201,169,110,0.6); text-transform: uppercase; margin-bottom: 1rem;
}
.welcome-section h2 {
  font-size: 1.75rem; line-height: 1.6;
}
@media (min-width: 768px) { .welcome-section h2 { font-size: 2.25rem; } }
@media (min-width: 1024px) { .welcome-section h2 { font-size: 3rem; } }
.welcome-section .author {
  font-size: 1.125rem; color: rgba(74,74,74,0.7);
  margin-top: 2rem; font-style: italic;
}

/* --- CTA Section --- */
.cta-section {
  background: var(--ink); padding: 6rem 0; position: relative; overflow: hidden;
  text-align: center;
}
@media (min-width: 1024px) { .cta-section { padding: 8rem 0; } }

.cta-bg {
  position: absolute; inset: 0; opacity: 0.04;
  background-image: radial-gradient(circle at 50% 50%, var(--gold) 1px, transparent 1px);
  background-size: 60px 60px;
}
.cta-section .content { position: relative; }
.cta-section .label {
  font-size: 0.75rem; letter-spacing: 0.3em;
  color: rgba(201,169,110,0.5); text-transform: uppercase; margin-bottom: 1.5rem;
}
.cta-section h2 {
  font-size: 1.75rem; font-weight: 700; color: var(--white);
  letter-spacing: 0.05em; margin-bottom: 2rem;
}
@media (min-width: 1024px) { .cta-section h2 { font-size: 2.25rem; } }

/* --- Feature Cards on Home --- */
.feature-card-link { display: block; color: inherit; }

/* --- About Values --- */
.values-grid {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
}
@media (min-width: 768px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .values-grid { grid-template-columns: repeat(4, 1fr); } }

.value-card {
  text-align: center; background: var(--cream); border: 1px solid rgba(201,169,110,0.1);
  padding: 2rem; transition: all 0.5s;
}
.value-card:hover { border-color: rgba(201,169,110,0.3); }
.value-card .line { width: 2rem; height: 1px; background: rgba(201,169,110,0.4); margin: 0 auto 1rem; }
.value-card p { font-size: 0.875rem; color: rgba(74,74,74,0.8); line-height: 1.8; }

/* --- Author Section --- */
.author-card {
  background: var(--ink); color: rgba(255,255,255,0.8);
  padding: 2.5rem 3rem;
}
.author-card h3 { font-size: 1.5rem; font-weight: 700; color: var(--gold); margin-bottom: 0.5rem; }
.author-card .origin-title { font-size: 0.75rem; color: rgba(201,169,110,0.6); letter-spacing: 0.1em; margin-bottom: 1.5rem; }
.author-card .quote { font-size: 0.875rem; font-style: italic; line-height: 1.8; opacity: 0.7; }
.author-card .quote-author { font-size: 0.75rem; color: rgba(201,169,110,0.5); margin-top: 0.75rem; }

/* --- Steps (Club page) --- */
.steps { display: flex; flex-direction: column; gap: 1.5rem; }
.step { display: flex; align-items: flex-start; gap: 1rem; }
.step-number {
  width: 2rem; height: 2rem; border-radius: 50%;
  border: 1px solid rgba(201,169,110,0.4);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 0.875rem; font-weight: 700;
  flex-shrink: 0;
}
.step p { font-size: 0.875rem; color: rgba(74,74,74,0.7); padding-top: 0.25rem; }

/* --- Events --- */
.event-empty {
  border: 1px solid rgba(201,169,110,0.2); background: var(--cream);
  padding: 3rem 4rem; text-align: center;
}
.event-empty .icon { font-size: 3rem; margin-bottom: 1.5rem; display: block; color: rgba(201,169,110,0.6); }
.event-empty p { font-size: 1rem; color: rgba(74,74,74,0.7); line-height: 1.8; }

.event-item {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1.5rem; background: var(--cream);
  border: 1px solid rgba(201,169,110,0.1);
  transition: all 0.5s;
}
.event-item:hover { border-color: rgba(201,169,110,0.3); }
.event-item .date {
  color: var(--gold-dark); font-size: 0.875rem; font-weight: 700;
  letter-spacing: 0.05em; min-width: 5rem;
}
.event-item .divider { width: 1px; height: 2rem; background: rgba(201,169,110,0.2); }
.event-item .title { font-size: 0.875rem; color: rgba(74,74,74,0.7); }

/* --- Gallery --- */
.gallery-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem;
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }

.gallery-card {
  background: var(--cream); border: 1px solid rgba(201,169,110,0.1);
  overflow: hidden; transition: all 0.5s; cursor: pointer;
}
.gallery-card:hover { border-color: rgba(201,169,110,0.4); }

.gallery-image {
  aspect-ratio: 3/4;
  background: linear-gradient(to bottom right, var(--ink), var(--ink-soft));
  position: relative; overflow: hidden;
}
.gallery-image .pattern-overlay {
  position: absolute; inset: 0; opacity: 0.1;
  background-image: repeating-conic-gradient(rgba(201,169,110,0.3) 0% 25%, transparent 0% 50%);
  background-size: 60px 60px;
}
.gallery-image .center-mark {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 4rem; height: 4rem; border: 1px solid rgba(201,169,110,0.3);
  transform: translate(-50%, -50%) rotate(45deg);
  display: flex; align-items: center; justify-content: center;
}
.gallery-image .center-mark .inner {
  width: 2rem; height: 2rem; border: 1px solid rgba(201,169,110,0.2);
}
.gallery-image .hover-overlay {
  position: absolute; inset: 0;
  background: rgba(201,169,110,0);
  transition: all 0.5s;
}
.gallery-card:hover .hover-overlay { background: rgba(201,169,110,0.1); }

.gallery-caption { padding: 1rem; text-align: center; }
.gallery-caption .zh-title { font-size: 0.75rem; color: var(--gold-dark); letter-spacing: 0.1em; margin-bottom: 0.25rem; }
.gallery-caption .en-title { font-size: 0.625rem; color: rgba(74,74,74,0.5); letter-spacing: 0.05em; font-style: italic; }

/* --- Scholar Cards --- */
.scholar-card { text-align: center; }
.scholar-avatar {
  width: 4rem; height: 4rem; margin: 0 auto 1.5rem;
  border-radius: 50%; border: 1px solid rgba(201,169,110,0.3);
  display: flex; align-items: center; justify-content: center;
}
.scholar-avatar span { color: var(--gold); font-size: 1.5rem; font-weight: 700; }
.scholar-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.75rem; letter-spacing: 0.05em; }
.scholar-card p { font-size: 0.875rem; color: rgba(74,74,74,0.7); line-height: 1.8; max-width: 16rem; margin: 0 auto; }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(2rem); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-in { opacity: 0; }
.animate-in.visible { animation: fadeInUp 0.8s ease-out forwards; }

/* --- Responsive --- */
@media (max-width: 639px) {
  .hero h1 { font-size: 2.5rem; }
  .section { padding: 3rem 0; }
  .card { padding: 1.5rem; }
  .page-header { padding: 6rem 0 3rem; }
  .page-header-content h1 { font-size: 1.5rem; }
}

/* --- Scholar / school card in grid fix --- */
.school-card {
  background: var(--cream); border: 1px solid rgba(201,169,110,0.1);
  padding: 2.5rem; transition: all 0.5s;
}
.school-card:hover { border-color: rgba(201,169,110,0.3); }
.school-card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: 0.05em; }
.school-card p { font-size: 0.875rem; color: rgba(74,74,74,0.7); line-height: 1.8; }
