/* TAFY 2026 — 克制 · 官方 · 留白 */

:root {
  --purple: #5c4d7a;
  --purple-light: #7a6b96;
  --purple-muted: #9a8fb0;
  --text: #2a2a2e;
  --text-secondary: #5a5a62;
  --text-light: #8a8a92;
  --bg: #ffffff;
  --bg-subtle: #f7f6f9;
  --divider: rgba(92, 77, 122, 0.18);
  --max-width: 1120px;
  --header-height: 5.25rem;
  --section-gap: clamp(5rem, 10vw, 8rem);
  --font-serif: "Noto Serif SC", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --font-sans: "Noto Sans JP", "Hiragino Sans", "PingFang SC", sans-serif;
}

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

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

body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--purple);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

.container {
  width: min(var(--max-width), calc(100% - 3rem));
  margin-inline: auto;
}

/* —— 导航 —— */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: background 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.header-logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.header-nav a {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.site-header:not(.is-scrolled) .header-nav a {
  color: rgba(255, 255, 255, 0.88);
}

.site-header:not(.is-scrolled) .header-logo img {
  filter: brightness(0) invert(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.lang-switcher button {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  cursor: pointer;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.lang-switcher button.is-active {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--purple-muted);
}

.lang-switcher button:hover {
  opacity: 0.7;
}

.lang-sep {
  font-size: 0.6875rem;
  color: var(--text-light);
  user-select: none;
}

.site-header:not(.is-scrolled) .lang-switcher button {
  color: rgba(255, 255, 255, 0.72);
}

.site-header:not(.is-scrolled) .lang-switcher button.is-active {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.55);
}

.site-header:not(.is-scrolled) .lang-sep {
  color: rgba(255, 255, 255, 0.35);
}

.header-cta {
  display: none;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--purple);
}

.site-header:not(.is-scrolled) .header-cta {
  color: rgba(255, 255, 255, 0.92);
}

/* —— 首屏 —— */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  color: #fff;
  text-align: left;
  padding:
    calc(var(--header-height) + clamp(1.5rem, 4vh, 2.5rem))
    1.5rem
    clamp(3rem, 6vh, 4rem)
    max(1.5rem, calc((100vw - var(--max-width)) / 2 + 1.5rem));
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% bottom;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  /* 左上轻遮罩保障文字可读；右下保留人物与舞台纹样 */
  background:
    linear-gradient(
      135deg,
      rgba(28, 22, 45, 0.58) 0%,
      rgba(28, 22, 45, 0.26) 32%,
      transparent 55%
    ),
    linear-gradient(
      to bottom,
      rgba(18, 14, 32, 0.32) 0%,
      transparent 28%
    );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: min(28rem, 88vw);
}

.hero-edition {
  font-size: clamp(0.8125rem, 1.8vw, 0.9375rem);
  letter-spacing: 0.28em;
  margin-bottom: 1.25rem;
  opacity: 0.92;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.625rem, 4.2vw, 2.5rem);
  letter-spacing: 0.1em;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.hero-title-en {
  font-size: clamp(0.6875rem, 1.6vw, 0.875rem);
  letter-spacing: 0.06em;
  font-weight: 300;
  line-height: 1.7;
  opacity: 0.88;
  margin-bottom: 2rem;
  max-width: 22rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  font-size: clamp(0.8125rem, 1.8vw, 0.9375rem);
  letter-spacing: 0.16em;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.hero-links {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.875rem;
}

.hero-link {
  display: block;
  width: 100%;
  padding: 0.625rem 1.75rem;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-align: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  transition: background 0.2s ease, opacity 0.2s ease;
}

.hero-link:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

/* —— 通用区块 —— */

.section {
  padding-block: var(--section-gap);
}

.section--flush {
  padding-bottom: var(--section-gap);
  padding-top: var(--section-gap);
}

.section--org {
  background: var(--bg-subtle);
}

.section-heading h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: var(--purple);
  letter-spacing: 0.15em;
}

