/* =========================================================
   T-LAB / TestOffical — preview design system
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #08090f;
  --bg-soft: #0b0d15;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f1f4f9;
  --muted: #8a93a7;
  --dim: #5c6477;
  --primary: #38bdf8;
  --accent: #22d3ee;
  --ice: #a5f3fc;
  --violet: #818cf8;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --grad: linear-gradient(115deg, #38bdf8 0%, #22d3ee 52%, #a5f3fc 100%);
  --grad-soft: linear-gradient(135deg, rgba(56,189,248,.18), rgba(34,211,238,.06));
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Manrope", "Inter", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1180px;
  --ease: cubic-bezier(.22, .8, .22, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% -12%, rgba(56, 189, 248, 0.10), transparent 70%),
    radial-gradient(700px 480px at 92% 8%, rgba(129, 140, 248, 0.055), transparent 70%),
    radial-gradient(760px 500px at 4% 82%, rgba(34, 211, 238, 0.045), transparent 70%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

::selection { background: rgba(56, 189, 248, .28); color: #fff; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

p { color: var(--muted); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 74px;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
}
.site-header.is-scrolled, .site-header.is-solid {
  background: rgba(8, 9, 15, .72);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.header-inner {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
  color: #041018;
  background: var(--grad);
  box-shadow: 0 6px 24px -8px rgba(56, 189, 248, .8), inset 0 1px 0 rgba(255,255,255,.4);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 8px;
  border: 1px solid rgba(4, 16, 24, .2);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-text strong {
  font-family: var(--display);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .17em;
}
.brand-text small {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .13em;
  color: var(--dim);
  text-transform: uppercase;
  margin-top: 3px;
}

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 13px;
  border-radius: 9px;
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.main-nav a.is-active { color: var(--text); background: rgba(255,255,255,.055); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s, color .2s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--grad);
  color: #041018;
  box-shadow: 0 10px 34px -14px rgba(56, 189, 248, .75), inset 0 1px 0 rgba(255,255,255,.45);
}
.btn-primary:hover { box-shadow: 0 14px 40px -12px rgba(56, 189, 248, .9), inset 0 1px 0 rgba(255,255,255,.45); }
.btn-ghost {
  background: rgba(255, 255, 255, .04);
  border-color: var(--line);
  color: var(--text);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .075); border-color: var(--line-2); }
.btn-quiet { color: var(--muted); padding: 0 14px; }
.btn-quiet:hover { color: var(--text); background: rgba(255,255,255,.04); }
.btn-small { height: 36px; padding: 0 14px; font-size: 12.5px; border-radius: 9px; }
.btn-lg { height: 52px; padding: 0 26px; font-size: 14.5px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s var(--ease), top .25s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle.is-open span:nth-child(1) { top: 18px; transform: rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { top: 18px; transform: rotate(-45deg); }

.mobile-nav {
  display: none;
  position: absolute;
  top: 74px;
  left: 12px;
  right: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(10, 12, 20, .96);
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
}
.mobile-nav.is-open { display: block; animation: dropIn .22s var(--ease); }
.mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.mobile-nav a:hover, .mobile-nav a.is-active { color: var(--text); background: rgba(255,255,255,.05); }
.mobile-nav .btn { margin-top: 8px; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

main { position: relative; z-index: 2; padding-top: 74px; }
.section { padding: clamp(64px, 8.5vw, 108px) 0; }
.section-tight { padding: clamp(44px, 6vw, 72px) 0; }
.section-line { border-top: 1px solid var(--line); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary));
}
.eyebrow.center { justify-content: center; }
.eyebrow.center::after {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--primary), transparent);
}

.section-head { max-width: 720px; margin-bottom: clamp(34px, 4.5vw, 54px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(30px, 3.7vw, 46px); margin-bottom: 16px; }
.section-head p { font-size: 15.5px; line-height: 1.7; max-width: 640px; }
.section-head.center p { margin-inline: auto; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

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

.card {
  position: relative;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(255,255,255,.05), rgba(255,255,255,.018));
  transition: border-color .3s, transform .3s var(--ease), background .3s;
  overflow: hidden;
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px 160px at 0% 0%, rgba(56,189,248,.09), transparent 65%);
  opacity: 0;
  transition: opacity .35s;
}
.card:hover::after { opacity: 1; }
.card > * { position: relative; z-index: 1; }

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: rgba(56, 189, 248, .09);
  border: 1px solid rgba(56, 189, 248, .18);
  margin-bottom: 18px;
}
.card-icon svg { width: 20px; height: 20px; }
.card-icon.accent { color: var(--accent); background: rgba(34,211,238,.08); border-color: rgba(34,211,238,.16); }
.card-icon.violet { color: var(--violet); background: rgba(129,140,248,.08); border-color: rgba(129,140,248,.16); }
.card-icon.green { color: var(--green); background: rgba(52,211,153,.08); border-color: rgba(52,211,153,.16); }
.card h3 { font-size: 16.5px; margin-bottom: 8px; letter-spacing: -0.015em; }
.card p { font-size: 13.5px; line-height: 1.65; }
.card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .04em;
  white-space: nowrap;
}
.tag.primary { color: var(--primary); border-color: rgba(56,189,248,.22); background: rgba(56,189,248,.07); }
.tag.green { color: var(--green); border-color: rgba(52,211,153,.22); background: rgba(52,211,153,.07); }
.tag.amber { color: var(--amber); border-color: rgba(251,191,36,.22); background: rgba(251,191,36,.07); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  backdrop-filter: blur(10px);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.chip .dot.live { animation: pulseDot 2.2s infinite; }
.chip strong { color: var(--text); font-weight: 600; }
@keyframes pulseDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52,211,153,.4); }
  50% { opacity: .7; box-shadow: 0 0 0 5px rgba(52,211,153,0); }
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  transition: gap .2s var(--ease), color .2s;
}
.link-arrow:hover { gap: 11px; color: var(--ice); }
.link-arrow svg { width: 14px; height: 14px; }

.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding: 56px 0 26px;
  background: linear-gradient(180deg, transparent, rgba(56,189,248,.025));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand p { font-size: 12.5px; line-height: 1.7; max-width: 280px; margin-top: 16px; }
.footer-col h4 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 16px;
}
.footer-col a { display: block; font-size: 12.5px; color: var(--muted); padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--dim);
}
.footer-bottom .demo-note { display: inline-flex; align-items: center; gap: 7px; }
.footer-bottom .demo-note::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); }

/* ---------- reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- preview dock ---------- */
.preview-dock {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 100px;
  border: 1px solid var(--line-2);
  background: rgba(9, 11, 18, .88);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.9);
  font-size: 11.5px;
}
.preview-dock a, .preview-dock button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 100px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  transition: color .2s, background .2s;
}
.preview-dock a:hover, .preview-dock button:hover { color: var(--text); background: rgba(255,255,255,.06); }
.preview-dock .dock-pick.is-picked { color: var(--green); background: rgba(52,211,153,.09); }
.preview-dock .dock-title {
  padding: 0 10px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.preview-dock .dock-sep { width: 1px; height: 16px; background: var(--line); }
.preview-dock .dock-variants { display: flex; gap: 2px; }
.preview-dock .dock-variants a { width: 26px; padding: 0; justify-content: center; font-family: var(--mono); }
.preview-dock .dock-variants a.is-active { color: var(--primary); background: rgba(56,189,248,.1); }

.toast {
  position: fixed;
  right: 18px;
  bottom: 70px;
  z-index: 95;
  max-width: 340px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(56,189,248,.25);
  background: rgba(10, 14, 24, .95);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px -18px rgba(0,0,0,.8);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.is-on { opacity: 1; transform: none; }
.toast strong { color: var(--primary); font-weight: 600; }

/* ---------- shared bits ---------- */
.hr { height: 1px; background: var(--line); border: 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; }
.status-dot.warn { background: var(--amber); }
.status-dot.bad { background: var(--red); }

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 13px 0;
  position: relative;
  z-index: 2;
}
.marquee-track {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
  display: inline-flex;
  align-items: center;
  gap: 40px;
}
.marquee span::after { content: "◇"; color: rgba(56,189,248,.4); }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (max-width: 1020px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .header-actions .btn-ghost { display: none; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-col:last-child { display: none; }
}

@media (max-width: 860px) {
  .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 32px, var(--container)); }
  .header-actions .btn-primary { display: none; }
  .site-header, .header-inner { height: 64px; }
  .mobile-nav { top: 64px; }
  main { padding-top: 64px; }
  .brand-text small { display: none; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .section { padding: 58px 0; }
  .preview-dock { right: 10px; bottom: 10px; }
  .preview-dock .dock-title { display: none; }
  .preview-dock .dock-variants { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-col:last-child { display: block; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* thin scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #08090f; }
::-webkit-scrollbar-thumb { background: #232838; border-radius: 20px; border: 3px solid #08090f; }
::-webkit-scrollbar-thumb:hover { background: #2e3548; }
