:root {
  --bg: #121212;
  --panel: #1a1a1a;
  --panel-soft: #202020;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5f5;
  --muted: rgba(245, 245, 245, 0.72);
  --yellow: #f4e52a;
  --yellow-deep: #d2c100;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --content-width: 1380px;
  --topbar-height: 76px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  min-height: 100%;
  background: #111111;
  color-scheme: dark;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 100%;
  position: relative;
  overflow-x: clip;
  background-color: #111111;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.04), transparent 28%),
    linear-gradient(180deg, #181818 0%, #111111 100%);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--safe-top);
  background: #111111;
  z-index: 999;
  pointer-events: none;
}

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

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: calc(16px + var(--safe-top)) calc(28px + var(--safe-right)) 16px calc(28px + var(--safe-left));
  border-bottom: 1px solid var(--line);
  background: rgba(18, 18, 18, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: inline-flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  color: rgba(245, 245, 245, 0.82);
  text-decoration: none;
  font-size: 0.96rem;
  white-space: nowrap;
}

.nav a:hover,
.topbar-cta:hover {
  color: #fff;
}

.topbar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--yellow);
  color: #111;
  font-weight: 700;
  text-decoration: none;
}

main {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: min(84vh, 860px);
  background: #171717;
  box-shadow: var(--shadow);
  width: 100%;
  touch-action: pan-y;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.035);
  filter: saturate(0.94) brightness(0.92);
  transition:
    opacity 900ms ease,
    transform 5200ms cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 900ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  filter: saturate(1) brightness(1);
}

.hero-slide.is-entering {
  animation: hero-slide-entrance 1400ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: min(calc(100% - 32px), var(--content-width));
  min-height: min(84vh, 860px);
  margin: 0 auto;
  padding: 64px 0 30px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  width: min(100%, 640px);
  padding: 0 0 24px;
  transform: translateY(0);
  opacity: 1;
  transition: opacity 320ms ease, transform 420ms ease;
}

.hero-content.is-transitioning {
  opacity: 0;
  transform: translateY(16px);
}

.hero-content.is-entering {
  animation: hero-copy-entrance 900ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.hero-kicker,
.feature-copy p,
.rail-copy span,
.showcase-copy p,
.news-copy p {
  margin: 0;
  color: var(--yellow);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.24), 0 8px 18px rgba(0, 0, 0, 0.22);
}

.hero h1 {
  margin: 14px 0 0;
  font-size: clamp(3rem, 5.6vw, 5.6rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.28),
    0 12px 28px rgba(0, 0, 0, 0.24),
    0 22px 44px rgba(0, 0, 0, 0.14);
}

.hero-summary {
  max-width: 34rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.85;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.24),
    0 10px 24px rgba(0, 0, 0, 0.2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  padding: 14px 20px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
}

.button-primary {
  background: var(--yellow);
  color: #111;
}

.button-secondary {
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.24);
  color: #fff;
}

@keyframes hero-slide-entrance {
  0% {
    opacity: 0;
    transform: scale(1.065);
    filter: saturate(0.88) brightness(0.86);
  }

  100% {
    opacity: 1;
    transform: scale(1);
    filter: saturate(1) brightness(1);
  }
}

