:root {
  color-scheme: light;
  --purple-900: #351348;
  --purple-800: #4a1d63;
  --purple-700: #5b287b;
  --purple-600: #6e328c;
  --purple-100: #f1e8f8;
  --purple-50: #fbf7fd;
  --orange: #d25a28;
  --gold: #f2bf32;
  --green: #5f8e45;
  --ink: #201827;
  --muted: #6e6078;
  --line: #e5dbea;
  --paper: #ffffff;
  --wash: #f8f3fb;
  --shadow: 0 18px 42px rgba(53, 19, 72, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #fbf7fd 0%, #fffaf6 54%, #ffffff 100%);
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui,
    sans-serif;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid rgba(229, 219, 234, 0.86);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: clamp(150px, 20vw, 214px);
  height: auto;
  display: block;
}

.brand-divider {
  width: 1px;
  height: 36px;
  background: var(--line);
}

.product-name {
  display: grid;
  gap: 2px;
  min-width: 116px;
}

.product-name strong {
  color: var(--purple-800);
  font-size: 1rem;
  line-height: 1.15;
}

.product-name small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.main-nav a {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--purple-800);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.main-nav a:hover {
  background: var(--purple-100);
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(390px, 50vh, 520px);
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: clamp(34px, 5vw, 72px) clamp(18px, 6vw, 76px);
  border-bottom: 1px solid rgba(229, 219, 234, 0.72);
  background:
    radial-gradient(circle at 82% 34%, rgba(242, 191, 50, 0.28), transparent 27%),
    linear-gradient(135deg, rgba(110, 50, 140, 0.14), rgba(255, 255, 255, 0.72) 48%),
    var(--purple-50);
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(110, 50, 140, 0.1), rgba(210, 90, 40, 0.09)),
    repeating-linear-gradient(
      90deg,
      rgba(110, 50, 140, 0.08) 0 1px,
      transparent 1px 62px
    );
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
}

.hero-mascots {
  position: absolute;
  right: clamp(10px, 4vw, 58px);
  bottom: clamp(-22px, -2vw, 0px);
  z-index: 1;
  width: min(47vw, 620px);
  max-height: 88%;
  object-fit: contain;
  filter: drop-shadow(0 26px 30px rgba(53, 19, 72, 0.16));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 18px;
  color: var(--purple-900);
  font-size: clamp(3rem, 6.2vw, 5.5rem);
  line-height: 0.98;
}

h1 span {
  display: block;
}

h2 {
  margin-bottom: 0;
  color: var(--purple-900);
  font-size: clamp(1.65rem, 3.4vw, 2.7rem);
  line-height: 1.08;
}

h3 {
  margin-bottom: 8px;
  color: var(--purple-900);
  font-size: 1.05rem;
  line-height: 1.25;
}

p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-copy {
  width: min(510px, 100%);
  margin-bottom: 24px;
  color: #4d4058;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.hero-actions,
.card-actions,
.contact-band {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-action,
.secondary-action,
.download-link,
.preview-link,
.play-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}

.primary-action {
  padding: 11px 16px;
  background: var(--purple-700);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(91, 40, 123, 0.22);
}

.secondary-action {
  padding: 10px 15px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--purple-800);
}

svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 110px));
  gap: 12px;
  margin: 28px 0 0;
}

