/* blipbox site styles. Tokens live in brand/tokens.css. */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--s4);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--yellow); color: #0D0D0B; }

:focus-visible {
  outline: var(--stroke) solid var(--yellow);
  outline-offset: 3px;
  border-radius: 4px;
}

a { color: inherit; }

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus-visible { top: 16px; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--paper-2);
  padding: 2px 7px;
  border-radius: 6px;
}
svg { display: block; }
[hidden] { display: none !important; }
button.btn { font-family: inherit; cursor: pointer; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

/* Nav ------------------------------------------------------------------ */

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  padding-block: var(--s3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  font-stretch: var(--wide);
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand svg { width: 38px; height: 38px; }

.nav-links {
  display: flex;
  gap: var(--s4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: var(--t-sm);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}
.nav-links a:hover { border-bottom-color: var(--yellow); }

@media (max-width: 560px) {
  .nav-links { gap: var(--s3); }
  .nav-links a { padding-block: 11px; }
}
@media (max-width: 400px) {
  .nav-links { gap: var(--s2); }
}

/* Hero ----------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s8);
  align-items: center;
  padding-block: clamp(var(--s6), 7vw, var(--s12)) clamp(var(--s6), 6vw, var(--s10));
}

.hero h1 {
  font-size: var(--t-display);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 800;
  font-stretch: var(--wide);
  max-width: 13ch;
  margin-bottom: var(--s4);
}

.lede {
  font-size: var(--t-lg);
  line-height: 1.45;
  max-width: 34ch;
  color: var(--ink-2);
  margin-bottom: var(--s5);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  align-items: center;
}

.status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: var(--s5);
  font-size: var(--t-sm);
  color: var(--ink-2);
  max-width: 44ch;
}
.status::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 0.45em;
  border-radius: 2px;
  background: var(--yellow);
}
.status a { color: var(--ink); font-weight: 600; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }

.hero-mark {
  justify-self: end;
  width: min(100%, 440px);
  transition: transform 0.5s var(--ease-pop);
}
@media (hover: hover) and (pointer: fine) {
  .hero-mark:hover { transform: rotate(-4deg) translateY(-8px); }
}
.hero-mark svg { width: 100%; height: auto; animation: land 0.8s var(--ease-pop) both; }

@keyframes land {
  from { transform: translateY(18px); }
  to   { transform: translateY(0); }
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: var(--s5); }
  .hero-mark { order: -1; justify-self: start; width: min(56%, 220px); }
}

/* Buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--on-ink);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--t-base);
  line-height: 1;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); color: var(--on-red); }
.btn:active { transform: translateY(2px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--paper-2); border-color: var(--ink); color: var(--ink); }

/* Sections ------------------------------------------------------------- */

.section {
  padding-block: clamp(var(--s8), 8vw, var(--s12));
  border-top: var(--stroke) solid var(--ink);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--s3) var(--s8);
  align-items: end;
  margin-bottom: clamp(var(--s5), 5vw, var(--s8));
}
.section h2 {
  font-size: var(--t-3xl);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 800;
  font-stretch: var(--wide);
}
.section-head p {
  max-width: 50ch;
  color: var(--ink-2);
  font-size: var(--t-lg);
  line-height: 1.45;
}

@media (max-width: 820px) {
  .section-head { grid-template-columns: 1fr; }
}

/* A box: the only thing on the page that gets a border ----------------- */

.box {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
}

.box-face {
  background: var(--red);
  border-right: var(--stroke) solid var(--ink);
  display: grid;
  place-items: center;
  padding: clamp(var(--s4), 5vw, var(--s8));
}
.box-face svg { width: min(100%, 200px); aspect-ratio: 1; height: auto; }

.box-body { padding: clamp(var(--s4), 4vw, var(--s6)); min-width: 0; }

.box-kind {
  font-size: var(--t-sm);
  font-weight: 600;
  font-stretch: var(--narrow);
  color: var(--ink-3);
  margin-bottom: 6px;
}
.box-body h3 {
  font-size: var(--t-2xl);
  font-weight: 800;
  font-stretch: 108%;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: var(--s2);
}
.box-body > p { max-width: 58ch; }

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px var(--s3);
  margin: var(--s4) 0 0;
  font-size: var(--t-sm);
}
.facts dt { color: var(--ink-3); font-weight: 600; font-stretch: var(--narrow); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.facts a { text-decoration-color: var(--line); text-underline-offset: 0.18em; }
.facts a:hover { text-decoration-color: var(--yellow); text-decoration-thickness: 2px; }

@media (max-width: 720px) {
  .box { grid-template-columns: 1fr; }
  .box-face { border-right: 0; border-bottom: var(--stroke) solid var(--ink); }
  .box-face svg { width: min(50%, 160px); }
}

/* Try it --------------------------------------------------------------- */

.try {
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: var(--stroke) solid var(--ink);
}
.try label {
  display: block;
  font-weight: 600;
  font-size: var(--t-sm);
  margin-bottom: var(--s2);
}
.try-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: var(--s2);
}
.try input {
  font: inherit;
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}
.try output {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  padding: 12px 14px;
  min-height: 3em;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--on-ink);
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.try output:empty::before { content: "\2205"; color: var(--ink-3); }
.belt-dots { display: flex; gap: 5px; padding-inline: 4px; }
.belt-dots i { width: 8px; height: 8px; border-radius: 2px; background: var(--yellow); }
.try-note { margin-top: var(--s2); font-size: var(--t-xs); color: var(--ink-3); max-width: 60ch; }

@media (max-width: 560px) {
  .try-row { grid-template-columns: 1fr; }
  .belt-dots { flex-direction: column; align-items: center; padding: 0; }
}

.more {
  margin-top: var(--s5);
  max-width: 62ch;
  color: var(--ink-2);
}
.more a { font-weight: 600; color: var(--ink); text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }

/* The belt: a real sequence, so it is numbered ------------------------- */

.belt {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--s4);
  counter-reset: step;
  position: relative;
}
.belt::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 25px;
  height: var(--stroke);
  background: var(--ink);
}
.belt li { position: relative; padding-top: var(--s8); min-width: 0; }
.belt li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
  font-stretch: var(--wide);
  font-size: var(--t-xl);
  letter-spacing: -0.02em;
  line-height: 1;
}
.belt li[data-ship]::before { background: var(--red); color: var(--on-red); }
.belt h3 {
  font-size: var(--t-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--s1);
}
.belt p { color: var(--ink-2); font-size: var(--t-sm); }

