/*
========================================
   Unified Scrolling Architecture CSS
========================================
*/

:root {
  color-scheme: dark;
  --bg: #0b1018;
  --text: #eef5ff;
  --muted: #c1ccdc;
  --cyan: #70d7ff;
  --pink: #dd6b89;
  --yellow: #f5d86f;
  --panel: rgba(21, 27, 40, 0.9);
  --line: rgba(255, 255, 255, 0.13);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: #090d14 url("assets/background.png") center center / cover no-repeat fixed;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ========================================
   Phase 1: HERO SECTION
======================================== */

.hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(620px, 1fr) minmax(520px, 0.88fr);
  align-items: center;
  gap: clamp(36px, 5vw, 110px);
  width: min(1760px, calc(100% - 10vw));
  margin: 0 auto;
  padding: clamp(24px, 4.8vw, 72px) 0;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: -18% -12%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 38%, transparent 100%);
  opacity: 0.32;
  transform: perspective(900px) rotateX(64deg) rotateZ(-13deg);
  transform-origin: 62% 46%;
}

.panel,
.orbit {
  position: absolute;
  display: block;
}

.panel {
  right: -4vw;
  width: min(40vw, 650px);
  height: 156px;
  border: 1px solid rgba(112, 215, 255, 0.13);
  background: linear-gradient(135deg, rgba(112, 215, 255, 0.08), rgba(255, 255, 255, 0.015));
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.28);
  transform: rotate(-9deg) skewX(-10deg);
  animation: panelDrift 8s ease-in-out infinite;
}

.panel-one {
  top: 24%;
}

.panel-two {
  top: 43%;
  right: 7vw;
  animation-delay: -1.8s;
}

.panel-three {
  top: 63%;
  right: 2vw;
  animation-delay: -3.1s;
}

.orbit {
  right: 8%;
  top: 15%;
  width: min(46vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(112, 215, 255, 0.38);
  opacity: 0.75;
  animation: spin 18s linear infinite;
}

.orbit-two {
  inset: auto 4% 15% auto;
  width: min(36vw, 520px);
  border-color: rgba(221, 107, 137, 0.44);
  animation-duration: 23s;
  animation-direction: reverse;
}

.hero-copy {
  position: relative;
  z-index: 3;
  min-width: 0;
  padding-top: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: clamp(16px, 1.35vw, 22px);
  font-weight: 900;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0 0 22px;
  color: #edf4ff;
  font-size: clamp(72px, 7.8vw, 148px);
  line-height: 0.86;
  letter-spacing: 0;
}

.tagline {
  max-width: 650px;
  margin: 0 0 36px;
  color: var(--muted);
  font-size: clamp(22px, 1.72vw, 30px);
  font-weight: 650;
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.button {
  min-width: 158px;
  min-height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 28px;
  font-size: 22px;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-3px);
}

.button.primary {
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, rgba(112, 215, 255, 0.62), rgba(221, 107, 137, 0.62));
  color: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #f7fbff;
}

.hero-visual {
  position: relative;
  z-index: 2;
  min-height: min(47vw, 640px);
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
}

.logo-shell {
  position: relative;
  width: min(28vw, 470px);
  min-width: 320px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(from 150deg, var(--pink), #c8acd5, #82d5eb, #b5e1b2, #ffd26f, var(--pink));
  box-shadow: 0 42px 110px rgba(0, 0, 0, 0.42);
  animation: floatLogo 5.4s ease-in-out infinite;
}

.logo-shell::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: inherit;
  background: #f7f8fb;
  box-shadow: inset 0 0 36px rgba(28, 43, 59, 0.14);
}

.logo-shell img {
  position: relative;
  z-index: 2;
  width: calc(100% - 86px);
  height: calc(100% - 86px);
  object-fit: contain;
  border-radius: 50%;
}

.halo {
  position: absolute;
  inset: -28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  animation: spin 14s linear infinite;
}

