@font-face {
  font-family: "MoLiTi";
  src: url("fonts/molit-subset.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #f2f4f7;
  --white: #ffffff;
  --ink: #1a1d24;
  --text: #333844;
  --text-muted: #5a6070;
  --blue: #2b4ce0;
  --blue-dark: #1c2e8a;
  --red: #e0453a;
  --yellow: #f4c945;
  --yellow-dark: #9c7a12;
  --border: #e2e5eb;
  --radius: 16px;
  --max-width: 1330px;
  --sans: "Alibaba PuHuiTi", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --display: "MoLiTi", "Alibaba PuHuiTi", "PingFang SC", sans-serif;
  --shadow: 0 4px 24px rgba(20, 24, 40, 0.08);
}

* { box-sizing: border-box; }


body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.brand-logo {
  height: 44px;
  width: auto;
}

.brand-logo-white { display: none; }

.main-nav {
  display: flex;
  gap: 56px;
}

.nav-link {
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  padding-bottom: 26px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-link.is-active,
.nav-link:hover {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--ink);
}

/* Dark transparent header on the hero page */
body.on-home .site-header {
  position: absolute;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom-color: transparent;
}

body.on-home .brand-logo-color { display: none; }
body.on-home .brand-logo-white { display: block; }

body.on-home .nav-link { color: #fff; }
body.on-home .nav-link.is-active,
body.on-home .nav-link:hover { border-bottom-color: #fff; }

/* 往届回顾 nav dropdown */
.nav-item {
  position: relative;
  display: flex;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 6px 0;
  white-space: nowrap;
  z-index: 20;
}

.nav-item:hover .nav-dropdown { display: block; }

.nav-dropdown a {
  display: block;
  padding: 10px 22px;
  font-size: 16px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.nav-dropdown a + a { border-top: 1px solid var(--border); }

.nav-dropdown a:hover { color: var(--blue); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* Section basics */
.section {
  display: none;
  padding: 40px 0 32px;
  position: relative;
}

/* Sections are page-views: clamp native #hash fragment scrolling to the top */
main > section { scroll-margin-top: 9999px; }

.section .container { position: relative; }

.section.is-active { display: block; }

.hero.is-active { display: flex; }

.partners-block { margin-top: 56px; }

.section-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--ink);
  text-align: center;
  margin: 0 0 28px;
}

.body-text {
  font-size: 16px;
  color: var(--text);
  margin: 0 0 16px;
  text-align: justify;
}

.eyebrow {
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: 0.06em;
  color: var(--red);
  font-weight: 400;
}

.eyebrow-inline {
  font-family: var(--display);
  font-size: 12px;
  color: var(--red);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.section-caption {
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 40px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(300px, 100%);
  padding: 15px 26px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-align: left;
}

.btn-primary {
  background: rgba(38, 66, 172, 0.82);
  color: #fff;
}

.btn-primary:hover { background: rgba(38, 66, 172, 0.95); }

.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(4px); }

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 32px;
}

/* ---------- Hero ---------- */
.hero {
  display: none;
  position: relative;
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,14,30,0.55) 0%, rgba(10,14,30,0.35) 40%, rgba(10,14,30,0.75) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 170px;
  padding-bottom: 60px;
  text-align: center;
}

.hero-heading { margin: 0 0 28px; }

.hero-wordmark {
  width: 100%;
  max-width: 1165px;
  margin: 0 auto;
}

.hero-location {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 12px;
}

.hero-dates {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 44px;
  letter-spacing: 0.02em;
}

.hero-caption {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,0.85);
  padding-bottom: 32px;
}

/* ---------- Stats ---------- */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  margin: 28px 0;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.stat-number {
  font-family: var(--display);
  font-size: 50px;
  font-weight: 400;
  color: var(--blue);
  line-height: 1.15;
}

.stats-row-red {
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: clamp(2rem, 6vw, 5.625rem);
}

.stats-row-red .stat { align-items: flex-start; }

.stats-row-red .stat-number {
  color: var(--red);
  font-size: clamp(2.75rem, 4.4vw, 5.25rem);
  line-height: 1.05;
}

.stat-label {
  font-size: 17px;
  color: var(--text);
}

.stats-row-red .stat-label { color: var(--ink); }

/* ---------- About carousel ---------- */
.about-section .body-text { font-size: 19px; }

.about-photo,
.about-grid-photo {
  width: 100%;
  border-radius: 12px;
  margin-top: 8px;
}

