:root {
  --paper: #F7F1E8;
  --ink: #241A2E;
  --grape: #6B3FA0;
  --vine: #3E8E5A;
  --gold: #D9A441;
  --felt: #2F6B4A;
  --lilac: #EFE7F7;
  --vine-paper: #E7F0E5;
  --walnut: #8A5A3B;
  --muted: #6E6577;
  --alert: #B4462F;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", monospace;
  --content-max: 1280px;
  --gutter: clamp(1.1rem, 3vw, 2rem);
  --header-h: 84px;
  --radius-lg: 40px;
  --radius-md: 28px;
  --radius-sm: 18px;
  --pill: 999px;
  --shadow-panel: 0 20px 50px rgba(36, 26, 46, 0.07);
  --shadow-lift: 0 28px 70px rgba(36, 26, 46, 0.13);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 8% 0%, rgba(107, 63, 160, 0.07), transparent 30rem),
    radial-gradient(circle at 100% 14%, rgba(62, 142, 90, 0.06), transparent 28rem);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--grape);
}

button,
input,
select,
textarea {
  font: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}

h3 {
  font-size: clamp(1.18rem, 1.8vw, 1.4rem);
}

p {
  margin: 0;
}

::selection {
  background: rgba(217, 164, 65, 0.42);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

[hidden],
.is-filtered-out {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 300;
  transform: translateY(-180%);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease;
}

.skip-link:focus-visible {
  transform: none;
}

.container {
  width: min(calc(100% - (var(--gutter) * 2)), var(--content-max));
  margin-inline: auto;
}

/* Header */
.site-header {
  --scroll-progress: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 241, 232, 0.94);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.site-header[data-scrolled="true"] {
  border-bottom-color: rgba(36, 26, 46, 0.12);
  box-shadow: 0 12px 32px rgba(36, 26, 46, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding-block: 0.7rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-gem,
.footer-gem {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 42px;
  border-radius: 14px 14px 18px 18px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.55), transparent 28%),
    linear-gradient(135deg, var(--grape), var(--vine));
  box-shadow:
    inset 0 -4px 10px rgba(36, 26, 46, 0.18),
    0 6px 14px rgba(107, 63, 160, 0.22);
}

.brand-gem::before,
.footer-gem::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 2px;
  height: 10px;
  border-radius: 2px;
  background: var(--vine);
  transform: rotate(12deg);
}

.brand-gem::after,
.footer-gem::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow:
    -8px 9px 0 -2px var(--gold),
    4px 12px 0 -3px rgba(217, 164, 65, 0.82);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-mark {
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.brand-sub {
  margin-top: 0.24rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
}

.nav-item {
  margin: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.48rem 0.82rem;
  border-radius: var(--pill);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease;
}

.nav-link:hover {
  background: var(--lilac);
  color: var(--grape);
}

.nav-link[aria-current="page"] {
  background: var(--grape);
  color: #FFFFFF;
  box-shadow: 0 5px 14px rgba(107, 63, 160, 0.26);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 42px;
  margin-left: 0.25rem;
  padding: 0.55rem 1rem;
  border: 1.5px solid var(--gold);
  border-radius: var(--pill);
  background: rgba(217, 164, 65, 0.08);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.header-cta:hover {
  background: var(--gold);
  color: var(--ink);
  transform: translateY(-1px);
}

.header-cta-icon {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--grape);
  transform: rotate(45deg);
}

.header-cta:hover .header-cta-icon {
  background: var(--ink);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(107, 63, 160, 0.2);
  border-radius: 50%;
  background: var(--lilac);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--grape);
  transform-origin: center;
  transition: transform 180ms ease, opacity 180ms ease;
}

.site-header[data-open="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header[data-open="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header[data-open="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.scroll-hairline {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.site-header[data-scrolled="true"] .scroll-hairline {
  opacity: 1;
}

.scroll-hairline span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--grape), var(--vine), var(--gold));
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
  transition: transform 100ms linear;
}

