/* iComps Data API — developer portal. Brand-matched to icomps.io:
   warm cream canvas, navy ink, deep-blue brand, orange accent,
   Plus Jakarta Sans + Nunito display. */

:root {
  /* iComps palette */
  --cream: #F4EDE2;
  --cream-light: #FBF8F4;
  --cream-deep: #EBE2D3;
  --card-bg: #FEFCF9;
  --warm-border: #DFD6C5;
  --warm-border-strong: #C2B89E;
  --navy: #0A1628;
  --navy-light: #3E4E62;
  --navy-muted: #8490A0;
  --brand: #1B4785;
  --brand-hover: #2A5FAA;
  --accent: #E07320;
  --accent-hover: #F08C38;
  --green: #16A34A;
  --code-bg: #0C1A2C;
  --code-ink: #E7EEF6;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Nunito', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --text-sm: 0.9rem;
  --text-base: clamp(1rem, 0.95rem + 0.2vw, 1.1rem);
  --text-lg: 1.3rem;
  --text-xl: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem);
  --text-hero: clamp(2.6rem, 1.3rem + 5.2vw, 5.4rem);

  --space-section: clamp(4rem, 3rem + 5vw, 8rem);
  --radius: 16px;
  --radius-sm: 10px;
  --duration: 240ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 1px 2px rgba(10, 22, 40, 0.04), 0 10px 30px rgba(10, 22, 40, 0.07);
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--navy);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1140px, 92vw); margin-inline: auto; }

