/* ==========================================================================
   jimbennett.world — style.css
   Sections 1 to 15. Section 15 added session 06.

   Governed by Website_PageInventory_v1_7.md:
     §7   palette and WCAG 2.2 AA
     §7.3 tokens (reproduced below verbatim — do not add to them)
     §8   hand-coded static build: no build step, no framework, no packages

   This file is the only stylesheet. Edit it directly.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS — inventory §7.3. Ruled values. Do not edit without a W ruling.

   #846A1A (gold on cream at 4.51) is DELIBERATELY ABSENT. §7.2 rules it in
   only by explicit ruling, never as "gold, a bit darker". If it is needed,
   rule it, then add it here.
   -------------------------------------------------------------------------- */
:root {
  --vc-navy:      #15304B;
  --vc-gold:      #C9A227;
  --vc-cream:     #F6EFDD;
  --vc-navy-mid:  #4A6480;
  --vc-navy-pale: #B9C4CF;
  --vc-gold-pale: #E4D29B;

  /* Layout constants — not ruled, adjust freely */
  --measure: 36rem;
  --pad:     1.5rem;
  --rule:    2px;
}

/* --------------------------------------------------------------------------
   2. TYPEFACES — RULED. W33, 3 September 2026. No longer provisional.

   The site face is the system serif stack below. No webfont is licensed,
   self-hosted, or requested from a third party.

   VictoryCode_DesignSystem_Adobe.md does not ratify a face, and was never
   going to. Its §2 rules that the figures are set in a Times-metric serif
   and that the book's own text face is substituted at typesetting. There
   was no face here to inherit — only a rule for a later decision.

   Ruled on three grounds: no font files added to a ten-file site, no licence
   to track, and no third-party request on page load — which would be a
   personal-data transfer to account for in /privacy. If the book's face is
   later licensed for web, that is a fresh ruling against a real face rather
   than a guess at one.

   Consequence, accepted rather than overlooked: display and body are the
   same stack. Register is carried by scale, weight and spacing — sections 3
   and 7 — not by contrast of face.
   -------------------------------------------------------------------------- */
:root {
  --font-display: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-body:    Georgia, "Iowan Old Style", "Times New Roman", serif;
}

/* --------------------------------------------------------------------------
   3. BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--vc-cream);
  color: var(--vc-navy);                 /* 11.76 — §7.1 body text */
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 2.5rem 0 0.75rem;
  font-weight: 600;
}
h1 { font-size: 2.125rem; margin-top: 0; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1875rem; }

p, ul, ol { margin: 0 0 1.1rem; }

/* Links: navy, underlined. Colour never carries the meaning on its own. */
a {
  color: var(--vc-navy);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
a:hover { text-decoration-thickness: 2px; }

/* --------------------------------------------------------------------------
   4. FOCUS — §7.4. Visible navy indicator, minimum 2px, keyboard only.
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: var(--rule) solid var(--vc-navy);
  outline-offset: 2px;
}
.site-foot :focus-visible {
  outline-color: var(--vc-cream);        /* navy ground — navy ring would vanish */
}

/* --------------------------------------------------------------------------
   5. SKIP LINK — first tab stop on every page.
   -------------------------------------------------------------------------- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--vc-navy);
  color: var(--vc-cream);
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip:focus {
  left: 0;
}

/* --------------------------------------------------------------------------
   6. LAYOUT
   -------------------------------------------------------------------------- */
.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 var(--pad);
}
main { padding: 2rem 0 4rem; }
main p, main ul, main ol { max-width: var(--measure); }

/* --------------------------------------------------------------------------
   7. HEADER AND NAVIGATION
   -------------------------------------------------------------------------- */
.site-head {
  border-bottom: 1px solid var(--vc-navy-pale);
  padding: 1.25rem 0 0.75rem;
}
.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 2rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { text-decoration: underline; }

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
}
.site-nav a {
  text-decoration: none;
  padding: 0.35rem 0;
  display: inline-block;
  border-bottom: var(--rule) solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--vc-navy-mid); }

/* Current page: weight + rule, never colour alone. */
.site-nav a[aria-current="page"] {
  font-weight: 700;
  border-bottom-color: var(--vc-navy);
}

