/* ==========================================================================
   STORYBOOK — the hero, rebuilt from the founder's artifact (2026-10-01).
   Loaded after x-storybook.css on a/storybook.html only. Scope: .st-hh.

   One painted scene, full width of the page column, rising behind the empty
   top bar. Across the top, a mock nav on a cream band: the wordmark at the
   left, this page's own sections at the right, on one row. With the rail
   showing, the fixed action cluster holds the top-right of the band, so the
   row runs just below it.

   Wide (hero 1000px and up): the words are live type set on the painting,
   placed in reference pixels (1685 x 934) via --st-u, with floors so they
   stay readable, over a soft leaf haze at the left.
   Narrow: the picture leads (the landscape half of the painting), and the
   words follow on the leaf ground.

   Face is the page's own ("Brygada X", x-storybook.css). Tokens are scoped
   here. Contrast: ink #443228 on band #F5E7CF 9.9:1; cream #FBF4E7 on
   sienna #8C4A26 6.3:1; sienna on leaf #F6ECDC 5.8:1.
   ========================================================================== */
.st-hh {
  --st-hh-leaf: #F6ECDC;
  --st-hh-band: #F5E7CF;
  --st-hh-paper: #FBF4E7;
  --st-hh-ink: #443228;
  --st-hh-ink-2: #6B5138;
  --st-hh-deep: #2F2018;
  --st-hh-sienna: #8C4A26;
  --st-hh-wash: #EDD6A8;
  --st-hh-dusk: #5C4434;
  --st-hh-serif: "Brygada X", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  container-type: inline-size;
  --st-u: calc(100cqi / 1685);
  position: relative;
  display: block;
  isolation: isolate;
  background: var(--st-hh-leaf);
  color: var(--st-hh-ink);
  font-family: var(--st-hh-serif);
  /* Full width of the page column, rising behind the empty top bar. */
  margin: calc(-3rem - var(--s2, 0.5rem)) calc(-1 * var(--s6, 2rem)) 0;
}
@media (max-width: 60rem) {
  .st-hh { margin-inline: calc(-1 * var(--s4, 1rem)); }
}
.st-hh * { box-sizing: border-box; }
.st-hh a:focus-visible { outline: 2px solid var(--st-hh-sienna); outline-offset: 3px; }

/* ---- the mock nav: a cream band, one full-width row --------------------- */
.st-hh__nav {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px clamp(20px, calc(60 * var(--st-u)), 60px);
  min-height: max(60px, calc(86 * var(--st-u)));
  padding: 8px max(20px, calc(64 * var(--st-u))) 8px max(20px, calc(118 * var(--st-u)));
  background: var(--st-hh-band);
  border-bottom: 1px solid rgba(107, 81, 56, 0.28);
  box-shadow: 0 1px 0 rgba(251, 244, 231, 0.6);
}
@media (min-width: 60.0625rem) {
  .st-hh__nav { /* nav on top, the action bar in the room under its row (founder, 2026-10-01) */ padding-top: 10px; padding-bottom: calc(3rem + var(--s2, 0.5rem)); }
}
.st-hh__mark {
  flex: none;
  color: var(--st-hh-ink);
  text-decoration: none;
  font: 400 clamp(19px, calc(32 * var(--st-u)), 26px)/1 var(--st-hh-serif);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.st-hh__toc {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px clamp(4px, calc(31 * var(--st-u)), 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.st-hh__toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  color: var(--st-hh-ink);
  text-decoration: none;
  font: 400 clamp(15px, calc(19 * var(--st-u)), 19px)/1 var(--st-hh-serif);
  white-space: nowrap;
  text-underline-offset: 7px;
  text-decoration-thickness: 2px;
}
.st-hh__toc a:hover { text-decoration: underline; text-decoration-color: var(--st-hh-sienna); }
.st-hh__toc a.st-hh__pill {
  min-height: max(40px, calc(51 * var(--st-u)));
  margin-left: clamp(0px, calc(12 * var(--st-u)), 12px);
  padding: 0 max(18px, calc(37 * var(--st-u)));
  border-radius: 999px;
  background: var(--st-hh-sienna);
  color: var(--st-hh-paper);
}
.st-hh__toc a.st-hh__pill:hover { background: var(--st-hh-dusk); text-decoration: none; }

/* ---- the painting and the words on it ----------------------------------- */
.st-hh__stage { position: relative; }
.st-hh__art { display: block; margin: 0; }
.st-hh__art img { display: block; width: 100%; height: auto; }

/* Reading ground: a soft leaf-coloured haze over the left of the painting,
   so the words sit on light sky. A legibility layer, not a painted texture. */
.st-hh__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 34% 30% at 25% 44%, rgba(246, 236, 220, 0.9) 0%, rgba(246, 236, 220, 0.82) 50%, rgba(246, 236, 220, 0.4) 80%, rgba(246, 236, 220, 0) 100%);
}