/* ── Nav ─────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(244, 237, 226, 0.82);
  border-bottom: 1px solid var(--warm-border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.brand { display: flex; align-items: baseline; gap: 0.5rem; font-family: var(--font-display); font-weight: 900; letter-spacing: -0.02em; color: var(--navy); font-size: 1.2rem; }
.brand__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; }
.brand__tag { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--navy-muted); font-weight: 600; }
.nav__links { display: flex; gap: 1.6rem; align-items: center; font-size: var(--text-sm); font-weight: 600; }
.nav__links a { color: var(--navy-light); text-decoration: none; transition: color var(--duration) var(--ease); }
.nav__links a:hover { color: var(--navy); }
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.65rem 1.2rem; border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: 700; text-decoration: none;
  background: var(--brand); color: #fff;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease), background var(--duration) var(--ease);
}
.btn:hover { transform: translateY(-1px); background: var(--brand-hover); box-shadow: 0 8px 20px rgba(27, 71, 133, 0.28); }
.btn--accent { background: var(--accent); }
.btn--accent:hover { background: var(--accent-hover); box-shadow: 0 8px 20px rgba(224, 115, 32, 0.3); }
.btn--ghost { background: transparent; color: var(--navy); border: 1px solid var(--warm-border-strong); }
.btn--ghost:hover { border-color: var(--brand); background: var(--cream-light); box-shadow: none; }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero { padding: clamp(3.5rem, 8vw, 7rem) 0 var(--space-section); }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: var(--text-sm); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--brand); background: rgba(27, 71, 133, 0.08);
  padding: 0.4rem 0.9rem; border-radius: 100px; margin-bottom: 1.6rem;
}
.hero h1 {
  font-family: var(--font-display); font-size: var(--text-hero); line-height: 0.98;
  letter-spacing: -0.035em; font-weight: 900; max-width: 15ch; color: var(--navy);
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero__lede { margin-top: 1.6rem; max-width: 56ch; font-size: var(--text-lg); color: var(--navy-light); }
.hero__cta { margin-top: 2.4rem; display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ── Sections ────────────────────────────────────────────────────── */
section { padding-block: var(--space-section); border-top: 1px solid var(--warm-border); }
.eyebrow { font-size: var(--text-sm); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.section__head { max-width: 62ch; margin-bottom: 3rem; }
.section__head h2 { font-family: var(--font-display); font-size: var(--text-xl); letter-spacing: -0.025em; margin-top: 0.8rem; font-weight: 900; color: var(--navy); }
.section__head p { margin-top: 1rem; color: var(--navy-light); }

/* ── Product / endpoint bento ────────────────────────────────────── */
.endpoints { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.ep {
  grid-column: span 3; background: var(--card-bg); border: 1px solid var(--warm-border);
  border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow);
  transition: transform var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.ep:hover { transform: translateY(-3px); border-color: var(--brand); }
.ep--wide { grid-column: span 6; }
.ep__method {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
  padding: 0.2rem 0.55rem; border-radius: 6px; letter-spacing: 0.02em;
  background: rgba(27, 71, 133, 0.1); color: var(--brand);
}
.ep__method--post { background: rgba(224, 115, 32, 0.12); color: var(--accent); }
.ep__path { font-family: var(--font-mono); font-size: var(--text-sm); margin-top: 0.9rem; color: var(--navy); word-break: break-all; }
.ep__desc { font-size: var(--text-sm); color: var(--navy-light); margin-top: 0.5rem; }
.ep__tag { font-size: 0.78rem; color: var(--navy-muted); margin-top: 0.9rem; display: inline-block; font-weight: 600; }
@media (max-width: 820px) { .ep, .ep--wide { grid-column: span 6; } }

/* ── Quickstart ──────────────────────────────────────────────────── */
.quickstart { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3rem; align-items: start; }
@media (max-width: 820px) { .quickstart { grid-template-columns: 1fr; gap: 2rem; } }
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li { position: relative; padding-left: 2.6rem; padding-bottom: 1.8rem; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 800;
  background: var(--brand); color: #fff;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 0.88rem; top: 1.9rem; bottom: 0; width: 1.5px; background: var(--warm-border);
}
.steps strong { display: block; margin-bottom: 0.2rem; color: var(--navy); }
.steps span { color: var(--navy-light); font-size: var(--text-sm); }

.tabs { background: var(--code-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tabs__bar { display: flex; gap: 0.2rem; padding: 0.6rem 0.6rem 0; background: #081320; }
.tabs__btn {
  font-family: var(--font-sans); font-size: 0.8rem; font-weight: 700;
  color: #7E9CB8; background: transparent; border: 0; cursor: pointer;
  padding: 0.5rem 0.9rem; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
}
.tabs__btn[aria-selected="true"] { color: var(--code-ink); background: var(--code-bg); }
.tabs__panel { display: none; padding: 1.4rem 1.5rem; }
.tabs__panel[data-active] { display: block; }
pre { margin: 0; overflow-x: auto; }
code { font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.7; color: var(--code-ink); }
/* Inline code in prose sits on the light page, not in a dark block — give it
   contrast (the default code ink is near-white, tuned for the .tabs blocks). */
p code, li code, .note code, .steps code { color: var(--brand); background: rgba(224, 115, 32, 0.09); padding: 0.06em 0.36em; border-radius: 5px; font-size: 0.86em; }
.tok-key { color: #F08C38; }
.tok-str { color: #6FCF97; }
.tok-com { color: #5E7388; font-style: italic; }

/* ── Capability + pricing tables ─────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--warm-border); border-radius: var(--radius); background: var(--card-bg); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
th, td { text-align: left; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--warm-border); }
thead th { font-weight: 800; color: var(--navy); background: var(--cream-deep); white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
td code { color: var(--brand); font-size: 0.82rem; }
.check { color: var(--green); font-weight: 800; }
.dash { color: var(--navy-muted); }

/* ── Pricing cards ───────────────────────────────────────────────── */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 820px) { .pricing { grid-template-columns: 1fr; } }
.plan {
  background: var(--card-bg); border: 1px solid var(--warm-border); border-radius: var(--radius);
  padding: 1.8rem; display: flex; flex-direction: column; gap: 0.4rem;
}
.plan--featured { border-color: var(--brand); box-shadow: 0 12px 36px rgba(27, 71, 133, 0.14); position: relative; }
.plan__badge { position: absolute; top: -0.7rem; left: 1.8rem; background: var(--accent); color: #fff; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.25rem 0.7rem; border-radius: 100px; }
.plan__name { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; color: var(--navy); }
.plan__price { font-family: var(--font-display); font-weight: 900; font-size: 2.2rem; color: var(--navy); letter-spacing: -0.02em; }
.plan__price span { font-family: var(--font-sans); font-size: 0.9rem; font-weight: 600; color: var(--navy-muted); }
.plan__list { list-style: none; padding: 0; margin-top: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.plan__list li { display: flex; gap: 0.5rem; font-size: var(--text-sm); color: var(--navy-light); }
.plan__list li::before { content: "✓"; color: var(--green); font-weight: 800; }
.plan .btn { margin-top: 1.4rem; justify-content: center; }
.note { margin-top: 1rem; font-size: 0.82rem; color: var(--navy-muted); }

/* ── Footer ──────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--warm-border); padding-block: 3rem; color: var(--navy-muted); font-size: var(--text-sm); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
footer a { color: var(--navy-light); text-decoration: none; font-weight: 600; }
footer a:hover { color: var(--navy); }
