/* ==========================================================================
   S9H Dev — "Source" Design System
   Deep space black · Cyan → Indigo → Violet signal gradient
   ========================================================================== */

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

:root {
  --bg: #04060c;
  --surface: #0b1020;
  --line: rgba(148, 163, 184, 0.1);
  --line-2: rgba(129, 140, 248, 0.26);

  --text: #eef2ff;
  --muted: #94a3b8;
  --dim: #5b6b85;

  --cyan: #38bdf8;
  --indigo: #6366f1;
  --violet: #a855f7;
  --green: #22c55e;
  --amber: #fbbf24;
  --rose: #f43f5e;

  --grad: linear-gradient(110deg, #38bdf8 0%, #6366f1 50%, #a855f7 100%);
  --grid-lines:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);

  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  --radius: 18px;
  --max: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(99, 102, 241, 0.45); color: #fff; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }
ul { list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--font-mono); }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.skip-link {
  position: absolute; left: -999px; top: 10px; z-index: 1000;
  background: var(--indigo); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 10px; }
.section-tight { padding-top: 20px; }

/* ==========================================================================
   Ambient Layers — aurora, grid, particle canvas, cursor glow, progress
   ========================================================================== */
.aurora { position: fixed; inset: 0; z-index: -3; pointer-events: none; overflow: hidden; }
.aurora::before, .aurora::after {
  content: ''; position: absolute; width: 60vw; height: 60vw;
  border-radius: 50%; filter: blur(130px);
}
.aurora::before {
  background: #1d4ed8; opacity: 0.32; top: -28vw; left: -18vw;
  animation: drift 22s ease-in-out infinite alternate;
}
.aurora::after {
  background: #7c3aed; opacity: 0.2; bottom: -32vw; right: -22vw;
  animation: drift 28s ease-in-out infinite alternate-reverse;
}
@keyframes drift { to { transform: translate(9vw, 7vw) scale(1.12); } }

.grid-overlay {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: var(--grid-lines);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 15%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 15%, transparent 70%);
}

#bgCanvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none;
}

.cursor-glow {
  position: fixed; top: 0; left: 0; width: 460px; height: 460px;
  margin: -230px 0 0 -230px; border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.11), transparent 65%);
  pointer-events: none; z-index: -1; opacity: 0; transition: opacity 0.4s;
  will-change: transform;
}
body.has-cursor .cursor-glow { opacity: 1; }

.progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 2px; z-index: 300;
  background: var(--grad); transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 999; background: var(--bg);
  display: grid; place-items: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.preloader.done { opacity: 0; visibility: hidden; }
