/* =================== Dry Ink — design tokens ===================
   Palette mirrors scripts/style.py so site frame matches the SVG output. */
:root {
  --bg: #f5f0e6;
  --bg-deep: #ede5d4;
  --bg-paper: #f8f3e9;
  --fg: #1f1d1a;
  --fg-2: #2a2722;
  --fg-dim: #6a5f56;
  --fg-faint: #b3a899;
  --accent: #8a3a2c;
  --accent-soft: rgba(138, 58, 44, 0.08);
  --accent-strong: #6f2c1f;
  --ok: #2c5a3a;

  --serif: 'Newsreader', 'Source Serif Pro', Georgia, serif;
  --mono: 'Geist Mono', 'IBM Plex Mono', Menlo, monospace;

  --container: 1320px;
  --gutter: clamp(20px, 4vw, 64px);
  --rule: 1px solid var(--fg);
  --rule-dim: 1px solid var(--fg-dim);
  --shadow-paper: 0 1px 0 rgba(31, 29, 26, 0.06), 0 16px 32px -16px rgba(31, 29, 26, 0.18);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; }
h1 { font-size: 68px; letter-spacing: 0; font-weight: 500; }
h2 { font-size: 44px; letter-spacing: 0; }
h3 { font-size: 18px; }

@media (max-width: 980px) {
  h1 { font-size: 58px; }
  h2 { font-size: 38px; }
}
@media (max-width: 640px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
}

::selection { background: var(--accent); color: var(--bg); }