.hero-stats div {
  padding: 12px 14px;
  border: 1px solid rgba(229, 219, 234, 0.84);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.hero-stats dt {
  color: var(--purple-800);
  font-size: 1.25rem;
  font-weight: 950;
}

.hero-stats dd {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.project-shell,
.learning-band,
.mascot-band,
.contact-band {
  max-width: 1220px;
  margin: 0 auto;
  padding: clamp(42px, 7vw, 78px) clamp(18px, 4vw, 46px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 22px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 430px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.segmented {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid rgba(229, 219, 234, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--purple-800);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 850;
}

.segmented button strong {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--purple-100);
  color: var(--purple-800);
  font-size: 0.72rem;
}

.segmented button.is-active {
  border-color: var(--purple-700);
  background: var(--purple-700);
  color: #ffffff;
}

.segmented button.is-active strong {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card,
.path-grid article,
.mascot-profile,
.contact-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.project-card {
  overflow: hidden;
}

.project-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--purple-100);
  cursor: pointer;
}

.project-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background: rgba(53, 19, 72, 0.76);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.play-overlay {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--purple-800);
  font-size: 0.86rem;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(53, 19, 72, 0.18);
  transform: translateY(6px);
  opacity: 0;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.project-visual:hover img,
.project-visual:focus-visible img {
  transform: scale(1.025);
}

.project-visual img {
  transition: transform 220ms ease;
}

.project-visual:hover .play-overlay,
.project-visual:focus-visible .play-overlay {
  transform: translateY(0);
  opacity: 1;
}

.project-visual:focus-visible,
.play-link:focus-visible,
.icon-button:focus-visible {
  outline: 3px solid rgba(110, 50, 140, 0.34);
  outline-offset: 3px;
}

.project-body {
  padding: 18px;
}

.project-body h3 {
  display: -webkit-box;
  min-height: 2.62em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tag-row span {
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--purple-100);
  color: var(--purple-800);
  font-size: 0.76rem;
  font-weight: 850;
}

.project-body p {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  margin-bottom: 18px;
  font-size: 0.94rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-actions {
  justify-content: space-between;
}

.file-size {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.download-link,
.preview-link,
.play-link {
  min-height: 38px;
  padding: 9px 12px;
  font-size: 0.9rem;
}

.download-link,
.play-link {
  background: var(--purple-700);
  color: #ffffff;
}

.play-link {
  border: 0;
  cursor: pointer;
}

.preview-link {
  border: 1px solid var(--line);
  color: var(--purple-800);
}

.player-modal[hidden] {
  display: none;
}

.player-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 30px);
}

.player-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 24, 39, 0.62);
  backdrop-filter: blur(10px);
}

.player-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1120px, 100%);
  max-height: min(92vh, 820px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(20, 10, 28, 0.32);
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.player-modal.is-open .player-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.player-dialog-header,
.player-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.player-dialog-header {
  border-bottom: 1px solid var(--line);
}

.player-dialog-header h2 {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.player-dialog-header .eyebrow {
  margin-bottom: 4px;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--purple-800);
  cursor: pointer;
}

.player-frame-wrap {
  background: #16091f;
}

.player-frame-wrap iframe {
  display: block;
  width: 100%;
  height: min(68vh, 620px);
  border: 0;
  background: #16091f;
}

.player-dialog-footer {
  border-top: 1px solid var(--line);
  background: var(--purple-50);
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}

.learning-band {
  border-top: 1px solid rgba(229, 219, 234, 0.7);
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.path-grid article {
  padding: 22px;
}

.path-grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: var(--purple-700);
  color: #ffffff;
  font-weight: 950;
}

.mascot-band {
  padding-top: 24px;
}

.mascot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.mascot-profile {
  display: grid;
  grid-template-columns: minmax(110px, 180px) 1fr;
  align-items: center;
  gap: 20px;
  min-height: 230px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(110, 50, 140, 0.09), rgba(242, 191, 50, 0.1)),
    #ffffff;
}

.mascot-profile img {
  width: 100%;
  max-height: 210px;
  object-fit: contain;
  filter: drop-shadow(0 18px 20px rgba(53, 19, 72, 0.14));
}

.contact-band {
  justify-content: space-between;
  margin-bottom: 42px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.contact-band p {
  max-width: 680px;
  margin-bottom: 0;
}

.site-footer {
  padding: 24px clamp(18px, 4vw, 58px);
  border-top: 1px solid var(--line);
  background: var(--purple-900);
  color: #ffffff;
}

.site-footer p {
  max-width: 1220px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .hero-mascots {
    width: min(70vw, 560px);
    right: -28px;
    opacity: 0.72;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .segmented {
    justify-content: flex-start;
  }

  .project-grid,
  .path-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .brand {
    width: 100%;
  }

  .brand img {
    width: min(58vw, 190px);
  }

  .brand-divider {
    display: none;
  }

  .product-name {
    min-width: 0;
  }

  .main-nav {
    width: 100%;
  }

  .main-nav a {
    flex: 1 1 auto;
    text-align: center;
  }

  .hero {
    min-height: 400px;
    align-items: start;
    padding-top: 34px;
  }

  h1 {
    max-width: 8ch;
    font-size: clamp(2.6rem, 16vw, 4rem);
  }

  .hero-copy {
    width: min(360px, 78%);
  }

  .hero-mascots {
    right: -86px;
    bottom: -10px;
    width: 92vw;
    opacity: 0.54;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-grid,
  .path-grid,
  .mascot-grid {
    grid-template-columns: 1fr;
  }

  .mascot-profile {
    grid-template-columns: 110px 1fr;
    min-height: 0;
    gap: 14px;
  }

  .contact-band {
    align-items: flex-start;
  }
}
