:root {
  color-scheme: light;
  --paper: #f6f7f4;
  --ink: #231c18;
  --muted: #5f5a55;
  --white: #fffefb;
  --red: #d9412e;
  --orange: #ee8a2a;
  --yellow: #f3c63a;
  --green: #4ba561;
  --blue: #2f8fc9;
  --slab: Rockwell, "Rockwell Nova", "American Typewriter", "Roboto Slab", Georgia, serif;
  --text: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --wide: 62rem;
  --measure: 38rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --line: 2px solid var(--ink);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
}

.wrap { max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }

a {
  color: var(--ink);
  text-decoration-color: var(--blue);
  text-decoration-thickness: 0.14em;
  text-underline-offset: 0.2em;
}
a:hover { background: var(--yellow); }
a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 3px; }

/* Header: name, three buttons, and the five-colour stripe across the full width. */
.site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; padding-block: 1.5rem 1.25rem; }
.site-name { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--slab); font-size: 1.6rem; font-weight: 700; text-decoration: none; }
.site-name:hover { background: none; }
.site-name::before {
  content: "";
  width: 1.15em;
  height: 1.15em;
  border: var(--line);
  border-radius: 5px;
  background: linear-gradient(var(--red) 0 20%, var(--orange) 20% 40%, var(--yellow) 40% 60%, var(--green) 60% 80%, var(--blue) 80%);
}
.site-head nav { display: flex; gap: 0.6rem; }
.site-head nav a {
  padding: 0.15rem 0.9rem;
  border: var(--line);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--slab);
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}
.site-head nav a:hover { background: var(--yellow); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.stripe {
  height: 14px;
  border-block: var(--line);
  background: linear-gradient(90deg, var(--red) 0 20%, var(--orange) 20% 40%, var(--yellow) 40% 60%, var(--green) 60% 80%, var(--blue) 80%);
}

main { padding-block: 3.5rem 4.5rem; }

h1, h2, h3 { font-family: var(--slab); font-weight: 700; }
h1 { margin: 0 0 1.25rem; max-width: 13ch; font-size: clamp(2.5rem, 7vw, 4.4rem); line-height: 1; letter-spacing: -0.02em; text-wrap: balance; }
.page-title { max-width: 16ch; font-size: clamp(2.3rem, 6vw, 3.6rem); }
h2 { margin: 3.25rem 0 1rem; font-size: 1.7rem; line-height: 1.2; }

p, ul, ol, dl, table { margin: 0 0 1.25rem; }
.prose > p, .prose > ul, .prose > ol, .prose > dl, .prose > h2 { max-width: var(--measure); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.55rem; }
.lede { max-width: 34rem; font-size: 1.3rem; line-height: 1.45; }
.muted { color: var(--muted); }

/* Home hero: headline on the left, house rules in a box on the right. */
.hero { display: grid; grid-template-columns: 1fr 20rem; gap: 2.5rem 3rem; align-items: start; }

.box { border: var(--line); border-radius: 14px; background: var(--white); box-shadow: 7px 7px 0 var(--red); overflow: hidden; }
.box-head { margin: 0; padding: 0.55rem 1.1rem; border-bottom: var(--line); background: var(--yellow); font-size: 1.2rem; }
.rules { margin: 0; padding: 0.4rem 1.1rem 0.6rem; list-style: none; }
.rules li { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.55rem 0; }
.rules li + li { border-top: 2px dotted var(--ink); }
.rules li::before { content: ""; flex: none; width: 0.8rem; height: 0.8rem; border: var(--line); border-radius: 3px; background: var(--red); }
.rules li:nth-child(2)::before { background: var(--orange); }
.rules li:nth-child(3)::before { background: var(--green); }
.rules li:nth-child(4)::before { background: var(--blue); }

/* Instant-photo frames: white border, thick bottom edge, hard shadow, a slight tilt. */
.snaps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.25rem 1.75rem; margin: 0; padding: 0; list-style: none; }
.snaps-three { grid-template-columns: repeat(3, 1fr); max-width: 44rem; }
.snap {
  display: block;
  margin: 0;
  padding: 0.65rem 0.65rem 0.85rem;
  border: var(--line);
  border-radius: 5px;
  background: var(--white);
  box-shadow: 5px 5px 0 var(--ink);
  color: var(--ink);
  text-decoration: none;
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}
a.snap:hover { background: var(--white); transform: rotate(0deg) translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.tilt-l2 { --tilt: -1.8deg; }
.tilt-l1 { --tilt: -0.9deg; }
.tilt-r1 { --tilt: 1deg; }
.tilt-r2 { --tilt: 1.7deg; }
.snap-photo { display: block; aspect-ratio: 1; border: var(--line); border-radius: 3px; background: var(--photo); }
.snap-photo svg { display: block; width: 100%; height: 100%; }
.photo-red { --photo: var(--red); }
.photo-orange { --photo: var(--orange); }
.photo-yellow { --photo: var(--yellow); }
.photo-green { --photo: var(--green); }
.photo-blue { --photo: var(--blue); }
.snap-name { display: block; margin-top: 0.7rem; font-family: var(--slab); font-size: 1.2rem; font-weight: 700; line-height: 1.2; }
.snap-how { display: block; color: var(--muted); font-size: 0.95rem; line-height: 1.35; }

/* Note cards: the whole card is the link; the shadow colour cycles through the stripe. */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; margin: 0; padding: 0; list-style: none; }
.card { position: relative; padding: 1rem 1.1rem 1.1rem; border: var(--line); border-radius: 14px; background: var(--white); box-shadow: 6px 6px 0 var(--accent, var(--blue)); transition: transform 0.12s ease-out, box-shadow 0.12s ease-out; }
.card:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--accent, var(--blue)); }
.card:nth-child(5n + 1) { --accent: var(--red); }
.card:nth-child(5n + 2) { --accent: var(--orange); }
.card:nth-child(5n + 3) { --accent: var(--yellow); }
.card:nth-child(5n + 4) { --accent: var(--green); }
.card a { font-family: var(--slab); font-size: 1.3rem; font-weight: 700; text-decoration: none; }
.card a:hover { background: none; }
.card a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.card p { margin: 0.3rem 0 0; color: var(--muted); }