.partners-photo {
  background: #fff;
  padding: 12px;
  border: 1px solid var(--border);
}

.carousel {
  position: relative;
}

.carousel-track {
  position: relative;
  min-height: 40px;
}

.carousel-slide {
  display: none;
}

.carousel-slide.is-active {
  display: block;
  animation: fadeIn 0.35s ease;
}

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

.carousel-arrow {
  position: absolute;
  top: 45%;
  translate: 0 -50%;
  z-index: 5;
  border: none;
  background: none;
  color: var(--blue);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  /* ≥44px hit area regardless of glyph size */
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 10px;
  transition: opacity 0.2s, transform 0.2s;
}

.carousel-arrow:hover:not(:disabled) { opacity: 0.75; }
.carousel-arrow:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.carousel-arrow:active:not(:disabled) { opacity: 0.55; }
.carousel-arrow:disabled { opacity: 0.25; cursor: default; }

.carousel-count {
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  margin: 20px 0 0;
}

.carousel-count:empty { display: none; }

/* ---------- Cross-section cues ---------- */
/* Entering a new "chapter" via the chained arrows/swipe: a slightly stronger,
   directional entrance than the per-slide fade */
@keyframes sectionEnterFwd {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes sectionEnterBack {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

.section-enter-fwd { animation: sectionEnterFwd 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.section-enter-back { animation: sectionEnterBack 0.45s cubic-bezier(0.22, 1, 0.36, 1); }

/* Section-name toast: flashes the chapter you just landed in */
.section-toast {
  position: fixed;
  top: 112px;
  left: 50%;
  z-index: 200;
  translate: -50% 0;
  background: rgba(26, 29, 36, 0.92);
  color: #fff;
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 0.12em;
  padding: 10px 28px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s, transform 0.3s;
}

.section-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Upcoming-section name shown beside the ▶ arrow on a section's last page */
.carousel-next-hint {
  position: absolute;
  z-index: 5;
  /* sit centered just below the 44px arrow */
  top: calc(45% + 26px);
  right: calc((100% - 100vw) / 2 + clamp(0.875rem, 2vw, 2rem) + 22px - 2.5em);
  width: 5em;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  color: var(--text-muted);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.carousel-next-hint.is-visible { opacity: 1; }
/* Pin the arrows a fluid ~2vw in from the viewport edges regardless of container width */
.carousel-arrow-prev { left: calc((100% - 100vw) / 2 + clamp(0.875rem, 2vw, 2rem)); }
.carousel-arrow-next { right: calc((100% - 100vw) / 2 + clamp(0.875rem, 2vw, 2rem)); }
.carousel-arrow-prev:hover:not(:disabled) { transform: translateX(-3px); }
.carousel-arrow-next:hover:not(:disabled) { transform: translateX(3px); }

.plan-section .carousel-arrow { color: var(--red); }
/* Brand yellow reads too faint on the light background — use its darker cut */
.history-section .carousel-arrow { color: var(--yellow-dark); }

/* Mid-size viewports: the viewport gutter is too narrow to hold the arrows,
   so reserve a fluid gutter inside the carousel and pin the arrows to it —
   the text-to-arrow gap can never collapse */
@media (max-width: 1480px) and (min-width: 901px) {
  .carousel { padding-inline: clamp(3.5rem, 5vw, 4.5rem); }
  .carousel-arrow-prev { left: 0; }
  .carousel-arrow-next { right: 0; }
  .carousel-next-hint { right: calc(22px - 2.5em); }
}

/* ---------- Plan section ---------- */
.plan-section { padding-top: 0; }

.plan-banner {
  width: 100%;
  margin-bottom: 32px;
}

.plan-card {
  display: grid;
  grid-template-columns: 46% 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px;
  margin-bottom: 0;
}

.plan-card .body-text { font-size: 17px; }

/* Schedule slide: narrower venue-map column, like the reference */
.plan-card:has(.schedule-card) { grid-template-columns: 31% 1fr; }

.plan-card-media img {
  border-radius: 10px;
  border: 1px solid var(--border);
}

.schedule-title { text-align: left; margin-bottom: 2px; font-size: 34px; }

.schedule-card .eyebrow { display: block; margin-bottom: 14px; }

.schedule-row {
  display: flex;
  gap: 18px;
  padding: 10px 0;
  align-items: center;
}

.schedule-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  color: var(--red);
}

.schedule-row-body {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 28px;
}

.schedule-label-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 96px;
}

.schedule-label {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
}

.schedule-value {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 6px clamp(1.75rem, 3vw, 3.5rem);
  font-size: 15px;
  white-space: nowrap;
}

.schedule-media {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
}

/* ---------- History section ---------- */
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.history-overview-photo {
  width: 100%;
  border-radius: 12px;
}

.year-slide {
  grid-template-columns: 42% 1fr;
  gap: 64px;
}

.carousel-slide.year-slide.is-active { display: grid; }

.year-photos img {
  border-radius: 10px;
  margin-bottom: 14px;
}

.year-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 16px;
}

.year-copy .body-text { font-size: 15.5px; }

.guests-photo {
  width: 100%;
  border-radius: 12px;
  margin-top: 24px;
  background: #fff;
  padding: 12px;
  border: 1px solid var(--border);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding-top: 40px;
}

.contact-info { padding-left: 72px; }

.contact-info .body-text {
  font-size: 23px;
  text-align: left;
  margin-bottom: 6px;
}

.qr-code {
  width: 200px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 44px 0 24px;
}

.contact-logo img {
  width: min(310px, 100%);
  margin: 0 auto;
}

.contact-info a { color: var(--text); font-weight: 400; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .header-inner { height: 64px; }

  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    display: none;
  }

  .main-nav.is-open { display: flex; }

  .nav-link {
    display: block;
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
  }

  .nav-link.is-active, .nav-link:hover { border-bottom-color: var(--border); }

  body.on-home .site-header { position: sticky; background: var(--bg); border-bottom-color: var(--border); }
  body.on-home .brand-logo-color { display: block; }
  body.on-home .brand-logo-white { display: none; }
  body.on-home .nav-link { color: var(--ink); }

  .nav-item { display: block; }
  .nav-dropdown {
    display: block;
    position: static;
    transform: none;
    border: none;
    box-shadow: none;
    padding: 0;
    background: transparent;
  }
  .nav-dropdown a { padding: 14px 48px; border-top: 1px solid var(--border); text-decoration: none; }

  .hero-location { font-size: 24px; }
  .hero-dates { font-size: 28px; }
  .hero-content { padding-top: 96px; }

  .eyebrow { font-size: 15px; }

  .plan-card,
  .plan-card:has(.schedule-card),
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .year-slide {
    grid-template-columns: 1fr;
  }

  .schedule-grid { grid-template-columns: 1fr 1fr; white-space: normal; }

  /* Value text wraps below the label here, so pin the icon level with its label */
  .schedule-row { align-items: flex-start; }

  .container { padding: 0 20px; }

  .section-title { font-size: 26px; }

  .contact-info { padding-left: 0; }

  /* One mobile scheme for every paged view: a ◀ n/m ▶ cluster centered on
     the carousel's top edge — it never moves between slides, unlike the
     bottom/middle of the fluid-height slide content */
  .carousel { padding-top: 3.25rem; }

  .carousel-arrow { top: 0; translate: none; }
  .carousel-arrow-prev { left: calc(50% - 5.5rem); }
  .carousel-arrow-next { right: calc(50% - 5.5rem); }

  .carousel-count {
    position: absolute;
    top: 0;
    left: 50%;
    translate: -50% 0;
    margin: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* The hint joins the top cluster, to the right of the ▶ arrow */
  .carousel-next-hint {
    top: 0;
    right: auto;
    left: calc(50% + 5.5rem + 6px);
    width: auto;
    max-width: calc(50% - 6.5rem);
    min-height: 44px;
    display: flex;
    align-items: center;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .section-toast { top: 84px; }
}

@media (max-width: 560px) {
  .stats-row { gap: 20px; }
  .stat { min-width: 100px; }
  .stat-number { font-size: 30px; }
  .stats-row-red { gap: clamp(0.5rem, 4vw, 2rem); }
  .stats-row-red .stat { min-width: 0; }
  .stats-row-red .stat-number { font-size: clamp(1.5rem, 9vw, 3rem); }
  .stats-row-red .stat-label { font-size: clamp(0.8125rem, 4vw, 1.0625rem); }
  .schedule-grid { grid-template-columns: 1fr; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-slide.is-active,
  .section-enter-fwd,
  .section-enter-back { animation: none; }

  .section-toast,
  .carousel-next-hint,
  .carousel-arrow,
  .btn .arrow { transition: none; }
}