button {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 11px 22px;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--fg); cursor: pointer;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
button:hover { background: var(--fg); color: var(--bg); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
button:disabled:hover { background: var(--bg); color: var(--fg); }

input, textarea {
  font-family: var(--mono); font-size: 14px;
  background: rgba(31, 29, 26, 0.025);
  color: var(--fg);
  border: 1px solid var(--fg-dim);
  padding: 14px 16px;
  width: 100%;
  resize: vertical;
  transition: all 0.15s ease;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 4px rgba(138, 58, 44, 0.06);
}

/* Cycling placeholder fade — smooth transitions when JS rotates examples */
textarea::placeholder {
  color: var(--fg-faint);
  opacity: 1;
  transition: opacity 0.22s ease;
}
textarea.placeholder-fade::placeholder {
  opacity: 0;
}

/* =================== Paper grain overlay =================== */

.paper-grain {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

/* =================== Cinematic intro bars =================== */

.cinema-bars {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 999;
}
.cinema-bars .bar {
  position: absolute; left: 0; right: 0;
  background: var(--fg);
  height: 50vh;
}
.cinema-bars .bar-top { top: 0; transform: translateY(-100%); animation: cinema-top 1.6s cubic-bezier(0.7, 0, 0.3, 1) forwards; }
.cinema-bars .bar-bottom { bottom: 0; transform: translateY(100%); animation: cinema-bot 1.6s cubic-bezier(0.7, 0, 0.3, 1) forwards; }
@keyframes cinema-top {
  0%   { transform: translateY(-100%); }
  35%  { transform: translateY(0); }
  55%  { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}
@keyframes cinema-bot {
  0%   { transform: translateY(100%); }
  35%  { transform: translateY(0); }
  55%  { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* =================== Brand strip =================== */

.brand-strip {
  background: var(--fg);
  color: var(--bg);
  position: relative;
  z-index: 2;
}
.brand-strip-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em;
}
.brand-tag { white-space: nowrap; opacity: 0.92; }
.brand-divider {
  color: var(--fg-faint); opacity: 0.45;
}
.brand-divider--push { flex: 1; }
.brand-live {
  color: var(--bg); position: relative; padding-left: 16px;
  letter-spacing: 0.22em;
}
.brand-live::before {
  content: ''; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 50%;
  background: #d04d3d;
  animation: live-dot 1.4s ease-in-out infinite;
}
@keyframes live-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(208, 77, 61, 0); }
  50%      { opacity: 0.5; box-shadow: 0 0 0 5px rgba(208, 77, 61, 0.25); }
}

/* =================== Header =================== */

.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 28px var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
  position: relative; z-index: 2;
}
.brand { display: flex; gap: 12px; align-items: baseline; color: var(--fg); }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); font-size: 26px; line-height: 1; }
.brand-name {
  font-family: var(--serif); font-size: 26px; font-weight: 500;
  letter-spacing: 0;
}
.brand-version {
  font-family: var(--mono); font-size: 10px; color: var(--fg-faint);
  letter-spacing: 0.1em;
  border: 1px solid var(--fg-faint);
  padding: 2px 6px;
  margin-left: 4px;
}
.site-nav { display: flex; gap: 32px; align-items: center; }
.site-nav a {
  font-family: var(--mono); font-size: 11px; color: var(--fg-dim);
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.nav-github {
  display: inline-flex; gap: 6px; align-items: center;
  border: 1px solid var(--fg-dim);
  padding: 7px 12px;
  transition: all 0.15s ease;
}
.nav-github:hover { border-color: var(--accent); color: var(--accent); }
.nav-arrow { font-size: 13px; }

/* =================== Hero =================== */

.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 72px) var(--gutter) clamp(56px, 7vw, 96px);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  position: relative;
  z-index: 2;
}
@media (max-width: 980px) { .hero { grid-template-columns: 1fr; gap: 56px; } }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px; color: var(--accent);
  letter-spacing: 0.18em;
  border: 1px solid var(--accent);
  padding: 7px 14px;
  margin-bottom: 28px;
  text-transform: uppercase;
}
.eyebrow-mark {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  animation: eyebrow-pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes eyebrow-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.hero-title { line-height: 1.04; max-width: 15ch; margin-bottom: 0; }
.hero-line { display: block; opacity: 0; transform: translateY(12px); }
.hero-line-accent {
  font-style: italic; color: var(--accent); font-weight: 400;
  margin-top: 4px;
  line-height: 1.12;
}
.hero-line.reveal {
  animation: hero-reveal 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes hero-reveal {
  to { opacity: 1; transform: translateY(0); }
}

/* The "Hermes" word: stroke-draw underline that grows in sync with text reveal */
.hero-draw {
  position: relative; display: inline-block; padding-bottom: 0;
  white-space: nowrap;
}
.hero-draw::after {
  content: '';
  position: absolute; left: 0; bottom: 0.04em;
  height: 4px; width: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
}
.hero-nowrap { white-space: nowrap; }
.hero-draw.draw-active::after {
  animation: hero-underline 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes hero-underline {
  0%   { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

.hero-lede {
  margin: 28px 0 36px;
  font-size: 19px; color: var(--fg-dim);
  max-width: 50ch;
  line-height: 1.5;
  opacity: 0;
  animation: hero-reveal 0.85s 0.6s ease forwards;
}
.hero-lede strong { color: var(--fg); font-weight: 500; }
.hero-lede em { color: var(--accent); font-style: italic; font-weight: 500; }

.hero-cta {
  display: flex; gap: 28px; align-items: center; flex-wrap: wrap;
  opacity: 0;
  animation: hero-reveal 0.85s 0.85s ease forwards;
  margin-bottom: 56px;
}
.cta-button {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 18px 28px;
  background: var(--accent); color: var(--bg);
  border: 1px solid var(--accent);
  position: relative;
  transition: all 0.2s ease;
}
.cta-button::before {
  content: '';
  position: absolute; inset: -1px;
  border: 1px solid var(--accent);
  opacity: 0.4;
  pointer-events: none;
  animation: cta-ring 2.4s ease-in-out infinite;
}
@keyframes cta-ring {
  0%   { inset: -1px; opacity: 0.45; }
  100% { inset: -10px; opacity: 0; }
}
.cta-button:hover {
  background: var(--fg); border-color: var(--fg); text-decoration: none;
}
.cta-button:hover::before { animation-duration: 1.2s; }
.cta-arrow { color: var(--bg); font-size: 11px; }
.cta-link {
  font-family: var(--mono); font-size: 12px; color: var(--fg-dim);
  letter-spacing: 0.1em; text-transform: uppercase;
}

.hero-stats {
  display: flex; gap: clamp(28px, 4vw, 56px);
  opacity: 0;
  animation: hero-reveal 0.85s 1.1s ease forwards;
  padding-top: 32px;
  border-top: var(--rule-dim);
  max-width: 480px;
}
.stat-num {
  font-family: var(--serif); font-size: 34px;
  font-weight: 500; line-height: 1;
  color: var(--accent);
}
.stat-label {
  font-family: var(--mono); font-size: 10px; color: var(--fg-dim);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-top: 6px;
}

/* Hero auto-demo board — bigger, with film perforation */
.hero-demo {
  opacity: 0;
  animation: hero-reveal 1s 0.4s ease forwards;
  position: relative;
}

/* =================== Section structure =================== */

section {
  position: relative;
  z-index: 2;
}

.section-header {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 48px;
  padding-bottom: 28px;
  border-bottom: var(--rule);
}
.section-label {
  font-family: var(--mono); font-size: 10px; color: var(--accent);
  letter-spacing: 0.22em; text-transform: uppercase;
  margin-bottom: 4px;
}
.section-header h2 { margin-bottom: 4px; }
.section-sub {
  font-family: var(--serif); font-size: 16px; font-style: italic; color: var(--fg-dim);
  margin: 0; max-width: 60ch;
}
.section-lede {
  max-width: 64ch;
  font-size: 19px; color: var(--fg-dim);
  margin: 0 0 40px;
  line-height: 1.55;
}
.section-lede strong { color: var(--fg); font-weight: 500; }

/* =================== Try section =================== */

.try {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 96px) var(--gutter);
  border-top: var(--rule);
}
.try-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(0, 2fr);
  gap: clamp(32px, 4vw, 64px);
}
@media (max-width: 980px) { .try-grid { grid-template-columns: 1fr; } }

.field-label {
  display: block;
  font-family: var(--mono); font-size: 11px; color: var(--fg-dim);
  letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 10px;
}
.try-controls {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-top: 18px;
}
.try-controls .primary {
  background: var(--accent); color: var(--bg); border-color: var(--accent);
}
.try-controls .primary:hover { background: var(--fg); border-color: var(--fg); }
.try-controls .primary:disabled { background: var(--fg-faint); border-color: var(--fg-faint); }
.btn-arrow { margin-right: 4px; }

/* Demo presets — film slate style: two-tone clapper buttons */
.demo-section { margin-top: 28px; }
.demo-section-label {
  font-family: var(--mono); font-size: 10px; color: var(--fg-dim);
  letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 10px;
}
.demo-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.demo-buttons button {
  padding: 0;
  background: var(--bg);
  border: 1px solid var(--fg);
  text-transform: none;
  font-family: var(--serif);
  font-size: 13px; letter-spacing: 0;
  display: inline-flex;
  overflow: hidden;
  position: relative;
}
.demo-buttons button::before {
  content: attr(data-cat) '';
  background: var(--fg); color: var(--bg);
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 7px 8px;
  align-self: stretch;
  display: flex; align-items: center;
}
.demo-buttons button > span {
  padding: 7px 12px;
  display: flex; align-items: center;
  background: var(--bg);
  color: var(--fg);
  transition: all 0.15s ease;
}
.demo-buttons button:hover { border-color: var(--accent); }
.demo-buttons button:hover::before { background: var(--accent); }
.demo-buttons button:hover > span { color: var(--accent); }

.try-foot {
  margin-top: 20px;
  font-family: var(--mono); font-size: 11px; color: var(--fg-dim);
  line-height: 1.7;
  max-width: 38ch;
}
.try-foot strong { color: var(--accent); font-weight: 500; }

/* Output column */
.try-output { min-width: 0; }

.status-bar {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; color: var(--fg-dim);
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 12px 16px;
  border: var(--rule-dim);
  margin-bottom: 16px;
  background: var(--bg-paper);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--fg-dim);
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.status-bar.is-running .status-dot { background: var(--accent); animation: dot-pulse 1.2s ease-in-out infinite; }
.status-bar.is-done .status-dot { background: var(--ok); }
.status-bar.is-error .status-dot { background: var(--accent); }
.status-spacer { flex: 1; }
.status-meta { color: var(--fg-faint); font-size: 10px; }
@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.board-wrap {
  border: 1px solid var(--fg);
  background: var(--bg-paper);
  min-height: 380px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-paper);
}
.board-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px 32px;
  text-align: center;
  color: var(--fg-dim);
  min-height: 380px;
}
.board-empty-mark {
  font-size: 56px; color: var(--fg-faint); line-height: 1; margin-bottom: 16px;
  font-family: var(--serif);
}
.board-empty p { margin: 4px 0; font-style: italic; }
.board-empty-tip {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-dim);
  font-style: normal !important;
  margin-top: 12px !important;
}
.board { width: 100%; }
.board svg { display: block; width: 100%; height: auto; }