html:not(.js) .preloader { display: none; }
.pre-inner { width: min(360px, 80vw); font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.pre-inner img { width: 54px; height: 54px; margin-bottom: 22px; }
.pre-inner p { line-height: 1.9; }
.pre-inner .ok { color: var(--green); }
.pre-bar { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 18px; }
.pre-bar i { display: block; height: 100%; width: 0; background: var(--grad); animation: preload 1s var(--ease) forwards; }
@keyframes preload { to { width: 100%; } }

/* ==========================================================================
   Floating Navigation
   ========================================================================== */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 100;
  width: min(1200px, calc(100% - 28px));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 18px; border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(6, 9, 18, 0.55);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition: background 0.3s, box-shadow 0.3s, border-color 0.3s, top 0.3s;
}
.nav.scrolled {
  top: 10px; background: rgba(6, 9, 18, 0.88); border-color: var(--line-2);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.85);
}
.nav-brand img { height: 38px; width: auto; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 8px 13px; border-radius: 10px;
  font-size: 0.88rem; font-weight: 500; color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav-links a span { font-family: var(--font-mono); font-size: 0.66rem; color: var(--cyan); }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none; width: 42px; height: 42px; border-radius: 11px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { width: 17px; height: 1.5px; background: var(--text); transition: transform 0.3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 12px; font-weight: 600; font-size: 0.94rem;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, background-position 0.6s var(--ease), border-color 0.3s, background-color 0.3s;
  will-change: transform;
}
.btn-sm { padding: 9px 16px; font-size: 0.84rem; border-radius: 10px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(110deg, #38bdf8, #6366f1, #a855f7, #38bdf8);
  background-size: 250% 100%;
  box-shadow: 0 12px 34px -12px rgba(99, 102, 241, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 16px 44px -12px rgba(56, 189, 248, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn-ghost { color: var(--text); background: rgba(255, 255, 255, 0.03); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--cyan); background-color: rgba(56, 189, 248, 0.08); }
.btn .arr { transition: transform 0.3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* ==========================================================================
   Glow Card — animated conic border + cursor spotlight
   ========================================================================== */
.glow-card {
  position: relative; isolation: isolate;
  background: linear-gradient(180deg, rgba(16, 22, 43, 0.88), rgba(8, 11, 22, 0.92));
  border: 1px solid var(--line); border-radius: var(--radius);
}
.glow-card::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--angle), transparent 0deg, transparent 240deg, #38bdf8 295deg, #a855f7 335deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0; transition: opacity 0.4s; animation: spin 5s linear infinite; pointer-events: none;
}
.glow-card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(99, 102, 241, 0.13), transparent 45%);
  opacity: 0; transition: opacity 0.4s; pointer-events: none;
}
.glow-card:hover::before, .glow-card:hover::after { opacity: 1; }
@keyframes spin { to { --angle: 360deg; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 150px 0 90px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 11px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(99, 102, 241, 0.08);
  font-family: var(--font-mono); font-size: 0.74rem; color: #c7d2fe; margin-bottom: 28px;
}
/* Shared pulsing status dot (hero eyebrow + app "live" badges) */
.pulse, .live::before {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero h1 {
  font-size: clamp(2.8rem, 6.4vw, 5.4rem);
  letter-spacing: -0.05em; line-height: 0.98; margin-bottom: 26px;
}

/* Glitch word */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
}
.glitch::before { color: var(--cyan); animation: glitchA 5s infinite steps(1); }
.glitch::after { color: var(--violet); animation: glitchB 5s infinite steps(1); }
@keyframes glitchA {
  0%, 90%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  91% { clip-path: inset(18% 0 62% 0); transform: translate(-4px, 0); }
  93% { clip-path: inset(58% 0 12% 0); transform: translate(3px, 0); }
  95% { clip-path: inset(38% 0 42% 0); transform: translate(-2px, 0); }
}
@keyframes glitchB {
  0%, 91%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  92% { clip-path: inset(66% 0 8% 0); transform: translate(4px, 0); }
  94% { clip-path: inset(10% 0 70% 0); transform: translate(-3px, 0); }
  96% { clip-path: inset(46% 0 30% 0); transform: translate(2px, 0); }
}

.typed-line {
  font-family: var(--font-mono); font-size: clamp(0.95rem, 1.6vw, 1.12rem);
  color: var(--muted); margin-bottom: 22px; min-height: 1.7em;
}
.typed-line .p { color: var(--green); }
#typed { color: var(--text); }
.caret { display: inline-block; color: var(--cyan); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-lead { font-size: 1.08rem; color: var(--muted); max-width: 540px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-os { display: flex; flex-wrap: wrap; gap: 8px 16px; font-family: var(--font-mono); font-size: 0.74rem; color: var(--dim); }
.hero-os b { color: var(--muted); font-weight: 500; }

/* Live terminal */
.hero-visual { position: relative; }
.term {
  border-radius: 18px; background: rgba(7, 10, 20, 0.9);
  border: 1px solid var(--line-2); overflow: hidden;
  box-shadow: 0 50px 120px -40px rgba(99, 102, 241, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: transform 0.6s var(--ease);
}
.term-head { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; }
.dots i:nth-child(1) { background: var(--rose); }
.dots i:nth-child(2) { background: var(--amber); }
.dots i:nth-child(3) { background: var(--green); }
.term-title { flex: 1; text-align: center; margin-right: 50px; font-family: var(--font-mono); font-size: 0.74rem; color: var(--dim); }
.term-body { font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.85; padding: 20px 22px; height: 360px; overflow: hidden; }
.t-line { white-space: pre-wrap; word-break: break-word; }
.t-cmd { color: var(--text); }
.t-cmd::before { content: '❯ '; color: var(--green); }
.t-ok { color: var(--green); }
.t-out { color: var(--muted); }
.t-link { color: var(--cyan); }
.t-line:last-child::after { content: '▋'; color: var(--cyan); margin-left: 2px; animation: blink 1s steps(1) infinite; }
.term-foot { display: flex; justify-content: space-between; padding: 9px 16px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.68rem; color: var(--dim); }
.term-foot .ok { color: var(--green); }

.chip-float {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 8px;
  padding: 9px 13px; border-radius: 12px;
  background: rgba(10, 14, 28, 0.88); border: 1px solid var(--line-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--text);
  animation: float 6s ease-in-out infinite;
}
.chip-float i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.chip-float.c2 i { background: var(--cyan); }
.chip-float.c3 i { background: var(--violet); }
.cf-1 { top: -18px; right: 26px; }
.cf-2 { bottom: 70px; left: -30px; animation-delay: -2s; }
.cf-3 { bottom: -18px; right: 44px; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ==========================================================================
   Marquee — app logos + outlined tech words (no border clipping)
   ========================================================================== */
.marquee { padding: 44px 0 40px; border-block: 1px solid var(--line); background: rgba(6, 9, 18, 0.6); overflow: hidden; }
.mq-label { text-align: center; font-family: var(--font-mono); font-size: 0.74rem; color: var(--dim); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 20px; }
.mq {
  display: flex; overflow: hidden; padding: 10px 0; user-select: none;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.mq + .mq { margin-top: 14px; }
.mq-track { display: flex; align-items: center; gap: 18px; padding-right: 18px; flex-shrink: 0; animation: mq 34s linear infinite; }
.mq-rev .mq-track { animation-direction: reverse; animation-duration: 46s; }
.mq:hover .mq-track { animation-play-state: paused; }
@keyframes mq { to { transform: translateX(-100%); } }

.mq-item {
  display: flex; align-items: center; gap: 16px; min-width: 290px;
  padding: 13px 22px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.mq-item:hover { border-color: rgba(56, 189, 248, 0.5); transform: translateY(-3px); box-shadow: 0 14px 30px -16px rgba(56, 189, 248, 0.6); }
.mq-logo { width: 64px; height: 42px; display: grid; place-items: center; flex-shrink: 0; }
.mq-logo img { max-height: 40px; max-width: 64px; object-fit: contain; }
.mq-item strong { display: block; font-size: 0.93rem; }
.mq-item span { font-family: var(--font-mono); font-size: 0.7rem; color: var(--cyan); }

.mq-word {
  display: inline-flex; align-items: center; gap: 18px; white-space: nowrap;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em;
  font-size: clamp(1.9rem, 4vw, 3.1rem); color: transparent;
  -webkit-text-stroke: 1px rgba(148, 163, 184, 0.3); transition: color 0.3s;
}
.mq-word:hover { color: rgba(129, 140, 248, 0.85); }
.mq-word i { font-style: normal; font-size: 0.5em; color: var(--indigo); -webkit-text-stroke: 0; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { position: relative; padding: 120px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 56px; flex-wrap: wrap; }
.sec-num { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 16px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--cyan); }
.sec-num::after { content: ''; width: 42px; height: 1px; background: var(--grad); }
.sec-head h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); max-width: 720px; }
.sec-head p { color: var(--muted); max-width: 440px; }

/* ---------- Apps ---------- */
.apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.app-card { padding: 22px; display: flex; flex-direction: column; transform-style: preserve-3d; }
.app-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--dim); }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--green); }
.live::before { content: ''; }
.app-stage {
  position: relative; height: 176px; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center; margin-bottom: 22px; border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 55%, rgba(var(--glow), 0.3), transparent 62%), #060913;
}
.app-stage::before {
  content: ''; position: absolute; inset: 0;
  background-image: var(--grid-lines);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at center, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at center, #000 10%, transparent 70%);
}
.app-stage img {
  position: relative; max-height: 86px; max-width: 72%; object-fit: contain;
  filter: drop-shadow(0 12px 30px rgba(var(--glow), 0.5));
  transition: transform 0.6s var(--ease);
}
.app-card:hover .app-stage img { transform: scale(1.08) translateZ(30px); }
.app-card h3 { font-size: 1.42rem; margin-bottom: 8px; }
.app-card > p { color: var(--muted); font-size: 0.92rem; margin-bottom: 18px; }
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; flex-grow: 1; align-content: start; }
.feat li { font-family: var(--font-mono); font-size: 0.74rem; color: #cbd5e1; display: flex; gap: 7px; }
.feat li::before { content: '✓'; color: var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.chip { font-family: var(--font-mono); font-size: 0.7rem; padding: 4px 9px; border-radius: 6px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); color: #cbd5e1; }
.notice {
  margin-top: 26px; padding: 15px 20px; border-radius: 12px; font-size: 0.86rem; color: var(--muted);
  background: rgba(8, 11, 22, 0.7); border: 1px solid var(--line); border-left: 2px solid var(--cyan);
}
.notice b { font-family: var(--font-mono); font-size: 0.76rem; color: var(--cyan); margin-right: 6px; }

/* ---------- Engineering Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.b-tv { grid-column: span 4; }
.b-mobile { grid-column: span 2; }
.b-code { grid-column: span 3; }
.b-qa { grid-column: span 3; }
.b-cell { padding: 30px; display: flex; flex-direction: column; }
.b-tag { font-family: var(--font-mono); font-size: 0.7rem; color: var(--cyan); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 14px; }
.b-cell h3 { font-size: 1.5rem; margin-bottom: 10px; }
.b-cell > p { color: var(--muted); font-size: 0.93rem; }

.os-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 24px; }
.os {
  padding: 14px 13px; border-radius: 12px; background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.8rem; display: flex; flex-direction: column; gap: 3px;
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.os small { font-size: 0.66rem; color: var(--dim); }
.os:hover { border-color: rgba(56, 189, 248, 0.5); background: rgba(56, 189, 248, 0.06); transform: translateY(-3px); box-shadow: 0 12px 30px -16px rgba(56, 189, 248, 0.7); }

.stack-list { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.stack-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line);
  font-size: 0.88rem; transition: border-color 0.3s;
}
.stack-list li:hover { border-color: var(--line-2); }
.stack-list li span { font-family: var(--font-mono); font-size: 0.7rem; color: var(--dim); }

.code {
  margin-top: 20px; padding: 18px; border-radius: 12px; overflow-x: auto;
  background: #060913; border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.79rem; line-height: 1.8; color: #cbd5e1;
}
.code .k { color: #c084fc; }
.code .s { color: #34d399; }
.code .f { color: #38bdf8; }
.code .c { color: #5b6b85; }
.code .n { color: #fbbf24; }

.qa { margin-top: 22px; display: flex; flex-direction: column; gap: 16px; }
.qa-row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.76rem; color: #cbd5e1; margin-bottom: 7px; }
.qa-row b { color: var(--green); font-weight: 600; }
.qa-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.qa-bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 4px; transition: width 1.6s var(--ease) 0.3s; }
.visible .qa-bar i, html:not(.js) .qa-bar i { width: var(--w); }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: rgba(8, 11, 22, 0.65); overflow: hidden;
}
.stat { padding: 30px 28px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3rem); letter-spacing: -0.04em; line-height: 1.1; }
.stat span { font-size: 0.86rem; color: var(--muted); }

/* ---------- Servers ---------- */
.srv-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.regions { display: flex; gap: 8px; flex-wrap: wrap; }
.region {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(99, 102, 241, 0.08);
  font-family: var(--font-mono); font-size: 0.74rem; color: #e0e7ff;
}
.region b { color: var(--cyan); font-weight: 700; }
.filters { display: inline-flex; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); flex-wrap: wrap; }
.filter { background: none; border: 0; color: var(--muted); font-family: var(--font-mono); font-size: 0.76rem; font-weight: 600; padding: 8px 14px; border-radius: 9px; cursor: pointer; transition: color 0.2s, background 0.2s; }
.filter:hover { color: var(--text); }
.filter.active { background: var(--grad); color: #fff; }

.srv-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(8, 11, 22, 0.75); }
.srv-row {
  position: relative; display: grid; grid-template-columns: 1.5fr 1.7fr 1fr 1.25fr 0.8fr 120px;
  gap: 16px; align-items: center; padding: 18px 22px; border-top: 1px solid var(--line);
  transition: background 0.25s;
}
.srv-row::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--grad);
  transform: scaleY(0); transition: transform 0.3s var(--ease);
}
.srv-row:not(.srv-head):hover { background: rgba(99, 102, 241, 0.07); }
.srv-row:not(.srv-head):hover::before { transform: scaleY(1); }
.srv-row.hidden { display: none; }
.srv-head { border-top: 0; padding: 14px 22px; background: rgba(255, 255, 255, 0.02); font-family: var(--font-mono); font-size: 0.68rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.12em; }
.srv-cell { font-size: 0.87rem; color: #cbd5e1; }
.srv-node strong { display: block; font-family: var(--font-mono); font-size: 0.88rem; color: var(--text); }
.srv-node span { font-size: 0.76rem; color: var(--dim); }
.port { display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; border: 1px solid; }
.p1 { color: #cbd5e1; border-color: rgba(148, 163, 184, 0.3); }
.p10 { color: var(--cyan); border-color: rgba(56, 189, 248, 0.38); background: rgba(56, 189, 248, 0.08); }
.p25 { color: #a5b4fc; border-color: rgba(129, 140, 248, 0.4); background: rgba(99, 102, 241, 0.1); }
.p100 { color: #fff; border-color: transparent; background: var(--grad); box-shadow: 0 6px 18px -6px rgba(168, 85, 247, 0.7); }
.srv-act { text-align: right; }
.srv-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px;
  border: 1px solid var(--line-2); font-family: var(--font-mono); font-size: 0.76rem; color: var(--text);
  transition: background 0.3s, border-color 0.3s;
}
.srv-btn:hover { background: rgba(99, 102, 241, 0.2); border-color: var(--indigo); }
.srv-note { margin-top: 16px; font-family: var(--font-mono); font-size: 0.74rem; color: var(--dim); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.srv-note span::before { content: '› '; color: var(--cyan); }

/* ---------- Process Timeline ---------- */
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.timeline::before { content: ''; position: absolute; top: 27px; left: 0; right: 0; height: 1px; background: var(--line); }
.tl-fill {
  position: absolute; top: 27px; left: 0; height: 1px; width: 0; background: var(--grad);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.9); transition: width 1.8s var(--ease);
}
.timeline.is-active .tl-fill, html:not(.js) .tl-fill { width: 100%; }
.tl-dot {
  position: relative; z-index: 1; width: 54px; height: 54px; border-radius: 16px;
  display: grid; place-items: center; margin-bottom: 24px;
  background: var(--surface); border: 1px solid var(--line-2);
  font-family: var(--font-mono); font-weight: 700; color: var(--muted);
  transition: background 0.5s var(--ease), color 0.5s, box-shadow 0.5s, border-color 0.5s;
  transition-delay: var(--d, 0s);
}
.timeline.is-active .tl-dot { background: var(--indigo); background-image: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 12px 30px -8px rgba(99, 102, 241, 0.85); }
.tl-cmd { font-family: var(--font-mono); font-size: 0.74rem; color: var(--cyan); margin-bottom: 8px; display: block; }
.tl-step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.tl-step p { font-size: 0.9rem; color: var(--muted); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center; }
.about-statement { font-family: var(--font-display); font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.25; letter-spacing: -0.03em; color: var(--muted); }
.about-statement em { font-style: normal; color: var(--text); }
.about-card { padding: 30px; }
.about-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.about-brand img { width: 56px; height: 56px; border-radius: 14px; }
.about-brand strong { display: block; font-size: 1.05rem; }
.about-brand span { font-family: var(--font-mono); font-size: 0.72rem; color: var(--cyan); }
.about-card p { color: var(--muted); font-size: 0.94rem; margin-bottom: 12px; }
.about-card p:last-child { margin-bottom: 0; }

/* ---------- CTA ---------- */
.cta {
  position: relative; overflow: hidden; text-align: center; padding: 90px 40px; border-radius: 28px;
  border: 1px solid var(--line-2);
  background: radial-gradient(circle at 50% 120%, rgba(99, 102, 241, 0.5), transparent 60%), #070a16;
}
.cta::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--grid-lines);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 50% 100%, #000 10%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 100%, #000 10%, transparent 65%);
}
.cta > * { position: relative; }
.cta .sec-num { justify-content: center; }
.cta h2 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); letter-spacing: -0.05em; margin-bottom: 18px; }
.cta p { color: var(--muted); max-width: 580px; margin: 0 auto 34px; }
.cta-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { position: relative; overflow: hidden; border-top: 1px solid var(--line); padding-top: 70px; margin-top: 60px; background: rgba(4, 6, 12, 0.7); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.foot-brand img { height: 38px; width: auto; }
.foot-brand p { color: var(--muted); font-size: 0.9rem; margin-top: 16px; max-width: 320px; }
.foot-col h4 { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text); margin-bottom: 18px; }
.foot-col li { margin-bottom: 10px; }
.foot-col a { color: var(--muted); font-size: 0.9rem; transition: color 0.2s; }
.foot-col a:hover { color: var(--cyan); }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 22px 0; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.74rem; color: var(--dim); }
.foot-bottom a { color: var(--cyan); }
.foot-giant {
  font-family: var(--font-display); font-weight: 700; text-align: center; user-select: none;
  font-size: clamp(4rem, 17vw, 15rem); line-height: 0.8; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1px rgba(148, 163, 184, 0.12);
  margin-bottom: -0.1em; transition: -webkit-text-stroke-color 0.5s;
}
.foot-giant:hover { -webkit-text-stroke-color: rgba(129, 140, 248, 0.55); }

