/* Hello Egg - shared site styles.
 *
 * The palette is the studio logo's own three colours (docs/brand.md, Logo and
 * favicon): ink ground, cream text, yolk accent. The user picked them for the
 * site on 2026-10-11. The other tones are mixes of those three, not new
 * colours, so the logo stays the single source.
 *
 * Plain CSS, no build step. Pages link this with a relative path so they still
 * open from file://.
 */

:root {
  --ink: #15181d;    /* Ink: the ground */
  --cream: #f2ede3;  /* Cream: text, the egg white */
  --yolk: #f5b83d;   /* Yolk: the one accent */

  --muted: color-mix(in srgb, var(--cream) 62%, var(--ink));
  --line: color-mix(in srgb, var(--cream) 14%, var(--ink));
  --panel: color-mix(in srgb, var(--cream) 5%, var(--ink));

  --wrap: 960px;
  --sans: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--ink); }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font: 17px/1.6 var(--sans);
}

a { color: var(--yolk); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cream); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

header {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 40px 24px 8px;
}

/* The wordmark SVG carries its own margin inside a 500x150 box, so the image
 * is nudged left to put the h of hello on the column edge. */
header h1 { margin: 0; line-height: 0; }
header h1 img { display: block; width: min(420px, 78vw); height: auto; margin-left: -24px; }

section { padding: 40px 0; border-top: 1px solid var(--line); }
section:first-child { border-top: 0; }

h2 {
  font: 700 26px/1.2 var(--sans);
  letter-spacing: -0.01em;
  color: var(--cream);
  margin: 0 0 20px;
}

footer {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 28px 24px 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

/* Keyboard focus must stay visible - the site is read by press on unfamiliar
 * machines, and a lost focus ring is a real accessibility regression. */
a:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 600px) {
  header { padding: 24px 16px 0; }
  header h1 img { margin-left: -14px; }
  .wrap { padding: 0 16px; }
  footer { padding: 24px 16px 48px; }
  h2 { font-size: 22px; }
}
