:root {
  --bg: #071528;
  --bg-deep: #030a14;
  --line: rgba(132, 224, 255, 0.2);
  --text: #eaf3ff;
  --text-sub: #a2b9cf;
  --accent: #4ddcff;
  --accent-2: #66ffb8;
  --surface: #0b1d35;
  --surface-2: #0d2340;
  --border: rgba(144, 214, 255, 0.16);
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  background: radial-gradient(circle at 14% 10%, #12315a 0%, var(--bg) 42%, var(--bg-deep) 100%);
  color: var(--text);
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
  filter: saturate(0.95) contrast(1.08) brightness(0.55);
  pointer-events: none;
}

body.video-bg .hero-video {
  opacity: 0.68;
}

body.video-bg #hero-canvas {
  opacity: 0.2;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(99, 219, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 219, 255, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 90%);
}

.bg-toggle {
  position: fixed;
  right: 6vw;
  bottom: 24px;
  z-index: 25;
  border: 1px solid var(--border);
  background: rgba(6, 20, 40, 0.88);
  color: var(--text);
  border-radius: 999px;
  height: 38px;
  padding: 0 14px;
  font-size: 12px;
  cursor: pointer;
}

.bg-glow {
  position: absolute;
  width: 42vw;
  height: 42vw;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
}

.bg-glow-a {
  top: -10vw;
  left: -8vw;
  background: #34d6ff;
  animation: floatA 10s ease-in-out infinite alternate;
}

