/* ================================================
   GLANCE — Landing Page

   Typography: Space Grotesk (body) + Instrument Serif (display italic)
   Palette: near-black bg, warm off-white text, single teal accent
   ================================================ */

:root {
  --bg: #0a0a0b;
  --surface: #111113;
  --line: rgba(255,255,255,0.06);
  --line2: rgba(255,255,255,0.10);
  --text: #e8e6e3;
  --text2: #8a8784;
  --text3: #4a4845;
  --accent: #5eead4;
  --accent-dim: rgba(94,234,212,0.08);
  --accent-mid: rgba(94,234,212,0.15);
  --red: #ef6461;
  --red-dim: rgba(239,100,97,0.08);
  --mono: 'Space Mono', monospace;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
}
html::-webkit-scrollbar { display: none; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- Selection ---- */
::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ---- Links ---- */
a { color: inherit; text-decoration: none; }

/* ---- Layout ---- */
section {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---- Nav ---- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  height: 52px;
  background: rgba(10,10,11,0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nav-right {
  display: flex; align-items: center; gap: 28px;
}
.nav-right a {
  font-size: 13px;
  color: var(--text2);
  transition: color 0.2s;
}
.nav-right a:hover { color: var(--text); }
.nav-gh { display: flex; }

/* ================================================
   HERO
   ================================================ */
.hero {
  padding: 160px 32px 40px;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 40px;
}
.hero h1 {
  font-size: clamp(38px, 5.5vw, 56px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--text);
}
.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.hero-h1-alt {
  margin-top: 4px;
  margin-bottom: 40px;
  color: var(--text2) !important;
}
.hero-p {
  max-width: 520px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text2);
}

/* ================================================
   NUMBERS
   ================================================ */
.numbers {
  display: flex;
  gap: 0;
  padding: 80px 32px;
  border-top: 1px solid var(--line);
}
.number-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.number-item + .number-item {
  border-left: 1px solid var(--line);
  padding-left: 40px;
}
.n-val {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}
.n-unit {
  font-size: 18px;
  font-weight: 400;
  color: var(--text2);
}
.n-context {
  font-size: 13px;
  color: var(--text3);
  line-height: 1.5;
  max-width: 280px;
}
.count {
  display: inline-block;
}

/* ================================================
   CODE
   ================================================ */
.code-section {
  padding: 80px 32px;
}
.code-window {
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 12px;
  overflow: hidden;
}
.code-chrome {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.015);
}
.dots {
  display: flex; gap: 6px;
}
.dots i {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: block;
}
.code-tabs {
  display: flex; gap: 0;
  margin-left: 8px;
}
.ct {
  background: none; border: none; cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
  padding: 4px 12px;
  border-radius: 4px;
  transition: all 0.15s;
}
.ct.active {
  color: var(--text2);
  background: rgba(255,255,255,0.05);
}
.ct:hover:not(.active) { color: var(--text2); }
.code-body {
  padding: 24px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.code-body::-webkit-scrollbar { display: none; }
.code-body.hidden { display: none; }
.code-body code {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.75;
}

/* Syntax */
.k { color: #c4b5fd; }     /* keywords — soft lavender */
.s { color: #86efac; }     /* strings — soft green */
.f { color: var(--accent); } /* functions — teal */
.c { color: var(--text3); }  /* comments */
.o { color: var(--text2); }  /* operators */

.ow-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
  margin-left: auto;
}

/* ================================================
   WHY
   ================================================ */
.why {
  padding: 100px 32px;
}
.why-header {
  margin-bottom: 48px;
}
.why-header h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.why-header p {
  max-width: 560px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text2);
}
.why-header em {
  font-family: var(--serif);
  font-style: italic;
}
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}
.why-card {
  padding: 28px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.accent-card {
  border-color: rgba(94,234,212,0.12);
  background: linear-gradient(135deg, rgba(94,234,212,0.03), transparent);
}
.why-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.bad-label { color: var(--text3); }
.good-label { color: var(--accent); }
.why-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.ws {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}
.ws-n {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  border-radius: 5px;
  background: rgba(255,255,255,0.05);
  color: var(--text3);
  flex-shrink: 0;
}
.ws-n.gn {
  background: var(--accent-dim);
  color: var(--accent);
}
.why-bottom {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12px;
}
.bad-bottom {
  background: var(--red-dim);
  color: var(--red);
}
.good-bottom {
  background: var(--accent-dim);
  color: var(--accent);
}

.latency-note {
  padding: 20px 24px;
  border-left: 2px solid var(--accent);
  background: var(--accent-dim);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text2);
}
.latency-note strong {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ================================================
   OUTPUT
   ================================================ */
.output {
  padding: 100px 32px;
  border-top: 1px solid var(--line);
}
.output h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.output-sub {
  color: var(--text2);
  font-size: 15px;
  margin-bottom: 36px;
}
.output-window {
  background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}
.output-body {
  padding: 24px;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.output-body::-webkit-scrollbar { display: none; }
.output-body code {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.8;
}
.oh { color: var(--accent); font-weight: 600; }
.os { color: #c4b5fd; font-weight: 600; }
.oe { color: var(--text2); }

.output-note {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text2);
}
.output-note code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 7px;
  border-radius: 4px;
}

/* ================================================
   FALLBACK
   ================================================ */
.fallback {
  padding: 100px 32px;
  border-top: 1px solid var(--line);
}
.fallback h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.fallback-sub {
  color: var(--text2);
  font-size: 15px;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 36px;
}
.small-window { margin-bottom: 40px; }

/* Speed comparison table */
.speed-table {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.st-header, .st-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
}
.st-header {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--line);
}
.st-header span {
  padding: 14px 20px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
}
.st-row {
  border-bottom: 1px solid var(--line);
}
.st-row:last-child { border-bottom: none; }
.st-row span {
  padding: 14px 20px;
  font-size: 13px;
  color: var(--text2);
}
.st-row span:first-child {
  color: var(--text3);
  font-size: 12px;
}
.good-val {
  color: var(--accent) !important;
  font-family: var(--mono);
  font-size: 12px !important;
}
.bad-val {
  color: var(--red) !important;
  font-family: var(--mono);
  font-size: 12px !important;
  opacity: 0.7;
}

/* ================================================
   INSTALL
   ================================================ */
.install {
  padding: 100px 32px;
  border-top: 1px solid var(--line);
}
.install h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.install-sub {
  color: var(--text2);
  font-size: 15px;
  margin-bottom: 36px;
}
.install-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.install-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.il {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 12px;
}
.install-card pre {
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.install-card pre::-webkit-scrollbar { display: none; }
.install-card code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  line-height: 1.5;
}

/* ================================================
   API
   ================================================ */
.api {
  padding: 100px 32px;
  border-top: 1px solid var(--line);
}
.api h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 48px;
}
.api-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.api-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 24px;
  align-items: start;
}
.api-item:first-child { border-top: 1px solid var(--line); }
.api-name {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}
.api-item p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text2);
}
.api-ret {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
  white-space: nowrap;
}

