:root {
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hero-text: rgba(255, 255, 255, 0.96);
  --hero-muted: rgba(255, 255, 255, 0.74);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow: hidden;
  color: var(--hero-text);
  font-family: var(--serif);
  background: #060709;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 203, 188, 0.72), transparent 26%),
    radial-gradient(circle at 78% 12%, rgba(184, 231, 238, 0.58), transparent 26%),
    radial-gradient(circle at 70% 76%, rgba(255, 224, 154, 0.48), transparent 30%),
    linear-gradient(135deg, #11131b 0%, #315765 46%, #f0c58e 100%);
}

.ambient,
.video-stage,
.hero-shade,
.prompt-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ambient {
  z-index: -4;
  background:
    radial-gradient(circle at 20% 28%, rgba(255, 179, 199, 0.8), transparent 24%),
    radial-gradient(circle at 78% 28%, rgba(165, 227, 219, 0.72), transparent 27%),
    radial-gradient(circle at 54% 82%, rgba(255, 226, 157, 0.62), transparent 30%),
    conic-gradient(from 120deg at 50% 46%, #f7bea4, #bceadf, #e9ddff, #ffefad, #f7bea4);
  filter: blur(18px) saturate(1.16);
  opacity: 0.78;
  transform: scale(1.08);
  animation: ambientDrift 18s ease-in-out infinite alternate;
}

.video-stage {
  z-index: -3;
  background:
    linear-gradient(rgba(6, 7, 9, 0.2), rgba(6, 7, 9, 0.2)),
    url("../images/hero-poster.jpg") center / cover no-repeat,
    #060709;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  filter: saturate(1.08) contrast(1.02);
  transition: opacity 1000ms ease-in-out;
}

.bg-video.is-active {
  opacity: 0.72;
}

.hero-shade {
  z-index: -2;
  background:
    radial-gradient(circle at 50% 45%, transparent 0 28%, rgba(3, 6, 9, 0.18) 54%, rgba(3, 6, 9, 0.48) 100%),
    linear-gradient(180deg, rgba(5, 8, 12, 0.52), rgba(5, 8, 12, 0.05) 36%, rgba(5, 8, 12, 0.6));
}

.prompt-overlay {
  z-index: -1;
  opacity: 0;
  transition: opacity 700ms ease;
}

.prompt-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transform: scale(1.03);
  animation: trainBob 3s ease-in-out infinite;
}

.prompt-overlay.is-loaded {
  opacity: 1;
}

.liquid-glass {
  position: relative;
  overflow: hidden;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  background-blend-mode: luminosity;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.12),
    0 14px 42px rgba(0, 0, 0, 0.11);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.liquid-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.4px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.15) 20%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.15) 80%,
    rgba(255, 255, 255, 0.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.site-header {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(20px, 3vw, 34px);
}

.brand {
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-style: italic;
  line-height: 1;
  text-decoration: none;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  user-select: none;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  font-family: var(--sans);
}

.desktop-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 17px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 200ms ease, background-color 200ms ease, transform 200ms ease;
}

.desktop-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 999px;
  background: #fff;
  transition: transform 300ms ease, opacity 300ms ease;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-icon::before {
  transform: translateY(-6px);
}

.menu-icon::after {
  transform: translateY(6px);
}

.menu-toggle[aria-expanded="true"] .menu-icon {
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon::before {
  opacity: 0;
  transform: translateY(0) rotate(90deg) scale(0.75);
}

.menu-toggle[aria-expanded="true"] .menu-icon::after {
  transform: translateY(0) rotate(-90deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.mobile-menu-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
  text-align: center;
}

.mobile-menu-panel a {
  color: #fff;
  font-size: clamp(2.2rem, 12vw, 3.5rem);
  line-height: 1;
  text-decoration: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms cubic-bezier(0.4, 0, 0.2, 1), transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.is-open .mobile-menu-panel a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.is-open .mobile-menu-panel a:nth-child(1) {
  transition-delay: 100ms;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 28px clamp(20px, 6vw, 56px) 70px;
  text-align: center;
}

.hero-content h1 {
  margin: 0;
  max-width: 920px;
  color: var(--hero-text);
  font-size: clamp(3.05rem, 9vw, 6.25rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.hero-copy {
  max-width: 610px;
  margin: 24px 0 0;
  color: var(--hero-muted);
  font-family: var(--sans);
  font-size: clamp(0.98rem, 2vw, 1.1rem);
  line-height: 1.78;
  text-wrap: pretty;
}

.video-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 22px;
  margin-top: 34px;
  font-family: var(--sans);
}

.video-switcher button {
  position: relative;
  min-height: 32px;
  padding: 0 0 8px;
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--hero-text);
  background: transparent;
  font: inherit;
  font-size: 0.96rem;
  opacity: 0.52;
  cursor: pointer;
  transition: opacity 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.video-switcher button:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}

.video-switcher button.is-active {
  border-color: currentColor;
  opacity: 1;
}

@keyframes ambientDrift {
  from {
    transform: scale(1.08) translate3d(-1.4%, -1%, 0) rotate(0deg);
  }
  to {
    transform: scale(1.12) translate3d(1.4%, 1%, 0) rotate(4deg);
  }
}

@keyframes trainBob {
  0%,
  100% {
    transform: scale(1.03) translateY(0);
  }
  50% {
    transform: scale(1.03) translateY(-6px);
  }
}

@media (max-width: 760px) {
  body {
    overflow-y: auto;
  }

  .hero {
    min-height: 100svh;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .hero-content {
    justify-content: center;
    padding-top: 18px;
    padding-bottom: 56px;
  }

  .hero-content h1 {
    font-size: clamp(3.15rem, 16vw, 4.8rem);
  }

  .hero-copy {
    margin-top: 18px;
  }

  .video-switcher {
    width: min(100%, 340px);
    gap: 8px 16px;
    margin-top: 26px;
  }

  .video-switcher button {
    font-size: 0.9rem;
  }
}

.site-footer {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  padding: 0 clamp(20px, 3vw, 34px) clamp(16px, 2.5vw, 24px);
  color: rgba(255, 255, 255, 0.54);
  font-family: var(--sans);
  font-size: clamp(0.68rem, 1.2vw, 0.78rem);
  line-height: 1;
}

.beian-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.beian-link:hover {
  color: rgba(255, 255, 255, 0.84);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.beian-mark {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.08));
}

.beian-mark::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.42);
}

@media (max-height: 720px) and (min-width: 761px) {
  .hero-content h1 {
    font-size: clamp(3rem, 7vw, 5.1rem);
  }

  .hero-copy {
    margin-top: 16px;
  }

  .video-switcher {
    margin-top: 24px;
  }
}

@media (max-width: 760px) {
  .site-footer {
    padding-inline: 18px;
    padding-bottom: 18px;
    gap: 8px 10px;
  }

  .beian-link {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none;
    scroll-behavior: auto;
    transition-duration: 0.01ms !important;
  }
}
