/* ============================================================
   AgentArc — shared site stylesheet (subpages)
   Design tokens mirror index.html / pricing / docs.
   ============================================================ */
:root {
  --bg: #020203;
  --t1: rgba(255, 255, 255, 0.92);
  --t2: rgba(255, 255, 255, 0.55);
  --t3: rgba(255, 255, 255, 0.32);
  --t4: rgba(255, 255, 255, 0.20);
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.06);
  --panel: rgba(255, 255, 255, 0.03);
  --panel-hover: rgba(255, 255, 255, 0.06);
  --ok: #64ffa0;
  --warn: #ffcd6b;
  --bad: #ff6b6b;
  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --body: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--t1);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}
button, textarea, input { font: inherit; color: inherit; }
button { appearance: none; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(255, 255, 255, 0.18); }

/* ===================== NAV ===================== */
.nav {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 48px;
  border-bottom: 1px solid var(--line-soft);
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--t1);
}
.brand-mark { width: 22px; height: 22px; display: grid; place-items: center; color: var(--ok); }
.brand-mark svg { width: 100%; height: 100%; }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links > a { font-size: 13.5px; color: var(--t2); transition: color 0.2s ease; }
.nav-links > a:hover, .nav-links > a.active { color: var(--t1); }

.nav-item { position: relative; }
.nav-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: 13.5px; color: var(--t2);
  padding: 0; transition: color 0.2s ease;
}
.nav-item:hover .nav-trigger, .nav-trigger.active { color: var(--t1); }
.nav-trigger .caret { width: 9px; height: 9px; opacity: 0.55; transition: transform 0.2s ease; }
.nav-item:hover .nav-trigger .caret { transform: rotate(180deg); }
.nav-item::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 16px; }
.dropdown {
  position: absolute; top: calc(100% + 14px); left: 0; min-width: 244px;
  background: rgba(8, 8, 11, 0.94);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 14px; padding: 8px;
  display: grid; gap: 1px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown.wide { min-width: 300px; }
.dropdown a { display: grid; gap: 3px; padding: 9px 11px; border-radius: 9px; transition: background 0.15s ease; }
.dropdown a:hover { background: var(--panel-hover); }
.d-title { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--t1); }
.d-desc { font-size: 11.5px; color: var(--t2); line-height: 1.4; }
.d-head {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--t2); opacity: 0.5; padding: 9px 11px 4px;
}
.d-head:first-child { padding-top: 4px; }

.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-ghost { font-size: 13.5px; color: var(--t2); transition: color 0.2s ease; }
.nav-ghost:hover { color: var(--t1); }
.nav-gh {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--t2);
  border: 1px solid var(--line); border-radius: 100px; padding: 6px 12px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav-gh:hover { color: var(--t1); border-color: rgba(255, 255, 255, 0.25); }
.nav-gh svg { width: 14px; height: 14px; }
.nav-gh .stars { font-family: var(--mono); font-size: 11.5px; color: var(--t1); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; font-size: 13px;
  color: var(--t1); border: 1px solid var(--line); border-radius: 100px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav-cta:hover { border-color: rgba(255,255,255,0.35); background: var(--panel); }

/* ===================== PAGE HEADER ===================== */
.page-header {
  max-width: var(--maxw); margin: 0 auto; padding: 88px 48px 56px; text-align: center;
}
.page-header.left { text-align: left; }
.page-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--t3); margin-bottom: 22px;
}
.page-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.page-title {
  font-family: var(--display); font-size: clamp(38px, 6vw, 70px); font-weight: 400;
  line-height: 1.03; letter-spacing: -0.015em; color: #fff; margin-bottom: 20px;
}
.page-title .thin { color: var(--t3); }
.page-lead {
  font-size: 16.5px; font-weight: 300; color: var(--t2); max-width: 56ch;
  margin: 0 auto; line-height: 1.7;
}
.page-header.left .page-lead { margin: 0; }
.header-actions { display: flex; gap: 14px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.page-header.left .header-actions { justify-content: flex-start; }

/* ===================== SECTIONS ===================== */
.section { max-width: var(--maxw); margin: 0 auto; padding: 28px 48px; }
.section.pad-b { padding-bottom: 110px; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--t3); margin-bottom: 16px;
}
.section-title {
  font-family: var(--display); font-size: clamp(28px, 4vw, 42px); font-weight: 400;
  line-height: 1.08; letter-spacing: -0.01em; color: #fff; margin-bottom: 16px;
}
.section-lead { font-size: 15px; font-weight: 300; color: var(--t2); line-height: 1.7; }