@media (max-width: 960px) {
  .belt { grid-template-columns: 1fr; gap: var(--s5); }
  .belt::before { top: 0; bottom: 0; left: 24px; right: auto; width: var(--stroke); height: auto; }
  .belt li { padding-top: 0; padding-left: var(--s10); }
  .belt li::before { top: -4px; }
}

/* Principles ----------------------------------------------------------- */

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s5) var(--s8);
}
.principles li { position: relative; padding-left: 26px; max-width: 42ch; }
.principles li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--yellow);
}
.principles strong {
  display: block;
  font-weight: 700;
  font-size: var(--t-lg);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 6px;
}
.principles p { color: var(--ink-2); }

/* About ---------------------------------------------------------------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s5) var(--s8);
  align-items: start;
}
.about-text { display: grid; gap: var(--s3); max-width: 60ch; font-size: var(--t-lg); line-height: 1.5; }
.about-text a { text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 0.18em; font-weight: 600; }

.about-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: var(--stroke) solid var(--ink); }
.about-links li { border-bottom: 1px solid var(--line); }
.about-links a {
  display: flex;
  justify-content: space-between;
  gap: var(--s2);
  padding: 14px 0;
  text-decoration: none;
  font-weight: 600;
}
.about-links span { color: var(--ink-3); font-weight: 400; font-size: var(--t-sm); text-align: right; }
.about-links a:hover { color: var(--red); }

@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
}

/* Footer --------------------------------------------------------------- */

.footer {
  border-top: var(--stroke) solid var(--ink);
  padding-block: var(--s8) var(--s6);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: var(--s6) var(--s5);
}
.footer-brand { display: grid; gap: var(--s2); align-content: start; max-width: 32ch; color: var(--ink-2); font-size: var(--t-sm); }
.footer h4 {
  font-size: var(--t-sm);
  font-weight: 600;
  font-stretch: var(--narrow);
  color: var(--ink-3);
  margin-bottom: var(--s2);
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer ul a { text-decoration: none; font-weight: 600; font-size: var(--t-sm); }
.footer ul a:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.footer-bar {
  margin-top: var(--s8);
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s1) var(--s4);
  font-size: var(--t-xs);
  color: var(--ink-3);
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Analytics opt-in: small, bottom-left, shown only after scroll or a click --- */

.consent {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 20;
  max-width: 340px;
  padding: 14px 16px;
  display: grid;
  gap: 10px;
  background: var(--paper);
  color: var(--ink);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius);
  font-size: var(--t-sm);
  line-height: 1.45;
  animation: rise 0.35s var(--ease-out) both;
}
.consent p { margin: 0; }
.consent-actions { display: flex; gap: 8px; }
.consent .btn { padding: 9px 14px; font-size: var(--t-sm); }

@keyframes rise {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@media (max-width: 560px) {
  .consent { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* Motion --------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mark, .hero-mark svg, .btn, .consent { transition: none; animation: none; }
  .hero-mark:hover { transform: none; }
}
