/* AgentSonar — shared stylesheet v2 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --accent:       #D85A30;
  --accent-light: #F0997B;
  --accent-dim:   rgba(216, 90, 48, 0.10);
  --accent-glow:  rgba(216, 90, 48, 0.06);
  --green:        #3ecf8e;
  --transition:   background 0.25s, color 0.25s, border-color 0.25s;
}
[data-theme="dark"] {
  --bg:        #0a0a0a;
  --surface:   #111111;
  --surface-2: #181818;
  --border:    #1f1f1f;
  --border-hi: #2d2d2d;
  --text:      #ededed;
  --text-muted:#b8b8b8;
  --text-dim:  #777777;
  --code-pre:  #c0c0c0;
}
[data-theme="light"] {
  --bg:        #f5f4f1;
  --surface:   #ebebea;
  --surface-2: #e2e1de;
  --border:    #d0ceca;
  --border-hi: #c0bebc;
  --text:      #161616;
  --text-muted:#3d3d3d;
  --text-dim:  #888;
  --code-pre:  #333;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; transition: var(--transition);
}
a { color: inherit; text-decoration: none; }

/* ── reveal ───────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── status bar ───────────────────────────────────── */
.status-bar {
  background: var(--accent-dim); border-bottom: 1px solid rgba(216,90,48,0.15);
  padding: 8px 32px; text-align: center; font-family: var(--mono);
  font-size: 11.5px; color: var(--accent-light); letter-spacing: 0.03em;
}
.status-bar a { color: var(--accent-light); border-bottom: 1px solid rgba(240,153,123,0.3); }
.status-bar a:hover { border-bottom-color: var(--accent-light); }
.status-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); margin-right: 8px; vertical-align: middle;
  animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* ── nav ──────────────────────────────────────────── */
nav:not(.binder-nav) {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); padding: 0 clamp(20px, 4vw, 64px);
  display: flex; align-items: center; justify-content: space-between; height: 58px;
  transition: background 0.25s, border-color 0.25s;
}
[data-theme="light"] nav:not(.binder-nav) { background: rgba(245,244,241,0.92); }
.nav-logo {
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  color: var(--text); display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; white-space: nowrap;
}
.nav-logo-img { height: 24px; width: auto; flex-shrink: 0; display: block; }
[data-theme="dark"]  .nav-logo-img { filter: invert(1); }
[data-theme="light"] .nav-logo-img { filter: none; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 13px; color: var(--text-muted); }
.nav-icon-link { display: flex; align-items: center; color: var(--text-muted); transition: color 0.15s; }
.nav-icon-link:hover { color: var(--text); }
.nav-icon-link svg { display: block; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent-light); }
.nav-links .sep { color: var(--text-dim); }

/* ── hamburger ────────────────────────────────────── */
.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px; margin-left: 4px;
  -webkit-tap-highlight-color: transparent;
}
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text-muted); border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── mobile drawer ────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed; top: 58px; left: 0; right: 0; bottom: 0;
  background: var(--bg); z-index: 99; overflow-y: auto;
  padding: 8px 0 40px;
}
.mobile-nav.open { display: block; }
.mobile-nav-inner { padding: 0 24px; }
.mobile-nav-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--border);
  font-size: 15px; color: var(--text-muted);
  transition: color 0.15s;
}
.mobile-nav-link:hover { color: var(--text); }
.mobile-nav-link.active { color: var(--accent-light); }
.mobile-nav-link:last-child { border-bottom: none; }
.mobile-nav-arrow { color: var(--text-dim); font-size: 13px; }
.mobile-nav-cta {
  margin-top: 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.mobile-nav-cta .btn-primary,
.mobile-nav-cta .btn-secondary {
  width: 100%; text-align: center; justify-content: center;
}

/* show hamburger on mobile, hide on desktop */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .btn-nav { display: none; }
}
@media (min-width: 769px) {
  .hamburger { display: none !important; }
  .mobile-nav { display: none !important; }
}
.btn-nav {
  background: var(--accent); color: #fff; padding: 7px 16px; border-radius: 6px;
  font-size: 13px; font-weight: 500; transition: background 0.15s, color 0.15s;
}
.btn-nav:hover { background: var(--accent-light); color: #0a0a0a; }
.theme-btn {
  background: transparent; border: 1px solid var(--border); border-radius: 6px;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted); font-size: 15px; transition: border-color 0.15s, color 0.15s;
}
.theme-btn:hover { border-color: var(--border-hi); color: var(--text); }
[data-theme="dark"]  .icon-sun  { display: block; }
[data-theme="dark"]  .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* ── layout ───────────────────────────────────────── */
.container     { width: 100%; padding: 0 clamp(20px, 4vw, 64px); }
.container-sm  { width: 100%; max-width: 820px; padding: 0 clamp(20px, 4vw, 64px); }
section        { padding: 100px 0; border-bottom: 1px solid var(--border); position: relative; }
section:last-of-type { border-bottom: none; }
.page-header   { padding: 96px 0 72px; border-bottom: 1px solid var(--border); }

