:root {
  --paper: #e9eef1;
  --ink: #1f2a44;
  --muted: #55607a;
  --cup: #ffffff;
  --sleeve: #6b4226;
  --marker: #2b5fd9;
  --line: #c7d0d8;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #18202f;
  --ink: #e8ecf3;
  --muted: #a3adc2;
  --cup: #222c3e;
  --sleeve: #b07a52;
  --marker: #8fb0ff;
  --line: #34405a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  transition: background-color .25s, color .25s;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--marker); outline-offset: 3px; border-radius: 4px; }

.bar {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: center;
  max-width: 64rem; margin: 0 auto; padding: 1.25rem 1.5rem;
}
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; text-decoration: none; }
nav { display: flex; align-items: center; gap: 1.25rem; }
nav a { text-decoration: none; color: var(--muted); }
nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
.toggle {
  display: inline-flex; align-items: center; gap: .4rem;
  font: inherit; font-size: .9rem; color: var(--ink);
  background: var(--cup); border: 1px solid var(--line);
  padding: .4rem .8rem; border-radius: 999px; cursor: pointer;
}
:root[data-theme="dark"] .toggle img { filter: invert(1); }

main { max-width: 64rem; margin: 0 auto; padding: 1rem 1.5rem 4rem; }
.hero { max-width: 36rem; margin: 2rem 0 3rem; }
h1 {
  font-size: clamp(2.6rem, 7vw, 4.75rem);
  line-height: 1; letter-spacing: -.03em; margin: 0 0 1rem; font-weight: 700;
}
h2 { font-size: 1.4rem; margin: 2.5rem 0 .75rem; }
.hero p { color: var(--muted); font-size: 1.2rem; margin: 0; }

/* The memorable bit: each order is a takeaway cup with the name in marker */
.cups {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 2.5rem 1.5rem;
}
.cup {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  min-height: 15rem; padding: 2.25rem 1rem 1.5rem;
  background: var(--cup);
  clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%);
}
.cup::before { /* lid line */
  content: ""; position: absolute; inset: 0 0 auto; height: .6rem; background: var(--ink);
}
.cup::after { /* sleeve */
  content: ""; position: absolute; left: 0; right: 0; top: 55%; height: 2.4rem;
  background: var(--sleeve); opacity: .9;
}
.name {
  font-family: "Caveat", "Comic Sans MS", cursive;
  font-size: 2.3rem; line-height: 1; color: var(--marker);
  transform: rotate(-4deg); margin-bottom: .6rem;
}
.drink { font-weight: 700; font-size: 1.05rem; }
.note { position: relative; z-index: 1; margin-top: auto; font-size: .85rem; color: var(--muted); max-width: 9rem; }

.tally dl { display: flex; flex-wrap: wrap; gap: 1rem 3rem; margin: 0; }
.tally dt { color: var(--muted); font-size: .95rem; }
.tally dd { margin: 0; font-size: 1.6rem; font-weight: 700; }

.prose { max-width: 38rem; }
.prose h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); margin-top: 2rem; }
.prose p { margin: 0 0 1rem; }

.foot { max-width: 64rem; margin: 0 auto; padding: 2rem 1.5rem 3rem; color: var(--muted); border-top: 1px solid var(--line); font-size: .95rem; }

@media (prefers-reduced-motion: reduce) { body { transition: none; } }
