@font-face {
  font-family: "Archivo Black";
  src: url("/fonts/archivo-black-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #fff8e7;
  --card: #ffffff;
  --ink: #111111;      /* text, borders and hard shadows */
  --muted: #4a463e;
  --yellow: #ffd23f;
  --pink: #ff7aa2;
  --blue: #7cd4ff;
  --on-color: #111111; /* text on the colour blocks */
  --border: 2.5px solid var(--ink);
  --display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16140f;
    --card: #24211b;
    --ink: #f3ead8;
    --muted: #c9bfae;
    --yellow: #f5c518;
    --pink: #ff6f98;
    --blue: #5ec8f7;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.4 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

button { font: inherit; color: inherit; }

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 1.05rem;
}
.pill {
  border: var(--border);
  border-radius: 99px;
  padding: 3px 11px;
  background: var(--card);
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hero: the next meal */
.hero {
  background: var(--yellow);
  color: var(--on-color);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 18px 18px 16px;
  min-height: 150px;
  margin-right: 6px; /* room for the shadow */
}
.eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  background: var(--on-color);
  color: var(--yellow);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 7px;
}
.hero h1.title, .hero .empty {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.75rem, 7.4vw, 2.4rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
.hero .empty { font-size: clamp(1.4rem, 5.6vw, 1.8rem); }
.dishes.big .extra { color: var(--on-color); opacity: 0.8; font-size: 1rem; margin-top: 6px; }
.dishes.big .alt { margin-top: 14px; padding-top: 10px; border-top: 2.5px dashed var(--on-color); }
.dishes.big .alt .title { font-size: 1.05rem; font-weight: 600; }
.dishes.big .tag, .dishes.big .generic .title { color: var(--on-color); opacity: 0.7; }

/* Tomorrow */
.tomorrow {
  display: flex;
  flex-direction: column;
  margin: 14px 6px 0 0;
  background: var(--pink);
  color: var(--on-color);
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 11px 14px;
}
.tomorrow[hidden] { display: none; }
.nextlabel { font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.nexttitle { font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.tomorrow .extra { font-size: 0.9rem; opacity: 0.8; }

/* Week navigation */
.weeknav {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  margin: 28px 0 2px;
}
.weeklabel { text-align: center; display: flex; flex-direction: column; }
.weeklabel strong { font-family: var(--display); font-weight: 400; font-size: 1.4rem; line-height: 1.1; }
.weeklabel span { color: var(--muted); font-size: 0.9rem; }
.arrow {
  width: 42px;
  height: 42px;
  border: var(--border);
  border-radius: 11px;
  background: var(--card);
  box-shadow: 3px 3px 0 var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
}
.arrow:hover { background: var(--yellow); color: var(--on-color); }
.arrow:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.thisweek-row { text-align: center; min-height: 38px; padding-top: 6px; }
.thisweek {
  border: var(--border);
  border-radius: 99px;
  background: var(--blue);
  color: var(--on-color);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 4px 12px;
  cursor: pointer;
}
.thisweek[hidden] { display: none; }

/* Week list */
.week { transition: opacity 0.15s; }
.week.loading { opacity: 0.5; }

.days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.day {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 13px;
  background: var(--card);
  border: var(--border);
  border-radius: 15px;
  padding: 12px;
  margin-right: 5px;
}
.day.today {
  background: var(--blue);
  color: var(--on-color);
  box-shadow: 5px 5px 0 var(--ink);
}
.day.today .extra, .day.today .tag, .day.today .generic .title { color: var(--on-color); opacity: 0.75; }
.day.past { opacity: 0.5; }
.day.closed { background: transparent; border-style: dashed; }

.dayhead {
  background: var(--ink);
  color: var(--bg);
  border-radius: 10px;
  text-align: center;
  padding: 6px 0 5px;
  align-self: start;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.wd { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.dm { font-family: var(--display); font-size: 1.35rem; }
.today .dayhead { background: var(--on-color); color: var(--blue); }
.todaytag { display: none; }

.dishes { list-style: none; margin: 0; padding: 0; }
.dish { display: flex; flex-direction: column; }
.dish + .dish { margin-top: 9px; }
.dish .title { font-weight: 700; font-size: 1rem; line-height: 1.22; text-wrap: pretty; }
.dish.alt .title { font-weight: 600; }
.dish .extra { color: var(--muted); font-size: 0.88rem; font-weight: 500; }
.dish.generic .title { color: var(--muted); font-weight: 500; }
.tag {
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.allergens { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.allergen {
  font-size: 0.72rem;
  font-weight: 700;
  border: 2px solid currentColor;
  border-radius: 99px;
  padding: 0 8px;
}
.none { margin: 0; align-self: center; color: var(--muted); font-weight: 600; }

.notice {
  background: var(--card);
  border: var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 5px 12px 0;
  white-space: pre-line;
  font-weight: 600;
}
.notice.holiday {
  background: var(--yellow);
  color: var(--on-color);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--display);
  font-weight: 400;
  text-align: center;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 4px 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.foot a { color: inherit; font-weight: 700; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
