:root {
  --ink:     #0E1116;
  --paper:   #FAFAF7;
  --paper-2: #F2F2EC;
  --pop:     #FF5C2B;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

/* ---------- base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: var(--paper); color: var(--ink); }
body { font-family: var(--sans); font-size: 16px; line-height: 1.45; }
a { color: inherit; text-decoration: none; transition: color 0.12s ease; }
a:not(.btn):not(.tier-cta):hover { color: var(--pop); }
button:focus, a:focus { outline: 2px solid var(--pop); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--sans); font-weight: 800; letter-spacing: -0.02em; }
code, pre, .mono { font-family: var(--mono); }

/* Keyboard-only skip link — visually hidden until focused. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Logo "eyes" — blink + look, mirroring csp-dashboard's EyesIcon.
   Keyframes match the dashboard's blinkLook (tailwind.config.js). */
@keyframes blinkLook {
  0%, 18%   { transform: translateX(0) scaleY(1); }
  19%, 21%  { transform: translateX(0) scaleY(0.05); }
  24%, 40%  { transform: translateX(-2px) scaleY(1); }
  52%, 70%  { transform: translateX(2px) scaleY(1); }
  78%, 80%  { transform: translateX(0) scaleY(0.05); }
  83%, 100% { transform: translateX(0) scaleY(1); }
}
.brand svg .eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: blinkLook 7s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .brand svg .eyes { animation: none; }
}

/* ---------- primitives ---------- */
.tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-block;
  white-space: nowrap;
}
.tag--bordered {
  border: 1px solid var(--ink);
  padding: 4px 8px;
}
.tag--filled {
  background: var(--ink);
  color: var(--paper);
  padding: 4px 10px;
}
.tag--pop {
  color: var(--pop);
}

.card {
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 24px;
}
.card--accent {
  background: var(--ink);
  color: var(--paper);
}

.btn {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  letter-spacing: 0.04em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}
.btn--primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--pop);
}
.btn--big {
  font-size: 15px;
  padding: 16px 24px;
}
.btn--pop {
  background: var(--pop);
  color: var(--ink);
  border-color: var(--pop);
  box-shadow: 6px 6px 0 var(--paper);
  padding: 18px 28px;
  font-size: 15px;
}
/* Pre-launch gate: registration is closed until launch — see _includes/base.njk + legal.css */
.is-soon {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}
.btn--ink-on-pop {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--paper);
  padding: 14px 22px;
}

/* Brutal hover lift — ports csp-dashboard's .csplog-lift to plain CSS.
   Box translates up-left so the existing 4px shadow visually grows,
   giving the brutal "page lifts off the paper" feel. */
.card, .btn, .tier-cta {
  transition: transform 150ms ease;
}
@media (hover: hover) {
  .btn:hover, .tier-cta:hover, .card:hover {
    transform: translate(-2px, -2px);
  }
}
.btn:active, .tier-cta:active {
  transform: translate(2px, 2px);
}
@media (prefers-reduced-motion: reduce) {
  .card, .btn, .tier-cta { transition: none !important; }
}

.section {
  padding: 80px 48px;
  border-bottom: 1.5px solid var(--ink);
}
.section--tight   { padding-top: 64px; padding-bottom: 64px; }
.section--hero    { padding: 80px 48px 64px; }
.section--explain { padding: 80px 48px; }
.section--dark    { background: var(--ink); color: var(--paper); }
.section--paper2  { background: var(--paper-2); }
/* Bottom rule for sections that don't carry the base .section border (e.g. hero, explainer). */
.section--ruled   { border-bottom: 1.5px solid var(--ink); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}
.section-head h2 {
  font-size: 52px;
  line-height: 1;
  margin: 0;
}
.section-head--compact { margin-bottom: 32px; }

.footnote {
  font-family: var(--mono);
  font-size: 12px;
  color: #555;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1.5px solid var(--ink);
  padding: 16px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  background: var(--paper);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand .dot { color: var(--pop); }
.brand svg { display: block; }
.nav-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 14px;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.15s ease;
}
.nav-links a:hover { border-bottom-color: var(--pop); }
.nav-ctas { display: flex; gap: 12px; }
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-hamburger span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
body.nav-open .nav-hamburger span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
body.nav-open .nav-hamburger span:nth-child(2) { opacity: 0; }
body.nav-open .nav-hamburger span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }
.nav-menu {
  display: none;
  position: sticky;
  top: 64px;
  z-index: 49;
  flex-direction: column;
  gap: 16px;
  padding: 20px 20px 24px;
  background: var(--paper);
  border-bottom: 1.5px solid var(--ink);
  font-family: var(--mono);
  font-size: 16px;
}
.nav-menu a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
}
.nav-menu .btn { align-self: flex-start; }
body.nav-open .nav-menu { display: flex; }

