:root {
  --bg: #08090C;
  --bg-soft: #0B0D12;
  --surface: #0E1016;
  --surface-2: #12141C;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #F4F5F7;
  --muted: #9BA3B4;
  --dim: #A8B0BF;
  --primary: #2B6FF6;
  --primary-deep: #245ED6;
  --primary-bright: #5B9BFF;
  --cyan: #22D3EE;
  --good: #10B981;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 64px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

::selection { background: rgba(43, 111, 246, 0.45); color: #fff; }
:focus-visible { outline: 2px solid var(--primary-bright); outline-offset: 3px; border-radius: 6px; }
body { caret-color: var(--primary-bright); }
* { scrollbar-color: #2A2F3A var(--bg); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2A2F3A; border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3A4150; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 10px 16px; background: var(--primary-deep); color: #fff;
  border-radius: 0 0 10px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.spotlight { position: relative; }
.spotlight::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(91, 155, 255, 0.13), transparent 65%);
  opacity: 0;
  transition: opacity 260ms var(--ease);
  pointer-events: none;
}
.spotlight:hover::before { opacity: 1; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 32px); }
.section { padding-block: clamp(72px, 11vw, 132px); }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; font-weight: 600; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.12rem; }
p { text-wrap: pretty; }

.section-head { max-width: 640px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 1.03rem; }

/* Nav */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(8, 9, 12, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 250ms var(--ease), background 250ms var(--ease);
}
.site-nav.is-scrolled { border-bottom-color: var(--border); background: rgba(8, 9, 12, 0.82); }
.nav-inner {
  max-width: 1200px; margin-inline: auto; height: 100%;
  padding-inline: clamp(20px, 4vw, 32px);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--primary-deep); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.9);
}
.nav-links { display: flex; gap: 26px; font-size: 0.92rem; color: var(--muted); }
.nav-links a { position: relative; transition: color 180ms var(--ease); }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -5px; height: 1px;
  background: var(--primary-bright); transition: right 220ms var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { right: 0; }
.nav-actions { display: flex; gap: 10px; align-items: center; }
@media (max-width: 900px) { .nav-links { display: none; } }
@media (max-width: 640px) {
  .nav-actions .btn-ghost { display: none; }
  .nav-actions .btn { padding: 8px 13px; font-size: 0.86rem; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  font-weight: 500; font-size: 0.94rem; white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease);
}
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary {
  background: linear-gradient(180deg, #2A6AEE, var(--primary-deep));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 10px 24px -14px rgba(0, 0, 0, 0.95);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 12px 26px -12px rgba(0, 0, 0, 0.95); }
.btn-ghost { background: rgba(255, 255, 255, 0.02); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.05); transform: translateY(-1px); }
.btn-sm { padding: 8px 14px; font-size: 0.88rem; }
.btn-lg { padding: 13px 24px; font-size: 1rem; border-radius: 12px; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding-top: calc(var(--nav-h) + clamp(56px, 9vw, 104px));
  padding-bottom: clamp(56px, 8vw, 96px);
}
.hero-inner { position: relative; z-index: 1; max-width: 1100px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 32px); text-align: center; }
.hero #hero-canvas {
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100vh;
  height: 100svh;
  pointer-events: none;
}
.hero-title {
  font-family: 'Prata', Georgia, serif;
  font-size: clamp(2.35rem, 6vw, 4.35rem);
  font-weight: 400; letter-spacing: -0.01em;
  line-height: 1.08;
  color: var(--dim);
}
.hero-em { color: var(--text); }
.hero-sub {
  max-width: 660px; margin: 22px auto 0;
  color: var(--muted); font-size: clamp(1.02rem, 1.6vw, 1.16rem);
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.hero-frame {
  position: relative;
  margin: clamp(44px, 7vw, 72px) auto 0;
  max-width: 960px;
  perspective: 1400px;
}
.hero-tilt {
  position: relative; z-index: 1;
  transform: rotateX(var(--rx, 2.2deg)) rotateY(var(--ry, 1.6deg));
  transition: transform 300ms var(--ease);
  will-change: transform;
}
.hero-tilt img {
  width: 100%; height: auto; border-radius: 14px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.hero-frame-glow {
  position: absolute; left: 8%; right: 8%; top: 18%; bottom: -6%;
  background: linear-gradient(90deg, rgba(43, 111, 246, 0.32), rgba(34, 211, 238, 0.22));
  filter: blur(70px); opacity: 0.5; z-index: 0; pointer-events: none;
}

/* Marquee */
.marquee-band { border-block: 1px solid var(--border); background: var(--bg-soft); overflow: hidden; }
.marquee {
  padding-block: 18px;
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.marquee-track {
  display: flex; gap: 26px; width: max-content;
  color: var(--muted); font-family: 'Spline Sans Mono', ui-monospace, monospace;
  font-size: 0.85rem; letter-spacing: 0.02em;
  animation: marquee 36s linear infinite;
}
.marquee-band:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Stats */
.stats-band { padding-block: clamp(48px, 7vw, 72px); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { display: grid; gap: 6px; padding-left: 18px; border-left: 1px solid var(--border); }
.stat-num {
  font-size: clamp(2.1rem, 4vw, 3rem); font-weight: 600; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stat-label { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 860px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stats-grid { grid-template-columns: 1fr; } }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.bento-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  transition: border-color 250ms var(--ease), transform 250ms var(--ease), background 250ms var(--ease);
}
.bento-card:hover { border-color: var(--border-strong); transform: translateY(-3px); background: var(--surface-2); }
.bento-wide { grid-column: span 2; }
.bento-card h3 { margin-bottom: 8px; }
.bento-card p { color: var(--muted); font-size: 0.95rem; }
.bento-visual { margin-bottom: 20px; display: grid; gap: 10px; }
.sla-row { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--muted); }
.sla-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.sla-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.sla-bar i { display: block; height: 100%; width: var(--w); border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--cyan)); transform: scaleX(0); transform-origin: left center; transition: transform 1100ms var(--ease) 200ms; }
.is-in .sla-bar i { transform: scaleX(1); }
.conv-line { display: flex; align-items: center; gap: 10px; }
.conv-line i { width: 14px; height: 14px; border-radius: 50%; background: rgba(43, 111, 246, 0.7); flex: none; }
.conv-line b { display: block; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); width: var(--w); }
.conv-line.conv-ok i { background: var(--good); }
@media (max-width: 960px) { .bento { grid-template-columns: repeat(2, 1fr); } .bento-wide { grid-column: span 2; } }
@media (max-width: 600px) { .bento { grid-template-columns: 1fr; } .bento-wide { grid-column: span 1; } }

