/* ==========================================================================
   hero.css — the hero's field and the pixel face, shared by the home page
   and About (moved out of story.css, Nov 2026). Loaded after field.css, so
   these values win over the field defaults.
   ========================================================================== */

/* ---------- the field behind the greeting (field.js; defaults in field.css) */

.hero {
  position: relative;
  isolation: isolate;
  /* THE GRID — play with these. Width and height of one character cell and
     the size of the letters in it, in px. Keep the font a little smaller
     than the cell height. The face scales with the cells by itself. */
  --grid-cell-w: 4.9;
  --grid-cell-h: 8.5;
  --grid-font: 7;
  --grid-ink-panel: rgb(255 255 255);  /* grid colour on the accent panel */
  --grid-alpha-panel: 0.04;            /* its opacity, 0–1 (default 0.12) */
  --grid-alpha: 0.04;
}

@media (min-width: 600px) {
    .hero {
        --grid-cell-w: 5.6;
        --grid-cell-h: 9.5;
        --grid-font: 8;
    }
}

/* the hero's field sits over the panel's ground and under its words */
.hero { --field-z: 1; }

/* ---------- the face, pixel art in the field ----------------------------
   The face box is sized for the field from the first frame (html.js), so it
   never grows after load. field.js lights its pixels in the grid's
   characters and adds .type-field--drawn; the SVG then keeps its space but steps
   aside. Without JavaScript the SVG pixels are the face.
   Colours: the eyes in the theme's primary (shade, tone, light), a shine,
   a blush in every theme, ink for lashes and mouth. */
.hero {
  --face-ink: black;
  /* the tones of her drawing: shade ~0.70, iris ~0.85, light ~0.93 lightness */
  --face-iris-shade: oklch(from var(--accent) calc(l - 0.13) calc(c + 0.05) h);
  --face-iris: oklch(from var(--accent) calc(l + 0.01) calc(c + 0.05) h);
  --face-iris-light: oklch(from var(--accent) calc(l + 0.09) calc(c * 0.6) h);
  --face-shine: var(--light);
  --face-blush: oklch(from var(--dark) calc(l + 0.15) c h);
}

html.js .hero__face {
  width: min(86vw, 26rem);
  font-size: inherit;
  margin-block: 0;
}
.hero__face rect { stroke: none; }
.hero__face .px-k { fill: var(--face-ink); }
.hero__face .px-G { fill: var(--face-iris-shade); }
.hero__face .px-g { fill: var(--face-iris); }
.hero__face .px-h { fill: var(--face-iris-light); }
.hero__face .px-w { fill: var(--face-shine); }
.hero__face .px-p { fill: var(--face-blush); }

@media (min-width: 901px) {
  html.js .hero__face { width: min(88%, 40rem); }
}

/* About: the same two cards, the page title and its words in the theme
   block, the face beside them */
.hero__kicker {
  position: relative; z-index: 2; margin-bottom: 14px;
  font-family: var(--font-small); font-size: 0.875rem; font-weight: 600; color: var(--on-accent);
}
.hero__kicker .kicker-nav { color: inherit; }
.hero--about .hero__title { font-size: clamp(2.6rem, 5.6vw, 5.4rem); font-weight: 620; letter-spacing: -0.045em; line-height: 1; }
.hero--about .hero__intro { font-size: clamp(1.125rem, 1.6vw, 1.5rem); }
