/* Masterful Capital — optimization layer (2026-11-23)
   Loads AFTER styles.css. Additive only: it never redefines layout the
   base sheet owns; it adds accessibility affordances, the Inter body
   face (house standard), focus states, the footer contact block, the
   scroll-reveal states used by reveal.js, and print hygiene.

   Colour discipline (measured, WCAG contrast):
   - #D4AF37 on #050505 = 9.7:1 — used for small gold text on dark.
   - #C6A15B on #050505 = 8.4:1 — passes, kept for large/display use.
   - Gold on ivory fails (#C6A15B on #f7f3ea = 2.2:1) — gold body text
     on any light surface must use #6b531f (6.4:1 on #f2f0e9). */

:root{
  --mc-black:#050505;
  --mc-ivory:#f7f3ea;
  --mc-gold:#C6A15B;
  --mc-gold-bright:#D4AF37;
  --mc-gold-on-light:#6b531f;
  --mc-rule:rgba(198,161,91,.38);
}

/* Body face: Inter per the house standard; Manrope remains the fallback
   for any component the base sheet sets explicitly. */
body{font-family:"Inter","Manrope",system-ui,-apple-system,"Segoe UI",sans-serif}

::selection{background:var(--mc-gold);color:var(--mc-black)}

/* Skip link — first focusable element, visible only on focus */
.skip-link{
  position:absolute;left:1rem;top:-4rem;z-index:200;
  background:var(--mc-gold-bright);color:var(--mc-black);
  padding:.65rem 1.1rem;font-weight:600;font-size:.9rem;
  text-decoration:none;border-radius:0 0 .35rem .35rem;
  transition:top .18s ease;
}
.skip-link:focus{top:0}

/* Visible, consistent focus for keyboard users */
a:focus-visible,button:focus-visible,input:focus-visible,
select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{
  outline:2px solid var(--mc-gold-bright);
  outline-offset:3px;
  border-radius:2px;
}

/* Small gold labels on the dark theme get the brighter, higher-contrast gold */
.kicker,.sub,.idx,.flab{color:var(--mc-gold-bright)}

/* Refined link behaviour: hairline gold underline grows on hover */
main a:not(.cta):not(.more){
  text-underline-offset:.22em;
  text-decoration-color:rgba(212,175,55,.45);
}
.cta,.more{transition:transform .18s ease,filter .18s ease,background-color .18s ease,color .18s ease}
.cta:hover,.more:hover{filter:brightness(1.12)}
.cta:active{transform:translateY(1px)}

/* Footer pillars + contact block (markup added by the optimization pass) */
.fcontact{
  display:grid;gap:1.4rem;margin:2rem 0 .4rem;
  padding-top:1.6rem;border-top:1px solid var(--mc-rule);
  font-size:.94rem;line-height:1.55;
}
@media (min-width:880px){
  .fcontact{grid-template-columns:1fr 1fr 1fr;gap:2rem}
}
.fcontact .flab{
  font-size:.72rem;letter-spacing:.18em;text-transform:uppercase;
  margin-bottom:.45rem;font-weight:600;
}
.fcontact a{font-weight:500}

/* Scroll reveal — states exist only when reveal.js has run (html.js),
   so content is fully visible with JavaScript off or blocked. */
html.js .reveal-init{opacity:0;transform:translateY(14px)}
html.js .reveal-init.in{
  opacity:1;transform:none;
  transition:opacity .7s ease,transform .7s ease;
}

/* Reduced motion: no reveal travel, no transitions */
@media (prefers-reduced-motion: reduce){
  html.js .reveal-init{opacity:1;transform:none;transition:none}
  *,*::before,*::after{transition-duration:.01ms !important;animation-duration:.01ms !important}
  html{scroll-behavior:auto}
}

/* Print: ivory paper, dark text, gold only where it still reads (#6b531f) */
@media print{
  body{background:#fff;color:#111}
  .skip-link,nav .links,.scrollcue{display:none}
}