/* --------------------------------------------------------------------------
   8. FOOTER — reversed panel. Cream on navy 11.76; gold-pale on navy 8.99.
   -------------------------------------------------------------------------- */
.site-foot {
  background: var(--vc-navy);
  color: var(--vc-cream);
  padding: 2rem 0;
  margin-top: 3rem;
  font-size: 0.9375rem;
}
.site-foot a { color: var(--vc-gold-pale); }
.site-foot p { margin: 0 0 0.4rem; max-width: none; }
.site-foot .foot-meta { color: var(--vc-navy-pale); }

/* --------------------------------------------------------------------------
   9. BUTTON — navy on gold, 5.58. §7.1.
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  background: var(--vc-gold);
  color: var(--vc-navy);
  border: var(--rule) solid var(--vc-navy);
  padding: 0.6rem 1.2rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--vc-gold-pale); }

/* --------------------------------------------------------------------------
   10. RULE — decorative gold. §7.2: gold on cream carries no information.
   -------------------------------------------------------------------------- */
.rule-gold {
  border: 0;
  border-top: 3px solid var(--vc-gold);
  width: 3rem;
  margin: 2rem 0;
}

/* --------------------------------------------------------------------------
   11. FORMS — every field labelled. §7.4.
   -------------------------------------------------------------------------- */
.field { margin: 0 0 1.1rem; max-width: var(--measure); }
.field label {
  display: block;
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 0.3rem;
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--vc-navy);
  background: #FFFFFF;
  border: var(--rule) solid var(--vc-navy-mid);
  padding: 0.5rem 0.6rem;
}
.field textarea { min-height: 9rem; }

/* --------------------------------------------------------------------------
   12. STUB MARKER — visible scaffolding. DELETE THIS RULE BEFORE LAUNCH.
   -------------------------------------------------------------------------- */
.stub {
  border-left: 3px solid var(--vc-navy-pale);
  padding: 0.1rem 0 0.1rem 1rem;
  margin: 0 0 1.5rem;
  color: var(--vc-navy-mid);             /* 5.34 — §7.1 secondary text */
  font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   13. MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* --------------------------------------------------------------------------
   14. HOME AND FORMS — motto, consent, small print. W34, amended W35.

   The honeypot rule (.hp) was DELETED at W35. It existed only to hide Brevo's
   email_address_check field in the embedded form, and that form is withdrawn.
   Nothing on the site uses it now. If a form is ever embedded again, the rule
   comes back with it.
   -------------------------------------------------------------------------- */
.motto {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 1.6rem;
}

/* Consent checkbox. The label wraps the input, so it must not inherit the
   block label from section 11. §7.4's labelling requirement still holds.
   Unused on Home since W35. Kept for /contact, which needs the same shape. */
.consent label {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-weight: 400;
  font-size: 0.9375rem;
}
.consent input {
  width: auto;                           /* section 11 sets 100% */
  margin-top: 0.3rem;
  flex-shrink: 0;
}

/* Small print. Carries the W12 disclosure under the mailing-list link. */
.smallprint {
  font-size: 0.875rem;
  color: var(--vc-navy-mid);             /* 5.34 — §7.1 secondary text */
  max-width: var(--measure);
}

/* --------------------------------------------------------------------------
   15. PORTRAIT — /about only, §5.5. Added session 06.

   Soft radial mask rather than a hard edge: the photograph is shot on
   near-white and the ground is cream, so a rectangle would show a visible
   white patch against the page.

   The mask centre sits at 42% vertically, not 50%, because the face occupies
   the upper portion of a 400 × 590 crop. Centred at 50% the fade eats the
   forehead. Do not "tidy" this to 50%.

   Requires /img/jim.jpg. Source is 400 × 590 and 57.5 KB, already resized and
   approved. Nothing else on the site uses /img/ yet.
   -------------------------------------------------------------------------- */
.portrait {
  display: block;
  width: 260px;
  max-width: 60%;
  height: auto;
  margin: 0 0 1.5rem;
     -webkit-mask-image: radial-gradient(ellipse closest-side at 50% 46%, #000 55%, transparent 100%);
          mask-image: radial-gradient(ellipse closest-side at 50% 48%, #000 65%, transparent 100%);
}

@media (min-width: 40rem) {
  .portrait { float: right; margin: 0.3rem 0 1rem 2rem; }
}