/* ============================================================================
   Oli's Anecdotes — site chrome
   ----------------------------------------------------------------------------
   Layout only. Every colour, radius, size and space comes from oli-dark.css,
   so this file cannot drift from the teachings it wraps. If something here
   hardcodes a hex, that is a bug.
   ========================================================================== */

* { box-sizing: border-box; }
body { margin: 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 var(--md-space-4); }

/* --- Header + nav --------------------------------------------------------- */
header.top {
  border-bottom: 1px solid var(--md-outline-variant);
  background: color-mix(in srgb, var(--md-surface-low) 88%, transparent);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(10px);
}
.top-inner {
  display: flex; align-items: center; gap: var(--md-space-4);
  /* Only set the vertical padding here. The horizontal padding comes from
     .wrap (class="wrap top-inner") — a `padding: … 0` shorthand would win on
     source order and zero out the left/right, leaving the brand flush to the
     edge. Adding a little extra left so the wordmark clears the edge comfortably
     and lines up just inside the content. */
  padding-top: var(--md-space-2); padding-bottom: var(--md-space-2);
  /* This padding-left REPLACES .wrap's 16px (later source order wins), it does
     not add to it — so set the full value here. 24px sits the wordmark just
     right of the content edge (hero/cards are at 16px), comfortably off the edge. */
  padding-left: var(--md-space-6);
  flex-wrap: wrap;
}

/* Brand: logo image if present, text wordmark if not. The <img> hides itself
   on error so the site never shows a broken-image icon. */
.brand { display: flex; align-items: center; gap: var(--md-space-2); text-decoration: none; color: inherit; }
.brand img { height: 34px; width: auto; display: block; }
.brand .wordmark { font-weight: 800; font-size: var(--md-text-xl); letter-spacing: -.02em; }
.brand .wordmark .accent { color: var(--md-primary); }
.brand-tag {
  font-size: var(--md-text-2xs); color: var(--md-on-surface-variant);
  letter-spacing: .12em; text-transform: uppercase;
}

nav.sections { display: flex; gap: var(--md-space-1); margin-left: auto; flex-wrap: wrap; }
nav.sections a {
  font-size: var(--md-text-sm); text-decoration: none;
  color: var(--md-on-surface-variant);
  padding: var(--md-space-2) var(--md-space-3);
  border-radius: var(--md-shape-full);
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease;
}
nav.sections a:hover { background: color-mix(in srgb, var(--md-primary) 8%, transparent); color: var(--md-on-surface); }
nav.sections a[aria-current="page"] {
  color: var(--md-primary);
  border-color: var(--md-primary-container);
  background: color-mix(in srgb, var(--md-primary) 10%, transparent);
}
nav.sections a.planned { opacity: .45; cursor: default; }
nav.sections a.planned:hover { background: none; color: var(--md-on-surface-variant); }

/* --- Hero ---------------------------------------------------------------- */
.hero { padding: 56px 0 var(--md-space-6); }
.hero h1 { font-size: 34px; line-height: 1.15; margin: 0 0 var(--md-space-3); font-weight: 600; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--md-primary); }
.hero p { font-size: var(--md-text-base); color: var(--md-on-surface-variant); max-width: 62ch; margin: 0; }
.eyebrow {
  font-size: var(--md-text-2xs); letter-spacing: .16em; text-transform: uppercase;
  color: var(--md-teal); margin: 0 0 var(--md-space-2);
}

/* --- Cards --------------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--md-space-3); padding-bottom: 56px; }
a.card, div.card { display: flex; flex-direction: column; gap: var(--md-space-2); text-decoration: none; color: inherit; }
.card-top { display: flex; align-items: flex-start; gap: var(--md-space-3); }
.card-icon { font-size: 22px; line-height: 1; }
.card h2 { font-size: var(--md-text-base); font-weight: 600; margin: 0 0 2px; }
.card p { font-size: var(--md-text-md); color: var(--md-on-surface-variant); margin: 0; line-height: 1.5; }
.meta { display: flex; flex-wrap: wrap; gap: var(--md-space-2); margin-top: auto; padding-top: var(--md-space-2); }
.chip {
  font-size: var(--md-text-2xs); padding: 2px var(--md-space-2);
  border-radius: var(--md-shape-full); border: 1px solid var(--md-outline-variant);
  color: var(--md-on-surface-variant);
}
.chip.documentary { color: var(--md-secondary); border-color: var(--md-secondary-container); }
.chip.comic       { color: var(--md-primary);   border-color: var(--md-primary-container); }
.chip.storybook   { color: var(--md-tertiary);  border-color: var(--md-tertiary-container); }
.chip.deep-dive   { color: var(--md-teal);      border-color: var(--md-outline-variant); }
.chip.count       { color: var(--md-teal); border-color: var(--md-outline-variant); }

/* --- Section bands (grouped index) --------------------------------------- */
.band { margin-top: var(--md-space-6); }
.band-first { margin-top: var(--md-space-4); }
.band-head { margin-bottom: var(--md-space-3); }
.band-head h2 {
  font-size: var(--md-text-lg); font-weight: 600; margin: 0;
  color: var(--md-on-surface);
}
.band-head p {
  font-size: var(--md-text-md); color: var(--md-on-surface-variant);
  margin: 2px 0 0; max-width: 68ch;
}
.band .grid { padding-bottom: 0; }

.card.planned { opacity: .55; cursor: default; }
.blocked-note {
  font-size: var(--md-text-xs); color: var(--md-error);
  border-left: 2px solid var(--md-error); padding-left: var(--md-space-2);
  margin-top: var(--md-space-2); line-height: 1.45;
}

/* --- Footer -------------------------------------------------------------- */
footer.site {
  border-top: 1px solid var(--md-outline-variant);
  padding: var(--md-space-6) 0; font-size: var(--md-text-xs);
  color: var(--md-on-surface-variant);
}
footer.site p { margin: 0 0 var(--md-space-2); max-width: 78ch; }

@media (max-width: 640px) {
  .hero { padding: 32px 0 var(--md-space-4); }
  .hero h1 { font-size: 26px; }
  nav.sections { margin-left: 0; width: 100%; }
}