/* Pulse for flagged frames during critique */
.board g[data-shot-label].kimi-flag {
  animation: kimi-pulse 1.6s ease-in-out 2;
}
@keyframes kimi-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50%      { filter: drop-shadow(0 0 16px var(--accent)); }
}

/* Frame selection (for revise) */
.board g[data-shot-label] { cursor: pointer; transition: opacity 0.15s ease; }
.board g[data-shot-label]:hover { opacity: 0.8; }
.board g[data-shot-label].is-selected rect:first-of-type {
  stroke: var(--accent) !important;
  stroke-width: 3.5 !important;
}

/* Panels */
.critique-panel, .memory-panel, .revise-panel {
  margin-top: 20px;
  padding: 20px 24px;
  border: 1px solid var(--fg);
  background: var(--bg-paper);
  animation: panel-fade 0.5s ease;
}
@keyframes panel-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.critique-panel h3, .memory-panel h3, .revise-panel h3 {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.panel-mark { color: var(--accent); font-size: 14px; }

.revisions { list-style: none; padding: 0; margin: 0; }
.revisions li {
  padding: 14px 0;
  border-bottom: 1px dashed var(--fg-dim);
}
.revisions li:last-child { border-bottom: none; }
.rev-label {
  display: inline-block;
  font-family: var(--mono); font-size: 12px;
  border: 1px solid var(--fg);
  padding: 2px 8px; margin-right: 10px;
  background: var(--bg);
}
.rev-field { font-family: var(--mono); font-size: 12px; color: var(--fg-dim); margin-right: 8px; }
.rev-arrow { font-family: var(--mono); color: var(--accent); margin-right: 8px; }
.rev-value { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.rev-reason { margin: 8px 0 0; font-size: 14px; color: var(--fg-dim); font-style: italic; line-height: 1.55; }

.memory-panel { border-color: var(--accent); background: var(--accent-soft); }
.memory-rule { font-style: italic; margin: 0 0 10px; line-height: 1.55; }
.memory-tags {
  font-family: var(--mono); font-size: 11px; color: var(--fg-dim);
  letter-spacing: 0.05em; margin: 0;
}

.revise-help { font-size: 14px; color: var(--fg-dim); margin: 0 0 14px; line-height: 1.55; }
.revise-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px; align-items: stretch;
}
@media (max-width: 640px) { .revise-row { grid-template-columns: 1fr; } }
.revise-target {
  font-family: var(--mono); font-size: 12px; padding: 12px 14px;
  border: 1px solid var(--fg-dim); color: var(--fg-dim);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.revise-target.is-active { border-color: var(--accent); color: var(--accent); }

.download-panel {
  margin-top: 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.download-link {
  font-family: var(--mono); font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase;
  display: inline-block;
  padding: 14px 20px;
  border: 1px solid var(--fg);
  align-self: flex-start;
  color: var(--fg);
  background: var(--bg-paper);
}
.download-link:hover { background: var(--fg); color: var(--bg); text-decoration: none; }
.download-help {
  font-family: var(--mono); font-size: 11px; color: var(--fg-dim);
  margin: 0; line-height: 1.7;
}

/* =================== Learning section — bg-deep for rhythm =================== */

.learning {
  background: var(--bg-deep);
  border-top: var(--rule);
  border-bottom: var(--rule);
  margin-top: 0;
}
.learning > * {
  max-width: var(--container);
  margin-left: auto; margin-right: auto;
  padding-left: var(--gutter); padding-right: var(--gutter);
}
.learning .section-header,
.learning .section-lede,
.learning .rule-block {
  max-width: 1120px;
}
.learning .section-header { padding-top: clamp(56px, 7vw, 96px); }
.learning > .rule-block {
  padding-left: 0;
  padding-right: 0;
  margin-bottom: 88px !important;
}

.learning-steps {
  list-style: none; padding: 0; margin: 0 auto 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  counter-reset: lstep;
  max-width: 1120px;
}
.learning-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px 22px 22px 18px;
  background: var(--bg-paper);
  border: 1px solid var(--fg);
  position: relative;
}
.learning-step-num {
  font-family: var(--serif);
  font-size: 48px; font-weight: 500;
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0;
  align-self: start;
  padding-top: 4px;
}
.learning-step-body h3 {
  font-family: var(--serif); font-size: 20px; font-weight: 500;
  color: var(--fg);
  margin: 0 0 8px;
  letter-spacing: 0;
}
.learning-step-body p {
  font-size: 15px; color: var(--fg-dim);
  line-height: 1.55; margin: 0;
}
.learning-step-body em {
  font-style: italic; color: var(--accent);
  font-family: var(--serif);
}
.learning-step-body code {
  font-family: var(--mono); font-size: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 6px;
}

.learning-figure {
  margin: 0 auto 44px;
  max-width: 1080px;
}
.learning-figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--fg);
  box-shadow: var(--shadow-paper);
}
.learning-figure figcaption {
  font-family: var(--mono); font-size: 12px;
  color: var(--fg-dim); line-height: 1.7;
  padding: 16px 0 0;
  max-width: 80ch;
}
.learning-figure figcaption strong { color: var(--fg); font-weight: 500; }
.learning-figure figcaption em { color: var(--accent); font-style: italic; }

