/* Zane Design System — styleguide-local layout only. Every color, font and
   component below comes
   from /shared/editorial.css — if something here needs a literal color, that
   is a sign the token it wants is missing from the layer. */

body { padding-bottom: 0; }

#sg-main { max-width: 1200px; margin: 0 auto; padding: 0 var(--page-gutter); }

.sg-section {
  padding: 72px 0;
  border-top: 1px solid var(--rule);
}
.sg-section h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 14px 0 18px;
}
.sg-h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin: 44px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-2);
}
.sg-h3-note { color: var(--ink-300); text-transform: none; letter-spacing: 0.08em; }

.sg-lede {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-700);
  max-width: 62ch;
}
.sg-lede--tight { margin-top: 0; }

.sg-note {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-500);
  max-width: 72ch;
}
.sg-note strong { color: var(--ink-700); font-weight: 600; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--blue-700);
}
a { color: var(--blue-700); }

.sg-code {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  background: var(--bg-paper-2);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--blue-700);
  padding: 16px 18px;
  overflow-x: auto;
}
.sg-code code { color: var(--ink-700); font-size: inherit; }
.sg-code--wide { max-width: 100%; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.sg-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 84px;
}
.sg-hero-flair { position: absolute; inset: 0; z-index: 0; opacity: 0; transition: opacity 0.6s ease; }
.sg-hero-flair.is-live { opacity: 1; }
/* Knocks the field back to a texture so the headline stays the loudest thing. */
.sg-hero-flair::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    var(--bg-paper) 0%,
    color-mix(in srgb, var(--bg-paper) 78%, transparent) 46%,
    color-mix(in srgb, var(--bg-paper) 42%, transparent) 100%);
}
.sg-hero-body { position: relative; z-index: 1; }
.sg-hero h1 {
  font-size: clamp(44px, 8vw, 92px);
  line-height: 0.98;
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 12px 0 22px;
}
.sg-hero h1 em { font-style: italic; color: var(--blue-700); }

/* ── Adopt ────────────────────────────────────────────────────────── */
.sg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.sg-files { margin: 14px 0 0; }
.sg-files dt { margin-top: 14px; }
.sg-files dd {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-500);
}

/* ── Tokens ───────────────────────────────────────────────────────── */
.sg-ramp-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin: 26px 0 10px;
}
.sg-ramp-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 2px; }
.sg-chip { border: 1px solid var(--rule); }
.sg-chip-well { height: 56px; }
.sg-chip-meta {
  padding: 7px 8px;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.45;
  color: var(--ink-400);
  border-top: 1px solid var(--rule);
  word-break: break-all;
}
.sg-chip-meta b { display: block; color: var(--ink-700); font-weight: 500; }

/* ── Type ─────────────────────────────────────────────────────────── */
.sg-type-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule-2);
}
.sg-spec { font-size: 21px; margin: 0; color: var(--ink-900); }
.sg-spec em { font-family: "Playfair Display", var(--serif); font-style: italic; font-weight: 700; }

/* ── Components ───────────────────────────────────────────────────── */
.sg-specimens { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 18px; }

.sg-navdemo { position: relative; height: 120px; overflow: hidden; border: 1px solid var(--rule); }
/* Two hard bands: the difference blend has to be seen inverting against both. */
.sg-navdemo-band {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--ink-abs) 0 50%, var(--paper-0) 50% 100%);
}
.sg-navdemo-nav { position: absolute; top: 0; left: 0; right: 0; }

/* ── Motion ───────────────────────────────────────────────────────── */
.sg-motion { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin: 18px 0 28px; }
.sg-motion-cell { border-top: 1px solid var(--rule); padding-top: 12px; }

.sg-cascade { list-style: none; margin: 0; padding: 0; max-width: 560px; }
.sg-cascade li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-500);
}
.sg-cascade .dots {
  flex: 1;
  border-bottom: 1px dotted var(--ink-300);
  transform-origin: left;
}

/* ── Shaders ──────────────────────────────────────────────────────── */
.sg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.sg-grid--four { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.sg-cell { border: 1px solid var(--rule); }
.sg-cell-host { position: relative; height: 118px; overflow: hidden; background: var(--bg-paper-2); }
.sg-cell-host > div { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s ease; }
.sg-cell-host > div.is-live { opacity: 1; }
.sg-cell-meta {
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-400);
  border-top: 1px solid var(--rule);
}
.sg-cell-meta b { color: var(--ink-700); font-weight: 500; }

/* ── ASCII ────────────────────────────────────────────────────────── */
.sg-ramp { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 2px; }
.sg-ramp-cell {
  border: 1px solid var(--rule);
  padding: 12px 0 8px;
  text-align: center;
  background: var(--bg-ink);
}
.sg-ramp-glyph { font-family: var(--mono); font-size: 22px; line-height: 1; color: var(--blue-300); }
.sg-ramp-val { font-family: var(--mono); font-size: 9px; color: var(--ink-400); margin-top: 8px; }

.sg-ascii-frame {
  container-type: inline-size;
  background: var(--bg-ink);
  border: 1px solid var(--rule);
  overflow: hidden;
  padding: 10px 0;
}
.sg-ascii {
  margin: 0;
  font-family: var(--mono);
  /* 200 columns at the mono stack's 0.6em advance is 120em; see the same
     calc on .row-art--shuttrr in the main stylesheet. */
  --ascii-cols: 200;
  font-size: calc(100cqw / (var(--ascii-cols) * 0.6));
  line-height: 1.02;
  white-space: pre;
  color: var(--blue-300);
}

/* ── Nav toggle ───────────────────────────────────────────────────── */
.sg-theme {
  appearance: none;
  background: transparent;
  border: 1px solid var(--rule);
  cursor: pointer;
  padding: 4px 9px;
  font-size: 13px;
  line-height: 1;
  color: var(--ink-700);
}
.sg-theme:hover { border-color: var(--ink-400); }

@media (max-width: 760px) {
  .sg-two { grid-template-columns: 1fr; gap: 32px; }
  .sg-section { padding: 52px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sg-hero-flair,
  .sg-cell-host > div { transition: none; }
}