/* ---------- hero ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: start;
}
.hero-left { display: flex; flex-direction: column; gap: 28px; }
.hero h1 {
  font-size: 72px;
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}
.hero h1 .lead { display: block; }
.hero h1 .mark {
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  background: var(--ink);
  color: var(--paper);
  padding: 2px 10px;
  line-height: 1.5;
}
.hero h1 .mark--pop {
  background: var(--pop);
  color: var(--ink);
}
.hero h1 .pop { color: var(--pop); }
.hero-sub {
  font-size: 19px;
  line-height: 1.5;
  max-width: 560px;
  color: #bbb;
}
.hero-ctas {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 4px;
}
.hero .btn:not(.btn--pop) {
  color: var(--paper);
  border-color: var(--paper);
  box-shadow: 4px 4px 0 var(--paper);
}
.hero-microcopy { margin-top: -8px; }
.hero .hero-microcopy { color: #888; }
.hero-left > .tag { align-self: flex-start; }

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hero-right > .tag { align-self: flex-end; }
.code-block {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  padding: 24px;
  border: 1.5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--pop);
  overflow-x: auto;
}
.code-block .dim { color: #888; }
.code-block .pop { color: var(--pop); }
.code-block .cb-label { color: #888; margin-bottom: 8px; }
.code-block .cb-comment { color: #888; font-style: italic; margin-top: 4px; }
.code-block .cb-indent { padding-left: 16px; }
.code-block .cb-spacer { height: 16px; }
.hero .code-block { background: var(--paper); color: var(--ink); }
.hero .code-block .dim,
.hero .code-block .cb-label,
.hero .code-block .cb-comment { color: #555; }
.code-block .cb-directive { color: #5A4F8A; font-weight: 600; }
.code-block .cb-ok { color: #2C7A3D; }
.code-block .cb-danger { color: #C03830; font-weight: 600; }

/* ---------- three steps ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.step-card { display: flex; flex-direction: column; gap: 14px; }
.step-number {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--pop);
  font-weight: 700;
}
.step-card h3 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
}
.step-card p {
  font-size: 14px;
  line-height: 1.55;
  color: #333;
}
.step-card .grow { flex: 1; }
.endpoint-box {
  background: var(--ink);
  color: var(--paper);
  padding: 12px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  word-break: break-all;
}
.headers-box {
  background: var(--ink);
  color: var(--paper);
  padding: 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
/* Inline token highlighting inside the endpoint/headers examples (was inline style=). */
.endpoint-box .dim, .headers-box .dim { color: #888; }
.endpoint-box .pop, .headers-box .pop { color: var(--pop); }
.status-box {
  background: var(--paper-2);
  padding: 12px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  border: 1px dashed var(--ink);
}
.status-box .next { color: var(--pop); font-weight: 700; }
.inline-code {
  font-family: var(--mono);
  background: var(--paper-2);
  padding: 1px 6px;
}

/* ---------- features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card { display: flex; flex-direction: column; gap: 14px; }
.feature-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.feature-head .rule {
  flex: 1;
  height: 1px;
  background: var(--ink);
  opacity: 0.15;
}
.feature-head .num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--pop);
  font-weight: 700;
}
.feature-card h3 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.feature-card p {
  font-size: 15px;
  line-height: 1.55;
  color: #222;
}

/* ---------- explainer ---------- */
.explainer-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  align-items: start;
}
.explainer-tag-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}
.explainer-aside { position: sticky; top: 96px; }
.explainer-aside h2 {
  font-size: clamp(40px, 3.8vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}
.explainer-aside h2 .pop { color: var(--pop); }

/* explainer on dark background: invert borders + tag + body text */
.section--dark.section--explain .tag--bordered {
  border-color: var(--paper);
  color: var(--paper);
}
.section--dark .point {
  border-top-color: var(--paper);
}
.section--dark .point:last-child {
  border-bottom-color: var(--paper);
}
.section--dark .point p {
  color: #bbb;
}
.point-list { display: flex; flex-direction: column; }
.point {
  padding: 28px 0;
  border-top: 1.5px solid var(--ink);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 24px;
  align-items: start;
}
.point:last-child { border-bottom: 1.5px solid var(--ink); }
.point .num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--pop);
  font-weight: 700;
}
.point h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.point p {
  font-size: 15px;
  line-height: 1.55;
  color: #333;
}