/* ================================================
   COMPAT
   ================================================ */
.compat {
  padding: 100px 32px;
  border-top: 1px solid var(--line);
}
.compat h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.compat-sub {
  color: var(--text2);
  font-size: 15px;
  margin-bottom: 40px;
}
.compat-cols {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr;
  gap: 32px;
}
.compat-col h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text2);
}
.compat-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.green-dot { background: var(--accent); }
.yellow-dot { background: #fbbf24; }
.red-dot { background: var(--red); opacity: 0.6; }
.compat-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.compat-col li {
  font-size: 13px;
  color: var(--text3);
  line-height: 1.4;
}

/* ================================================
   INTEGRATE
   ================================================ */
.integrate {
  padding: 100px 32px;
  border-top: 1px solid var(--line);
}
.integrate h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.integrate-sub {
  color: var(--text2);
  font-size: 15px;
  margin-bottom: 40px;
}
.integrate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ig-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.ig-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}
.ig-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text2);
}
.ig-card code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ================================================
   CTA
   ================================================ */
.cta {
  padding: 120px 32px 80px;
}
.cta-inner {
  text-align: center;
}
.cta-inner h2 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.cta-inner p {
  font-size: 14px;
  color: var(--text3);
  margin-bottom: 40px;
}
.cta-links {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.cta-btn {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.cta-btn.primary {
  background: var(--text);
  color: var(--bg);
}
.cta-btn.primary:hover {
  opacity: 0.85;
}
.cta-btn.secondary {
  border: 1px solid var(--line2);
  color: var(--text2);
}
.cta-btn.secondary:hover {
  border-color: var(--text3);
  color: var(--text);
}

/* ================================================
   FOOTER
   ================================================ */
footer {
  display: flex;
  justify-content: space-between;
  padding: 24px 40px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text3);
}
footer span:first-child {
  font-family: var(--mono);
  font-weight: 700;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
  section { padding-left: 20px; padding-right: 20px; }
  .numbers { flex-direction: column; gap: 32px; }
  .number-item + .number-item { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 32px; }
  .why-grid, .install-grid, .integrate-grid, .compat-cols { grid-template-columns: 1fr; }
  .api-item { grid-template-columns: 1fr; gap: 8px; }
  .st-header, .st-row { grid-template-columns: 1fr; }
  .st-header span:first-child { display: none; }
}

/* ================================================
   REVEAL ANIMATION (subtle)
   ================================================ */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ================================================
   AGENT PROMPT BAR
   ================================================ */
.agent-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(94,234,212,0.12);
}
.agent-icon {
  font-size: 13px;
  color: var(--accent);
  flex-shrink: 0;
}
.agent-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
}
.agent-copy {
  margin-left: auto;
  display: flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--accent-mid);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 12px; font-weight: 600;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.agent-copy:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}