.rule-block {
  border: 1px solid var(--fg);
  background: var(--bg-paper);
  margin-bottom: 0 !important;
}
.rule-label {
  font-family: var(--mono); font-size: 10px; color: var(--accent);
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 14px 22px;
  border-bottom: 1px solid var(--fg-dim);
  background: var(--bg);
}
.rule-display {
  padding: 22px 26px;
  font-family: var(--mono); font-size: 13px;
  color: var(--fg);
  overflow-x: auto;
  white-space: pre;
  margin: 0;
  line-height: 1.7;
}
.json-key { color: var(--accent); }
.json-str { color: var(--fg); }

@media (max-width: 1080px) {
  .learning-steps { grid-template-columns: 1fr; }
}

/* =================== Install section =================== */

.install {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 96px) var(--gutter);
}
.install-lede {
  max-width: 60ch;
  font-size: 18px; color: var(--fg-dim);
  margin: 0 0 48px;
  line-height: 1.6;
}
.install-lede strong { color: var(--fg); font-weight: 500; }
.install-lede code {
  font-family: var(--mono); font-size: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 6px;
}
.install-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.install-col { display: flex; flex-direction: column; }
.install-step {
  font-family: var(--mono); font-size: 11px; color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}
.install-col h3 {
  font-family: var(--serif);
  font-size: 22px; font-weight: 500;
  color: var(--fg);
  text-transform: none; letter-spacing: 0;
  margin-bottom: 12px;
}
.install-text {
  font-size: 15px; color: var(--fg-dim);
  margin: 0 0 20px;
  line-height: 1.55;
}
.install-code {
  background: var(--fg);
  color: var(--bg);
  padding: 22px 24px;
  margin: 0;
  font-family: var(--mono); font-size: 12px;
  line-height: 1.85;
  overflow-x: auto;
  white-space: pre;
  flex: 1;
}
.install-code code { color: inherit; font-family: inherit; font-size: inherit; }
.prompt-you { color: var(--fg-faint); font-weight: 500; padding-right: 6px; }
.prompt-hermes { color: #d04d3d; font-weight: 500; padding-right: 6px; }

/* =================== Footer =================== */

.site-footer {
  background: var(--fg);
  color: var(--bg);
  position: relative;
  z-index: 2;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px var(--gutter) 74px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 20px;
}
.footer-brand {
  display: flex; align-items: baseline; gap: 12px;
  font-family: var(--serif); font-size: 18px; font-weight: 500;
  color: var(--bg);
}
.footer-mark { color: var(--accent); font-size: 22px; }
.footer-name { color: var(--bg); }
.footer-tag {
  font-family: var(--mono); font-size: 10px; color: var(--fg-faint);
  letter-spacing: 0.12em;
}
.footer-meta {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--fg-faint);
  letter-spacing: 0.05em;
}
.footer-meta a { color: var(--bg); text-decoration: none; }
.footer-meta a:hover { color: #d04d3d; }
/* =================== Voice button + prose wrap =================== */

.prose-wrap { position: relative; }
.prose-wrap textarea {
  display: block;
  min-height: 190px;
  padding-bottom: 72px;
  resize: none;
}
.voice-btn {
  position: absolute;
  bottom: 14px; right: 16px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.15em; text-transform: uppercase;
  min-height: 36px;
  padding: 7px 12px;
  background: var(--bg);
  color: var(--fg-dim);
  border: 1px solid var(--fg-dim);
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 2;
}
.voice-btn:hover {
  border-color: var(--accent); color: var(--accent); background: var(--bg);
}
.voice-btn.is-listening {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-soft);
  animation: voice-pulse 1.2s ease-in-out infinite;
}
@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(138, 58, 44, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(138, 58, 44, 0); }
}
.voice-btn.is-unsupported { opacity: 0.4; cursor: not-allowed; }
.voice-icon { font-size: 13px; line-height: 1; }