/* alternating section backgrounds */
.section-alt { background: var(--surface); }
.section-glow {
  overflow: hidden;
}
.section-glow::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 500px;
  background: radial-gradient(ellipse at center top, rgba(216,90,48,0.07) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
}
.section-glow > * { position: relative; z-index: 1; }
.section-glow .container { position: relative; z-index: 1; }

/* decorative large background number */
.section-tag {
  font-family: var(--mono);
  font-size: clamp(96px, 14vw, 200px);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px var(--border);
  line-height: 1;
  letter-spacing: -0.04em;
  position: absolute;
  right: max(24px, calc(50% - 550px + 24px));
  top: 60px;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* ── typography ───────────────────────────────────── */
.section-label {
  font-family: var(--mono); font-size: 12px; color: var(--accent);
  letter-spacing: 0.08em; margin-bottom: 28px; text-transform: lowercase;
}
h1 { font-size: clamp(44px, 6.5vw, 80px); font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 20px; }
h2 { font-size: clamp(30px, 4vw, 52px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
h3 { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
p  { color: var(--text-muted); line-height: 1.75; }
.lead {
  font-size: 18px; color: var(--text-muted); max-width: 600px; line-height: 1.65; margin-top: 16px;
}

/* ── tabs ─────────────────────────────────────────── */
.tab-bar {
  display: flex; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  overflow-x: auto; scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  font-family: var(--mono); font-size: 12px; padding: 10px 20px;
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--text-dim); cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s; margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-muted); }
.tab-btn.active { color: var(--accent-light); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── code blocks ──────────────────────────────────── */
.code-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; font-family: var(--mono); font-size: 13px; line-height: 1.7;
  position: relative; transition: var(--transition);
}
.code-block:hover { border-color: var(--border-hi); }
.code-block-header {
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  padding: 10px 16px; font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.code-dots { display: flex; gap: 5px; }
.code-dots span { width: 9px; height: 9px; border-radius: 50%; }
.code-dots span:nth-child(1) { background: #ff5f56; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #27c93f; }

/* catch section SVG icons */
.catch-svg-icon {
  width: 20px; height: 20px; display: block;
  color: var(--accent); margin-bottom: 12px;
}
.code-block pre { padding: 24px; overflow-x: auto; color: var(--code-pre); }
.c-acc { color: var(--accent-light); }
.c-grn { color: var(--green); }
.c-ora { color: var(--accent); }
.c-wht { color: var(--text); }
.c-dim { color: var(--text-dim); }
.c-gray { color: var(--text-muted); }
.c-red { color: #f87171; }
.c-ylw { color: #fbbf24; }
/* light mode: darken all code colours for readability */
[data-theme="light"] .c-acc { color: #b83d10; }
[data-theme="light"] .c-grn { color: #1a7a50; }
[data-theme="light"] .c-ora { color: #b83d10; }
[data-theme="light"] .c-red { color: #b91c1c; }
[data-theme="light"] .c-ylw { color: #92400e; }
[data-theme="light"] .c-dim { color: #6b7280; }
code {
  font-family: var(--mono); font-size: 13px; color: var(--accent-light);
  background: var(--surface); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border);
}

/* copy button */
.copy-btn {
  position: absolute; top: 10px; right: 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px;
  padding: 4px 10px; font-family: var(--mono); font-size: 10px; color: var(--text-dim);
  cursor: pointer; transition: color 0.15s, border-color 0.15s; letter-spacing: 0.03em;
}
.copy-btn:hover { color: var(--text-muted); border-color: var(--border-hi); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }

/* ── cards ────────────────────────────────────────── */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.card { background: var(--surface); padding: 32px 28px; transition: var(--transition); }
.card:hover { background: var(--surface-2); }
.card-badge {
  display: inline-block; font-family: var(--mono); font-size: 10px;
  padding: 3px 9px; border-radius: 3px; margin-bottom: 16px; letter-spacing: 0.06em;
}
.badge-shipped { background: rgba(62,207,142,0.08); color: var(--green); border: 1px solid rgba(62,207,142,0.18); }
.badge-soon    { background: var(--accent-dim); color: var(--accent-light); border: 1px solid rgba(216,90,48,0.18); }
.card h3 { font-size: 15px; font-weight: 500; margin-bottom: 10px; color: var(--text); }
.card p  { font-size: 13px; color: var(--text-muted); line-height: 1.65; }

/* two col */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }

/* callout */
.callout {
  border-left: 2px solid var(--accent); padding: 16px 24px;
  background: var(--accent-dim); border-radius: 0 8px 8px 0; margin-top: 28px;
}
.callout p { font-size: 13px; color: var(--accent-light); font-family: var(--mono); line-height: 1.65; }

/* ── stat block ───────────────────────────────────── */
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; margin-top: 56px;
}
.stat-cell { background: var(--surface); padding: 32px 28px; }
.stat-num {
  font-family: var(--mono); font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 500; color: var(--text); letter-spacing: -0.03em;
  line-height: 1; margin-bottom: 6px;
}
.stat-num span { color: var(--accent); }
.stat-label { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ── faq ──────────────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--border); padding: 32px 0; }
.faq-item:first-child { padding-top: 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-size: 16px; font-weight: 500; color: var(--text); margin-bottom: 12px; line-height: 1.45; }
.faq-a { font-size: 14px; color: var(--text-muted); line-height: 1.8; }
.faq-a a { color: var(--accent-light); border-bottom: 1px solid rgba(240,153,123,0.3); }
.faq-a a:hover { border-bottom-color: var(--accent-light); }

/* ── contact cards ────────────────────────────────── */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.contact-card { background: var(--surface); padding: 32px 28px; transition: var(--transition); }
.contact-card:hover { background: var(--surface-2); }
.contact-icon { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 0.06em; margin-bottom: 14px; }
.contact-card h3 { font-size: 16px; font-weight: 500; margin-bottom: 10px; color: var(--text); }
.contact-card p { font-size: 13px; color: var(--text-muted); line-height: 1.65; margin-bottom: 18px; }
.contact-card a.cta { font-family: var(--mono); font-size: 12px; color: var(--accent-light); border-bottom: 1px solid rgba(240,153,123,0.3); }
.contact-card a.cta:hover { border-bottom-color: var(--accent-light); }

/* ── buttons ──────────────────────────────────────── */
.btn-primary {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 11px 22px; border-radius: 7px; font-size: 14px; font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.btn-primary:hover { background: var(--accent-light); color: #0a0a0a; }
.btn-secondary {
  display: inline-block; background: transparent; color: var(--text-muted);
  padding: 11px 22px; border-radius: 7px; font-size: 14px;
  border: 1px solid var(--border); transition: border-color 0.15s, color 0.15s;
}
.btn-secondary:hover { border-color: var(--border-hi); color: var(--text); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }

/* ── breadcrumb ───────────────────────────────────── */
.breadcrumb { font-family: var(--mono); font-size: 12px; color: var(--text-muted); margin-bottom: 28px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { color: var(--accent); margin: 0 6px; }

/* ── footer ───────────────────────────────────────── */
.footer-wrap {
  padding: 64px clamp(20px, 4vw, 64px);
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 48px; flex-wrap: wrap; border-top: 1px solid var(--border);
}
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.footer-logo img { height: 20px; width: auto; }
[data-theme="dark"]  .footer-logo img { filter: invert(1); }
[data-theme="light"] .footer-logo img { filter: none; }
.footer-logo-name { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--text); }
.footer-tagline { font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col h5 { font-size: 11px; font-family: var(--mono); color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 9px; }
.footer-col a:hover { color: var(--text); }
.footer-copy {
  width: 100%; padding-top: 28px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-dim); font-family: var(--mono);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.footer-copy a { color: var(--accent-light); }
.footer-copy a:hover { color: var(--text); }

/* ── utils ────────────────────────────────────────── */
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mt-32  { margin-top: 32px; }
.mt-40  { margin-top: 40px; }
.mt-48  { margin-top: 48px; }
.mt-56  { margin-top: 56px; }
.mt-64  { margin-top: 64px; }

/* ── mid breakpoint: tablet / desktop-mode-on-mobile ─ */
@media (max-width: 1080px) and (min-width: 769px) {
  .nav-links { gap: 16px; font-size: 12px; }
  .btn-nav { padding: 6px 12px; font-size: 12px; }
}

/* ── responsive ───────────────────────────────────── */
@media (max-width: 768px) {
  nav:not(.binder-nav) { padding: 0 20px; }
  .container, .container-sm { padding: 0 20px !important; }
  section, .page-header { padding: 72px 0; }
  .hide-mob { display: none; }
  .footer-wrap { padding: 48px 20px; flex-direction: column; gap: 40px; }
  .footer-links { flex-wrap: wrap; gap: 32px; }
  .section-tag { display: none; }

  /* hero */
  .hero { padding: 80px 0 72px; }
  .hero h1 { font-size: clamp(36px, 10vw, 56px); }
  .hero .lead { font-size: 15px; }
  .hero-btns { flex-wrap: wrap; gap: 12px; }

  /* stat row */
  .stat-row { grid-template-columns: 1fr 1fr; gap: 16px; }

  /* catch grid */
  .catch-grid { grid-template-columns: 1fr; }
  .catch-soon { grid-template-columns: 1fr; }
  .catch-divider { font-size: 10px; gap: 10px; }

  /* sonar report */
  .sonar-report { margin: 0; }
  .graph-viz-wrap svg { max-width: 240px; }

  /* code blocks */
  .code-block pre { font-size: 11px !important; padding: 16px !important; overflow-x: auto; }

  /* callout */
  .callout { padding: 24px 20px; }

  /* page header */
  .page-header h1 { font-size: clamp(32px, 8vw, 52px); }

  /* card grid */
  .card-grid { grid-template-columns: 1fr; }

  /* btn row */
  .btn-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 480px) {
  section, .page-header { padding: 56px 0; }
  .stat-row { grid-template-columns: 1fr; }
  nav { height: 52px; }
}