/* Showcase */
.showcase { display: grid; gap: clamp(56px, 8vw, 96px); }
.show-row { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
.show-row:nth-child(even) .show-copy { order: 2; }
.show-row:nth-child(even) .show-frame { order: 1; }
.show-copy h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-bottom: 12px; }
.show-copy p { color: var(--muted); }
.show-frame { position: relative; }
.show-frame img {
  width: 100%; height: auto; border-radius: 14px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 90px -36px rgba(0, 0, 0, 0.9);
}
.show-frame-phone { max-width: 300px; margin-inline: auto; }
.show-frame-phone img { border-radius: 26px; }
.show-row-phone { grid-template-columns: 1fr 0.9fr; }
@media (max-width: 900px) {
  .show-row, .show-row-phone { grid-template-columns: 1fr; }
  .show-row:nth-child(even) .show-copy { order: 1; }
  .show-row:nth-child(even) .show-frame { order: 2; }
}

/* Channels */
.channel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.channel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: border-color 250ms var(--ease), transform 250ms var(--ease), box-shadow 250ms var(--ease);
}
.channel-card:hover {
  border-color: rgba(91, 155, 255, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.95);
}
.channel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 1.02rem; }
.channel-icon {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--cyan);
}
.channel-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.channel-card h3 { margin-bottom: 6px; font-size: 1.02rem; }
.channel-card p { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 960px) { .channel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .channel-grid { grid-template-columns: 1fr; } }

/* Channels convergence field */
.channel-field {
  position: relative;
  margin-top: clamp(28px, 5vw, 48px);
  height: clamp(240px, 36vw, 380px);
}
.channel-field canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@media (max-width: 520px) { .channel-field { height: clamp(200px, 52vw, 260px); } }

/* OSS */
.oss-band {
  position: relative;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px;
  padding: 48px;
  background:
    radial-gradient(60% 90% at 12% 12%, rgba(43, 111, 246, 0.16), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}
.oss-copy h2 { margin-bottom: 14px; }
.oss-copy p { color: var(--muted); max-width: 44ch; }
.oss-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.oss-facts { display: grid; gap: 0; align-content: start; }
.oss-facts > div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 2px; border-bottom: 1px solid var(--border);
}
.oss-facts > div:last-child { border-bottom: none; }
.oss-facts dt { color: var(--muted); font-size: 0.9rem; }
.oss-facts dd { font-family: 'Spline Sans Mono', ui-monospace, monospace; font-size: 0.88rem; text-align: right; overflow-wrap: anywhere; }
@media (max-width: 860px) { .oss-band { grid-template-columns: 1fr; gap: 32px; padding: 30px; } }

/* Final CTA */
.final-cta { position: relative; padding-block: clamp(72px, 10vw, 120px); overflow: hidden; }
.final-cta::before {
  content: ''; position: absolute; left: 50%; bottom: -40%; transform: translateX(-50%);
  width: 120%; height: 90%;
  background: radial-gradient(48% 70% at 50% 100%, rgba(43, 111, 246, 0.22), transparent 70%);
  pointer-events: none;
}
.final-inner { position: relative; text-align: center; display: grid; justify-items: center; gap: 14px; }
.final-inner p { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: 34px; background: var(--bg-soft); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; font-size: 0.9rem; color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-note { color: var(--muted); font-size: 0.85rem; }
@media (max-width: 760px) { .footer-inner { flex-direction: column; align-items: flex-start; } }

/* Reveal system */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none !important; }
  .hero-tilt { transform: none !important; transition: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .sla-bar i { transition: none; transform: scaleX(1); }
  .bento-card, .channel-card, .btn { transition: none; }
  .spotlight::before { display: none; }
}