/* =================== Share toggle =================== */

.share-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; color: var(--fg-dim);
  letter-spacing: 0.05em;
  margin-top: 16px;
  cursor: pointer;
  user-select: none;
}
.share-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.share-mark {
  display: inline-block;
  width: 14px; height: 14px;
  border: 1px solid var(--fg-dim);
  background: var(--bg);
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.share-toggle input:checked + .share-mark {
  background: var(--accent);
  border-color: var(--accent);
}
.share-toggle input:checked + .share-mark::after {
  content: '✓';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--bg);
  font-size: 11px; font-weight: 700;
  font-family: var(--serif);
}
.share-toggle:hover .share-mark { border-color: var(--accent); }
.share-text { color: var(--fg-dim); }

/* =================== Refine panel =================== */

.refine-panel {
  margin-top: 20px;
  padding: 20px 24px;
  border: 1px solid var(--fg);
  background: var(--bg-paper);
  animation: panel-fade 0.5s ease;
}
.refine-panel h3 {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.refine-help { font-size: 14px; color: var(--fg-dim); margin: 0 0 14px; line-height: 1.55; }
.refine-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
@media (max-width: 640px) { .refine-row { grid-template-columns: 1fr; } }

/* =================== Download row + share button =================== */

.download-row {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.download-gif { color: var(--accent); border-color: var(--accent); }
.download-gif:hover { background: var(--accent); color: var(--bg); }
.share-btn {
  cursor: pointer;
  font-family: var(--mono); font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 14px 20px;
  background: var(--bg-paper);
  border: 1px solid var(--fg);
  color: var(--fg);
}
.share-btn:hover { background: var(--fg); color: var(--bg); }

/* =================== Gallery =================== */

.gallery {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(56px, 7vw, 96px) var(--gutter);
  border-top: var(--rule);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.gallery-card {
  border: 1px solid var(--fg);
  background: var(--bg-paper);
  transition: all 0.2s ease;
  text-decoration: none;
  color: var(--fg);
  display: flex; flex-direction: column;
  cursor: pointer;
}
.gallery-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-paper);
}
.gallery-card img {
  display: block; width: 100%; height: auto;
  border-bottom: 1px solid var(--fg);
  background: var(--bg);
}
.gallery-card-body {
  padding: 14px 16px;
}
.gallery-card-title {
  font-family: var(--serif); font-size: 16px; font-weight: 500;
  line-height: 1.3;
  margin: 0 0 6px;
  letter-spacing: 0;
}
.gallery-card-prose {
  font-family: var(--mono); font-size: 11px;
  color: var(--fg-dim); line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gallery-card-meta {
  font-family: var(--mono); font-size: 9px;
  color: var(--fg-faint); letter-spacing: 0.15em;
  margin-top: 8px;
  text-transform: uppercase;
}
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--fg-dim);
  font-style: italic;
}
.gallery-empty p { margin: 4px 0; }
.gallery-empty-tip {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  font-style: normal !important;
  color: var(--fg-faint);
  margin-top: 12px !important;
}

.footer-repo { padding-left: 6px; }

/* =================== Hero secondary CTA =================== */

.cta-secondary {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 22px;
  background: transparent; color: var(--fg);
  border: 1px solid var(--fg);
  transition: all 0.18s ease;
}
.cta-secondary:hover {
  background: var(--fg); color: var(--bg); text-decoration: none;
}
.cta-secondary-icon { color: var(--accent); }
.cta-secondary:hover .cta-secondary-icon { color: var(--bg); }

/* =================== Inspect drawer =================== */