.section-heading-en {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--purple-muted);
  margin-top: 0.375rem;
  text-transform: uppercase;
}

.section-heading--block {
  margin-bottom: 3rem;
}

.section-heading--center {
  text-align: center;
}

/* 左右分栏：概要 */
.section-split {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.section-body .lead {
  font-size: clamp(0.9375rem, 1.8vw, 1.0625rem);
  color: var(--text-secondary);
  line-height: 2;
}

/* —— 赛事项目 —— */

.program-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.program-list li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--divider);
}

.program-list li:nth-child(odd) {
  padding-right: 2rem;
}

.program-list li:nth-child(even) {
  padding-left: 2rem;
}

.program-name {
  display: block;
  font-size: 0.9375rem;
  color: var(--text);
  letter-spacing: 0.04em;
}

.program-name-en {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-light);
  letter-spacing: 0.03em;
  margin-top: 0.375rem;
}

/* —— 日程 —— */

.schedule-list {
  max-width: 640px;
}

.schedule-item {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1.5rem;
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--divider);
}

.schedule-item dt {
  font-size: 0.875rem;
  color: var(--purple);
  letter-spacing: 0.06em;
  font-weight: 400;
}

.schedule-item dd {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.schedule-note {
  margin-top: 2.5rem;
  font-size: 0.8125rem;
  color: var(--text-light);
  line-height: 1.9;
}

/* —— 照片横向浏览 —— */

.highlights-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-inline: max(1.5rem, calc((100vw - var(--max-width)) / 2 + 1.5rem));
  padding-block: 0.5rem;
}

.highlights-scroll::-webkit-scrollbar {
  display: none;
}

.highlights-track {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  width: max-content;
}

.highlights-track li {
  flex-shrink: 0;
}

.highlights-track img {
  width: clamp(280px, 40vw, 420px);
  height: clamp(187px, 26vw, 280px);
  object-fit: cover;
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.highlights-track img:hover {
  opacity: 0.92;
  transform: scale(1.015);
}

/* —— 报名入口 —— */

.application-intro {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 560px;
}

.application-blocks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
}

.application-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1rem;
  color: var(--purple);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.application-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.9;
}

.text-link {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--divider);
  padding-bottom: 0.125rem;
}

.text-link:hover {
  border-bottom-color: var(--purple-light);
  opacity: 1;
}

/* —— 组织机构 —— */

.org-layout {
  text-align: center;
}

.org-main {
  margin: 2rem 0 3.5rem;
}

.org-main img {
  margin-inline: auto;
  height: 96px;
  width: auto;
  object-fit: contain;
}