/* Drink page top: text beside its photo. */
.drink-top { display: grid; grid-template-columns: 1fr 16rem; gap: 2rem 3.5rem; align-items: start; margin-bottom: 2.75rem; }

table { width: 100%; max-width: var(--measure); border: var(--line); border-radius: 14px; border-collapse: separate; border-spacing: 0; background: var(--white); box-shadow: 6px 6px 0 var(--blue); overflow: hidden; font-size: 1.05rem; }
th, td { padding: 0.6rem 0.9rem; text-align: left; vertical-align: top; }
th { border-bottom: var(--line); background: var(--yellow); font-family: var(--slab); font-size: 1rem; }
tbody tr + tr td { border-top: 2px dotted var(--ink); }
.spec { box-shadow: 6px 6px 0 var(--ink); }
.spec th { background: var(--photo); }
.spec .amount { white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }

.facts { display: grid; grid-template-columns: max-content 1fr; }
.facts dt, .facts dd { margin: 0; padding: 0.5rem 0; border-bottom: 2px dotted var(--ink); }
.facts dt { padding-right: 2.5rem; font-family: var(--slab); font-weight: 700; }

/* Steps are a real sequence, so they get numbers. */
.steps { padding: 0; list-style: none; counter-reset: step; }
.prose .steps { padding-left: 0; }
.steps li { position: relative; min-height: 2.2rem; margin-bottom: 1rem; padding-left: 3.1rem; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: var(--line);
  border-radius: 50%;
  background: var(--yellow);
  font-family: var(--slab);
  font-weight: 700;
  line-height: 1;
}

.site-foot { padding-block: 1.5rem 3rem; border-top: var(--line); color: var(--muted); font-size: 1rem; }
.site-foot p { margin: 0; }

@media (max-width: 56rem) {
  .hero { grid-template-columns: 1fr; }
  .hero .box { max-width: 24rem; }
  .snaps { grid-template-columns: repeat(2, 1fr); gap: 1.75rem 1.25rem; }
  .snaps-three { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .drink-top { grid-template-columns: 1fr; }
  .drink-top .snap { max-width: 15rem; }
}

@media (max-width: 34rem) {
  .cards { grid-template-columns: 1fr; }
  .snaps-three { grid-template-columns: repeat(2, 1fr); }
  .snaps-three li:nth-child(3) { display: none; }
  th, td { padding: 0.55rem 0.6rem; }
  .site-head nav a { padding-inline: 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .snap, .card, .site-head nav a { transition: none; }
}