.inspect-panel {
  margin-top: 24px;
  border: 1px solid var(--fg);
  background: var(--bg-paper);
  animation: panel-fade 0.5s ease;
}
.inspect-tabs {
  display: flex; flex-wrap: wrap;
  background: var(--fg);
  border-bottom: 1px solid var(--fg);
}
.inspect-tab {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 10px 16px;
  background: transparent;
  color: var(--fg-faint);
  border: none;
  border-right: 1px solid rgba(245, 240, 230, 0.12);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.inspect-tab:hover { color: var(--bg); background: rgba(255, 255, 255, 0.04); }
.inspect-tab.is-active {
  color: #d04d3d;
  background: rgba(208, 77, 61, 0.08);
}
.inspect-tab-icon { font-size: 11px; color: #d04d3d; }
.inspect-body {
  padding: 18px 22px;
  font-family: var(--mono); font-size: 12px;
  color: var(--fg);
  line-height: 1.65;
  margin: 0;
  max-height: 380px;
  overflow: auto;
  white-space: pre;
  background: var(--bg-paper);
}
.inspect-body code { font-family: inherit; font-size: inherit; }
.inspect-body .ij-key { color: var(--accent); }
.inspect-body .ij-str { color: var(--fg); }
.inspect-body .ij-num { color: var(--ok); }
.inspect-body .ij-bool { color: var(--ok); }
.inspect-body .ij-null { color: var(--fg-faint); }
.inspect-body .ij-comment { color: var(--fg-faint); font-style: italic; }
.inspect-body .tr-head { color: var(--fg-faint); letter-spacing: 0.1em; }
.inspect-body .tr-rule { color: var(--fg-faint); }
.inspect-body .tr-num { color: var(--fg-faint); }
.inspect-body .tr-stage { color: var(--fg); font-weight: 500; }
.inspect-body .tr-kimi { color: var(--accent); }
.inspect-body .tr-local { color: var(--fg-dim); }
.inspect-body .tr-ms { color: var(--ok); }
.inspect-body .tr-note { color: var(--fg-faint); font-style: italic; }
.inspect-foot {
  font-family: var(--mono); font-size: 10px;
  color: var(--fg-dim);
  border-top: 1px solid var(--fg-dim);
  padding: 11px 22px;
  margin: 0;
  letter-spacing: 0.04em;
  line-height: 1.6;
}
.inspect-foot code {
  font-family: var(--mono); font-size: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 5px;
}

/* =================== Kimi Roles thin band =================== */

.kimi-roles {
  background: var(--bg-paper);
  border-top: 1px solid var(--fg-dim);
  border-bottom: 1px solid var(--fg-dim);
  padding: clamp(40px, 5vw, 64px) var(--gutter);
}
.kimi-roles-inner {
  max-width: 1100px; margin: 0 auto;
}
.kimi-roles-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 26px;
}
.kr-mark {
  display: inline-block; width: 7px; height: 7px;
  background: var(--accent);
}
.kimi-roles-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: 0;
}
.kimi-roles-list li {
  display: grid;
  grid-template-columns: 38px minmax(180px, 1fr) 28px minmax(140px, 1fr) minmax(220px, 2fr);
  gap: 16px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid rgba(31, 29, 26, 0.10);
  font-family: var(--mono);
}
.kimi-roles-list li:last-child { border-bottom: none; }
.kr-num {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--accent);
}
.kr-stage {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--fg);
  letter-spacing: 0.02em;
}
.kr-arrow {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--fg-dim);
  text-align: center;
}
.kr-out {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0;
}
.kr-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.kr-note code {
  font-family: var(--mono); font-size: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 5px;
}
.kimi-roles-foot {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--fg-dim);
  margin: 24px 0 0;
  letter-spacing: 0;
}
.kimi-roles-foot a {
  color: var(--accent);
  text-decoration: none;
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.kimi-roles-foot a:hover { text-decoration: underline; }

.kimi-roles-slogan {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0;
  color: var(--fg);
  display: flex; flex-wrap: wrap; gap: 16px 28px;
}
.kimi-roles-slogan em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}
.kimi-roles-slogan em:nth-child(2) {
  color: var(--fg);
}
.kimi-roles-slogan em:nth-child(3) {
  color: var(--fg-dim);
}

@media (max-width: 720px) {
  .kimi-roles-list li {
    grid-template-columns: 28px 1fr;
    grid-template-rows: auto auto auto;
    gap: 4px 12px;
    padding: 16px 0;
  }
  .kr-arrow { display: none; }
  .kr-stage { grid-column: 2; }
  .kr-out { grid-column: 2; }
  .kr-note { grid-column: 1 / -1; padding-top: 6px; }
}

/* =================== Why Hermes =================== */

.why-hermes {
  background: var(--fg);
  color: var(--bg);
  padding: clamp(56px, 7vw, 96px) var(--gutter);
  border-top: 1px solid var(--fg);
  border-bottom: 1px solid var(--fg);
  position: relative;
  z-index: 2;
}
.why-hermes-inner {
  max-width: 1100px; margin: 0 auto;
}
.why-hermes-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #d04d3d;
  border: 1px solid #d04d3d;
  padding: 7px 14px;
  margin-bottom: 32px;
}
.why-hermes-eyebrow .eyebrow-mark { background: #d04d3d; }
.why-hermes-title {
  font-family: var(--serif); font-weight: 500;
  font-size: 40px;
  line-height: 1.18; letter-spacing: 0;
  color: var(--bg);
  margin: 0 0 40px;
  max-width: 28ch;
}
.why-hermes-title em {
  font-style: italic; color: #d04d3d; font-weight: 500;
}
.why-hermes-list {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.why-hermes-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 18px 22px;
  background: rgba(245, 240, 230, 0.04);
  border-left: 2px solid #d04d3d;
}
.why-num {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em;
  color: #d04d3d;
  align-self: start;
  padding-top: 2px;
}
.why-body {
  font-family: var(--serif); font-size: 16px;
  color: var(--bg);
  line-height: 1.55;
}
.why-body strong { color: var(--bg); font-weight: 500; }
.why-body code {
  font-family: var(--mono); font-size: 13px;
  background: rgba(245, 240, 230, 0.08);
  color: #d04d3d;
  padding: 1px 5px;
}

.grounded {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid rgba(245, 240, 230, 0.18);
}
.grounded-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #d04d3d;
  margin-bottom: 18px;
}
.grounded-label .grounded-mark {
  width: 7px; height: 7px;
  background: #d04d3d;
  display: inline-block;
}
.grounded-list {
  list-style: none; padding: 0; margin: 0 0 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px 28px;
}
.grounded-list li {
  font-family: var(--mono); font-size: 12px;
  color: var(--bg);
  letter-spacing: 0.02em;
  display: flex; align-items: baseline; gap: 10px;
  line-height: 1.7;
}
.grounded-list code {
  font-family: var(--mono); font-size: 11px;
  background: rgba(245, 240, 230, 0.10);
  color: #d04d3d;
  padding: 1px 5px;
}
.g-check {
  color: #d04d3d;
  font-size: 13px;
  flex-shrink: 0;
}
.grounded-foot {
  font-family: var(--serif); font-size: 14px;
  font-style: italic;
  color: rgba(245, 240, 230, 0.72);
  margin: 0;
  letter-spacing: 0;
  line-height: 1.5;
}
.grounded-foot a {
  color: #d04d3d;
  text-decoration: none;
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-left: 8px;
}
.grounded-foot a:hover { text-decoration: underline; }