.org-logos {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.org-logos li {
  flex: 0 1 auto;
}

.org-logos img {
  height: 54px;
  width: auto;
  max-width: 168px;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.org-logos img:hover {
  opacity: 1;
}

/* —— 页脚 —— */

.site-footer {
  padding: 4rem 0 3rem;
  text-align: center;
}

.footer-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.footer-email {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.footer-email a {
  letter-spacing: 0.02em;
}

.footer-copy {
  font-size: 0.6875rem;
  color: var(--text-light);
  letter-spacing: 0.06em;
}

.footer-credit {
  margin-top: 0.625rem;
  font-size: 0.625rem;
  color: #8a7a92;
  letter-spacing: 0.04em;
}

/* —— 响应式 —— */

@media (min-width: 769px) {
  .hero {
    padding-left: max(2rem, calc((100vw - var(--max-width)) / 2 + 2.75rem));
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }

  .header-actions {
    gap: 0.75rem;
  }

  .header-cta {
    display: block;
  }

  .lang-switcher button {
    font-size: 0.6875rem;
  }

  .hero {
    min-height: 100svh;
    align-items: flex-start;
    justify-content: flex-start;
    padding:
      calc(var(--header-height) + 0.5rem)
      max(1.5rem, calc((100vw - var(--max-width)) / 2 + 1.5rem))
      2rem;
  }

  .hero-media img {
    object-position: center top;
  }

  .hero-overlay {
    background:
      linear-gradient(
        to bottom,
        rgba(22, 18, 38, 0.58) 0%,
        rgba(22, 18, 38, 0.22) 38%,
        transparent 72%
      );
  }

  .hero-content {
    max-width: min(22rem, 92vw);
    padding-top: 14vh;
    transform: translateY(-8vh);
  }

  .hero-edition {
    margin-bottom: 0.875rem;
  }

  .hero-title {
    margin-bottom: 0.625rem;
  }

  .hero-title-en {
    margin-bottom: 0.75rem;
  }

  .hero-meta {
    margin-bottom: 0;
  }

  .hero-links {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
    max-width: 27.5rem;
    margin-top: 1.125rem;
  }

  .hero-link {
    flex: 1;
    min-width: 0;
    min-height: 3rem;
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
    letter-spacing: 0.03em;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
  }

  .section-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .program-list {
    grid-template-columns: 1fr;
  }

  .program-list li:nth-child(odd),
  .program-list li:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
  }

  .application-blocks {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .schedule-item {
    grid-template-columns: 1fr;
    gap: 0.375rem;
  }
}

@media (max-width: 480px) {
  .container {
    width: calc(100% - 2rem);
  }

  .hero-content {
    padding-top: 12vh;
    transform: translateY(-10vh);
  }

  .hero-title {
    letter-spacing: 0.06em;
  }

  .hero-edition {
    letter-spacing: 0.18em;
  }

  .hero-links {
    flex-direction: column;
    gap: 0.5rem;
    max-width: 22.5rem;
    margin-top: 1rem;
  }

  .hero-link {
    flex: none;
    width: 100%;
    min-height: 2.875rem;
    padding: 0.6875rem 1rem;
    font-size: 0.8125rem;
    white-space: normal;
  }
}

/* —— 小主持人报名弹窗 —— */

.host-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
}

.host-modal.is-open {
  display: block;
}

.host-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 8, 28, 0.64);
  backdrop-filter: blur(6px);
}

.host-modal__panel {
  position: relative;
  width: min(920px, calc(100% - 2rem));
  margin: 10vh auto 0;
  background: var(--bg);
  border-radius: 1.75rem;
  padding: 2.75rem;
  box-shadow: 0 24px 80px rgba(20, 8, 28, 0.28);
}

.host-modal__close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  border: 0;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--purple);
}

.host-modal__header {
  text-align: center;
  margin-bottom: 2rem;
}

.host-modal__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--purple-light);
}

.host-modal__header h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--purple);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  letter-spacing: 0.08em;
}

.host-modal__header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.host-modal__options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.125rem;
}

.host-modal__option {
  display: flex;
  min-height: 13rem;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px solid rgba(92, 77, 122, 0.18);
  border-radius: 1.375rem;
  text-decoration: none;
  color: var(--purple);
  background: var(--bg);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.host-modal__option:hover {
  opacity: 1;
  transform: translateY(-3px);
  border-color: var(--purple-light);
  box-shadow: 0 16px 40px rgba(82, 26, 118, 0.12);
}

.host-modal__tag {
  width: fit-content;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: var(--bg-subtle);
  color: var(--purple);
}

.host-modal__option--mainland .host-modal__tag {
  background: #fff3db;
  color: #a46a15;
}

.host-modal__option--online .host-modal__tag {
  background: #f0ebf6;
  color: #6a4d8a;
}

.host-modal__option--onsite .host-modal__tag {
  background: #ebe4f2;
  color: var(--purple);
}

.host-modal__option strong {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.04em;
}

.host-modal__option small {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.host-modal__action {
  margin-top: auto;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--purple-light);
}

body.host-modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .host-modal__panel {
    margin: 5vh auto 0;
    padding: 2rem 1.25rem 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
  }

  .host-modal__options {
    grid-template-columns: 1fr;
  }

  .host-modal__option {
    min-height: auto;
  }
}