/* Shared components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.7rem 1.25rem;
  border: 1.5px solid transparent;
  border-radius: var(--pill);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--grape);
  color: #FFFFFF;
  box-shadow: 0 10px 24px rgba(107, 63, 160, 0.24);
}

.btn-primary:hover {
  background: #5A3388;
}

.btn-ghost {
  border-color: rgba(36, 26, 46, 0.24);
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--grape);
  color: var(--grape);
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(217, 164, 65, 0.22);
}

.btn-gold:hover {
  background: #C89132;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.35rem;
  border-radius: var(--pill);
  background: rgba(239, 231, 247, 0.72);
}

.chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.42rem 0.9rem;
  border: 1px solid rgba(107, 63, 160, 0.18);
  border-radius: var(--pill);
  background: transparent;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.chip:hover {
  border-color: var(--grape);
  color: var(--grape);
}

.chip[aria-pressed="true"] {
  background: var(--grape);
  border-color: var(--grape);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(107, 63, 160, 0.24);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.62rem;
  border-radius: var(--pill);
  background: var(--lilac);
  color: var(--grape);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.tag--gold {
  background: rgba(217, 164, 65, 0.17);
  color: #805810;
}

.tag--vine {
  background: rgba(62, 142, 90, 0.14);
  color: #2F7048;
}

.panel {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid rgba(36, 26, 46, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow-panel);
}

.panel + .panel {
  margin-top: clamp(1.75rem, 4vw, 3rem);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.panel-kicker {
  margin-bottom: 0.4rem;
  color: var(--vine);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-title {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.panel-anchor {
  display: inline-flex;
  align-items: center;
  padding-bottom: 0.12rem;
  border-bottom: 1px solid currentColor;
  color: var(--grape);
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.panel-anchor:hover {
  color: var(--vine);
}

.stack-line {
  height: 1px;
  margin-block: clamp(1.5rem, 4vw, 2.5rem);
  background: linear-gradient(90deg, transparent, rgba(107, 63, 160, 0.35), rgba(62, 142, 90, 0.35), transparent);
}

.section-head {
  display: grid;
  gap: 0.8rem;
  max-width: 52rem;
  margin-bottom: clamp(1.4rem, 3vw, 2.2rem);
}

.section-title {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}

.section-lede {
  max-width: 36em;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.breadcrumb {
  margin-bottom: 1.5rem;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  list-style: none;
  color: var(--muted);
  font-size: 0.82rem;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: rgba(110, 101, 119, 0.55);
}

.breadcrumb-link {
  color: var(--grape);
  text-decoration: none;
}

.breadcrumb-link:hover {
  text-decoration: underline;
}

.breadcrumb-item[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

.prose {
  max-width: 38em;
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.prose > * + * {
  margin-top: 1em;
}

.prose h2,
.prose h3 {
  margin-top: 1.6em;
  margin-bottom: 0.5em;
}

.prose h2 {
  font-size: clamp(1.38rem, 2.2vw, 1.75rem);
}

.prose h3 {
  font-size: 1.16rem;
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
}

.prose li + li {
  margin-top: 0.42em;
}

.prose a {
  color: var(--grape);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.prose strong {
  font-weight: 850;
}

.prose code {
  padding: 0.12em 0.32em;
  border-radius: 0.35em;
  background: var(--lilac);
  color: var(--grape);
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  background:
    linear-gradient(118deg, rgba(107, 63, 160, 0.18), rgba(62, 142, 90, 0.14)),
    var(--lilac);
  box-shadow: inset 0 0 0 1px rgba(36, 26, 46, 0.08);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--wide {
  aspect-ratio: 21 / 9;
}

.media-frame--portrait {
  aspect-ratio: 4 / 5;
}

.media-caption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

[data-reveal] {
  transition: opacity 320ms ease, transform 320ms ease;
}

.site-reveal-ready [data-reveal]:not(.is-revealed) {
  opacity: 0;
  transform: translateY(12px);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* Footer */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(3rem, 8vw, 6rem);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--ink);
  color: rgba(247, 241, 232, 0.82);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto;
  height: 70%;
  background:
    radial-gradient(circle at 18% 24%, rgba(107, 63, 160, 0.48), transparent 55%),
    radial-gradient(circle at 82% 0%, rgba(62, 142, 90, 0.34), transparent 58%);
  pointer-events: none;
}

