/* ==========================================================
   TG-Max Sniffer · Landing styles
   ========================================================== */

:root {
  --bg:           #ffffff;
  --bg-soft:      #f7f8fb;
  --bg-dark:      #0b1020;
  --bg-dark-2:    #0f172a;
  --surface:      #ffffff;
  --border:       #e6e8ee;
  --border-soft:  #eef0f5;

  --text:         #0b1224;
  --text-2:       #475569;
  --text-muted:   #64748b;
  --text-invert:  #f8fafc;
  --text-invert-2:#cbd5e1;

  --primary:      #6366f1;
  --primary-2:    #8b5cf6;
  --accent:       #06b6d4;
  --accent-2:     #14b8a6;
  --warn:         #f59e0b;
  --ok:           #10b981;

  --grad:         linear-gradient(135deg, #6366f1 0%, #8b5cf6 60%, #06b6d4 100%);
  --grad-soft:    linear-gradient(135deg, rgba(99,102,241,.08), rgba(139,92,246,.08) 60%, rgba(6,182,212,.08));

  --radius-sm:    8px;
  --radius:       14px;
  --radius-lg:    22px;
  --shadow-sm:    0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --shadow:       0 8px 24px rgba(15,23,42,.06), 0 2px 6px rgba(15,23,42,.04);
  --shadow-lg:    0 30px 60px -20px rgba(15,23,42,.18), 0 10px 24px -8px rgba(15,23,42,.12);

  --container:    1180px;
  --gap:          24px;

  --font:         "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:         "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0b1020;
    --bg-soft:     #0f172a;
    --surface:     #111a33;
    --border:      #1e293b;
    --border-soft: #182037;
    --text:        #f1f5f9;
    --text-2:      #cbd5e1;
    --text-muted:  #94a3b8;
    --shadow-sm:   0 1px 2px rgba(0,0,0,.5);
    --shadow:      0 8px 24px rgba(0,0,0,.5);
    --shadow-lg:   0 30px 60px -20px rgba(0,0,0,.7);
  }
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

code, pre {
  font-family: var(--mono);
  font-size: .92em;
}

code {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  padding: .12em .4em;
  border-radius: 6px;
  color: var(--text);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute; inset: 0 auto auto 0;
  transform: translateY(-200%);
  background: var(--text); color: var(--text-invert);
  padding: 10px 14px; border-radius: 0 0 8px 0;
  z-index: 1000;
}
.skip-link:focus { transform: translateY(0); outline: 2px solid var(--primary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 16px 28px; font-size: 16px; }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(99,102,241,.6), 0 4px 10px -4px rgba(139,92,246,.4);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -8px rgba(99,102,241,.7), 0 6px 14px -4px rgba(139,92,246,.5); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--text-muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.header-row {
  display: flex; align-items: center; gap: 24px;
  min-height: 64px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 17px; letter-spacing: -.01em;
  color: var(--text);
}
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  filter: drop-shadow(0 4px 10px rgba(99,102,241,.25));
}
.logo-text strong { font-weight: 800; }

.nav {
  display: flex; gap: 4px; margin-left: auto;
}
.nav a {
  color: var(--text-2);
  font-weight: 500; font-size: 14.5px;
  padding: 8px 12px; border-radius: 8px;
}
.nav a:hover { color: var(--text); background: var(--bg-soft); }

.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--border);
  width: 40px; height: 40px; border-radius: 10px;
  padding: 0;
  flex-direction: column; justify-content: center; align-items: center; gap: 4px;
  margin-left: auto;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 84px 0 56px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: -20% -10% auto -10%; height: 700px;
  background:
    radial-gradient(60% 60% at 20% 20%, rgba(99,102,241,.18), transparent 60%),
    radial-gradient(50% 50% at 85% 10%, rgba(6,182,212,.14), transparent 60%),
    radial-gradient(40% 40% at 60% 90%, rgba(139,92,246,.16), transparent 60%);
  z-index: -1;
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: var(--text-2);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}
.eyebrow-light {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.14);
  color: var(--text-invert-2);
}

h1, h2, h3, h4 {
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0;
}
h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  margin: 18px 0 18px;
}
h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 800;
  margin: 0 0 14px;
}
h3 { font-size: 18px; font-weight: 700; }

.lead {
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--text-2);
  max-width: 620px;
  margin: 0 0 28px;
}

