/* Cairn AI - sanity design system, adapted for production AI engineering.
   Dark canvas is the primary identity, not a mode. Colour deviations from
   the source system are deliberate and recorded in README.md: the system's
   #0052ef reads at 3.24:1 as text on #0b0b0b and fails WCAG AA, so it is
   used only as a hover BACKGROUND under white text, and #55beff carries
   every interactive text colour instead. */

:root {
  --canvas: #0b0b0b;
  --surface: #212121;
  --surface-2: #171717;
  --border: #353535;
  --border-soft: #262626;
  --text: #ffffff;
  --text-2: #b9b9b9;
  --text-3: #a0a0a0;
  --cta: #f36458;
  --cta-ink: #0b0b0b;
  --link: #55beff;
  --active-bg: #0052ef;
  --active-ink: #ffffff;
  --font-sans: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, ui-sans-serif, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: 32px;
  --radius: 6px;
  --radius-lg: 12px;
  --pill: 99999px;
}

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

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

body {
  margin: 0;
  background-color: #0b0b0b;
  color: #b9b9b9;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

img { max-width: 100%; height: auto; display: block; }

a { color: #55beff; text-decoration: none; }
/* WCAG 1.4.1: the link blue and the body grey sit at almost the same
   luminance, so colour alone cannot distinguish an inline link. Prose links
   are underlined; navigation, chips and buttons are distinguished by shape. */
p a, dd a, li a, figcaption a, caption a, address a { text-decoration: underline; }
a:hover { color: #ffffff; text-decoration: underline; }
a:focus-visible { outline: 2px solid #55beff; outline-offset: 3px; }

h1, h2, h3 { color: #ffffff; font-weight: 500; margin: 0 0 16px; }
h1 { font-size: clamp(40px, 8vw, 78px); line-height: 1.02; letter-spacing: -0.045em; }
h2 { font-size: clamp(28px, 4.4vw, 46px); line-height: 1.08; letter-spacing: -0.035em; }
h3 { font-size: 21px; line-height: 1.25; letter-spacing: -0.02em; }
p { margin: 0 0 16px; }
ul, ol, dl { margin: 0 0 16px; }
strong { color: #ffffff; font-weight: 500; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  background-color: #f36458; color: #0b0b0b;
  padding: 12px 20px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }
.skip-link:hover { color: #0b0b0b; }

/* ---------- header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 40;
  background-color: #0b0b0b;
  border-bottom: 1px solid var(--border-soft);
}
.site-head__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #ffffff; }
.brand:hover { color: #ffffff; text-decoration: none; }
.brand__mark { display: block; }
.brand__name { font-size: 18px; letter-spacing: -0.03em; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav__links { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: #b9b9b9; font-size: 15px; }
.site-nav a:hover { color: #ffffff; }
.site-nav .btn-primary { color: #0b0b0b; }
.site-nav .btn-primary:hover { color: #ffffff; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 22px;
  border-radius: var(--pill); border: 1px solid transparent;
  font-family: inherit; font-size: 16px; line-height: 1.2; text-align: center;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background-color: #f36458; color: #0b0b0b; }
.btn-primary:hover { background-color: #0052ef; color: #ffffff; }
.btn-secondary { background-color: #0b0b0b; color: #ffffff; border-color: var(--border); }
.btn-secondary:hover { background-color: #0052ef; color: #ffffff; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }

/* ---------- hero ---------- */

.hero { padding: 72px 0 40px; }
.hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: #a0a0a0; margin-bottom: 20px;
}
.hero__sub { font-size: 20px; color: #b9b9b9; max-width: 60ch; margin-top: 20px; }
.hero-price {
  display: flex; flex-direction: column; gap: 4px;
  border-left: 3px solid #f36458; padding: 4px 0 4px 18px; margin: 28px 0;
}
.hero-price-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #a0a0a0; }
.hero-price-amt { color: #ffffff; font-size: 34px; letter-spacing: -0.03em; }
.hero-price-market { color: #b9b9b9; font-size: 15px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.byline { font-size: 14px; color: #a0a0a0; }
.hero__figure { margin: 0; }
.hero__figure img { border: 1px solid var(--border); border-radius: var(--radius-lg); }

/* ---------- at a glance ---------- */

.glance { padding: 24px 0 8px; }
.glance-title {
  font-family: var(--font-mono); font-size: 12px; font-weight: 400;
  letter-spacing: 0.16em; text-transform: uppercase; color: #a0a0a0; margin-bottom: 14px;
}
.glance-card {
  background-color: #212121; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
}
.entity-def { font-size: 19px; color: #ffffff; max-width: 90ch; }
.glance-list { list-style: none; padding: 0; margin: 24px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; }
.glance-list li { color: #b9b9b9; padding-left: 18px; position: relative; font-size: 16px; }
.glance-list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 2px; background-color: #f36458; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 20px; border-top: 1px solid var(--border); }
.topic-chips a {
  display: inline-block; padding: 7px 14px; border-radius: var(--pill);
  border: 1px solid var(--border); background-color: #0b0b0b;
  color: #b9b9b9; font-size: 14px;
}
.topic-chips a:hover { background-color: #0052ef; color: #ffffff; text-decoration: none; }

/* ---------- sections ---------- */

.section { padding: 72px 0; border-top: 1px solid var(--border-soft); scroll-margin-top: 76px; }
.section-label {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: #a0a0a0; margin-bottom: 14px;
}
.section-title { max-width: 22ch; }
.section-intro { font-size: 19px; color: #b9b9b9; max-width: 78ch; margin-bottom: 36px; }
.note {
  border-left: 2px solid var(--border); padding-left: 18px;
  color: #a0a0a0; font-size: 16px; max-width: 88ch; margin-top: 28px;
}

/* ---------- top-10 ranking ---------- */

.rank-list { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 8px; }
.rank-item {
  display: flex; align-items: baseline; gap: 14px;
  background-color: #212121; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 20px;
}
.rank-item a { color: #ffffff; font-size: 18px; letter-spacing: -0.02em; }
.rank-item a:hover { color: #55beff; }
.rank-pos {
  font-family: var(--font-mono); font-size: 13px; color: #a0a0a0;
  min-width: 26px; flex: none;
}
.rank-item--self { border-color: #f36458; }
.rank-tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: #f36458; margin-left: auto;
}
.rank-detail {
  border-top: 1px solid var(--border-soft); padding: 22px 0; scroll-margin-top: 76px;
}
.rank-detail h3 { font-size: 19px; }
.rank-detail p { color: #b9b9b9; max-width: 86ch; margin-bottom: 12px; }
.rank-detail--self { border-left: 3px solid #f36458; padding-left: 20px; }

/* ---------- grids and cards ---------- */

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card, .driver, .term {
  background-color: #212121; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; position: relative;
}
.card p, .driver p, .term p { color: #b9b9b9; font-size: 16px; }
.card ul { list-style: none; padding: 0; margin: 0 0 20px; }
.card li { color: #a0a0a0; font-size: 15px; padding-left: 16px; position: relative; }
.card li::before { content: ""; position: absolute; left: 0; top: 11px; width: 6px; height: 2px; background-color: #55beff; }
.card-accent { position: absolute; top: 0; left: 0; height: 3px; width: 64px; border-radius: var(--radius) 0 0 0; }
.card-accent--coral { background-color: #f36458; }
.card-accent--blue { background-color: #55beff; }
.card-price {
  font-family: var(--font-mono); font-size: 15px; color: #ffffff;
  padding-top: 14px; border-top: 1px solid var(--border);
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.split__col p { color: #b9b9b9; }

.chip-list { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; }
.chip-list li { color: #b9b9b9; padding: 12px 0; border-bottom: 1px solid var(--border-soft); font-size: 16px; }

.frame-list { list-style: none; padding: 0; display: grid; gap: 16px; }
.frame-list li { background-color: #212121; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.frame-list p { margin-bottom: 0; color: #b9b9b9; }

.guide-list { padding: 0; list-style: none; counter-reset: guide; display: grid; gap: 16px; }
.guide-list li {
  counter-increment: guide; background-color: #212121; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px 22px 68px; position: relative;
}
.guide-list li::before {
  content: counter(guide); position: absolute; left: 24px; top: 22px;
  font-family: var(--font-mono); font-size: 15px; color: #f36458;
}
.guide-list p { margin-bottom: 0; color: #b9b9b9; }

.plain-list { list-style: none; padding: 0; }
.plain-list li { color: #b9b9b9; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }

.stack-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 28px; }
.stack-col { background-color: #212121; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.stack-col p { color: #b9b9b9; margin-bottom: 0; font-size: 16px; }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; padding: 6px; margin: 0 -6px 8px; }
table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 15px; }
.sourcing-table { min-width: 940px; }
caption { text-align: left; padding-bottom: 14px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background-color: #212121; color: #ffffff; font-weight: 500; white-space: nowrap; }
tbody th { color: #ffffff; font-weight: 500; }
td { color: #b9b9b9; }
tbody tr:nth-child(even) { background-color: #171717; }
.figure-note { color: #a0a0a0; font-size: 14px; max-width: 92ch; }

/* ---------- figures and quotes ---------- */

.figure { margin: 0 0 28px; }
.figure img { border: 1px solid var(--border); border-radius: var(--radius); }
.figure figcaption { padding-top: 12px; }

.pullquote {
  margin: 36px 0 0; padding: 24px 28px;
  background-color: #171717; border-left: 3px solid #55beff; border-radius: 0 var(--radius) var(--radius) 0;
}
.pullquote blockquote { margin: 0; }
.pullquote p { color: #ffffff; font-size: 21px; letter-spacing: -0.02em; margin-bottom: 12px; }
.pullquote figcaption { color: #a0a0a0; font-size: 14px; }
.pullquote__source { color: #b9b9b9; }

/* ---------- cases, process, certs ---------- */

.case-card {
  background-color: #212121; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; margin-bottom: 24px;
}
.case-card img { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; }
.case-body { display: grid; grid-template-columns: 160px 1fr; gap: 10px 24px; margin: 0 0 20px; }
.case-body dt {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: #a0a0a0; padding-top: 4px;
}
.case-body dd { margin: 0; color: #b9b9b9; }
.case-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.case-tags li {
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
  color: #a0a0a0; border: 1px solid var(--border); border-radius: var(--pill); padding: 6px 12px;
}

.process-step { display: grid; grid-template-columns: 64px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--border-soft); }
.process-num {
  font-family: var(--font-mono); font-size: 15px; color: #f36458;
  border: 1px solid var(--border); border-radius: var(--pill);
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
}
.process-body p { color: #b9b9b9; max-width: 80ch; }
.step-meta { display: grid; grid-template-columns: 130px 1fr; gap: 6px 20px; margin: 0; }
.step-meta dt {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: #a0a0a0;
}
.step-meta dd { margin: 0; color: #b9b9b9; font-size: 15px; }

.cert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cert-card { background-color: #212121; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.cert-card img { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; }
.cert-card p { color: #b9b9b9; font-size: 15px; }
.cert-number {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em;
  text-transform: uppercase; color: #a0a0a0;
}

/* ---------- founder, research ---------- */

.founder { display: grid; grid-template-columns: 200px 1fr; gap: 36px; align-items: start; }
.founder__mark { border: 1px solid var(--border); border-radius: var(--radius); }
.founder__body p { color: #b9b9b9; max-width: 82ch; }
.founder__role { font-family: var(--font-mono); font-size: 14px; color: #a0a0a0; }
.anecdote {
  border-left: 3px solid #f36458; padding: 4px 0 4px 20px;
  color: #ffffff; font-size: 18px;
}

.research { background-color: #212121; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.research p { color: #b9b9b9; }
.findings { list-style: none; padding: 0; display: grid; gap: 12px; margin-bottom: 24px; }
.findings li { color: #b9b9b9; padding-left: 18px; position: relative; }
.findings li::before { content: ""; position: absolute; left: 0; top: 11px; width: 8px; height: 2px; background-color: #55beff; }

.stat-list { display: grid; grid-template-columns: 320px 1fr; gap: 14px 32px; }
.stat-list dt { color: #ffffff; font-size: 17px; }
.stat-list dd { margin: 0; color: #b9b9b9; font-size: 16px; }

/* ---------- reviews ---------- */

.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.review-card { background-color: #212121; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.stars { color: #f36458; font-size: 16px; letter-spacing: 2px; margin-bottom: 12px; }
.review-card__quote { color: #ffffff; font-size: 17px; }
.review-meta { color: #a0a0a0; font-size: 14px; margin-bottom: 0; }

.rating-cards { display: flex; flex-wrap: wrap; gap: 20px; margin: 28px 0 12px; }
.rating-card {
  background-color: #212121; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 28px; min-width: 200px;
}
.rating-score { font-size: 38px; color: #ffffff; letter-spacing: -0.04em; margin-bottom: 4px; }
.rating-stars { color: #f36458; letter-spacing: 2px; margin-bottom: 6px; }
.rating-platform { font-family: var(--font-mono); font-size: 13px; color: #a0a0a0; margin-bottom: 0; }

/* ---------- FAQ, glossary, policies ---------- */

details {
  border-bottom: 1px solid var(--border-soft); padding: 18px 0;
}
summary {
  color: #ffffff; font-size: 18px; cursor: pointer;
  letter-spacing: -0.02em; padding-right: 24px; min-height: 28px;
}
summary:hover { color: #55beff; }
summary:focus-visible { outline: 2px solid #55beff; outline-offset: 3px; }
details p { color: #b9b9b9; margin: 14px 0 0; max-width: 88ch; }

.glossary { display: grid; grid-template-columns: 260px 1fr; gap: 14px 32px; }
.glossary dt { color: #ffffff; }
.glossary dd { margin: 0; color: #b9b9b9; }

.policies { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }

/* ---------- contact ---------- */

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contact-block p { color: #b9b9b9; }
address { font-style: normal; color: #b9b9b9; margin-bottom: 16px; }
.legal-details { background-color: #212121; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.legal-details dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 16px; margin: 0; }
.legal-details dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #a0a0a0; padding-top: 3px; }
.legal-details dd { margin: 0; color: #b9b9b9; font-size: 15px; }

/* ---------- sticky CTA ---------- */

.sticky-cta {
  position: fixed; z-index: 50; right: 24px; bottom: 24px;
  display: flex; align-items: center; gap: 16px;
  background-color: #212121; border: 1px solid var(--border);
  border-radius: var(--pill); padding: 10px 12px 10px 24px;
}
.sticky-cta-text { color: #b9b9b9; font-size: 14px; }

/* ---------- footer ---------- */

.site-foot { border-top: 1px solid var(--border); padding: 48px 0 96px; }
.foot-lead { color: #ffffff; font-size: 19px; max-width: 76ch; letter-spacing: -0.02em; }
.foot-meta { color: #a0a0a0; font-size: 14px; margin-bottom: 8px; }

/* ---------- reveal ---------- */

.reveal { transition: opacity 420ms ease, transform 420ms ease; }
.is-hidden { opacity: 0; transform: translateY(14px); }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .card-grid, .review-grid, .contact-grid { grid-template-columns: 1fr 1fr; }
  .hero__grid { grid-template-columns: 1fr; }
  .founder { grid-template-columns: 140px 1fr; gap: 24px; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .section { padding: 48px 0; }
  .hero { padding: 40px 0 24px; }
  .card-grid, .review-grid, .contact-grid, .split, .cert-grid, .stack-grid,
  .glance-list, .chip-list { grid-template-columns: 1fr; }
  .case-body, .step-meta, .stat-list, .glossary, .legal-details dl { grid-template-columns: 1fr; }
  .case-body dt, .step-meta dt, .legal-details dt { padding-top: 10px; }
  .founder { grid-template-columns: 1fr; }
  .founder__mark { max-width: 140px; }
  .site-nav__links { display: none; }
  .btn-sm { padding: 8px 14px; font-size: 14px; }
  .glance-card, .research { padding: 20px; }
  .sticky-cta {
    right: 0; left: 0; bottom: 0; border-radius: 0;
    border-left: none; border-right: none; border-bottom: none;
    justify-content: space-between; padding: 10px 16px;
  }
  .sticky-cta-text { font-size: 13px; }
  .section-title { max-width: none; }
  .site-foot { padding-bottom: 128px; }
}

@media (max-width: 420px) {
  .sticky-cta-text { display: none; }
  .sticky-cta { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; }
  .is-hidden { opacity: 1; transform: none; }
}