.halo-b {
  inset: -52px;
  border-top-color: rgba(112, 215, 255, 0.58);
  border-right-color: transparent;
  animation-duration: 19s;
  animation-direction: reverse;
}

.stat {
  position: absolute;
  z-index: 3;
  width: clamp(170px, 14vw, 240px);
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.stat strong {
  display: block;
  font-size: clamp(42px, 3.4vw, 62px);
  line-height: 0.98;
}

.stat span {
  color: #aab6c9;
  font-size: clamp(16px, 1.15vw, 20px);
  font-weight: 700;
}

.stat-top {
  left: 0;
  top: 22%;
  animation: driftTop 5s ease-in-out infinite;
}

.stat-bottom {
  right: 0;
  bottom: 17%;
  animation: driftBottom 5.8s ease-in-out infinite;
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(1.2deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes panelDrift {
  0%, 100% { transform: translateY(0) rotate(-9deg) skewX(-10deg); }
  50% { transform: translateY(-18px) rotate(-7deg) skewX(-10deg); }
}

@keyframes driftTop {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(14px, -12px); }
}

@keyframes driftBottom {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-14px, 14px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 980px) {
  .hero {
    height: 100dvh;
    max-height: none;
    min-height: 100svh;
    grid-template-columns: 1fr;
    width: min(720px, calc(100% - 32px));
    align-content: center;
    gap: clamp(14px, 3svh, 26px);
    padding: clamp(16px, 4svh, 36px) 0 clamp(14px, 3.6svh, 54px);
  }
  .hero-visual { min-height: 420px; }
  .logo-shell { width: min(78vw, 380px); }
  .stat-top { left: 0; top: 6%; }
  .stat-bottom { right: 0; bottom: 3%; }
}

@media (max-width: 560px) {
  .hero {
    width: min(720px, calc(100% - 28px));
    gap: 10px;
    padding: 18px 0 14px;
  }
  .eyebrow {
    margin-bottom: 8px;
    font-size: 14px;
  }
  h1 {
    margin-bottom: 12px;
    font-size: clamp(42px, 12vw, 58px);
  }
  .tagline {
    margin-bottom: 18px;
    font-size: 17px;
    line-height: 1.35;
  }
  .actions { gap: 10px; }
  .button {
    min-width: 132px;
    min-height: 48px;
    padding: 0 18px;
    font-size: 18px;
  }
  .hero-visual { min-height: min(34vh, 280px); }
  .logo-shell {
    width: min(64vw, 260px);
    min-width: 0;
  }
  .logo-shell img { width: calc(100% - 58px); height: calc(100% - 58px); }
  .stat { width: 118px; padding: 10px 12px; }
  .stat strong { font-size: 34px; }
  .stat span { font-size: 13px; }
  .visitor-stats {
    gap: 8px;
    margin-top: 10px;
    padding: 6px 8px;
    font-size: 11px;
  }
  .visitor-stat { gap: 5px; }
  .visitor-stat strong { font-size: 12px; }
}

body::before {
  background: transparent;
}

.site-dim-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(3, 8, 16, 0.6);
}

.site-fixed-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #090d14 url("assets/background.png") center center / cover no-repeat;
}

.hero {
  position: relative;
  z-index: 2;
}

body {
  background: #090d14;
}

.visitor-stats {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  background: rgba(9, 15, 25, 0.42);
  color: rgba(238, 245, 255, 0.78);
  font-size: 12px;
  backdrop-filter: blur(12px);
}

.visitor-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.visitor-stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #65e7ac;
  box-shadow: 0 0 10px rgba(101, 231, 172, 0.74);
}

.visitor-stat-label {
  color: rgba(193, 204, 220, 0.76);
}

.visitor-stat strong {
  color: #f4f8ff;
  font-size: 13px;
}

.visitor-stat-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.16);
}

html,
body {
  max-width: 100%;
  overflow: hidden;
}

.hero,
.hero-bg {
  max-width: 100%;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  .hero,
  .hero-bg {
    overflow-x: clip;
  }
}