@keyframes hero-copy-entrance {
  0% {
    opacity: 0;
    transform: translateY(28px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  transition: opacity 240ms ease, transform 240ms ease;
}

.hero-toggle,
.hero-indicator {
  border: 0;
  cursor: pointer;
}

.hero-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font: inherit;
}

.hero-toggle {
  position: relative;
  font-size: 0;
}

.hero-indicators {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-indicator {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  transition:
    width 320ms cubic-bezier(0.22, 1, 0.36, 1),
    background-color 220ms ease,
    opacity 220ms ease,
    transform 320ms ease;
  opacity: 0.7;
}

.hero-indicator.is-active {
  width: 36px;
  background: #fff;
  opacity: 1;
  transform: translateY(-1px);
}

.hero-toggle::before,
.hero-toggle::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: #fff;
}

.hero-toggle::before {
  left: 9px;
}

.hero-toggle::after {
  right: 9px;
}

.hero-toggle.is-paused::before {
  left: 10px;
  top: 6px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 11px solid #fff;
  border-radius: 0;
  background: transparent;
}

.hero-toggle.is-paused::after {
  display: none;
}

.section {
  margin-top: 40px;
  scroll-margin-top: calc(var(--topbar-height) + 18px);
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.section-head a,
.section-head span {
  color: var(--muted);
  font-size: 0.94rem;
  text-decoration: none;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.feature-card,
.rail-card,
.showcase-main,
.showcase-side,
.news-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.feature-card img,
.rail-card img,
.showcase-main img,
.showcase-side img,
.news-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.feature-card-large {
  grid-column: 1 / -1;
}

.feature-card-large img {
  max-height: 360px;
}

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

.feature-card-horizontal {
  position: relative;
  display: block;
}

.feature-card-horizontal img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  max-height: 260px;
}

.feature-card::after,
.rail-card::after,
.showcase-main::after,
.showcase-side::after,
.news-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.82));
  pointer-events: none;
}

.feature-copy,
.rail-copy,
.showcase-copy,
.showcase-side-copy,
.news-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding: 16px 18px 14px;
}

.feature-card-horizontal .feature-copy,
.feature-card-large .feature-copy,
.rail-card .rail-copy,
.showcase-main .showcase-copy,
.showcase-side .showcase-side-copy,
.news-card .news-copy {
  bottom: 0;
}

.feature-copy h3,
.showcase-copy h3,
.news-copy h3 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.28;
}

.feature-card-horizontal .feature-copy h3,
.showcase-side-copy strong,
.rail-copy strong {
  font-size: 1.12rem;
}

.feature-copy span,
.showcase-copy span,
.showcase-side-copy span,
.rail-copy em {
  color: var(--muted);
  line-height: 1.7;
}

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

.class-grid .rail-card {
  min-height: 0;
}

.class-grid .rail-card img {
  width: 100%;
  height: clamp(350px, 27vw, 420px);
  object-fit: cover;
  object-position: center 18%;
  max-height: none;
}

.class-grid .rail-copy {
  gap: 6px;
  padding: 18px 16px 16px;
}

.class-grid .rail-copy strong {
  font-size: 1.08rem;
}

.class-grid .rail-copy em {
  font-size: 0.9rem;
  line-height: 1.55;
}

.rail-card--metal img {
  object-position: 52% 18%;
}

.rail-card--wood img {
  object-position: 51% 18%;
}

.rail-card--water img {
  object-position: 49% 18%;
}

.rail-card--fire img {
  object-position: 52% 18%;
  filter: saturate(1.12) hue-rotate(-12deg) brightness(1.02);
}

.rail-card--earth img {
  object-position: 52% 18%;
  filter: saturate(0.9) sepia(0.12) brightness(0.92);
}

.rail-copy em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

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

.showcase-main {
  grid-column: 1 / -1;
}

.showcase-main img {
  max-height: 420px;
}

.showcase-side img,
.news-card img,
.rail-card img {
  max-height: 240px;
}

.showcase-side-copy {
  display: grid;
  gap: 4px;
  padding: 16px;
}

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

