@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@400;500;600;700&display=swap');
/* JDYB: A Wacker Legacy — global styles. Linked by every page. */
:root {
  --navy: #0A192F; --navy-deep: #0F172A; --navy-line: #1C2E4A;
  --gold: #D4AF37; --gold-muted: #C5A059; --white: #FFFFFF;
  --text-soft: #B8C2D3;
  --header-h: 76px;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* Brand is navy in both themes; tokens stay fixed by design */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --navy: #0A192F; } }
:root[data-theme="dark"] { --navy: #0A192F; }

*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); }
body {
  margin: 0; background: var(--navy); color: var(--white);
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-optical-sizing: auto; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
::selection { background: var(--gold); color: var(--navy); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
body.drawer-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; }
.nav-link { position: relative; color: var(--text-soft); transition: color .2s; }
.nav-link[aria-current="page"] { color: var(--white); }
.nav-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* The signature: a gold baseline that runs from the paint (left) out to the horizon (right) */
.baseline-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-muted) 35%, rgba(212,175,55,.15) 100%);
}

/* Drawer */
.drawer { transform: translateX(100%); transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.drawer.is-open { transform: translateX(0); }
.drawer-scrim { opacity: 0; pointer-events: none; transition: opacity .3s; }
.drawer-scrim.is-open { opacity: 1; pointer-events: auto; }
.drawer-inner { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }

/* Hamburger morph */
.burger span { display: block; height: 1.5px; width: 22px; background: var(--white); transition: transform .3s, opacity .2s; }
.burger span + span { margin-top: 6px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Sticker buttons: a hard, no-blur shadow makes buttons look stuck on the page.
   Applies to gold buttons and gold-outline buttons sitewide. Press = button sinks. */
a.bg-gold.px-6, button.bg-gold {
  box-shadow: 0 4px 0 0 #8C6D1F;
  transition: transform .12s ease, box-shadow .12s ease, background-color .2s;
}
a.border-gold\/60 {
  box-shadow: 0 4px 0 0 rgba(212,175,55,.45);
  transition: transform .12s ease, box-shadow .12s ease, border-color .2s, color .2s;
}
a.bg-gold.px-6:active, button.bg-gold:active:not(:disabled), a.border-gold\/60:active { transform: translateY(4px); box-shadow: 0 0 0 0 transparent; }

/* ===== Game Program look (Oct 2026) =====
   Header, drawer and footer stay navy. Page content reads like a printed game program:
   dark ink on white, sturdy sans-serif text, serif headlines, gold for buttons and accents.
   Still Learning to Cook (main.kitchen) keeps its own paper-cutout look. */
main:not(.kitchen) {
  --navy: #FFFFFF; --navy-deep: #F5F6F8; --navy-line: #E1E5EB;
  --white: #0A192F; --text-soft: #4A5363;
  --gold: #7A5F17; --gold-muted: #7A5F17;
  --ink: #0A192F; --body-ink: #2B3240; --gold-ink: #7A5F17;
  background: #FFFFFF; color: var(--body-ink);
  font-family: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: auto;
}
main:not(.kitchen) h1, main:not(.kitchen) h2, main:not(.kitchen) h3, main:not(.kitchen) blockquote { color: var(--ink); }
main:not(.kitchen) .font-serif { font-weight: 500; }
main:not(.kitchen) .font-serif.italic { font-weight: 400; }
main:not(.kitchen) .font-light { font-weight: 400; }

/* Surfaces */
main:not(.kitchen) .bg-navy { background-color: #FFFFFF; }
main:not(.kitchen) .bg-navy-deep { background-color: #F5F6F8; }
main:not(.kitchen) .bg-navy-line { background-color: #E1E5EB; }
main:not(.kitchen) .border-navy-line { border-color: #E1E5EB; }

/* Text */
main:not(.kitchen) .text-white, main:not(.kitchen) .text-white\/90, main:not(.kitchen) .text-white\/80 { color: var(--ink); }
main:not(.kitchen) .text-white\/70 { color: #3D4555; }
main:not(.kitchen) .text-white\/55, main:not(.kitchen) .text-white\/45, main:not(.kitchen) .text-white\/40 { color: #5A6372; }
main:not(.kitchen) .text-white\/\[0\.035\] { color: rgba(10,25,47,.05); }
main:not(.kitchen) .text-gold, main:not(.kitchen) .text-gold\/80, main:not(.kitchen) .text-gold\/70, main:not(.kitchen) .text-gold-muted { color: var(--gold-ink); }
main:not(.kitchen) dd.text-gold { color: var(--ink); }
main:not(.kitchen) .decoration-gold\/30 { text-decoration-color: rgba(122,95,23,.45); }
main:not(.kitchen) .text-\[\#F2A68F\] { color: #B42318; }

/* Buttons keep Mike's gold; hover goes brighter instead of white */
main:not(.kitchen) .border-gold\/60 { border-color: #B8962E; }

/* Forms */
main:not(.kitchen) .field { background-color: #FFFFFF; border-color: #C9CFD8; color: var(--ink); }
main:not(.kitchen) .field::placeholder { color: #8A929E; }
main:not(.kitchen) .field:focus { border-color: #7A5F17; box-shadow: 0 0 0 1px #7A5F17; }

/* Speaking switch (data/settings.js): hidden variants stay hidden even with display utilities. */
[data-speaking][hidden] { display: none !important; }

/* ===== Phones (mobile-native skill, Oct 2026) =====
   Touch screens fake a hover on tap and leave it stuck, so every hover style lives in this block,
   which only applies when the device has a real mouse. Touch gets press feedback from :active instead.
   Tailwind's hover: classes do the same (tailwind.config.js, future.hoverOnlyWhenSupported). */
@media (hover: hover) and (pointer: fine) {
  .nav-link:hover { color: var(--white); }
  .nav-link:hover::after { transform: scaleX(1); }
  a.bg-gold.px-6:hover, button.bg-gold:hover:not(:disabled), a.border-gold\/60:hover { transform: translateY(-1px); }
  a.bg-gold.px-6:hover, button.bg-gold:hover:not(:disabled) { box-shadow: 0 5px 0 0 #8C6D1F; }
  a.border-gold\/60:hover { box-shadow: 0 5px 0 0 rgba(212,175,55,.6); }
  main:not(.kitchen) .hover\:bg-navy-deep:hover { background-color: #EEF1F5; }
  main:not(.kitchen) .hover\:text-white:hover { color: var(--ink); }
  main:not(.kitchen) .hover\:text-gold:hover { color: #5C470F; }
  main:not(.kitchen) .hover\:bg-white:hover { background-color: #E6C55A; }
}
/* No gray flash on tap for controls that already sink when pressed (sticker buttons, menu). Text links keep it. */
a.bg-gold, button, a.border-gold\/60, label { -webkit-tap-highlight-color: transparent; }
/* Taps fire at once (no double-tap wait). Zoom still works: pinch is untouched. */
a, button, label, summary, select, [role="button"] { touch-action: manipulation; }
/* Long-press on a button doesn't select its words. Body text stays selectable. */
button, a.bg-gold, a.border-gold\/60 { -webkit-user-select: none; user-select: none; }
/* Landscape on iPhone doesn't blow the text up. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
