/* ============================================================
   Conduction Design System, kit chassis
   ----------------------------------------------------------------
   Three canonical chassis patterns, one shared style sheet.

     CARD chassis   .card + .card-header + .card-eyebrow + .card-title
                    Content / spec / docs pages. The default.

     HUB chassis    .hero + .hub-grid + .tile
                    Landing / index pages that grid into sub-pages.

     CHROME chassis .chrome + .stage + .spark
                    Print artefacts (paper at true scale + rationale).
                    Defined in print/print.css, lifted into preview.css
                    once .spark went global.

   Plus shared atoms used by any chassis:
     .section-label, .specimen, .api-block + .api, .crumb, .lead
   ============================================================ */

@import url("../tokens.css");
@import url("../typography.css");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--c-cobalt-50);
  padding: var(--space-12);
  min-height: 100vh;
}

/* ============================================================
   CARD chassis, content pages
   ============================================================ */
.card {
  background: var(--c-white);
  border-radius: var(--radius-xl);
  padding: var(--space-12);
  max-width: 1280px;
  margin: 0 auto;
  box-shadow: var(--shadow-2);
}

.card-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-10);
  border-bottom: 1px solid var(--c-cobalt-100);
}
.card-eyebrow {
  font-family: var(--conduction-typography-font-family-code);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-cobalt-400);
}
.card-title { font-size: var(--fs-3xl); font-weight: var(--fw-bold); }
.card-subtitle {
  font-size: var(--fs-base);
  color: var(--c-cobalt-400);
  margin-left: auto;
  text-align: right;
  max-width: 40ch;
}

/* ============================================================
   HUB chassis, landing / index pages
   ----------------------------------------------------------------
   Body padding is reset to zero so the hero can run full-bleed
   to the edges of the viewport. Hub pages set body { padding: 0; }
   in their own style block to opt in.
   ============================================================ */
.hero {
  background: var(--conduction-color-background-inverse);
  color: white;
  padding: 80px 64px 64px;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.hero.lg { padding: 96px 64px 80px; }
.hero .crumb {
  font-family: var(--conduction-typography-font-family-code);
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--c-cobalt-200);
  margin-bottom: var(--space-4);
}
.hero .crumb a { color: var(--c-cobalt-200); text-decoration: none; }
.hero .crumb a:hover { color: white; }
.hero .eyebrow {
  color: var(--c-cobalt-200);
  font-family: var(--conduction-typography-font-family-code);
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.hero h1 {
  color: white;
  font-size: 56px; font-weight: 700;
  line-height: 1.05; letter-spacing: -0.02em;
  max-width: 18ch;
}
.hero.lg h1 {
  font-size: 72px; max-width: 14ch;
  letter-spacing: -0.025em;
}
.hero p {
  color: var(--c-cobalt-100);
  font-size: 18px;
  margin-top: var(--space-5);
  max-width: 64ch;
  line-height: 1.5;
}
.hero.lg p { font-size: 20px; margin-top: var(--space-6); max-width: 60ch; }
.hero .meta {
  display: flex; gap: var(--space-8);
  margin-top: var(--space-8);
  font-family: var(--conduction-typography-font-family-code);
  font-size: 12px; color: var(--c-cobalt-200);
  flex-wrap: wrap;
}
.hero.lg .meta { margin-top: var(--space-10); }
.hero .meta span strong {
  display: block;
  color: white;
  font-family: var(--conduction-typography-font-family-body);
  font-size: 15px; font-weight: 600;
  margin-top: 4px;
}
.hero.lg .meta span strong { font-size: 16px; }

.hub-grid {
  max-width: 1280px;
  margin: 64px auto;
  padding: 0 var(--space-12);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.tile {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-1);
  transition: all 160ms ease;
  display: flex; flex-direction: column;
  gap: var(--space-4);
  border: 1px solid transparent;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-3); border-color: var(--c-cobalt-200); }