.st-hh__copy {
  position: absolute;
  z-index: 2;
  left: calc(127 * var(--st-u));
  top: calc(189 * var(--st-u));
  width: calc(690 * var(--st-u));
  min-width: 440px;
}
.st-hh__copy > * { margin: 0; }
.st-hh__kicker {
  font-size: max(11px, calc(16.5 * var(--st-u)));
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--st-hh-sienna);
  line-height: 1;
}
.st-hh .st-hh__title {
  margin: calc(14 * var(--st-u)) 0 0 calc(-11 * var(--st-u));
  font: 700 max(52px, calc(146 * var(--st-u)))/0.98 var(--st-hh-serif);
  letter-spacing: -0.028em;
  color: var(--st-hh-deep);
  overflow-wrap: normal;
}
.st-hh__tagline {
  margin-top: calc(7 * var(--st-u)) !important;
  max-width: 22.5em;
  font-size: max(18px, calc(35.5 * var(--st-u)));
  line-height: 1.12;
  letter-spacing: -0.005em;
}
.st-hh__quote {
  margin-top: calc(11 * var(--st-u)) !important;
  max-width: 21em;
  font-size: max(17px, calc(27.5 * var(--st-u)));
  font-style: italic;
  line-height: 1.24;
  color: var(--st-hh-sienna);
}
.st-hh__actions {
  display: flex;
  flex-wrap: wrap;
  gap: max(12px, calc(17 * var(--st-u)));
  margin-top: max(16px, calc(22 * var(--st-u))) !important;
}
.st-hh__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: max(10px, calc(18 * var(--st-u)));
  height: max(44px, calc(58 * var(--st-u)));
  padding: 0 max(22px, calc(46 * var(--st-u)));
  border-radius: 999px;
  font: 400 max(15px, calc(22 * var(--st-u)))/1 var(--st-hh-serif);
  text-decoration: none;
  white-space: nowrap;
}
.st-hh__btn svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.st-hh__btn--solid { background: var(--st-hh-sienna); color: var(--st-hh-paper); }
.st-hh__btn--solid:hover { background: var(--st-hh-dusk); }
.st-hh__btn--line { color: var(--st-hh-ink); border: 1.5px solid var(--st-hh-ink); min-width: calc(227 * var(--st-u)); }
.st-hh__btn--line:hover { background: var(--st-hh-wash); }

/* ---- narrow: picture first, words after --------------------------------- */
@container (max-width: 999px) {
  .st-hh__stage::before { display: none; }
  .st-hh__art img { max-height: 72vh; object-fit: cover; object-position: 50% 60%; }
  .st-hh__copy {
    position: static;
    width: auto;
    min-width: 0;
    padding: 30px clamp(20px, 6cqi, 56px) 44px;
    background: var(--st-hh-leaf);
    border-top: 1px solid rgba(107, 81, 56, 0.3);
  }
  .st-hh__kicker { font-size: 12px; }
  .st-hh .st-hh__title { font-size: clamp(56px, 15cqi, 110px); margin: 6px 0 0 -3px; }
  .st-hh__tagline { margin-top: 14px !important; font-size: clamp(19px, 3.6cqi, 26px); max-width: 30ch; }
  .st-hh__quote { margin-top: 14px !important; font-size: clamp(18px, 3.2cqi, 22px); }
  .st-hh__actions { gap: 12px; margin-top: 24px !important; }
  .st-hh__btn { padding: 0 24px; gap: 12px; }
  .st-hh__btn--line { min-width: 0; }
}
/* Phone: the wordmark keeps the first row; the sections wrap under it. */
@container (max-width: 559px) {
  .st-hh__nav { flex-wrap: wrap; padding-block: 14px 8px; }
  .st-hh__toc { flex: 1 0 100%; justify-content: space-between; gap: 0; margin-left: -6px; }
  .st-hh__toc a { font-size: 16px; }
  .st-hh__toc a.st-hh__pill { margin-left: 8px; padding: 0 16px; }
}
@container (max-width: 359px) {
  .st-hh__toc a { padding: 0 4px; font-size: 15px; }
  .st-hh__toc a.st-hh__pill { margin-left: 4px; padding: 0 12px; }
}

/* The painting was generated (founder, 2026-10-01); it says so on the hero. */
.st-hh { position: relative; }
.st-hh__gen { position: absolute; z-index: 3; right: 14px; bottom: 10px; margin: 0; padding: 2px 6px; background: rgba(252, 246, 232, .82); font: italic 400 12px/1.3 "Brygada X", Georgia, serif; color: #4a3b2a; }
@media (max-width: 760px) { .st-hh__gen { position: static; display: block; text-align: right; background: none; padding: 6px 16px 0; } }

/* The quote over the painted sky: a deeper sienna (audit 2026-10-01: 3.9:1 at p10). */
.st-hh__quote { color: #6E3A1E; }
