:root {
  --ink: #f6f8ff;
  --muted: #a9b5d6;
  --soft: #d8e3ff;
  --navy: #050914;
  --panel: rgba(9, 18, 42, 0.78);
  --panel-strong: rgba(13, 26, 61, 0.9);
  --line: rgba(138, 164, 255, 0.18);
  --blue: #2f74ff;
  --purple: #8a5cff;
  --cyan: #28e8ff;
  --green: #46f0a6;
  --red: #ff5b7d;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(120deg, rgba(47, 116, 255, 0.12), transparent 36%),
    linear-gradient(250deg, rgba(138, 92, 255, 0.16), transparent 44%),
    var(--navy);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(92, 132, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 132, 255, 0.09) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.signal-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.75;
  pointer-events: none;
}

.section-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid transparent;
  transition: background-color 220ms ease, border-color 220ms ease, backdrop-filter 220ms ease;
}

.site-header.is-elevated {
  border-color: var(--line);
  background: rgba(5, 9, 20, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(40, 232, 255, 0.26));
}

.site-header .brand-mark {
  width: 64px;
  height: 64px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.8vw, 34px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.site-nav a {
  position: relative;
  padding-block: 8px;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  align-items: center;
  gap: clamp(34px, 5vw, 74px);
  min-height: min(900px, 100svh);
  padding-top: 112px;
  padding-bottom: 72px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(70, 240, 166, 0.55);
  animation: pulse-dot 1.8s ease-out infinite;
}

.hero h1 {
  max-width: 780px;
  margin: 18px 0 20px;
  font-size: clamp(3.4rem, 9vw, 8.7rem);
  line-height: 0.88;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 680px;
  margin: 0;
  color: var(--soft);
  font-size: clamp(1.05rem, 1.55vw, 1.38rem);
}

.hero-actions,
.contact-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.hero-actions {
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

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

.btn.primary {
  background: linear-gradient(135deg, var(--blue), var(--purple) 58%, var(--cyan));
  box-shadow: 0 18px 42px rgba(47, 116, 255, 0.32);
}

.btn.secondary {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--soft);
}

.hero-visual {
  min-width: 0;
}

.system-frame {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  padding: 20px;
  border: 1px solid rgba(138, 164, 255, 0.28);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(47, 116, 255, 0.18), rgba(138, 92, 255, 0.08)),
    rgba(5, 11, 27, 0.78);
  box-shadow: var(--shadow);
}

.system-frame::before,
.system-frame::after {
  position: absolute;
  inset: auto 20px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: sweep 4.5s linear infinite;
}

.system-frame::before {
  top: 25%;
}

.system-frame::after {
  bottom: 22%;
  animation-delay: -2s;
}

.frame-topline {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(70, 240, 166, 0.36);
  border-radius: 999px;
  color: var(--green);
  background: rgba(70, 240, 166, 0.08);
}

.stream-monitor {
  position: absolute;
  inset: 76px 20px 96px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 18px;
}

.video-plane {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(40, 232, 255, 0.26);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(47, 116, 255, 0.24), transparent 42%),
    linear-gradient(310deg, rgba(138, 92, 255, 0.28), transparent 48%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 18px),
    #091226;
}

.video-plane::before {
  position: absolute;
  inset: 16%;
  content: "";
  border: 1px solid rgba(40, 232, 255, 0.24);
  transform: perspective(500px) rotateX(62deg);
  animation: horizon 6s ease-in-out infinite;
}

.video-plane::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(40, 232, 255, 0.18), transparent);
  transform: translateX(-100%);
  animation: stream-pass 3.6s ease-in-out infinite;
}

.scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 13px, rgba(40, 232, 255, 0.08) 13px 14px);
  mix-blend-mode: screen;
}

.play-node {
  position: absolute;
  top: 50%;
  left: 50%;
  --node-size: clamp(86px, 13vw, 136px);
  display: grid;
  place-items: center;
  overflow: hidden;
  width: var(--node-size);
  height: var(--node-size);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(5, 9, 20, 0.58);
  box-shadow: 0 0 42px rgba(40, 232, 255, 0.25);
  color: white;
  font-size: clamp(1.7rem, 4vw, 3.3rem);
  font-weight: 800;
  transform: translate(-50%, -50%);
  animation: node-float 5s ease-in-out infinite;
}

.play-node img {
  width: 105%;
  height: 105%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 0 16px rgba(40, 232, 255, 0.3));
  transform: translateY(-13%);
}

.telemetry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.telemetry div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.telemetry span,
.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.telemetry strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
}

.signal-rails {
  position: absolute;
  right: 20px;
  bottom: 22px;
  left: 20px;
  display: grid;
  gap: 9px;
}

.signal-rails span {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--cyan), transparent);
  animation: rail 2.6s ease-in-out infinite;
}

.signal-rails span:nth-child(2) {
  animation-delay: -0.8s;
}

.signal-rails span:nth-child(3) {
  animation-delay: -1.45s;
}