/* ==========================================================================
   Inner pages — page hero, contact, legal
   ========================================================================== */
.page-hero { padding: 160px 0 56px; }
.crumb { font-family: var(--font-mono); font-size: 0.78rem; color: var(--dim); margin-bottom: 18px; }
.crumb b { color: var(--cyan); font-weight: 500; }
.page-hero h1 { font-size: clamp(2.5rem, 5.4vw, 4.2rem); letter-spacing: -0.05em; margin-bottom: 16px; }
.page-hero p { color: var(--muted); max-width: 640px; font-size: 1.04rem; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; padding-bottom: 60px; }
.contact-card { padding: 34px; height: 100%; display: flex; flex-direction: column; }
.contact-card h2 { font-size: 1.5rem; margin-bottom: 24px; }
.channel { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.channel:first-of-type { border-top: 0; padding-top: 0; }
.ch-icon { width: 42px; height: 42px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; color: var(--cyan); background: rgba(56, 189, 248, 0.08); border: 1px solid var(--line-2); }
.channel strong { display: block; font-size: 0.95rem; margin-bottom: 2px; }
.channel p, .channel a { font-size: 0.88rem; color: var(--muted); }
.channel a.mail { font-family: var(--font-mono); color: var(--cyan); }
.mini-term { margin-top: auto; padding: 16px 18px; border-radius: 12px; background: #060913; border: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.76rem; line-height: 1.85; }
.mini-term .c { color: var(--text); }
.mini-term .c::before { content: '❯ '; color: var(--green); }
.mini-term .o { color: var(--muted); }
.mini-term .g { color: var(--green); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 16px; }
label { display: block; font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; color: #cbd5e1; margin-bottom: 7px; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: #060913; border: 1px solid var(--line); color: var(--text);
  font-family: var(--font-body); font-size: 0.92rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
select { cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14); }
textarea { min-height: 130px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.bot-guard-box { padding: 15px 16px; margin-bottom: 18px; border-radius: 12px; background: #060913; border: 1px solid var(--line-2); }
.bot-guard-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; font-family: var(--font-mono); font-size: 0.76rem; color: var(--cyan); font-weight: 600; }
.bot-guard-header button { background: none; border: 0; color: var(--muted); font-family: var(--font-mono); font-size: 0.72rem; cursor: pointer; text-decoration: underline; }
.bot-guard-header button:hover { color: var(--text); }
.captcha-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.captcha-tile {
  position: relative; padding: 6px; border-radius: 10px; cursor: pointer;
  background: rgba(16, 22, 43, 0.9); border: 1px solid var(--line);
  display: grid; place-items: center; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.captcha-tile:hover { border-color: var(--cyan); transform: translateY(-2px); }
.captcha-tile.selected { border-color: var(--green); box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3); background: rgba(34, 197, 94, 0.08); }
.captcha-tile canvas { width: 46px; height: 46px; display: block; pointer-events: none; }
.form-submit { width: 100%; margin-top: auto; }
.form-status { margin-top: 14px; padding: 12px 15px; border-radius: 10px; font-size: 0.87rem; display: none; }
.form-status.success { display: block; background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.35); color: #86efac; }
.form-status.error { display: block; background: rgba(244, 63, 94, 0.1); border: 1px solid rgba(244, 63, 94, 0.35); color: #fda4af; }
.form-status a { color: var(--cyan); text-decoration: underline; font-weight: 600; }
.contact-form-card form { display: flex; flex-direction: column; flex-grow: 1; }

.legal { display: grid; grid-template-columns: 240px 1fr; gap: 56px; padding: 10px 0 100px; }
.toc { position: sticky; top: 110px; align-self: start; border-left: 1px solid var(--line); padding-left: 18px; }
.toc p { font-family: var(--font-mono); font-size: 0.7rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 12px; }
.toc a { display: block; padding: 6px 0; font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); transition: color 0.2s; }
.toc a:hover { color: var(--cyan); }
.legal-body { max-width: 780px; }
.legal-body h2 { font-size: 1.4rem; margin: 40px 0 12px; scroll-margin-top: 110px; }
.legal-body h2 span { font-family: var(--font-mono); font-size: 0.8rem; color: var(--cyan); margin-right: 10px; }
.legal-body p, .legal-body li { color: var(--muted); margin-bottom: 12px; }
.legal-body ul { list-style: disc; padding-left: 22px; margin-bottom: 14px; }
.legal-body strong { color: var(--text); }
.legal-body a { color: var(--cyan); }

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
.js .reveal {
  opacity: 0; transform: translateY(28px); filter: blur(8px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.visible { opacity: 1; transform: none; filter: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-visual { max-width: 640px; }
  .apps-grid { grid-template-columns: 1fr 1fr; }
  .b-tv, .b-mobile, .b-code, .b-qa { grid-column: span 6; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .timeline::before, .tl-fill { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .srv-head { display: none; }
  .srv-row { grid-template-columns: repeat(4, 1fr); row-gap: 12px; }
  .srv-node { grid-column: 1 / -1; }
  .srv-act { grid-column: 1 / -1; text-align: left; }
  .srv-cell[data-label]::before { content: attr(data-label); display: block; font-family: var(--font-mono); font-size: 0.64rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 2px; }
}

@media (max-width: 900px) {
  .nav-links {
    display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    flex-direction: column; padding: 10px; border-radius: 16px;
    background: rgba(6, 9, 18, 0.97); border: 1px solid var(--line-2);
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 12px 14px; }
  .nav-toggle { display: flex; }
  .nav-cta .btn { display: none; }
  .contact-grid, .legal { grid-template-columns: 1fr; }
  .toc { position: static; }
}

@media (max-width: 720px) {
  .section { padding: 84px 0; }
  .apps-grid, .os-grid, .form-row, .timeline, .foot-grid { grid-template-columns: 1fr; }
  .os-grid { grid-template-columns: 1fr 1fr; }
  .captcha-grid { grid-template-columns: repeat(3, 1fr); }
  .srv-row { grid-template-columns: 1fr 1fr; }
  .chip-float.cf-2 { left: 8px; }
  .term-body { height: 330px; font-size: 0.74rem; }
  .cta { padding: 64px 22px; }
  .contact-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .mq-track { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
  html { scroll-behavior: auto; }
}
