/* Theme Tokens */
:root {
  --primary: #D32F2F;
  --primary-dark: #B71C1C;
  --secondary: #FCE4EC;
  --bg: #FFFFFF;
  --text: #1A1F2B;
  --muted: #5B667A;
  --card: rgba(0, 0, 0, 0.03);
  --border: rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Noto Sans SC', 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, 'PingFang SC', 'Microsoft YaHei', 'WenQuanYi Micro Hei', sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* Global link color on light theme */
a { color: var(--text); }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Top Fixed Navigation */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  backdrop-filter: saturate(1.2) blur(8px);
  background: rgba(12, 14, 18, 0.6);
  border-bottom: 1px solid var(--border);
}
.top-nav .nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 16px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.logo .brand { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: 0.5px; display: inline-flex; align-items: center; gap: 8px; }
.logo .brand .brand-mark { height: 22px; display: inline-block; }
.site-title { font-weight: 600; letter-spacing: 0.5px; font-size: 14px; opacity: 0.92; color: #fff; }
.nav-items { display: flex; gap: 20px; }
.nav-items a {
  color: #fff; text-decoration: none; font-size: 14px; padding: 10px 8px; border-radius: 8px;
  border-bottom: 2px solid transparent; transition: border-color .2s ease, color .2s ease;
}
.nav-items a:hover { background: transparent; box-shadow: none; border-bottom-color: #fff; }
.nav-toggle { display: none; background: transparent; border: 0; color: #fff; font-size: 22px; border-radius: 8px; padding: 6px; }

/* Hero Banner */
.hero {
  position: relative; min-height: calc(86vh - 160px); padding-top: 64px; display: flex; align-items: center; overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}
.hero-overlay { position: absolute; top: 0; left: 0; right: 0; height: 70%; background: radial-gradient(1000px 500px at 70% 20%, rgba(255,255,255,0.12), transparent 60%); mix-blend-mode: screen; }
.hero-content { position: relative; z-index: 2; text-align: left; transform: translateY(-30px); }
.hero h1, .hero .title { font-size: 40px; margin: 0 0 14px; color: #fff; font-weight: 800; }
.hero .subtitle { font-size: 24px; margin: 0 0 10px; color: #fff; font-weight: 700; }
.hero .desc { color: #ffe5ea; margin-bottom: 24px; }
.countdown { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: rgba(0,0,0,0.12); color: #fff; margin: 6px 0 10px; font-weight: 600; font-size: 13px; box-shadow: 0 0 0 1px rgba(255,255,255,0.10) inset; }
.countdown .label { opacity: .85; }
.countdown .value { font-variant-numeric: tabular-nums; letter-spacing: .3px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; text-decoration: none; font-weight: 600; transition: box-shadow .25s ease, transform .2s ease; }
.btn-primary { background: #fff; color: var(--primary-dark); }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.25), 0 0 0 8px rgba(252,228,236,0.45); transform: translateY(-1px); }

#particles { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.6; }
.scroll-indicator { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,0.15); backdrop-filter: blur(6px); animation: floatY 2.2s ease-in-out infinite; z-index: 2; }
/* Local icons */
.icon-arrow { position: relative; width: 16px; height: 16px; display: inline-block; }
.icon-arrow::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translate(-50%, -50%) rotate(45deg); }
.icon-menu { position: relative; width: 20px; height: 16px; display: inline-block; background:
  linear-gradient(currentColor 0 0) left 0 top 2px/20px 2px no-repeat,
  linear-gradient(currentColor 0 0) left 0 top 7px/20px 2px no-repeat,
  linear-gradient(currentColor 0 0) left 0 top 12px/20px 2px no-repeat; opacity: .95; }
@keyframes floatY { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,-6px); } }

/* Sections */
.section { padding: 28px 0; }
.section h2 { font-size: 24px; margin-bottom: 14px; letter-spacing: .5px; }
.section p { color: var(--muted); line-height: 1.8; text-align: justify; }
.section span { color: var(--muted); opacity: .92; }
.section-centered { text-align: center; }
.highlight { display: inline-block; margin-top: 8px; padding: 10px 14px; border-radius: 12px; background: #F2F4F7; color: var(--text); box-shadow: 0 0 0 1px rgba(0,0,0,0.12) inset; }

/* Accordion */
.accordion { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: rgba(255,255,255,0.03); }
.accordion-item + .accordion-item { border-top: 1px solid var(--border); }
.accordion-header { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; background: transparent; color: var(--text); border: 0; cursor: pointer; font-size: 16px; font-weight: 700; }
.accordion-header i { position: relative; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: rgba(0,0,0,0.08); transition: transform .2s ease, background .2s ease; font-style: normal; }
.accordion-header i::before { content: "+"; font-size: 16px; line-height: 1; font-weight: 700; color: var(--primary); }
.accordion-item.open .accordion-header i { transform: rotate(45deg); background: rgba(0,0,0,0.12); }
.accordion-body { display: none; padding: 15px 16px; font-size: 16px; line-height: 1.7; color: var(--text); }

/* Reduce contrast on open items */
.accordion-item { transition: background .2s ease; }
.accordion-item.open { background: rgba(255,255,255,0.05); }
.accordion-item.open .accordion-body { background: rgba(255,255,255,0.03); border-top: 1px solid var(--border); }

/* Timeline */
.timeline { position: relative; margin: 24px 0 12px; }
.timeline::before { content: ""; position: absolute; left: 18px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--primary), var(--primary-dark)); border-radius: 2px; }
.timeline-item { position: relative; display: flex; gap: 16px; padding: 12px 0 12px 46px; }
.timeline-dot { position: absolute; left: 10px; top: 18px; width: 16px; height: 16px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 6px rgba(211,47,47,0.28); }
.timeline-content .date { color: var(--text); font-weight: 600; }
.timeline-content .event { color: var(--muted); }

.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 18px; }
.contact-card { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.contact-card a { color: var(--text); text-decoration: none; }
.contact-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.2), 0 0 0 8px rgba(252,228,236,0.18); }

.note-list { display: grid; gap: 10px; padding-left: 18px; }
.note-list li { color: var(--muted); }

/* Footer */
.footer { background: var(--primary-dark); padding: 24px 0; text-align: center; }
.footer p { margin: 0; color: #fff; opacity: .95; }
.footer a { color: #fff; text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,0.6); }
.footer a:hover { opacity: 1; border-bottom-color: #fff; }

/* Theme section: align left and tighten left padding */
#theme { text-align: left; }
#theme .container { padding-left: 12px; }

/* Scroll Animations */
[data-animate] { opacity: 0; transform: translateY(8px); will-change: opacity, transform; }
[data-animate].visible { opacity: 1; transform: none; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInScale { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

#hero.visible { animation: fadeIn .8s ease both; }
#background.visible { animation: fadeInUp .8s ease both; }
#theme.visible { animation: fadeInScale .8s ease both; }
#scope.visible { animation: fadeInRight .8s ease both; }
#directions.visible { animation: slideUp .8s ease both; }
#timeline.visible { animation: fadeIn .8s ease both; }
#notes.visible { animation: fadeInUp .8s ease both; }

/* Responsive */
@media (max-width: 960px) {
  .nav-items { display: none; position: absolute; top: 64px; right: 12px; left: 12px; flex-direction: column; padding: 10px; border-radius: 12px; background: rgba(12,14,18,0.85); border: 1px solid var(--border); }
  .nav-items.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .hero h1, .hero .title { font-size: 32px; }
  .hero .subtitle { font-size: 16px; }
  .logo .brand { font-size: 18px; }
  .logo .brand .brand-mark { height: 18px; }
}

@media (max-width: 600px) {
  .section { padding: 24px 0; }
  .timeline-item { padding-left: 40px; }
}

/* Extra small screens refinement */
@media (max-width: 420px) {
  .top-nav .nav-inner { height: 56px; }
  .hero { padding-top: 56px; min-height: calc(80vh - 160px); }
  .hero h1, .hero .title { font-size: 26px; }
  .hero .subtitle { font-size: 18px; }
  .container { padding: 0 16px; }
  .section { padding: 20px 0; }
  .btn { padding: 10px 16px; font-size: 14px; }
  .highlight { padding: 8px 12px; border-radius: 10px; }
  .timeline-item { gap: 12px; }
  .contact { grid-template-columns: 1fr; }
  .logo .brand { font-size: 16px; }
  .logo .brand .brand-mark { height: 16px; }
}