/* ---------- differentiators ("what we get right") ---------- */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ---------- pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.tier {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding: 28px;
}
.tier-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tier--featured .tier-name { color: var(--pop); }
.tier-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.tier-price .amount {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.tier-price .period {
  font-family: var(--mono);
  font-size: 12px;
  color: #555;
}
.tier--featured .tier-price .period { color: #aaa; }
.tier-note {
  font-family: var(--mono);
  font-size: 11px;
  color: #555;
  margin-top: -8px;
}
.tier--featured .tier-note { color: #aaa; }
.tier-bullets {
  list-style: none;
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}
.tier-bullets li {
  display: flex;
  gap: 10px;
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px solid #E5E5E0;
}
.tier-bullets li:first-child { padding-top: 0; margin-top: 0; border-top: none; }
.tier-bullets li::before {
  content: "+";
  color: var(--pop);
  font-family: var(--mono);
  font-weight: 700;
}
.tier--featured .tier-bullets li { border-top-color: #333; }
.tier-cta {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  padding: 14px 16px;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  letter-spacing: 0.04em;
  text-align: center;
}
.tier--featured .tier-cta {
  background: var(--pop);
  border-color: var(--pop);
  box-shadow: 4px 4px 0 var(--paper);
}
.tier-badge {
  position: absolute;
  top: -14px;
  right: 20px;
  background: var(--pop);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1.5px solid var(--ink);
}
.pricing-note {
  margin-top: 32px;
  font-size: 14px;
  color: #555;
  text-align: center;
}

/* ---------- last-call CTA ---------- */
.cta-dark { padding: 96px 48px; border-bottom: 1.5px solid var(--ink); }
.cta-inner { max-width: 760px; }
.cta-inner h2 {
  font-size: 72px;
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 16px 0;
  color: var(--paper);
}
.cta-inner h2 .pop { color: var(--pop); }
.cta-inner p {
  font-size: 18px;
  line-height: 1.5;
  color: #bbb;
  margin: 0 0 32px;
  max-width: 560px;
}
.cta-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.cta-microcopy {
  font-family: var(--mono);
  font-size: 12px;
  color: #888;
}

/* ---------- footer ---------- */
.site-footer {
  padding: 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  color: #555;
}
.site-footer a { color: #555; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-links { display: flex; gap: 24px; }
.footer-account { display: flex; gap: 18px; }

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

/* Tablet (720–1023): keep multi-column where it earns its space. */
@media (max-width: 1023px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .explainer-grid { grid-template-columns: 1fr; gap: 40px; }
  .explainer-aside { position: static; }
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .tier--featured { grid-column: 1 / -1; }
}

/* Phone (<720): single column, scaled type, reduced shadows, tag-as-kicker. */
@media (max-width: 719px) {
  .nav { padding: 14px 20px; }
  .section, .section--hero, .section--explain { padding: 56px 20px; }
  .cta-dark { padding: 64px 20px; }
  .site-footer { padding: 24px 20px; }

  .hero h1 { font-size: clamp(32px, 9vw, 56px); }
  .hero-sub { font-size: 16px; }
  .section-head h2 { font-size: clamp(28px, 8vw, 40px); }
  .explainer-aside h2 { font-size: clamp(32px, 9vw, 56px); }
  .cta-inner h2 { font-size: clamp(32px, 9vw, 56px); }
  .cta-inner p { font-size: 16px; }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 32px;
  }
  .section-head .tag { order: -1; }

  .nav-links { display: none; }
  .nav-ctas { display: none; }
  .nav-hamburger { display: flex; }
  .brand { font-size: 16px; }

  .features-grid, .pricing-grid, .diff-grid { grid-template-columns: 1fr; }
  .tier--featured { grid-column: auto; }

  .card { box-shadow: 3px 3px 0 var(--ink); }
  .btn { box-shadow: 3px 3px 0 var(--ink); }
  .btn--primary { box-shadow: 3px 3px 0 var(--pop); }
  .btn--pop { box-shadow: 4px 4px 0 var(--paper); padding: 16px 24px; }
  .btn--ink-on-pop { box-shadow: 3px 3px 0 var(--paper); }
  .hero .btn:not(.btn--pop) { box-shadow: 3px 3px 0 var(--paper); }
  .code-block { box-shadow: 4px 4px 0 var(--pop); }
  .tier-cta { box-shadow: 3px 3px 0 var(--ink); }
  .tier--featured .tier-cta { box-shadow: 3px 3px 0 var(--paper); }

  .btn, .tier-cta { min-height: 44px; }

  .hero-right .code-block {
    font-size: 12px;
    padding: 16px;
    line-height: 1.6;
  }
  .headers-box, .endpoint-box {
    font-size: 11px;
    line-height: 1.55;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .footer-brand { order: 1; }
  .footer-account { order: 2; flex-wrap: wrap; }
  .footer-links { order: 3; flex-wrap: wrap; }
}

/* Small phone (<480): tighter padding only. */
@media (max-width: 479px) {
  .nav { padding: 12px 16px; }
  .section, .section--hero, .section--explain { padding: 40px 16px; }
  .cta-dark { padding: 48px 16px; }
  .site-footer { padding: 20px 16px; }
}