/* =================== Bundle file-tree =================== */

.bundle-tree {
  background: var(--bg);
  border-bottom: 1px solid var(--fg);
  padding: clamp(40px, 5vw, 64px) var(--gutter) clamp(24px, 4vw, 40px);
  position: relative;
  z-index: 2;
}
.bundle-tree-inner {
  max-width: 760px; margin: 0 auto;
}
.bundle-tree-label {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--fg-dim);
}
.bundle-tree-pre {
  font-family: var(--mono); font-size: 13px;
  line-height: 1.85;
  margin: 0;
  color: var(--fg);
  white-space: pre;
}
.bundle-tree-pre code {
  font-family: inherit; color: inherit;
}
.bt-line { display: block; }
.bt-tee { color: var(--fg-dim); }
.bt-comment { color: var(--fg-dim); font-style: italic; }

/* =================== Exports thin band =================== */

.exports {
  background: var(--fg);
  color: var(--bg);
  border-top: 1px solid var(--fg);
  border-bottom: 1px solid var(--fg);
  position: relative;
  z-index: 2;
}
.exports-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}
.exports-label {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #d04d3d;
  flex-shrink: 0;
  padding-right: 16px;
  border-right: 1px solid var(--fg-faint);
}
.exports-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 18px;
  flex: 1;
}
.exports-list li {
  display: inline-flex; gap: 8px; align-items: center;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--bg);
  white-space: nowrap;
}
.ex-mark { color: #d04d3d; font-size: 11px; }

/* =================== Director's clapboard (hero demo) =================== */

.clapboard {
  position: relative;
  background: var(--bg-paper);
  border: 1px solid var(--fg);
  box-shadow: var(--shadow-paper);
  /* Replace the previous double perforation with the proper slate */
}

/* The diagonal-stripe slate at the top */
.clapboard-slate {
  background: var(--fg);
  color: var(--bg);
  position: relative;
  padding: 0;
}
.clapboard-stripes {
  height: 16px;
  display: flex;
  overflow: hidden;
  border-bottom: 1px solid var(--bg);
}
.clapboard-stripes span {
  flex: 1;
  background: repeating-linear-gradient(
    -45deg,
    var(--bg) 0 10px,
    var(--fg) 10px 20px
  );
  border-right: 1px solid var(--fg);
}
.clapboard-stripes span:last-child { border-right: none; }
.clapboard-stripes span:nth-child(odd) {
  background: repeating-linear-gradient(
    -45deg,
    var(--fg) 0 10px,
    var(--bg) 10px 20px
  );
}

.clapboard-info {
  padding: 12px 18px 14px;
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.clap-row {
  display: flex; gap: 18px; flex-wrap: wrap;
  padding: 4px 0;
}
.clap-row-1 {
  border-bottom: 1px dashed rgba(245, 240, 230, 0.2);
  padding-bottom: 8px;
}
.clap-row-2 { padding-top: 8px; }
.clap-cell {
  display: flex; gap: 6px; align-items: baseline; min-width: fit-content;
}
.clap-k {
  font-size: 9px; color: rgba(245, 240, 230, 0.55);
  letter-spacing: 0.18em;
}
.clap-v {
  font-size: 12px; color: var(--bg);
  font-weight: 500; letter-spacing: 0.05em;
  text-transform: none;
  font-family: var(--serif); font-style: italic;
}
.clap-stage { margin-left: auto; }
.clap-stage .clap-v {
  color: #d04d3d; font-family: var(--mono); font-style: normal;
  letter-spacing: 0.12em; text-transform: uppercase;
}

.hero-demo-board {
  width: 100%; min-height: 320px;
  background: var(--bg-paper);
  position: relative;
  transition: opacity 0.4s ease;
  padding: 14px;
}
.hero-demo-board svg { display: block; width: 100%; height: auto; }

.hero-demo-foot {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--mono); font-size: 10px; color: var(--fg-dim);
  letter-spacing: 0.14em; text-transform: uppercase; text-align: center;
  padding: 12px;
  border-top: 1px solid var(--fg-dim);
  background: var(--bg);
}
.foot-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  animation: live-dot 1.4s ease-in-out infinite;
}