/* feature grid */
.grid { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 20px; overflow: hidden; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cell {
  background: var(--bg); padding: 32px 30px; display: flex; flex-direction: column; gap: 12px;
  transition: background 0.25s ease;
}
.cell:hover { background: rgba(255,255,255,0.015); }
.cell-ico {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line); color: var(--ok); margin-bottom: 6px;
}
.cell-ico svg { width: 19px; height: 19px; }
.cell h3 { font-size: 16px; font-weight: 500; color: var(--t1); letter-spacing: -0.005em; }
.cell p { font-size: 13.5px; font-weight: 300; color: var(--t2); line-height: 1.6; }
.cell .kicker { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t3); }

/* split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.r .split-text { order: 2; }
.split-visual {
  border: 1px solid var(--line-soft); border-radius: 18px; background: var(--panel);
  min-height: 280px; padding: 26px; overflow: hidden;
}

/* bullet list */
.checks { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 26px; }
.checks li { display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; font-weight: 300; color: var(--t2); line-height: 1.55; }
.checks li b { color: var(--t1); font-weight: 500; }
.checks .check { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; color: var(--ok); }

/* stat row */
.stat-row { display: flex; flex-wrap: wrap; gap: 56px; }
.stat .v { font-family: var(--display); font-size: 44px; line-height: 1; color: #fff; letter-spacing: -0.02em; }
.stat .l { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t3); margin-top: 10px; }

/* integration / logo grid */
.logo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 20px; overflow: hidden; }
.logo-cell {
  background: var(--bg); padding: 26px 22px; display: flex; align-items: center; gap: 13px;
  transition: background 0.2s ease;
}
.logo-cell:hover { background: rgba(255,255,255,0.02); }
.logo-cell .mk { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--t1); font-family: var(--mono); font-size: 13px; flex-shrink: 0; }
.logo-cell .nm { font-size: 13.5px; color: var(--t2); }
.logo-cell .cat { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--t4); }