.metrics-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
  background: rgba(9, 18, 42, 0.58);
  backdrop-filter: blur(16px);
}

.metric {
  min-height: 150px;
  padding: clamp(22px, 3vw, 34px);
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric strong {
  display: block;
  max-width: 260px;
  margin-top: 12px;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.7vw, 1.38rem);
  line-height: 1.25;
}

.products,
.technology {
  padding-block: clamp(76px, 10vw, 138px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 42px;
}

.section-heading h2,
.platform-copy h2,
.contact-layout h2 {
  margin: 12px 0 0;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.section-heading p,
.platform-copy p,
.contact-layout p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.2rem);
}

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

.product-card,
.tech-item,
.pipeline-step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.product-card {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  padding: clamp(24px, 2.6vw, 34px);
}

.product-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  content: "";
}

.tgplay::before {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.playverse::before {
  background: linear-gradient(90deg, var(--purple), var(--red));
}

.fintech::before {
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.product-card h3,
.tech-item h3 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 2.8vw, 2.6rem);
  line-height: 1;
}

.product-card p,
.tech-item p,
.pipeline-step p {
  color: var(--muted);
  margin: 0;
}

.product-card ul {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.product-card li {
  position: relative;
  padding-left: 22px;
  color: var(--soft);
}

.product-card li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  content: "";
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(40, 232, 255, 0.55);
  transform: translateY(-50%);
}

.platform-band {
  border-block: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(47, 116, 255, 0.16), transparent 52%),
    rgba(7, 13, 30, 0.82);
}

.platform-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(34px, 5vw, 70px);
  align-items: center;
  padding-block: clamp(76px, 9vw, 126px);
}

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

.pipeline-step {
  min-height: 196px;
  padding: 24px;
}

.pipeline-step strong {
  display: block;
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tech-item {
  min-height: 280px;
  padding: 26px;
}

.tech-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(40, 232, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(40, 232, 255, 0.08);
  color: var(--cyan);
  font-weight: 800;
}

.contact-band {
  padding-block: clamp(66px, 8vw, 106px);
  border-top: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(47, 116, 255, 0.18), rgba(138, 92, 255, 0.12));
}

.contact-layout {
  justify-content: space-between;
}

.contact-layout > div {
  max-width: 760px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 26px clamp(20px, 4vw, 56px);
  color: var(--muted);
}

.footer-brand {
  color: var(--ink);
}

.site-footer p {
  margin: 0;
  text-align: right;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(70, 240, 166, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 12px rgba(70, 240, 166, 0);
  }
}

@keyframes sweep {
  from {
    transform: translateX(-70%);
  }
  to {
    transform: translateX(70%);
  }
}

@keyframes stream-pass {
  0%,
  22% {
    transform: translateX(-100%);
  }
  80%,
  100% {
    transform: translateX(100%);
  }
}

@keyframes horizon {
  0%,
  100% {
    transform: perspective(500px) rotateX(62deg) translateY(0);
  }
  50% {
    transform: perspective(500px) rotateX(62deg) translateY(-16px);
  }
}

@keyframes node-float {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  50% {
    transform: translate(-50%, -57%);
  }
}

@keyframes rail {
  0%,
  100% {
    opacity: 0.35;
    transform: scaleX(0.45);
    transform-origin: left;
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@media (min-width: 1600px) {
  .section-shell {
    width: min(1420px, calc(100% - 80px));
  }

  .hero {
    min-height: 920px;
  }

  body {
    font-size: 1.08rem;
  }
}

@media (max-width: 980px) {
  .hero,
  .platform-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 122px;
  }

  .system-frame {
    min-height: 460px;
  }

  .metrics-band,
  .product-grid,
  .tech-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .product-card {
    min-height: 420px;
  }
}

@media (max-width: 720px) {
  .section-shell {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    padding: 14px;
  }

  .brand span {
    max-width: 154px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 14px;
    left: 14px;
    display: grid;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(5, 9, 20, 0.94);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    padding: 13px 12px;
  }

  .hero {
    gap: 28px;
    padding-top: 104px;
    padding-bottom: 58px;
  }

  .hero-actions,
  .contact-layout {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .system-frame {
    min-height: 0;
    padding: 14px;
  }

  .stream-monitor {
    position: relative;
    inset: auto;
    grid-template-rows: 160px auto;
    margin-top: 26px;
  }

  .play-node {
    --node-size: clamp(78px, 24vw, 96px);
  }

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

  .telemetry div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
  }

  .signal-rails {
    position: static;
    margin-top: 22px;
  }

  .metrics-band,
  .product-grid,
  .pipeline,
  .tech-grid {
    grid-template-columns: 1fr;
  }

  .metric,
  .metric:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric:last-child {
    border-bottom: 0;
  }

  .product-card,
  .pipeline-step,
  .tech-item {
    min-height: auto;
  }

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

  .site-footer p {
    text-align: left;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
