/* Neutral site theme; profiles override the tokens under [data-theme]. */

@font-face { font-family: 'Alfa Slab One'; src: url('/fonts/alfa-slab-one.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Archivo Black'; src: url('/fonts/archivo-black.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Caveat'; src: url('/fonts/caveat.ttf') format('truetype'); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #f6f5f2;
  --ink: #1c1c1c;
  --muted: #5d5d5d;
  --accent: #1c1c1c;
  --button-bg: #1c1c1c;
  --button-ink: #f6f5f2;
  --button-hover: #c9c9c9;
  --note-bg: #fffbea;
  --note-ink: #1c1c1c;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: var(--font-body);
  --font-button: var(--font-body);
  --font-hand: var(--font-body);
  --band: none;
}

[data-theme='walter'] {
  --bg: #faf4e6;
  --ink: #1a1714;
  --muted: #5b524a;
  --accent: #b8322a;
  --button-bg: #1a1714;
  --button-ink: #faf4e6;
  --button-hover: #e9b23a;
  --note-bg: #fffdf6;
  --note-ink: #1f3f7a;
  --font-head: 'Alfa Slab One', Georgia, serif;
  --font-button: 'Archivo Black', var(--font-body);
  --font-hand: 'Caveat', cursive;
  /* the blue and white checked oilcloth on Walter's kitchen table */
  --band: repeating-linear-gradient(90deg, #1f3f7a33 0 14px, transparent 14px 28px),
    repeating-linear-gradient(0deg, #1f3f7a33 0 14px, #fff 14px 28px);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--font-body);
}

body::before {
  content: '';
  display: block;
  height: 28px;
  background: var(--band);
}

main {
  flex: 1;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 16px 56px;
}

h1, h2 { font-family: var(--font-head); font-weight: 400; line-height: 1.15; color: var(--accent); }
h1 { font-size: clamp(2rem, 7vw, 2.75rem); margin: 0 0 12px; }
h2 { font-size: 1.4rem; margin: 40px 0 12px; }

a { color: inherit; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }

p > img { display: block; border-radius: 12px; }

ol, ul { padding-left: 1.3em; }
li + li { margin-top: 6px; }

/* Profile */

.profile__head { text-align: center; }
.avatar {
  display: block;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  object-fit: cover;
}
.tagline { margin: 0 auto; max-width: 28em; color: var(--muted); font-size: 1.1rem; }
.channels--soon { text-align: center; color: var(--muted); font-style: italic; }

/* Links render as chalkboard price signs, alternately tilted like the video subtitles. */
.links ul { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 14px; }
.links li + li { margin: 0; }
.links a {
  display: block;
  padding: 16px 20px;
  border-radius: 6px;
  background: var(--button-bg);
  color: var(--button-ink);
  font-family: var(--font-button);
  font-size: 1.15rem;
  text-align: center;
  text-decoration: none;
  transform: rotate(-0.6deg);
  transition: color 0.15s, transform 0.15s;
}
.links li:nth-child(even) a { transform: rotate(0.6deg); }
.links li a:hover, .links li a:focus-visible { color: var(--button-hover); transform: rotate(0deg) scale(1.02); }
.links a:focus-visible { outline: 3px solid var(--button-hover); outline-offset: 3px; }

/* Jana's handwritten slip */
.note {
  margin: 32px auto;
  max-width: 26em;
  padding: 14px 20px;
  background: var(--note-bg);
  color: var(--note-ink);
  font-family: var(--font-hand);
  font-size: 1.6rem;
  line-height: 1.25;
  transform: rotate(-1.2deg);
  box-shadow: 0 2px 8px #1a171422;
}
.note p { margin: 0; }

/* Recipe */

.back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-family: var(--font-button);
  text-decoration: none;
}
.avatar--sm { display: inline-block; margin: 0; border-width: 2px; }
.recipe ol li::marker { font-family: var(--font-button); color: var(--accent); }

/* Legal pages */

.effective { color: var(--muted); font-size: 0.95rem; }
.facts { display: grid; gap: 8px; margin: 0; }
.facts div { display: grid; grid-template-columns: minmax(7em, auto) 1fr; gap: 12px; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

/* Footer */

.site-footer { padding: 24px 16px 32px; border-top: 1px solid #1a171422; font-size: 0.9rem; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
.site-footer a[aria-current] { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .links a, .links li:nth-child(even) a, .note { transform: none; transition: none; }
}
