/* Lunch — one page, two campuses side by side (ETH Zentrum | UZH Zentrum),
   as they are across the street. The weekday row is the page's one loud
   element; everything else stays quiet so ~60 dishes scan fast. Diet is a
   coloured tab on each dish (vegan/vegetarian/fish/meat). */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin-ext.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #eef1f4;        /* porcelain */
  --surface: #ffffff;
  --ink: #1c2430;       /* slate */
  --muted: #5b6676;
  --faint: #b9c2cd;     /* unselected weekdays */
  --line: #dde3ea;
  --vegan: #2f8f5b;
  --vegetarian: #86a21f;
  --fish: #2c7da0;
  --meat: #c2453d;
  --focus: #2c7da0;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10141a;
    --surface: #18202a;
    --ink: #e7ebf0;
    --muted: #9aa5b4;
    --faint: #3a4553;
    --line: #27313d;
    --vegan: #4cb57d;
    --vegetarian: #a9c64a;
    --fish: #4ba3c7;
    --meat: #e0675e;
    --focus: #6cb8da;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10141a;
  --surface: #18202a;
  --ink: #e7ebf0;
  --muted: #9aa5b4;
  --faint: #3a4553;
  --line: #27313d;
  --vegan: #4cb57d;
  --vegetarian: #a9c64a;
  --fish: #4ba3c7;
  --meat: #e0675e;
  --focus: #6cb8da;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}
a { color: inherit; }

/* ---- header ------------------------------------------------------------ */

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 28px var(--gutter) 0;
}
.brand h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.today {
  margin: 0;
  color: var(--muted);
}
.settings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* segmented controls (price group, language) and filter chips */
.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.seg button,
.filters button {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.seg button[aria-pressed="true"],
.filters button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

/* ---- the weekday row (the loud part) ------------------------------------ */

.week {
  padding: 28px var(--gutter) 0;
}
.weeks {
  display: flex;
  gap: 16px;
  margin-bottom: 4px;
}
.weeks button {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.weeks button[aria-pressed="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.days {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(4px, 1.5vw, 24px);
}
.day {
  text-align: left;
  color: var(--faint);
  transition: color 120ms ease;
}
.day:hover:not(:disabled) { color: var(--muted); }
.day[aria-pressed="true"] { color: var(--ink); }
.day:disabled { cursor: default; opacity: 0.5; }
.day-name {
  display: block;
  font-size: clamp(2.25rem, 9vw, 6.5rem);
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 0.95;
}
.day-date {
  display: block;
  margin-top: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}
.day-date .is-today {
  color: var(--ink);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 24px var(--gutter) 0;
}
.filters button {
  box-shadow: inset 0 0 0 1px var(--line);
  background: var(--surface);
}

/* ---- the two campuses ----------------------------------------------------- */

main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 32px clamp(16px, 3vw, 40px);
  padding: 28px var(--gutter) 16px;
}
main.is-switching .campus { animation: settle 180ms ease-out; }
@keyframes settle {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

.state {
  grid-column: 1 / -1;
  margin: 24px 0;
  color: var(--muted);
}

.campus h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.outlets {
  display: grid;
  gap: 14px;
}

.outlet {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 16px 6px;
}
.outlet-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.outlet-title {
  flex: 1;
  min-width: 0;
}
.outlet h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.outlet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin: 1px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.star {
  width: 32px;
  height: 32px;
  margin: -4px -6px 0 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--faint);
}
.star:hover { color: var(--muted); }
.star[aria-pressed="true"] { color: #d9a400; }
.star svg { width: 18px; height: 18px; }

.notice {
  margin: 8px 0 8px;
  font-size: 0.875rem;
  color: var(--meat);
}

/* ---- dishes ------------------------------------------------------------- */

.dishes {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.dish + .dish { border-top: 1px solid var(--line); }
.dish details > summary {
  list-style: none;
  display: grid;
  grid-template-columns: 4px 1fr auto;
  gap: 0 12px;
  padding: 10px 0;
  cursor: pointer;
}
.dish details > summary::-webkit-details-marker { display: none; }
.tab {
  grid-row: 1 / span 3;
  border-radius: 2px;
  background: var(--line);
}
.diet-vegan .tab { background: var(--vegan); }
.diet-vegetarian .tab { background: var(--vegetarian); }
.diet-fish .tab { background: var(--fish); }
.diet-meat .tab { background: var(--meat); }

.line {
  grid-column: 2;
  font-size: 0.8125rem;
  color: var(--muted);
}
.dish-name {
  grid-column: 2;
  font-weight: 650;
  line-height: 1.3;
}
.dish-desc {
  grid-column: 2;
  margin-top: 2px;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 62ch;
}
.price {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: start;
  padding-top: 1px;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
}
.price small {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}

.more {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 0 0 12px 16px;
  font-size: 0.875rem;
  color: var(--muted);
}
.dish details[open] .more { animation: open 160ms ease-out; }
@keyframes open {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.more p { margin: 0 0 4px; }
.more img {
  width: 112px;
  height: 84px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--line);
}

.quiet {
  margin: 14px 2px 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---- footer ----------------------------------------------------------------- */

.foot {
  padding: 8px var(--gutter) 40px;
  font-size: 0.875rem;
  color: var(--muted);
}
.foot p { margin: 4px 0; max-width: 75ch; }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.legend span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 0.9em;
  margin-right: 6px;
  border-radius: 2px;
  vertical-align: -0.1em;
  background: var(--line);
}
.legend .key-vegan::before { background: var(--vegan); }
.legend .key-vegetarian::before { background: var(--vegetarian); }
.legend .key-fish::before { background: var(--fish); }
.legend .key-meat::before { background: var(--meat); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 520px) {
  .top { padding-top: 20px; }
  .seg button { padding: 6px 10px; }
  .outlet { padding: 12px 14px 4px; }
  .more { grid-template-columns: 1fr; margin-left: 16px; }
}

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