.footer {
  display: flex;
  justify-content: center;
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
  padding: 0 0 36px;
  color: var(--muted);
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.footer-meta p {
  margin: 0;
  white-space: nowrap;
}

.footer-meta a {
  color: inherit;
  text-decoration: none;
}

.footer-meta a:hover {
  color: #fff;
}

@media (max-width: 1080px) {
  .class-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
    position: sticky;
    padding: 12px 14px 12px;
  }

  .brand {
    gap: 10px;
    padding-right: 102px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    font-size: 1.2rem;
  }

  .brand-copy strong {
    font-size: 0.96rem;
  }

  .brand-copy span {
    font-size: 0.72rem;
  }

  .nav {
    display: flex;
    width: 100%;
    gap: 4px;
    overflow: visible;
  }

  .nav a {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    min-width: 0;
    padding: 3px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.74rem;
    transition:
      background-color 180ms ease,
      border-color 180ms ease,
      color 180ms ease,
      transform 140ms ease,
      box-shadow 180ms ease;
    -webkit-tap-highlight-color: transparent;
  }

  .nav a:active {
    transform: translateY(1px) scale(0.98);
    background: rgba(244, 229, 42, 0.14);
    border-color: rgba(244, 229, 42, 0.34);
    color: #fff6a8;
  }

  .nav a.is-pressed {
    transform: translateY(1px) scale(0.98);
    background: rgba(244, 229, 42, 0.14);
    border-color: rgba(244, 229, 42, 0.34);
    color: #fff6a8;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  }

  .topbar-cta {
    position: absolute;
    top: 12px;
    right: 14px;
    min-width: 88px;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.86rem;
  }

  main,
  .footer {
    width: min(calc(100% - 20px), var(--content-width));
  }

  .footer-meta {
    display: block;
    text-align: center;
  }

  .footer-meta p {
    white-space: normal;
  }

  .hero {
    min-height: clamp(540px, 76svh, 660px);
  }

  .hero-shell {
    width: min(calc(100% - 24px), var(--content-width));
    min-height: clamp(540px, 76svh, 660px);
    padding: 32px 0 86px;
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
    padding: 0;
    align-items: flex-start;
    text-align: left;
  }

  .hero h1 {
    margin-top: 10px;
    width: 100%;
    max-width: none;
    font-size: clamp(1.55rem, 4vw, 2rem);
    line-height: 1.08;
  }

  .hero-summary {
    max-width: min(100%, 34rem);
    margin-top: 14px;
    font-size: 0.96rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: min(100%, 360px);
    margin-top: 22px;
  }

  .button {
    min-width: 0;
    padding: 13px 14px;
  }

  .feature-grid,
  .feature-subgrid,
  .showcase-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

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

  .class-grid .rail-card img {
    height: 330px;
  }

  .feature-card-large,
  .showcase-main {
    grid-column: auto;
  }

  .feature-card-horizontal {
    display: block;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .section {
    margin-top: 34px;
  }

  .hero-controls {
    bottom: 18px;
    gap: 8px;
    padding: 7px 12px;
  }

  .hero-indicators {
    gap: 6px;
  }

  .hero-indicator {
    width: 8px;
    height: 8px;
  }

  .hero-indicator.is-active {
    width: 32px;
  }
}

@media (max-width: 560px) {
  .topbar {
    gap: 7px;
    padding: calc(10px + var(--safe-top)) calc(12px + var(--safe-right)) 10px calc(12px + var(--safe-left));
  }

  .brand-copy span {
    display: none;
  }

  .nav {
    gap: 4px;
  }

  .nav a {
    min-height: 26px;
    font-size: 0.7rem;
  }

  .topbar-cta {
    top: 10px;
    right: 12px;
    min-width: 82px;
    min-height: 32px;
    padding: 6px 9px;
    font-size: 0.8rem;
  }

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

  .class-grid .rail-card img {
    height: 350px;
  }

  .hero {
    min-height: clamp(480px, 68svh, 560px);
  }

  .hero-shell {
    width: calc(100% - 20px);
    min-height: clamp(480px, 68svh, 560px);
    padding: 24px 0 78px;
  }

  .hero h1 {
    margin-top: 8px;
    width: 100%;
    max-width: none;
    font-size: clamp(1.2rem, 5.3vw, 1.55rem);
    line-height: 1.16;
  }

  .hero-summary {
    max-width: 100%;
    margin-top: 12px;
    font-size: 0.84rem;
    line-height: 1.45;
    -webkit-line-clamp: 2;
  }

  .hero-actions {
    width: min(100%, 320px);
    gap: 8px;
    margin-top: 18px;
  }

  .button {
    width: 100%;
    padding: 12px 12px;
    border-radius: 12px;
  }

  .hero-controls {
    bottom: 14px;
    padding: 6px 10px;
  }

  .hero-toggle {
    width: 26px;
    height: 26px;
  }
}