.tile.todo {
  background: var(--c-cobalt-50);
  border-style: dashed;
  pointer-events: none;
  opacity: 0.7;
}
.tile .row { display: flex; align-items: center; justify-content: space-between; }
.tile .num {
  font-family: var(--conduction-typography-font-family-code);
  font-size: 12px; letter-spacing: 0.06em;
  color: var(--c-cobalt-400);
}
.tile h3 {
  font-size: 28px; font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--c-blue-cobalt);
}
.tile p { color: var(--c-cobalt-700); font-size: 15px; line-height: 1.5; }
.tile .visual { height: 80px; display: flex; align-items: center; gap: var(--space-2); }
.tile .arrow { color: var(--c-cobalt-400); font-size: 22px; transition: transform 160ms; }
.tile:hover .arrow { color: var(--c-orange-knvb); transform: translateX(4px); }

.hub-footer {
  max-width: 1280px;
  margin: 80px auto 64px;
  padding: 0 var(--space-12);
  color: var(--c-cobalt-400);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.hub-footer code { font-family: var(--conduction-typography-font-family-code); }
.hub-footer a { color: var(--c-cobalt-400); }

/* ============================================================
   Shared atoms, used inside any chassis
   ============================================================ */
.section-label {
  font-family: var(--conduction-typography-font-family-code);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-cobalt-400);
  margin: var(--space-12) 0 var(--space-4);
}
.section-label:first-child { margin-top: 0; }

/* Specimen, neutral demo container (cobalt-50 bg, centered content) */
.specimen {
  background: var(--c-cobalt-50);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-5);
  min-height: 160px;
  flex-wrap: wrap;
}

/* API table, used on component reference pages */
.api-block {
  background: white;
  border: 1px solid var(--c-cobalt-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.api-block + .api-block { margin-top: var(--space-5); }
.api {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.api th {
  text-align: left;
  padding: var(--space-4) var(--space-5);
  font-family: var(--conduction-typography-font-family-code);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--c-cobalt-400);
  font-weight: 500;
  background: var(--c-cobalt-50);
  border-bottom: 1px solid var(--c-cobalt-100);
}
.api td {
  text-align: left;
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--c-cobalt-50);
  vertical-align: top;
  line-height: 1.5;
  color: var(--c-cobalt-900);
}
.api code {
  font-family: var(--conduction-typography-font-family-code);
  font-size: 12px;
  background: var(--c-cobalt-50);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--c-cobalt-900);
}

/* Spark aside, "why we built it this way" rationale block */
.spark {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-cobalt-100);
  padding: var(--space-6);
}
.spark.sticky { position: sticky; top: var(--space-6); }
.spark .label {
  font-family: var(--conduction-typography-font-family-code);
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--c-orange-knvb);
  margin-bottom: var(--space-2);
  display: flex; align-items: center; gap: var(--space-2);
}
.spark .label::before {
  content: "";
  width: 10px; height: 12px;
  clip-path: var(--hex-pointy-top);
  background: var(--c-orange-knvb);
  display: block;
}
.spark h2 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}
.spark p.lede {
  color: var(--c-cobalt-700);
  font-size: var(--fs-sm);
  line-height: 1.55;
  margin-bottom: var(--space-4);
}
.spark ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: var(--space-3);
}
.spark li {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--c-cobalt-900);
  padding-left: var(--space-4);
  position: relative;
}
.spark li::before {
  content: "";
  position: absolute; left: 0; top: 7px;
  width: 8px; height: 9.2px;
  clip-path: var(--hex-pointy-top);
  background: var(--c-blue-cobalt);
}
.spark li strong { color: var(--c-cobalt-900); }
.spark .footer-note {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--c-cobalt-100);
  font-family: var(--conduction-typography-font-family-code);
  font-size: 11px;
  color: var(--c-cobalt-400);
  line-height: 1.5;
}

/* ============================================================
   Utilities
   ============================================================ */
.token {
  font-family: var(--conduction-typography-font-family-code);
  font-size: var(--fs-xs);
  color: var(--c-cobalt-400);
}

.hex { clip-path: var(--hex-pointy-top); display: inline-block; }


/* ============================================================
   Thumbnails — abstract token-built previews for hub tiles.

   See SKILL.md "Thumbnails" for the four archetypes (token
   specimen, shrunk artefact, hex-glyph row, abstract paper) and
   the constraints (height ladder 80/100/110px, gap ladder, one
   orange element max, code-style meta label, tokens-only).

   Use these classes inside `.tile .visual`. For one-off shapes,
   inline-style with tokens — but if a shape repeats, give it a
   class here so the next tile can reach for it.
   ============================================================ */

