/* Hallmark · macrostructure: Split Studio · theme: custom (see tokens.css for the full stamp) */
@import url("tokens.css");

html { overflow-x: clip; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  padding-inline: max(0px, env(safe-area-inset-left)) max(0px, env(safe-area-inset-right));
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 0;
  overflow-wrap: anywhere;
  min-width: 0;
}
h2 { font-size: var(--text-display-s); }
h3 { font-size: var(--text-md); letter-spacing: -0.015em; }
p { margin: 0; max-width: var(--measure); }
a { color: var(--color-accent-deep); text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
::selection { background: var(--color-accent); color: var(--color-accent-ink); }
code, pre { font-family: var(--font-mono); font-size: 0.9em; }

/* ---------- nav · N5 floating pill ---------- */
.nav-pill {
  position: fixed;
  top: var(--space-md);
  left: 50%;
  translate: -50% 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  padding: 0.45rem 0.6rem 0.45rem 0.85rem;
  max-width: calc(100% - 2 * var(--space-md));
  background: color-mix(in oklch, var(--color-paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(120%);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: 999px;
  box-shadow: var(--shadow-pill);
  z-index: var(--z-sticky);
  white-space: nowrap;
}
.nav-pill__links { display: flex; gap: var(--space-md); list-style: none; margin: 0; padding: 0; }
.nav-pill__links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--color-ink-2);
  text-decoration: none;
  padding: 0.25rem 0.1rem;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav-pill__links a:hover { color: var(--color-ink); border-color: var(--color-accent); }
}
@media (max-width: 40rem) {
  .nav-pill__links { display: none; }
  .nav-pill { left: var(--space-md); right: var(--space-md); translate: none; max-width: none; justify-content: space-between; }
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  letter-spacing: -0.02em;
  color: var(--color-ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark svg { width: 22px; height: 22px; flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 40px;
  padding: 0.45rem 1rem;
  border: 1.5px solid var(--color-ink);
  border-radius: 999px;
  background: var(--color-ink);
  color: var(--color-paper);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform 100ms var(--ease-out);
}
.btn--ghost { background: transparent; color: var(--color-ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--color-ink-2); color: var(--color-paper); }
  .btn--ghost:hover { background: var(--color-ink); color: var(--color-paper); }
}
.btn:active { transform: translateY(1px); }
.btn--lg { min-height: 44px; padding: 0.6rem 1.2rem; font-size: var(--text-base); }
.link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--color-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 1px;
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) { .link:hover { border-bottom-width: 2px; } }

/* ---------- the diptych rows ---------- */
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl) var(--space-2xl);
  align-items: start;
  padding: var(--space-3xl) var(--page-gutter);
}
@media (min-width: 60rem) {
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .row--flip > .row__text { order: 2; }
  .row--flip > .row__proof { order: 1; }
}
.row + .row { padding-top: 0; }
.row__text > p { margin-top: var(--space-md); color: var(--color-ink-2); }
.row__text > p:first-of-type { margin-top: var(--space-lg); }
.row__text h2 { max-width: 16ch; }
.row__cta { margin-top: var(--space-xl); display: flex; flex-wrap: wrap; gap: var(--space-lg); align-items: center; }

/* hero row */
.hero { padding-top: calc(var(--space-4xl) + var(--space-md)); }
.hero h1 { font-size: var(--text-display); max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--color-accent-deep); }
.hero__lede { font-size: var(--text-md); line-height: 1.5; max-width: 32ch; }
.hero__status { font-size: var(--text-sm); color: var(--color-muted); max-width: 46ch; }

/* ---------- the agent panel (proof, machine-readable) ---------- */
.panel {
  margin: 0; /* figure default margins would shrink the column on phones */
  background: var(--color-panel);
  color: var(--color-panel-ink);
  border-radius: var(--radius);
  padding: var(--space-lg);
  overflow: hidden;
}
.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: var(--rule-hair) solid var(--color-panel-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-panel-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.panel pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--color-panel-ink);
}
.panel .k { color: var(--color-panel-muted); }
.panel .v { color: var(--color-accent); }
.panel__note { margin-top: var(--space-md); font-size: var(--text-xs); color: var(--color-panel-muted); }

