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

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Serif+JP:wght@400;500;600;700&display=swap');

:root {
  --bg: #0F0F0F;
  --bg-section: #141414;
  --text: #E8E0D4;
  --text-light: #A09888;
  --text-muted: #6B6358;
  --accent: #C9A96E;
  --accent-light: #DFC08A;
  --accent-dim: rgba(201,169,110,0.15);
  --card-bg: #1A1A1A;
  --card-bg-hover: #1F1F1F;
  --card-shadow: 0 4px 32px rgba(0,0,0,0.4);
  --border: rgba(201,169,110,0.12);
  --border-strong: rgba(201,169,110,0.25);
  --section-gap: 100px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Cormorant Garamond", "Noto Serif SC", "Noto Serif JP", Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
}

/* === Landing Section === */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(201,169,110,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(201,169,110,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 0%, rgba(201,169,110,0.08) 0%, transparent 60%),
    var(--bg);
}

.landing::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    repeating-linear-gradient(0deg, transparent, transparent 100px, rgba(201,169,110,0.02) 100px, rgba(201,169,110,0.02) 101px);
  pointer-events: none;
}

.landing::after {
  content: '60';
  position: absolute;
  font-family: "Playfair Display", serif;
  font-size: clamp(15rem, 30vw, 28rem);
  font-weight: 700;
  color: rgba(201,169,110,0.03);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  line-height: 1;
}

/* Decorative line above title */
.landing-ornament {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeIn 1.5s ease forwards 0.2s;
}

.landing h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 24px;
  position: relative;
  opacity: 0;
  animation: fadeUp 1.4s ease forwards 0.4s;
  text-transform: none;
}

.landing .name-line {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--text);
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 1.4s ease forwards 0.7s;
  text-transform: none;
}

.landing .name-cn {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--text-light);
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 1.4s ease forwards 0.9s;
}

.landing .subtitle {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: var(--text-muted);
  font-style: italic;
  font-weight: 300;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 1.4s ease forwards 1.1s;
  letter-spacing: 0.02em;
}

/* Decorative line below subtitle */
.landing-ornament-bottom {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeIn 1.5s ease forwards 1.3s;
}

.landing .scroll-hint {
  opacity: 0;
  animation: fadeUp 1.4s ease forwards 1.5s;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.3s;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: "Cormorant Garamond", serif;
}

.landing .scroll-hint:hover {
  color: var(--accent);
}

.scroll-arrow {
  display: inline-block;
  animation: bounce 2.5s ease-in-out infinite;
  font-size: 1.2rem;
  color: var(--accent);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === Section Layout === */
.section {
  max-width: 880px;
  margin: 0 auto;
  padding: var(--section-gap) 24px;
}

.section-title {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--accent);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 56px;
  font-style: italic;
  font-weight: 300;
}

/* === Category Dividers === */
.category-header {
  text-align: center;
  margin: 72px 0 40px;
  position: relative;
}

.category-header h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  display: inline-block;
  padding: 0 32px;
  background: var(--bg);
  position: relative;
  z-index: 1;
  letter-spacing: 0.08em;
}

.category-header::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

/* === Envelope Cards === */
.envelope {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.envelope:hover {
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--card-bg-hover);
}

.envelope.open {
  border-color: var(--accent);
  border-color: rgba(201,169,110,0.3);
}

.envelope.open .envelope-front .toggle-icon {
  transform: rotate(180deg);
}

.envelope-front {
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.envelope-front .person-info {
  flex: 1;
}

.envelope-front .person-name {
  font-family: "Playfair Display", "Noto Serif SC", serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.envelope-front .person-role {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 300;
}

.envelope-front .toggle-icon {
  font-size: 1rem;
  color: var(--accent);
  transition: transform 0.4s ease;
  flex-shrink: 0;
  opacity: 0.6;
}

.envelope-front .badges {
  display: flex;
  gap: 8px;
  margin-left: auto;
  margin-right: 16px;
}

.badge {
  font-size: 0.72rem;
  padding: 3px 12px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* === Envelope Content (hidden by default) === */
.envelope-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease;
}

.envelope.open .envelope-content {
  max-height: 3000px;
}

.envelope-inner {
  padding: 0 32px 32px;
  border-top: 1px solid var(--border);
}

.message-text {
  margin-top: 24px;
  font-size: 1.05rem;
  line-height: 2;
  white-space: pre-wrap;
  color: var(--text);
  font-weight: 300;
}

.message-text::before {
  content: '"';
  font-family: "Playfair Display", serif;
  font-size: 3.5rem;
  color: var(--accent);
  opacity: 0.25;
  line-height: 0;
  vertical-align: -0.5em;
  margin-right: 4px;
}

.extra-info {
  margin-top: 20px;
  padding: 16px 20px;
  background: rgba(201,169,110,0.04);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
  border-left: 2px solid var(--accent-dim);
  white-space: pre-wrap;
}

.extra-info::before {
  content: '📝 ';
}

/* === Photo Gallery === */
.photo-gallery {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.photo-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  background: #1a1a1a;
  display: block;
}

.photo-gallery img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(201,169,110,0.2);
}

/* === Video === */
.video-container {
  margin-top: 20px;
}

.video-container video,
.video-container iframe {
  width: 100%;
  max-width: 640px;
  border-radius: 8px;
  background: #000;
}

.video-container video {
  aspect-ratio: 16/9;
}

/* === Lightbox === */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.95);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1001;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
}

/* === Stats Bar === */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 64px;
  padding: 48px 20px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: "Playfair Display", serif;
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* === Footer === */
.footer {
  text-align: center;
  padding: 80px 20px 48px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 300;
}

.footer .heart {
  color: #c0392b;
  font-size: 1.1em;
}

.footer .committee {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  font-style: italic;
}

.footer .committee-names {
  margin-top: 8px;
  font-family: "Noto Serif SC", "Noto Serif JP", serif;
  font-size: 0.82rem;
  color: var(--accent);
  opacity: 0.5;
  letter-spacing: 0.08em;
}

/* === Fade-in on scroll === */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 600px) {
  .landing h1 { letter-spacing: 0.04em; }
  .landing .name-line { letter-spacing: 0.08em; }
  .envelope-front {
    padding: 18px 20px;
    flex-wrap: wrap;
  }
  .badges { margin: 8px 0 0; }
  .envelope-inner { padding: 0 20px 24px; }
  .photo-gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .stats-bar { gap: 32px; }
  .category-header { margin: 48px 0 28px; }
}