/* =================== Marquee ticker =================== */

.marquee {
  background: var(--fg);
  color: var(--bg);
  overflow: hidden;
  border-top: 1px solid var(--fg);
  border-bottom: 1px solid var(--fg);
  position: relative;
  z-index: 2;
}
.marquee::before, .marquee::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 1;
}
.marquee::before {
  left: 0;
  background: linear-gradient(to right, var(--fg), transparent);
}
.marquee::after {
  right: 0;
  background: linear-gradient(to left, var(--fg), transparent);
}
.marquee-track {
  display: flex; gap: 28px; align-items: center;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.22em; text-transform: uppercase;
  padding: 14px 0;
  white-space: nowrap;
  animation: marquee-scroll 60s linear infinite;
  width: max-content;
}
.marquee-track span { padding: 0 4px; }
.marq-dot {
  color: #d04d3d;
  font-size: 8px;
  vertical-align: middle;
}
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* =================== Pull quote =================== */

.pullquote {
  background: var(--bg);
  border-bottom: 1px solid var(--fg);
  padding: clamp(64px, 9vw, 128px) var(--gutter);
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.pullquote-inner {
  max-width: 920px;
  margin: 0 auto;
  position: relative;
}
.pullquote-mark {
  position: absolute;
  top: -28px;
  left: 0;
  width: 72px;
  height: 84px;
  opacity: 0.18;
  pointer-events: none;
  display: flex;
  gap: 12px;
}
.pullquote-mark span {
  display: block;
  width: 28px;
  height: 84px;
  background: var(--accent);
  transform: skewX(-16deg);
  transform-origin: top left;
  clip-path: polygon(0 0, 100% 0, 58% 100%, 0 100%);
}
.pullquote blockquote {
  font-family: var(--serif);
  font-size: 40px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
  color: var(--fg);
  margin: 0;
  letter-spacing: 0;
  position: relative;
}

@media (max-width: 640px) {
  .stat-num { font-size: 30px; }
  .why-hermes-title,
  .pullquote blockquote { font-size: 32px; }
}
.pullquote blockquote em {
  color: var(--accent); font-style: italic; font-weight: 500;
  position: relative;
  display: inline-block;
}
.pullquote blockquote em::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 4px;
  background: var(--accent);
  opacity: 0.25;
  transform: scaleX(0);
  transform-origin: left;
}
.pullquote.in-view blockquote em::after {
  animation: hero-underline 1.2s 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.pullquote-attr {
  display: flex; gap: 16px; align-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--fg-dim);
  letter-spacing: 0.18em; text-transform: uppercase;
  margin-top: 32px;
}
.pullquote-rule {
  width: 48px; height: 1px; background: var(--fg-dim);
  display: inline-block;
}

/* =================== API status pill =================== */

.api-pill {
  position: fixed;
  right: 18px; bottom: 18px;
  display: flex; align-items: center; gap: 10px;
  background: var(--fg);
  color: var(--bg);
  padding: 8px 14px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.15em; text-transform: uppercase;
  border-radius: 100px;
  box-shadow: 0 4px 16px rgba(31, 29, 26, 0.18);
  z-index: 800;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  animation: pill-in 0.6s 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes pill-in {
  to { opacity: 1; transform: translateY(0); }
}
.api-pill-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #d04d3d;
  animation: pill-dot-checking 1.6s ease-in-out infinite;
}
.api-pill.is-online .api-pill-dot {
  background: #4dc36c;
  animation: pill-dot-online 2.4s ease-in-out infinite;
}
.api-pill.is-offline .api-pill-dot {
  background: var(--fg-faint); animation: none;
}
@keyframes pill-dot-checking {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(208, 77, 61, 0); }
  50% { opacity: 0.6; transform: scale(0.85); box-shadow: 0 0 0 4px rgba(208, 77, 61, 0.25); }
}
@keyframes pill-dot-online {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(77, 195, 108, 0); }
  50% { opacity: 0.85; box-shadow: 0 0 0 5px rgba(77, 195, 108, 0.18); }
}
.api-pill-status {
  color: var(--bg); font-weight: 500;
}
.api-pill-meta {
  color: var(--fg-faint); font-size: 9px;
  border-left: 1px solid rgba(245, 240, 230, 0.15);
  padding-left: 10px; margin-left: 2px;
}
@media (max-width: 640px) { .api-pill { display: none; } }

/* =================== Cursor-following frame tip =================== */

.frame-tip {
  position: fixed;
  pointer-events: none;
  background: var(--fg);
  color: var(--bg);
  padding: 8px 12px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 700;
  opacity: 0;
  transform: translate(12px, 12px);
  transition: opacity 0.15s ease;
  box-shadow: 0 4px 14px rgba(31, 29, 26, 0.22);
  max-width: 240px;
}
.frame-tip.visible { opacity: 1; }
.frame-tip-label {
  font-size: 11px; color: var(--bg);
  font-weight: 500;
}
.frame-tip-meta {
  font-size: 9px; color: var(--fg-faint);
  letter-spacing: 0.12em;
  margin-top: 3px;
  border-top: 1px solid rgba(245, 240, 230, 0.15);
  padding-top: 4px;
}
