/* ============================================================
   QUAN ZHEN CULTURAL SOCIETY — 全真教化協會
   Global Stylesheet v1.0
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@400;500&family=Noto+Serif+TC:wght@400;500&display=swap');

/* ── CSS Variables — Brand Tokens ─────────────────────────── */
:root {
  /* Colours */
  --navy-primary:     #1A2744;
  --navy-deep:        #111D38;
  --brass-gold:       #C9A84C;
  --rice-paper:       #F5EDD8;
  --muted-sky:        #8FA3C8;
  --cinnabar:         #8B2A2A;
  --white:            #FFFFFF;

  /* Typography */
  --font-display:     'Cormorant Garamond', Georgia, serif;
  --font-body:        'Inter', system-ui, sans-serif;
  --font-cn:          'Noto Serif TC', serif;

  /* Spacing scale */
  --space-xs:         4px;
  --space-sm:         8px;
  --space-md:         16px;
  --space-lg:         24px;
  --space-xl:         40px;
  --space-2xl:        64px;
  --space-3xl:        96px;

  /* Layout */
  --container-max:    1200px;
  --container-pad:    24px;
  --radius-sm:        2px;
  --radius-md:        4px;
  --radius-lg:        8px;

  /* Transitions */
  --transition:       0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--navy-primary);
  background-color: var(--rice-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  background: none;
}

/* ── Container ────────────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ── Typography Scale ─────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--navy-primary);
}

h1 { font-size: clamp(36px, 5vw, 56px); }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: clamp(20px, 3vw, 28px); }
h4 { font-size: clamp(16px, 2vw, 20px); }

p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--navy-primary);
}

.text-muted {
  color: var(--muted-sky);
}

.cn-text {
  font-family: var(--font-cn);
  letter-spacing: 0.12em;
  color: var(--brass-gold);
}

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brass-gold);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-gold {
  background: var(--brass-gold);
  color: var(--navy-deep);
  border: 1px solid var(--brass-gold);
}
.btn-gold:hover {
  background: #b8943e;
  border-color: #b8943e;
  color: var(--navy-deep);
}

.btn-outline-gold {
  background: transparent;
  color: var(--brass-gold);
  border: 1px solid var(--brass-gold);
}
.btn-outline-gold:hover {
  background: var(--brass-gold);
  color: var(--navy-deep);
}

.btn-outline-light {
  background: transparent;
  color: var(--rice-paper);
  border: 1px solid rgba(245,237,216,0.4);
}
.btn-outline-light:hover {
  background: rgba(245,237,216,0.1);
  border-color: rgba(245,237,216,0.7);
}

/* ── Section Utilities ────────────────────────────────────── */
.section {
  padding: var(--space-3xl) 0;
}

.section-sm {
  padding: var(--space-2xl) 0;
}

.section-navy {
  background-color: var(--navy-primary);
}
.section-navy h1,
.section-navy h2,
.section-navy h3,
.section-navy h4,
.section-navy p {
  color: var(--rice-paper);
}

.section-deep {
  background-color: var(--navy-deep);
}
.section-deep h1,
.section-deep h2,
.section-deep h3,
.section-deep p {
  color: var(--rice-paper);
}

.section-paper {
  background-color: var(--rice-paper);
}

.gold-divider {
  width: 48px;
  height: 1px;
  background: var(--brass-gold);
  margin: var(--space-lg) 0;
}

.gold-divider-center {
  width: 48px;
  height: 1px;
  background: var(--brass-gold);
  margin: var(--space-lg) auto;
}

/* ── Navigation ───────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--navy-primary);
  border-bottom: 1px solid rgba(201,168,76,0.2);
  transition: background var(--transition);
}

.site-nav.scrolled {
  background: var(--navy-deep);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--space-lg);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.nav-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--brass-gold);
  background: var(--white);
  object-fit: contain;
  padding: 2px;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-logo-en {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--rice-paper);
  letter-spacing: 0.02em;
}

.nav-logo-cn {
  font-family: var(--font-cn);
  font-size: 10px;
  color: var(--brass-gold);
  letter-spacing: 0.12em;
  margin-top: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--muted-sky);
  transition: color var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--rice-paper);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.lang-toggle a {
  color: var(--muted-sky);
  transition: color var(--transition);
}

.lang-toggle a:hover,
.lang-toggle a.active {
  color: var(--brass-gold);
}

.lang-toggle .divider {
  color: rgba(143,163,200,0.35);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--muted-sky);
  border-radius: 1px;
  transition: all var(--transition);
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--navy-primary);
  z-index: 999;
  padding: var(--space-xl) var(--container-pad);
  flex-direction: column;
  gap: var(--space-md);
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-size: 18px;
  font-family: var(--font-display);
  color: var(--rice-paper);
  padding: var(--space-md) 0;
  border-bottom: 0.5px solid rgba(201,168,76,0.1);
  letter-spacing: 0.03em;
}

.mobile-nav a:hover {
  color: var(--brass-gold);
}

/* ── Hero Section ─────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  background-color: var(--navy-primary);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 64px;
}

.hero-bg-chars {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: var(--space-xl);
  pointer-events: none;
  user-select: none;
}

.hero-bg-char {
  font-family: var(--font-cn);
  font-size: clamp(120px, 15vw, 200px);
  color: rgba(201,168,76,0.08);
  line-height: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  padding: var(--space-3xl) 0;
}

.hero-content .eyebrow {
  margin-bottom: var(--space-lg);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 500;
  color: var(--rice-paper);
  line-height: 1.1;
  margin-bottom: var(--space-lg);
}

.hero-title em {
  font-style: italic;
  color: var(--brass-gold);
}

.hero-subtitle {
  font-size: 15px;
  color: var(--muted-sky);
  line-height: 1.75;
  max-width: 480px;
  margin-bottom: var(--space-xl);
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero-tags {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-xl);
}

.hero-tag {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted-sky);
  border: 0.5px solid rgba(143,163,200,0.25);
  border-radius: 20px;
  padding: 3px 12px;
}

/* ── Stats Bar ────────────────────────────────────────────── */
.stats-bar {
  background: var(--navy-deep);
  border-top: 1px solid rgba(201,168,76,0.15);
  border-bottom: 1px solid rgba(201,168,76,0.15);
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.stat-item {
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  border-right: 0.5px solid rgba(201,168,76,0.1);
}

.stat-item:last-child {
  border-right: none;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  color: var(--brass-gold);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted-sky);
}