.bg-glow-b {
  right: -10vw;
  bottom: -12vw;
  background: #1ab6ad;
  animation: floatB 12s ease-in-out infinite alternate;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 22px 6vw;
  background: linear-gradient(to bottom, rgba(3, 13, 26, 0.9), rgba(3, 13, 26, 0.45));
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.topbar.scrolled {
  background: rgba(3, 13, 26, 0.98);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.brand {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 44px;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border: 2px solid var(--accent);
  border-radius: 6px;
  transform: rotate(45deg);
  box-shadow: 0 0 20px rgba(99, 219, 255, 0.5);
}

.brand-text {
  letter-spacing: 0.08em;
  font-weight: 700;
}

.menu {
  display: flex;
  gap: 28px;
  margin-right: 28px;
}

.menu.open {
  display: flex;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  margin-right: 12px;
}

.lang-btn {
  height: 30px;
  min-width: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-sub);
  background: rgba(6, 20, 40, 0.55);
  font-size: 12px;
  cursor: pointer;
}

.lang-btn.active {
  color: #042035;
  border-color: transparent;
  background: linear-gradient(120deg, var(--accent), #97f7ff);
}

.top-cta {
  text-decoration: none;
  color: #042035;
  background: linear-gradient(120deg, var(--accent), #97f7ff);
  border-radius: 999px;
  height: 38px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(84, 223, 255, 0.35);
  margin-left: auto;
}

.menu a {
  color: var(--text-sub);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.25s;
}

.menu a:hover {
  color: var(--text);
}

.menu-btn {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
}

.hero {
  min-height: calc(100vh - 84px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 6vw 8vh;
  max-width: 980px;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero-tag {
  margin: 0 0 18px;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 11ch;
  animation: riseIn 0.9s ease both;
  text-wrap: balance;
}

.hero-sub {
  margin: 24px 0 0;
  max-width: 620px;
  color: var(--text-sub);
  line-height: 1.8;
  font-size: clamp(0.95rem, 2.1vw, 1.1rem);
  animation: riseIn 1.1s ease both;
  text-wrap: pretty;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  animation: riseIn 1.3s ease both;
}

.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  height: 46px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}

.btn-primary {
  color: #05212f;
  background: linear-gradient(110deg, var(--accent), #95f0ff);
  box-shadow: 0 8px 24px rgba(99, 219, 255, 0.34);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.02);
}

.section {
  padding: 76px 6vw;
  position: relative;
}

.section > * {
  max-width: 1200px;
  margin-left: 0;
  margin-right: 0;
}

.section::before {
  content: "";
  position: absolute;
  left: 6vw;
  right: 6vw;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(132, 214, 255, 0.2), transparent);
}

.section h2 {
  margin: 0 0 20px;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.metrics {
  text-align: center;
}

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

.card,
.feature-card,
.step {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  transition: transform 0.2s ease;
}

.card h3,
.feature-card h3,
.step h3 {
  margin: 0;
  font-size: 1.1rem;
}

.card p,
.feature-card p,
.step p {
  margin: 10px 0 0;
  color: var(--text-sub);
  line-height: 1.75;
}

.card,
.feature-card {
  padding: 0 18px;
  position: relative;
}

.card:not(:first-child)::before,
.feature-card:not(:first-child)::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(139, 218, 255, 0.35), transparent);
}

.card h3,
.feature-card h3 {
  font-size: clamp(1.12rem, 2vw, 1.35rem);
}

.metrics .section-sub {
  color: var(--text-sub);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  border-top: 0;
  padding-left: 0;
}

.step {
  display: block;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.step p {
  margin: 0;
  max-width: none;
  color: var(--text-sub);
  line-height: 1.75;
}

.step span {
  display: none;
}

.capability-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.capability-list li {
  background: transparent;
  border: 0;
  border-bottom: 1px dashed rgba(144, 214, 255, 0.24);
  border-radius: 0;
  padding: 14px 0;
}

.case-track-wrap {
  overflow: hidden;
  border-radius: 0;
  border-top: 1px solid rgba(144, 214, 255, 0.22);
  border-bottom: 1px solid rgba(144, 214, 255, 0.22);
  background: transparent;
  padding: 0;
}

.case-track {
  display: flex;
  width: max-content;
  gap: 14px;
  padding: 18px 0;
  animation: roll 38s linear infinite;
}

.case-card {
  width: min(280px, 70vw);
  border-radius: 0;
  padding: 8px 20px;
  border: 0;
  border-left: 1px solid rgba(144, 214, 255, 0.22);
  background: transparent;
}

.case-card h3 {
  margin: 0;
}

.case-card p {
  margin: 8px 0 0;
  color: var(--text-sub);
}

.final-cta {
  text-align: left;
  padding-bottom: 88px;
}

.final-cta .btn {
  min-width: 164px;
}

.final-cta p {
  color: var(--text-sub);
  margin: 0 0 24px;
  max-width: 640px;
}

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 6vw 30px;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: none;
  margin: 0;
}

#square,
#workflow,
#ecosystem,
#cases,
#features,
.final-cta {
  scroll-margin-top: 92px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

@media (min-width: 901px) {
  #square,
  #ecosystem,
  #features,
  #cases {
    background: linear-gradient(180deg, rgba(6, 19, 36, 0.16), rgba(6, 19, 36, 0.04));
  }
}

.footer div {
  display: inline-flex;
  gap: 14px;
}

.footer a {
  color: var(--text-sub);
  text-decoration: none;
}

@keyframes floatA {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(5vw, 2vw, 0);
  }
}

@keyframes floatB {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-4vw, -3vw, 0);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes roll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 900px) {
  html {
    scroll-snap-type: y proximity;
  }

  .menu {
    display: none;
    position: absolute;
    left: 6vw;
    right: 6vw;
    top: 72px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #07192f;
    flex-direction: column;
    gap: 12px;
  }

  .top-cta {
    display: none;
  }

  .lang-switch {
    margin-left: auto;
    margin-right: 8px;
  }

  .brand {
    margin-right: 16px;
  }

  .section {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .menu-btn {
    display: inline-flex;
  }

  .topbar {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .hero {
    min-height: calc(100vh - 72px);
    padding-bottom: 9vh;
    padding-left: 6vw;
    padding-right: 6vw;
    scroll-snap-stop: normal;
  }

  .hero-actions {
    flex-wrap: wrap;
  }

  .metric-grid,
  .feature-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .card,
  .feature-card {
    padding: 0;
  }

  .card:not(:first-child)::before,
  .feature-card:not(:first-child)::before {
    display: none;
  }

  .card,
  .feature-card {
    border-bottom: 1px solid rgba(144, 214, 255, 0.18);
    padding-bottom: 16px;
  }

  .step {
    padding: 8px 0;
  }

  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 0;
    gap: 10px 16px;
  }

  .step span {
    display: none;
  }

  .card,
  .feature-card,
  .step {
    border-radius: 0;
  }

  .section h2 {
    margin-bottom: 16px;
  }

  .bg-toggle {
    right: 12px;
    bottom: 12px;
  }

  #workflow .timeline {
    grid-template-columns: 1fr;
  }

  #square,
  #workflow,
  #ecosystem,
  #cases,
  #features,
  .final-cta {
    min-height: auto;
    display: block;
    scroll-snap-stop: normal;
  }
}