.footer-inner {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 4.5rem) 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1.35fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.footer-col {
  min-width: 0;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--paper);
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.footer-gem {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.footer-word {
  line-height: 1.1;
}

.footer-desc {
  max-width: 34ch;
  margin-top: 1rem;
  color: rgba(247, 241, 232, 0.68);
  font-size: 0.92rem;
  line-height: 1.75;
}

.footer-icp {
  margin-top: 1rem;
  color: rgba(217, 164, 65, 0.82);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

.footer-heading {
  margin-bottom: 1rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.footer-list {
  display: grid;
  gap: 0.55rem;
  list-style: none;
}

.footer-item {
  margin: 0;
}

.footer-link {
  display: inline-block;
  width: fit-content;
  border-bottom: 1px solid transparent;
  color: rgba(247, 241, 232, 0.82);
  font-size: 0.93rem;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease;
}

.footer-link:hover {
  border-bottom-color: var(--gold);
  color: var(--gold);
}

.footer-link[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.footer-contact {
  display: grid;
  gap: 0.8rem;
}

.footer-contact-line {
  display: grid;
  gap: 0.12rem;
}

.footer-contact-label {
  color: rgba(247, 241, 232, 0.48);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.footer-contact-value {
  overflow-wrap: anywhere;
  color: var(--paper);
  font-size: 0.92rem;
  line-height: 1.6;
}

.footer-note {
  margin-top: 0.85rem;
  color: rgba(247, 241, 232, 0.58);
  font-size: 0.8rem;
  line-height: 1.7;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(247, 241, 232, 0.15);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-legal-link {
  color: rgba(247, 241, 232, 0.72);
  font-size: 0.85rem;
  text-decoration: none;
}

.footer-legal-link:hover {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer-copy {
  color: rgba(247, 241, 232, 0.48);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
}

@media (max-width: 1080px) {
  .nav-link {
    padding-inline: 0.62rem;
    font-size: 0.88rem;
  }

  .header-cta {
    padding-inline: 0.8rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 980px) {
  :root {
    --header-h: 74px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: var(--gutter);
    left: var(--gutter);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    padding: 1rem;
    border: 1px solid rgba(36, 26, 46, 0.1);
    border-radius: var(--radius-md);
    background: var(--paper);
    box-shadow: var(--shadow-lift);
  }

  .site-header[data-open="true"] .site-nav {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }

  .nav-link {
    display: flex;
    min-height: 46px;
    padding: 0.72rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.96rem;
  }

  .header-cta {
    min-height: 46px;
    margin-left: 0;
    padding: 0.72rem 1rem;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .footer-col:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .header-inner {
    min-height: 68px;
  }

  .brand-gem {
    width: 38px;
    height: 38px;
  }

  .brand-mark {
    font-size: 1.04rem;
  }

  .brand-sub {
    font-size: 0.6rem;
    letter-spacing: 0.14em;
  }

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

  .footer-col:first-child,
  .footer-col:last-child {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .chip-group {
    width: 100%;
    border-radius: var(--radius-sm);
  }

  .chip {
    flex: 1 1 auto;
    justify-content: center;
  }

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

  .footer-col {
    grid-column: 1 / -1;
  }

  .site-footer {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .site-reveal-ready [data-reveal]:not(.is-revealed) {
    opacity: 1;
    transform: none;
  }

  .scroll-hairline {
    display: none;
  }
}