/* ---------- the decision card (proof, human) ---------- */
.card {
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius);
  background: var(--color-paper-2);
  padding: var(--space-lg);
}
.card__head {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-md);
  letter-spacing: -0.015em;
  margin-bottom: var(--space-md);
}
.card dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-xs) var(--space-lg); font-size: var(--text-sm); }
.card dt { color: var(--color-muted); }
.card dd { margin: 0; color: var(--color-ink); font-variant-numeric: tabular-nums; }
.card__actions { display: flex; gap: var(--space-sm); margin-top: var(--space-lg); flex-wrap: wrap; }
.card__actions .btn { min-height: 40px; }
.card__note { margin-top: var(--space-md); font-size: var(--text-xs); color: var(--color-muted); }

/* ---------- spec list (F3, two columns) ---------- */
.spec { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.spec th, .spec td { text-align: left; vertical-align: top; padding: var(--space-sm) 0; border-top: var(--rule-hair) solid var(--color-rule-2); }
.spec th { font-family: var(--font-mono); font-weight: 500; font-size: 0.82rem; color: var(--color-accent-deep); white-space: nowrap; padding-right: var(--space-lg); width: 1%; }
.spec td { color: var(--color-ink-2); }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: var(--rule-hair) solid var(--color-rule-2); }

/* ---------- starting states list ---------- */
.states { list-style: none; margin: var(--space-lg) 0 0; padding: 0; display: grid; gap: 0; }
.states li { padding: var(--space-md) 0; border-top: var(--rule-hair) solid var(--color-rule-2); }
.states li:last-child { border-bottom: var(--rule-hair) solid var(--color-rule-2); }
.states b { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; display: block; }
.states span { color: var(--color-ink-2); font-size: var(--text-sm); }

/* ---------- the four questions ---------- */
.four { list-style: none; margin: var(--space-lg) 0 0; padding: 0; display: grid; gap: var(--space-md); }
.four li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--space-md); padding-top: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule-2); }
.four b { font-family: var(--font-display); font-weight: 600; color: var(--color-accent-deep); letter-spacing: -0.01em; }
.four span { color: var(--color-ink-2); }
@media (max-width: 40rem) { .four li { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); } }

/* ---------- loop strip ---------- */
.loop { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-lg); font-family: var(--font-display); font-weight: 500; font-size: var(--text-sm); color: var(--color-ink-2); }
.loop span::after { content: "→"; margin-inline: var(--space-xs); color: var(--color-muted); }
.loop span:last-child::after { content: none; }

/* ---------- surfaces (agents: start here) ---------- */
.surfaces { padding: var(--space-3xl) var(--page-gutter); border-top: 2px solid var(--color-ink); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
@media (min-width: 60rem) { .surfaces { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.surfaces h2 { max-width: 12ch; }
.surfaces p { margin-top: var(--space-md); color: var(--color-ink-2); }

/* ---------- journey pages ---------- */
.skip { position: absolute; left: var(--space-md); top: -3rem; z-index: calc(var(--z-sticky) + 1); background: var(--color-ink); color: var(--color-paper); padding: var(--space-xs) var(--space-md); border-radius: var(--radius); }
.skip:focus-visible { top: var(--space-md); }
.eyebrow { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-muted); margin-bottom: var(--space-md); }
.journeys { margin-top: var(--space-xl); }
.journeys p { color: var(--color-ink-2); font-size: var(--text-sm); }
.journeys ul { list-style: none; margin: var(--space-sm) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); font-size: var(--text-sm); }

/* ---------- footer · Ft2 inline single line ---------- */
.foot-line {
  padding: var(--space-xl) var(--page-gutter) var(--space-2xl);
  border-top: var(--rule-hair) solid var(--color-rule);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
  align-items: baseline;
  font-size: var(--text-sm);
  color: var(--color-muted);
}
.foot-line a { color: var(--color-muted); white-space: nowrap; }
.foot-line .wordmark { font-size: var(--text-sm); }

/* ---------- motion · one crossfade on load; nothing on scroll ---------- */
.reveal { opacity: 0; transform: translateY(6px); animation: reveal var(--dur-long) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes reveal { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: reveal-reduced 150ms linear forwards; }
  @keyframes reveal-reduced { to { opacity: 1; transform: none; } }
  .btn, .link, .nav-pill__links a { transition-duration: 0ms; }
}