.agent-copy.copied .copy-label { }


/* ================================================
   CONTRIBUTE
   ================================================ */
.contribute {
  padding: 100px 32px;
  border-top: 1px solid var(--line);
}
.contribute h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}
.contrib-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.contrib-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.3s, transform 0.3s;
}
.contrib-card:hover {
  border-color: var(--line2);
  transform: translateY(-2px);
}
.contrib-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}
.contrib-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text2);
}

@media (max-width: 768px) {
  .contrib-grid { grid-template-columns: 1fr; }
  .agent-card { max-width: 100%; }
}

/* ================================================
   HONEST NOTE
   ================================================ */
.honest {
  padding: 0 32px;
  margin-top: -20px;
  margin-bottom: 40px;
}
.honest-card {
  padding: 28px 32px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.honest-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}
.honest-card p {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text2);
  max-width: 600px;
}
.honest-card p + p { margin-top: 10px; }
.honest-card strong { color: var(--text); }
.honest-card em {
  font-family: var(--serif);
  font-style: italic;
}

/* ================================================
   WORKS BEST (replaces compat)
   ================================================ */
.works-best {
  padding: 100px 32px;
  border-top: 1px solid var(--line);
}
.works-best h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.works-sub {
  color: var(--text2);
  font-size: 15px;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 40px;
}
.works-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.works-card {
  padding: 28px 32px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.works-card.best {
  border-color: rgba(94,234,212,0.15);
  background: linear-gradient(135deg, rgba(94,234,212,0.02), transparent);
}
.works-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.works-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
}
.best-badge { background: var(--accent-dim); color: var(--accent); }
.mostly-badge { background: rgba(251,191,36,0.08); color: #fbbf24; }
.fallback-badge { background: var(--red-dim); color: var(--red); opacity: 0.8; }
.works-pct {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
}
.works-desc {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text2);
  margin-bottom: 16px;
  max-width: 600px;
}
.works-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.works-card li {
  font-size: 13px;
  color: var(--text3);
  line-height: 1.5;
}
.works-card li strong {
  color: var(--text2);
}

/* ---- Footer link ---- */
.footer-link {
  color: var(--text2);
  transition: color 0.2s;
}
.footer-link:hover { color: var(--accent); }

/* ---- X link in nav ---- */
.nav-x { display: flex; }

/* ================================================
   ANIMATIONS
   ================================================ */

/* Staggered hero entrance */
.hero-eyebrow,
.hero h1,
.hero-h1-alt,
.hero-p {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.7s ease forwards;
}
.hero-eyebrow  { animation-delay: 0.1s; }
.hero h1       { animation-delay: 0.25s; }
.hero-h1-alt   { animation-delay: 0.4s; }
.hero-p        { animation-delay: 0.55s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

/* Number items entrance */
.number-item {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.5s ease forwards;
}
.number-item:nth-child(1) { animation-delay: 0.7s; }
.number-item:nth-child(2) { animation-delay: 0.85s; }
.number-item:nth-child(3) { animation-delay: 1.0s; }

/* Subtle pulse on hover for cards */
.why-card, .works-card, .ig-card, .install-card {
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.why-card:hover, .works-card:hover, .ig-card:hover {
  border-color: var(--line2);
  transform: translateY(-2px);
}

/* Code window lift */
.code-window {
  transition: box-shadow 0.4s ease, transform 0.3s ease;
}
.code-window:hover {
  box-shadow: 0 16px 64px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

/* Counter flash on complete */
@keyframes flash {
  0% { color: var(--text); }
  50% { color: var(--accent); }
  100% { color: var(--text); }
}
.count.done {
  animation: flash 0.6s ease;
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
  .works-grid { gap: 12px; }
  .honest-card { padding: 20px; }
}