.hero-cta {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  list-style: none; padding: 0; margin: 0;
  max-width: 640px;
}
.hero-stats li {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.hero-stats strong {
  font-size: 18px; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats span { font-size: 12.5px; color: var(--text-muted); }

/* Hero visual / mock */
.hero-visual {
  position: relative;
  min-height: 460px;
}
.mock-window {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(.5deg);
}
.mock-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-soft);
}
.mock-bar > span:not(:last-child) {
  width: 10px; height: 10px; border-radius: 50%;
  background: #d8dde6;
}
.mock-bar > span:nth-child(1) { background: #ff5f57; }
.mock-bar > span:nth-child(2) { background: #ffbd2e; }
.mock-bar > span:nth-child(3) { background: #28c840; }
.mock-bar em {
  margin-left: 10px;
  font-style: normal; font-size: 12.5px; color: var(--text-muted);
  font-family: var(--mono);
}
.mock-body {
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.mock-task {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--bg);
}
.mock-task h4 { font-size: 14.5px; margin: 6px 0 2px; }
.mock-task p { margin: 0; color: var(--text-muted); font-size: 13px; }
.mock-task-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
}
.mock-task code {
  font-size: 12px;
  background: transparent; border: none; padding: 0; color: var(--text-2);
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
}
.badge-on  { background: rgba(16,185,129,.12); color: #047857; }
.badge-off { background: rgba(148,163,184,.16); color: var(--text-2); }

.mock-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  width: 250px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
}
.mock-card p { margin: 6px 0 0; color: var(--text-2); }
.mock-card-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--primary); font-weight: 700;
}
.mock-card-1 {
  top: 24px; right: -16px;
  transform: rotate(2deg);
}
.mock-card-2 {
  bottom: -8px; left: -20px;
  transform: rotate(-3deg);
}

/* ---------- Band (value props strip) ---------- */
.band {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-soft);
  padding: 28px 0;
}
.band-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.band-item h3 { font-size: 15.5px; margin: 8px 0 4px; }
.band-item p  { margin: 0; font-size: 14px; color: var(--text-muted); }
.band-icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  font-size: 18px;
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-soft); }
.section-dark {
  background: var(--bg-dark);
  color: var(--text-invert);
}
.section-dark p, .section-dark code { color: var(--text-invert-2); }
.section-dark code {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.08);
  color: var(--text-invert);
}

.section-head {
  max-width: 740px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head .eyebrow { margin-bottom: 16px; }
.section-head p {
  color: var(--text-2);
  font-size: 17px;
  margin: 12px 0 0;
}
.section-head-light h2 { color: var(--text-invert); }
.section-head-light p  { color: var(--text-invert-2); }

/* ---------- Use cases ---------- */
.use-cases {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  counter-reset: uc;
}
.use-case {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.use-case:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border);
}
.use-case h3 { margin: 12px 0 8px; font-size: 19px; }
.use-case p  { margin: 0 0 14px; color: var(--text-2); }
.use-case-meta {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13.5px; color: var(--text-muted);
}
.use-case-meta b { color: var(--text); font-weight: 600; }
.use-case-rank {
  display: inline-flex;
  font-size: 12px; font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--grad-soft);
  color: var(--primary-2);
  border: 1px solid rgba(99,102,241,.18);
}
.use-case-1 { border-color: rgba(99,102,241,.25); }
.use-case-2 { border-color: rgba(139,92,246,.25); }
.use-case-3 { border-color: rgba(6,182,212,.25); }

/* ---------- Steps ---------- */
.steps {
  list-style: none; padding: 0; margin: 0 0 48px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
}
.step h3 { margin: 16px 0 8px; }
.step p  { margin: 0; color: var(--text-2); font-size: 14.5px; }
.step-num {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-weight: 800;
  background: var(--grad);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 8px 18px -6px rgba(99,102,241,.6);
}