/* code block */
.code {
  border: 1px solid var(--line-soft); border-radius: 14px; background: #08080b; overflow: hidden;
}
.code-bar { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); }
.code-bar .fn { font-family: var(--mono); font-size: 11.5px; color: var(--t3); }
.code-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; }
.code code { font-family: var(--mono); font-size: 12.5px; line-height: 1.75; color: var(--t2); white-space: pre; }
.code .k { color: #c792ea; }
.code .s { color: var(--ok); }
.code .c { color: var(--t4); }
.code .p { color: #82aaff; }

/* endpoint list (API) */
.endpoints { border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; }
.endpoint { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--line-soft); transition: background 0.2s ease; }
.endpoint:first-child { border-top: 0; }
.endpoint:hover { background: rgba(255,255,255,0.015); }
.method { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.06em; padding: 4px 9px; border-radius: 6px; flex-shrink: 0; width: 56px; text-align: center; }
.method.get { color: var(--ok); border: 1px solid rgba(100,255,160,0.3); }
.method.post { color: #82aaff; border: 1px solid rgba(130,170,255,0.3); }
.method.del { color: var(--bad); border: 1px solid rgba(255,107,107,0.3); }
.endpoint .path { font-family: var(--mono); font-size: 13px; color: var(--t1); }
.endpoint .ep-desc { font-size: 13px; color: var(--t3); margin-left: auto; font-weight: 300; }

/* changelog timeline */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.release { position: relative; padding-bottom: 52px; }
.release::before { content: ""; position: absolute; left: -29px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ok); }
.release .ver { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.release .tag { font-family: var(--mono); font-size: 13px; color: var(--ok); }
.release .date { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t4); }
.release h3 { font-family: var(--display); font-size: 24px; font-weight: 400; color: #fff; margin-bottom: 14px; letter-spacing: -0.01em; }
.release ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.release li { display: flex; align-items: flex-start; gap: 11px; font-size: 14px; font-weight: 300; color: var(--t2); line-height: 1.6; }
.pill { flex-shrink: 0; font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 7px; border-radius: 100px; margin-top: 2px; }
.pill.new { color: var(--ok); border: 1px solid rgba(100,255,160,0.3); }
.pill.imp { color: #82aaff; border: 1px solid rgba(130,170,255,0.3); }
.pill.fix { color: var(--warn); border: 1px solid rgba(255,205,107,0.3); }

/* status */
.status-banner { display: flex; align-items: center; gap: 14px; border: 1px solid rgba(100,255,160,0.25); background: rgba(100,255,160,0.04); border-radius: 14px; padding: 20px 24px; margin-bottom: 36px; }
.status-banner .big-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 12px var(--ok); animation: statusPulse 2.4s ease-in-out infinite; }
.status-banner .msg { font-size: 16px; color: var(--t1); }
.status-list { border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; }
.status-row { display: flex; align-items: center; gap: 14px; padding: 17px 22px; border-top: 1px solid var(--line-soft); }
.status-row:first-child { border-top: 0; }
.status-row .nm { font-size: 14.5px; color: var(--t1); }
.status-row .state { margin-left: auto; display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--t2); }
.status-row .sdot { width: 9px; height: 9px; border-radius: 50%; }
.sdot.up { background: var(--ok); }
.sdot.deg { background: var(--warn); }
.status-row .uptime { font-family: var(--mono); font-size: 12px; color: var(--t3); margin-left: 16px; }

/* CTA band */
.cta-band { max-width: var(--maxw); margin: 40px auto 0; padding: 0 48px 110px; }
.cta-inner {
  border: 1px solid var(--line-soft); border-radius: 24px; padding: 64px 48px; text-align: center;
  background: radial-gradient(120% 140% at 50% 0%, rgba(100,255,160,0.06), transparent 60%);
}
.cta-inner h2 { font-family: var(--display); font-size: clamp(30px, 4.5vw, 48px); font-weight: 400; color: #fff; letter-spacing: -0.01em; margin-bottom: 16px; }
.cta-inner p { font-size: 15.5px; font-weight: 300; color: var(--t2); max-width: 46ch; margin: 0 auto 30px; line-height: 1.7; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* buttons */
.btn-primary {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; color: #000; font-size: 13.5px; font-weight: 500; border-radius: 100px;
  border: 1px solid #fff; white-space: nowrap; overflow: hidden; isolation: isolate; transition: color 0.2s ease;
}
.btn-primary::before { content: ""; position: absolute; inset: 0; background: #fff; border-radius: inherit; transform: scaleX(1); transform-origin: left center; transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); z-index: -1; }
.btn-primary:hover::before { transform: scaleX(0); transform-origin: right center; }
.btn-primary:hover { color: #fff; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 26px;
  color: var(--t2); font-size: 13.5px; font-weight: 400; border-radius: 100px; border: 1px solid var(--line);
  white-space: nowrap; transition: border-color 0.25s ease, color 0.25s ease;
}
.btn-outline:hover { border-color: rgba(255,255,255,0.4); color: var(--t1); }

/* ===================== FOOTER ===================== */
footer.site { background: var(--bg); border-top: 1px solid var(--line-soft); padding: 40px 48px; }
.foot-inner { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-inner .brand { font-size: 12px; }
.foot-note { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--t4); }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a { font-size: 13px; color: var(--t3); transition: color 0.2s ease; }
.foot-links a:hover { color: var(--t1); }

/* ===================== ENTRANCE ===================== */
.anim { opacity: 0; transform: translateY(10px); transition: opacity 0.8s cubic-bezier(0.25,0.1,0.25,1), transform 0.8s cubic-bezier(0.25,0.1,0.25,1); }
.anim.in { opacity: 1; transform: none; }
.anim-d1 { transition-delay: 0.08s; }
.anim-d2 { transition-delay: 0.18s; }
.anim-d3 { transition-delay: 0.30s; }

@keyframes statusPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .anim { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 920px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.r .split-text { order: 0; }
  .grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .logo-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .nav { padding: 18px 22px; }
  .nav-links { display: none; }
  .nav-right .nav-gh, .nav-right .nav-ghost { display: none; }
  .page-header { padding: 56px 22px 44px; }
  .section { padding: 24px 22px; }
  .section.pad-b { padding-bottom: 72px; }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .logo-grid { grid-template-columns: 1fr 1fr; }
  .endpoint .ep-desc { display: none; }
  .cta-band { padding: 0 22px 72px; }
  .cta-inner { padding: 44px 26px; }
  footer.site { padding: 30px 22px; }
  .stat-row { gap: 36px; }
}

/* ===================== THEME TOGGLE ===================== */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 100px; color: var(--t2);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.theme-toggle:hover { color: var(--t1); border-color: rgba(127,127,127,0.4); background: var(--panel); }
.theme-toggle svg { width: 15px; height: 15px; }
.theme-toggle .i-moon { display: none; }
.theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }

/* ===================== LIGHT THEME ===================== */
:root[data-theme="light"] {
  --bg: #f6f6f4;
  --t1: rgba(18, 18, 22, 0.92);
  --t2: rgba(18, 18, 22, 0.60);
  --t3: rgba(18, 18, 22, 0.42);
  --t4: rgba(18, 18, 22, 0.26);
  --line: rgba(0, 0, 0, 0.12);
  --line-soft: rgba(0, 0, 0, 0.08);
  --panel: rgba(0, 0, 0, 0.025);
  --panel-hover: rgba(0, 0, 0, 0.05);
  --ok: #0c9a57;
  --warn: #b07400;
  --bad: #d23b3b;
}
/* hardcoded-color fixups */
:root[data-theme="light"] :is(.page-title, .section-title, .cell h3, .cta-inner h2, .release h3, .stat .v) { color: #101114; }
:root[data-theme="light"] .btn-primary { color: #fff; border-color: #101114; }
:root[data-theme="light"] .btn-primary::before { background: #101114; }
:root[data-theme="light"] .btn-primary:hover { color: #101114; }
:root[data-theme="light"] .dropdown { background: rgba(255,255,255,0.97); box-shadow: 0 24px 60px rgba(0,0,0,0.14); }
:root[data-theme="light"] ::selection { background: rgba(0,0,0,0.12); }
:root[data-theme="light"] .status-banner .msg { color: #101114; }
/* keep code blocks as dark cards in light mode (incl. transparent inline ones) */
:root[data-theme="light"] .code { background: #0e0f12 !important; border-color: rgba(255,255,255,0.08); }
:root[data-theme="light"] .code-bar { border-bottom-color: rgba(255,255,255,0.08); }
:root[data-theme="light"] .code code { color: rgba(255,255,255,0.72); }
:root[data-theme="light"] .code .fn { color: rgba(255,255,255,0.42); }
:root[data-theme="light"] .code .s { color: #64ffa0; }
:root[data-theme="light"] .code .c { color: rgba(255,255,255,0.32); }