/* Trailing code-style meta label, "13 artefacts · 13 deck layouts" */
.thumb-meta {
  font-family: var(--conduction-typography-font-family-code);
  font-size: 11px;
  color: var(--c-cobalt-400);
  letter-spacing: 0.06em;
  align-self: center;
  margin-left: var(--space-3);
}

/* Token specimens — show the tokens themselves at glanceable scale. */
.swatch-row { display: flex; gap: 4px; height: 48px; width: 100%; }
.swatch-row > div { flex: 1; border-radius: var(--radius-sm); }

.type-stack { display: flex; flex-direction: column; gap: 2px; }
.type-stack span { line-height: 1.1; }

.hex-row { display: flex; gap: var(--space-2); align-items: center; }
.hex-row .h { width: 36px; height: 42px; clip-path: var(--hex-pointy-top); }

/* Paper-artefact mocks — a tiny card / page / envelope / slide / banner /
   email signature. Paint with token colours, never images. */
.mock-card {
  width: 92px; height: 56px;
  background: var(--c-blue-cobalt);
  border-radius: 3px;
  padding: 6px 8px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-2);
}
.mock-card .mc-name { color: white; font-size: 8px; font-weight: 700; letter-spacing: -0.01em; }
.mock-card .mc-role { color: var(--c-cobalt-200); font-size: 6px; }
.mock-card .mc-qr { width: 14px; height: 14px; background: white; border-radius: 1px; align-self: flex-end; }

.mock-paper {
  width: 56px; height: 76px;
  background: white;
  border: 1px solid var(--c-cobalt-200);
  border-radius: 2px;
  padding: 5px;
  display: flex; flex-direction: column; gap: 2px;
}
.mock-paper .mp-h    { height: 6px; background: var(--c-blue-cobalt); border-radius: 1px; width: 50%; }
.mock-paper .mp-l    { height: 2px; background: var(--c-cobalt-100); border-radius: 1px; }
.mock-paper .mp-foot { margin-top: auto; height: 3px; background: var(--c-orange-knvb); border-radius: 1px; width: 30%; }

.mock-env {
  width: 100px; height: 60px;
  background: var(--c-cobalt-50);
  border: 1px solid var(--c-cobalt-200);
  border-radius: 2px;
  position: relative;
}
.mock-env::after {
  content: ""; position: absolute; inset: 0;
  border-bottom: 30px solid var(--c-cobalt-100);
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  height: 0;
}

.mock-banner {
  width: 32px; height: 76px;
  background: var(--c-blue-cobalt);
  border-radius: 2px;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 5px;
}
.mock-banner span { width: 12px; height: 14px; clip-path: var(--hex-pointy-top); background: white; }

.mock-slide {
  width: 100px; height: 56px;
  background: var(--c-cobalt-900);
  border-radius: 3px;
  padding: 6px 8px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-2);
}
.mock-slide .ms-t { color: white; font-size: 8px; font-weight: 600; }
.mock-slide .ms-d { display: flex; gap: 2px; }
.mock-slide .ms-d span { width: 6px; height: 7px; clip-path: var(--hex-pointy-top); background: var(--c-cobalt-300); }
.mock-slide .ms-d span:first-child { background: var(--c-orange-knvb); }

.mock-sig {
  width: 100%; max-width: 180px; height: 50px;
  background: white;
  border: 1px solid var(--c-cobalt-100);
  border-radius: 3px;
  padding: 6px 8px;
  display: flex; gap: 6px; align-items: center;
}
.mock-sig .ms-av { width: 32px; height: 32px; clip-path: var(--hex-pointy-top); background: var(--c-blue-cobalt); flex-shrink: 0; }
.mock-sig .ms-text { display: flex; flex-direction: column; gap: 2px; }
.mock-sig .ms-text .l1 { height: 5px; width: 60px; background: var(--c-cobalt-700); border-radius: 1px; }
.mock-sig .ms-text .l2 { height: 3px; width: 50px; background: var(--c-cobalt-400); border-radius: 1px; }
.mock-sig .ms-text .l3 { height: 3px; width: 40px; background: var(--c-orange-knvb); border-radius: 1px; }