/* ---------- Code card ---------- */
.code-card {
  background: var(--bg-dark);
  color: var(--text-invert);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin: 0 auto;
  max-width: 920px;
  border: 1px solid #1e293b;
}
.code-card-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: #0a1228;
  border-bottom: 1px solid #1e293b;
}
.code-card-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: #2d3a5e;
}
.code-card-dot:nth-child(1) { background: #ff5f57; }
.code-card-dot:nth-child(2) { background: #ffbd2e; }
.code-card-dot:nth-child(3) { background: #28c840; }
.code-card-title {
  margin-left: 12px;
  font-family: var(--mono); font-size: 12.5px;
  color: #94a3b8;
}
.code-card pre {
  margin: 0; padding: 22px 24px;
  overflow: auto;
  font-size: 13.5px;
  line-height: 1.55;
}
.code-card .kw  { color: #c4b5fd; }
.code-card .str { color: #6ee7b7; }
.code-card .num { color: #fcd34d; }

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border);
}
.feature h3 { margin: 12px 0 6px; font-size: 17px; }
.feature p  { margin: 0; color: var(--text-2); font-size: 14.5px; }
.feature-icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--grad-soft);
  font-size: 20px;
}

/* ---------- Screens / placeholders ---------- */
.screens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.screen {
  margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.screen-stub {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 10px, transparent 10px 20px),
    linear-gradient(135deg, #1e293b 0%, #0f172a 60%, #111827 100%);
  border: 1px solid rgba(255,255,255,.06);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  color: var(--text-invert-2);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.screen-stub::before,
.screen-stub::after {
  content: ""; position: absolute;
  inset: 12px 12px auto 12px; height: 22px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
}
.screen-stub::after {
  inset: auto 12px 12px 12px; height: 8px;
}
.screen-stub-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.screen-stub-size {
  font-family: var(--mono);
  font-size: 13px;
  color: rgba(255,255,255,.7);
  margin-top: 6px;
}
.screen-stub-caption {
  margin-top: 12px;
  font-size: 14.5px;
  color: rgba(255,255,255,.8);
  font-weight: 500;
}
.screen figcaption h3 { color: var(--text-invert); margin-bottom: 4px; font-size: 17px; }
.screen figcaption p  { margin: 0; font-size: 14.5px; color: var(--text-invert-2); }

/* ---------- Stack ---------- */
.stack {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.stack li {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-align: left;
}
.stack b    { font-weight: 700; }
.stack span { color: var(--text-muted); font-size: 13px; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.faq details[open] { border-color: var(--border); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--text-muted);
  transition: transform .2s ease, color .2s ease;
}
.faq details[open] summary::after { content: "−"; color: var(--primary); }
.faq p {
  margin: 12px 0 4px;
  color: var(--text-2);
  font-size: 14.5px;
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  margin: 96px auto;
  max-width: 1100px;
  border-radius: 32px;
  background:
    radial-gradient(80% 80% at 0% 0%, rgba(255,255,255,.12), transparent 60%),
    radial-gradient(80% 80% at 100% 100%, rgba(255,255,255,.12), transparent 60%),
    var(--grad);
  color: #fff;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(99,102,241,.45);
}
.cta-inner { padding: 64px 24px; }
.cta h2 { color: #fff; }
.cta p  { color: rgba(255,255,255,.92); max-width: 640px; margin: 14px auto 28px; font-size: 17px; }
.cta-actions {
  display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 18px;
}
.cta .btn-primary {
  background: #fff;
  color: var(--primary-2);
  box-shadow: 0 12px 28px -8px rgba(0,0,0,.3);
}
.cta .btn-primary:hover { color: var(--primary); }
.cta .btn-ghost {
  color: #fff; border-color: rgba(255,255,255,.4); background: transparent;
}
.cta .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.cta-foot { font-size: 13px; color: rgba(255,255,255,.78); margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 28px 0;
  color: var(--text-muted);
  font-size: 14px;
}
.footer-row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-nav   { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { color: var(--text-2); }
.footer-nav a:hover { color: var(--text); }

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { min-height: 0; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .band-grid,
  .features,
  .screens   { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .use-cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps     { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stack     { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .hero { padding: 48px 0 32px; }

  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-row > .btn { display: none; }

  .nav.is-open {
    display: flex;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border-soft);
    padding: 8px 16px 16px;
    box-shadow: var(--shadow);
  }
  .nav.is-open a {
    padding: 12px 8px;
    border-bottom: 1px solid var(--border-soft);
  }

  .band-grid,
  .features,
  .screens,
  .use-cases,
  .steps,
  .stack { grid-template-columns: 1fr; }

  .hero-stats { grid-template-columns: 1fr 1fr; }

  .cta { margin: 64px 16px; }
  .cta-inner { padding: 48px 20px; }

  .mock-card-1, .mock-card-2 { display: none; }

  .footer-row { justify-content: center; text-align: center; }
}

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

/* Focus styles */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 8px;
}
