:root {
  --brand-ink: #171b34;
  --brand-copy: #434b63;
  --brand-muted: #697188;
  --brand-line: rgba(29, 35, 72, .12);
  --brand-night: #151735;
  --brand-violet: #6758ea;
  --brand-violet-dark: #5143d4;
  --brand-coral: #ff5f52;
  --brand-cyan: #33bfd0;
  --brand-surface: #fff;
  --brand-canvas: #f7f8fc;
  --brand-shadow: 0 14px 36px rgba(36, 42, 86, .09);
  --brand-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html {
  background: var(--brand-canvas);
  scroll-behavior: smooth;
}

body {
  color: var(--brand-ink);
  background: var(--brand-canvas);
  font-family: var(--brand-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  color: #fff;
  background: var(--brand-violet);
}

.soft-bg { opacity: .34; }

h1,
h2,
h3,
.section-title-accent {
  color: var(--brand-ink);
  font-family: var(--brand-font);
  font-weight: 900;
  letter-spacing: -.025em;
}

p,
.lead,
.meta span,
.event-top small,
.portal-card p,
.path-card p,
.info-card p,
.detail-panel p {
  color: var(--brand-copy);
}

small,
.muted { color: var(--brand-muted); }

/* Retain the existing site structure; only sharpen the shared brand shell. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 70px;
  color: #fff;
  border-bottom: 2px solid var(--brand-violet);
  background: rgba(21, 23, 53, .97);
  box-shadow: 0 8px 24px rgba(15, 18, 52, .16);
  backdrop-filter: blur(12px);
}

.brand { gap: 10px; }
.brand img { width: 38px; height: 38px; border-radius: 9px; }
.brand span b { color: #fff; letter-spacing: .06em; }
.brand span small { color: #c5cae3; }

.main-nav { gap: 4px; }
.main-nav a {
  padding: 10px 13px;
  color: #dce0f1;
  border-radius: 9px;
  font-size: 14px;
}
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.main-nav a.active {
  color: #fff;
  background: var(--brand-violet);
  box-shadow: none;
}

.site-main { width: min(1240px, calc(100% - 48px)); }
.page-home .site-main { width: min(1280px, calc(100% - 48px)); }

.btn {
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 800;
  box-shadow: none;
}
.btn.primary { color: #fff; border-color: var(--brand-violet); background: var(--brand-violet); }
.btn.primary:hover { border-color: var(--brand-violet-dark); background: var(--brand-violet-dark); }
.btn.soft { color: var(--brand-ink); border-color: rgba(103, 88, 234, .16); background: #efedff; }
.btn.ghost { color: var(--brand-ink); border-color: var(--brand-line); background: #fff; }
.btn:focus-visible,
a:focus-visible,
button:focus-visible,
summary:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(51, 191, 208, .62);
  outline-offset: 3px;
}

/* Homepage: keep the original campaign composition and poster hierarchy. */
.home-hero-v3 { padding-top: clamp(34px, 4.5vw, 58px); }
.hero-intro h1 {
  max-width: 1080px;
  color: var(--brand-ink);
  font-size: clamp(44px, 5.2vw, 68px);
  line-height: 1.03;
}
.hero-intro p { max-width: 760px; color: var(--brand-copy); font-size: 16px; line-height: 1.75; }

.home-carousel { margin-top: clamp(28px, 3.5vw, 42px); }
.home-carousel-track {
  min-height: 540px;
  border-color: var(--brand-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--brand-shadow);
}
.home-slide { border-radius: 16px; }
.slide-copy h2,
.slide-autumn .slide-copy h2 { letter-spacing: -.025em; }
.slide-copy p,
.slide-autumn .slide-copy p { line-height: 1.7; }
.slide-art { border-radius: 14px; }
.slide-art img { object-position: center; }
.slide-points div { border-radius: 10px; }
.carousel-arrow { border-radius: 11px; }
.carousel-dots button { width: 44px; height: 44px; }

.portal-feature,
.home-metrics,
.proof-table {
  border-color: var(--brand-line);
  border-radius: 14px;
  box-shadow: var(--brand-shadow);
}
.portal-feature { overflow: hidden; }
.portal-feature-main { background: #ff655c; }
.portal-feature-guide { color: #fff; background: #6758ea; }
.portal-feature-business { color: #102638; background: #4fd0d8; }
.portal-content em { color: inherit; opacity: .86; }
.portal-entry-button { border-radius: 8px; }
.home-metrics { background: #fff; }
.home-metrics b { color: var(--brand-ink); }
.home-metrics span { color: var(--brand-copy); }
.proof-table { background: #fff; }
.proof-table span { color: var(--brand-violet); }

.autumn-theme {
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  margin-bottom: 72px;
  padding-bottom: 66px;
}
.autumn-theme .theme-poster {
  width: min(100%, 320px);
  justify-self: center;
  min-height: 0;
  border-radius: 14px;
  background: #fff7ef;
  box-shadow: 0 16px 36px rgba(143, 77, 36, .14);
}
.autumn-theme .theme-poster img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
}
.autumn-theme .theme-copy { max-width: 700px; }
.autumn-theme .theme-copy h2 { color: var(--brand-ink); }
.autumn-theme .theme-copy p { color: var(--brand-copy); line-height: 1.8; }

/* Inner pages keep their original page-specific colors and layout. */
.section { padding: 58px 0; }
.page-hero {
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(34, 38, 76, .08);
}
.page-hero h1 { letter-spacing: -.025em; }
.page-hero p { line-height: 1.72; }

.portal-card,
.path-card,
.mini-event-card,
.info-card,
.event-card,
.gallery-card,
.empty-state,
.local-finder,
.detail-panel,
.guide-card,
.guide-term-grid article,
.guide-faq-item,
.operations-grid article {
  border-color: var(--brand-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(35, 41, 82, .065);
}
.portal-card:hover,
.path-card:hover,
.mini-event-card:hover,
.event-card:hover,
.gallery-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(35, 41, 82, .1);
}

.local-finder { padding: 26px; }
.finder-form select,
.finder-form input {
  min-height: 45px;
  color: var(--brand-ink);
  border-color: var(--brand-line);
  border-radius: 9px;
  background: #fff;
}
.tabs { gap: 8px; }
.tabs a { border-radius: 8px; }
.tabs a.active { color: #fff; background: var(--brand-violet); }

/* Event covers are 1200x760 SVG posters. Show the whole composition without cropping. */
.page-events .grid.two { gap: 20px; }
.event-card {
  display: block;
  overflow: hidden;
  content-visibility: visible;
  contain: none;
}
.event-card > img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 30 / 19;
  object-fit: contain;
  object-position: center;
  background: #fff7ef;
  border-bottom: 1px solid var(--brand-line);
}
.event-body { display: block; padding: 22px; }
.event-body h3 { color: var(--brand-ink); font-size: 24px; line-height: 1.35; }
.event-body p { color: var(--brand-copy); line-height: 1.72; }
.event-top small,
.meta span { color: var(--brand-muted); }
.tag { color: #fff; border-radius: 7px; background: var(--brand-violet); }

.star-recruit-entry {
  color: #fff;
  border-radius: 14px;
  background: #252857;
  box-shadow: var(--brand-shadow);
}
.star-entry-copy p { color: #e0e4f7; }
.star-entry-orbit,
.star-entry-mark { display: none !important; }

.guide-welcome,
.cta-band,
.event-detail-hero,
.site-modal .modal-panel { border-radius: 14px; }
.cta-band { color: #fff; background: var(--brand-violet); }
.cta-band h2,
.cta-band p { color: inherit; }

.site-footer {
  margin-top: 0;
  color: #c5cae0;
  border-top: 3px solid var(--brand-violet);
  background: #11132e;
}
.site-footer strong { color: #fff; }
.site-footer a { color: #e5e7f5; }
.site-footer p { color: #b7bdd5; }

@media (max-width: 1100px) {
  .site-header { align-items: flex-start; flex-wrap: wrap; }
  .menu-toggle { display: block; margin-left: auto; }
  .main-nav {
    display: none;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .main-nav.open { display: grid; }
  .main-nav a { justify-content: center; text-align: center; }
  .carousel-prev { left: 8px; }
  .carousel-next { right: 8px; }
}

@media (max-width: 980px) {
  .site-header { min-height: 66px; }
  .main-nav { top: 66px; color: #fff; border-color: rgba(255, 255, 255, .12); background: #181a3c; }
  .main-nav a { color: #e7e9f7; background: rgba(255, 255, 255, .055); }
}

@media (max-width: 680px) {
  .site-main,
  .page-home .site-main { width: min(100% - 28px, 620px); }
  .site-header { padding-inline: 14px; }
  .brand img { width: 35px; height: 35px; }
  .brand span small { display: none; }
  .section { padding: 42px 0; }

  .home-hero-v3 { padding-top: 28px; }
  .hero-intro h1 { font-size: 36px; line-height: 1.08; }
  .hero-intro p { font-size: 15px; line-height: 1.7; }
  .home-carousel { margin-top: 24px; }
  .home-carousel-track { border-radius: 14px; }
  .home-slide { border-radius: 14px; }
  .slide-copy h2,
  .slide-partner .slide-copy h2,
  .slide-autumn .slide-copy h2 { font-size: 38px; }
  .slide-art { border-radius: 11px; }

  .portal-feature,
  .home-metrics,
  .proof-table { border-radius: 12px; }
  .autumn-theme {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 48px;
    padding-bottom: 48px;
  }
  .autumn-theme .theme-poster { width: min(100%, 250px); border-radius: 12px; }
  .autumn-theme .theme-copy { text-align: left; }

  .page-hero { margin-top: 18px; border-radius: 12px; }
  .page-hero h1 { font-size: 38px; }
  .page-hero p { font-size: 16px; }
  .local-finder { padding: 20px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tabs a { flex: 0 0 auto; }

  .page-events .grid.two { gap: 16px; }
  .event-card { border-radius: 12px; }
  .event-card > img { aspect-ratio: 30 / 19; object-fit: contain; }
  .event-body { padding: 20px; }
  .event-body h3 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