/* ── Events Teaser ────────────────────────────────────────── */
.event-card {
  background: var(--white);
  border: 0.5px solid rgba(26,39,68,0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  transition: border-color var(--transition);
}

.event-card:hover {
  border-color: rgba(201,168,76,0.4);
}

.event-date-block {
  background: var(--navy-primary);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  text-align: center;
  flex-shrink: 0;
  min-width: 52px;
}

.event-day {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--brass-gold);
  line-height: 1;
}

.event-month {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-sky);
  margin-top: 3px;
}

.event-body {}

.event-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--navy-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}

.event-desc {
  font-size: 12px;
  color: #666;
  line-height: 1.6;
}

.event-type {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 8px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.event-type-ritual {
  background: rgba(139,42,42,0.08);
  color: var(--cinnabar);
}

.event-type-class {
  background: rgba(26,39,68,0.08);
  color: var(--navy-primary);
}

/* ── Three Pillars ────────────────────────────────────────── */
.pillar-card {
  border-top: 2px solid var(--brass-gold);
  background: rgba(201,168,76,0.04);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
}

.pillar-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--navy-primary);
  margin-bottom: 4px;
}

.pillar-cn {
  font-family: var(--font-cn);
  font-size: 12px;
  color: var(--brass-gold);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.pillar-text {
  font-size: 13px;
  color: #555;
  line-height: 1.7;
}

/* ── CTA Band ─────────────────────────────────────────────── */
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.cta-card {
  border: 0.5px solid rgba(245,237,216,0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  background: rgba(245,237,216,0.04);
}

.cta-card-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--rice-paper);
  margin-bottom: var(--space-sm);
}

.cta-card-text {
  font-size: 13px;
  color: var(--muted-sky);
  line-height: 1.65;
  margin-bottom: var(--space-lg);
}

/* ── WhatsApp Float ───────────────────────────────────────── */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(37,211,102,0.35);
  transition: all var(--transition);
}

.wa-float:hover {
  background: #20ba5a;
  color: white;
  transform: translateY(-2px);
}

.wa-float svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-primary);
  border-top: 1px solid rgba(201,168,76,0.35);
}

.footer-main {
  padding: var(--space-3xl) 0 var(--space-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 1.2fr;
  gap: var(--space-3xl);
  align-items: start;
}

.footer-brand-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-md);
}

.footer-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--brass-gold);
  background: var(--white);
  object-fit: contain;
  padding: 2px;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--rice-paper);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.footer-brand-cn {
  font-family: var(--font-cn);
  font-size: 10px;
  color: var(--brass-gold);
  letter-spacing: 0.12em;
  margin-top: 1px;
}

.footer-brand-desc {
  font-size: 12px;
  color: rgba(143,163,200,0.8);
  line-height: 1.75;
  max-width: 260px;
  margin-bottom: var(--space-lg);
}

.footer-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(37,211,102,0.1);
  border: 0.5px solid rgba(37,211,102,0.25);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: #25D366;
  text-decoration: none;
  transition: background var(--transition);
}

.footer-wa-btn:hover {
  background: rgba(37,211,102,0.18);
  color: #25D366;
}

.footer-wa-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25D366;
  flex-shrink: 0;
}

.footer-col-title {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-gold);
  margin-bottom: var(--space-md);
}

.footer-col a {
  display: block;
  font-size: 12px;
  color: rgba(143,163,200,0.8);
  padding: 4px 0;
  transition: color var(--transition);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--rice-paper);
}

.footer-bottom {
  background: var(--navy-deep);
  border-top: 0.5px solid rgba(201,168,76,0.12);
  padding: var(--space-md) 0;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-copy {
  font-size: 11px;
  color: rgba(143,163,200,0.5);
}

.footer-legal {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.footer-legal a {
  font-size: 11px;
  color: rgba(143,163,200,0.5);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-legal a:hover {
  color: var(--muted-sky);
}

.footer-legal span {
  color: rgba(143,163,200,0.25);
  font-size: 11px;
}

/* ── Grid Utilities ───────────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
  .nav-links {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
}

@media (max-width: 768px) {
  :root {
    --container-pad: 20px;
    --space-3xl: 64px;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .cta-grid {
    grid-template-columns: 1fr;
  }
  .stats-inner {
    grid-template-columns: 1fr;
  }
  .stat-item {
    border-right: none;
    border-bottom: 0.5px solid rgba(201,168,76,0.1);
    padding: var(--space-lg);
  }
  .stat-item:last-child {
    border-bottom: none;
  }
  .hero-bg-chars {
    opacity: 0.5;
  }
  .lang-toggle {
    display: none;
  }
  .wa-float span {
    display: none;
  }
  .wa-float {
    padding: 14px;
    border-radius: 50%;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
  .hero-buttons {
    flex-direction: column;
  }
  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}
