/* Colours, corner radius and rounded type follow the iOS app's design system
   (DesignSystem/DS.swift in the app repo): cream ground, white cards, sage accent.
   The serif appears only on the fridge menu poster, as it does in the app. */
:root {
  --cream: #faf5e8;
  --sheet: #ffffff;
  --paper: #fdfaf1;
  --sage: #527d61;
  --sage-soft: #c7d6bf;
  --ink: #332921;
  --quiet: #6b6058;
  --check: rgba(82, 125, 97, 0.075);
  --shadow: 0 1px 2px rgba(51, 41, 33, 0.06), 0 10px 30px rgba(51, 41, 33, 0.1);
  --rounded: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --cream: #1c1a17;
    --sheet: #2b2621;
    --paper: #353029;
    --sage: #9cc2a6;
    --sage-soft: #384f40;
    --ink: #f0ebe0;
    --quiet: #b8afa3;
    --check: rgba(156, 194, 166, 0.055);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  padding: 24px 16px;
  color: var(--ink);
  font: 17px/1.5 var(--rounded);
  -webkit-text-size-adjust: 100%;
  /* The app's tablecloth check: two sets of faint sage stripes crossing. */
  background-color: var(--cream);
  background-image:
    linear-gradient(90deg, var(--check) 50%, transparent 50%),
    linear-gradient(var(--check) 50%, transparent 50%);
  background-size: 36px 36px;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
p, li, dd { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.2; }

a { color: var(--sage); text-underline-offset: 0.18em; }
a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 3px;
  border-radius: 4px;
}

[hidden] { display: none !important; }

/* ---- The name, with the app's icon ---- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: block;
}

/* ---- Small pages: one card in the middle (confirmed, not found) ---- */

.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
/* The name sits straight on the tablecloth here, so give it solid ground. */
.centered .brand,
.centered .elsewhere {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--cream);
}
.centered .elsewhere { font-size: 15px; color: var(--quiet); }

.card {
  width: 100%;
  max-width: 420px;
  padding: 28px 24px;
  border-radius: 14px;
  background: var(--sheet);
  box-shadow: var(--shadow);
  text-align: center;
}
.card h1 { margin-bottom: 8px; font-size: 26px; }
.card p + p { margin-top: 12px; }

.badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
}
.badge svg { width: 28px; height: 28px; }

/* ---- Long pages: a sheet of paper on the tablecloth ---- */

.sheet {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 24px 28px;
  border-radius: 14px;
  background: var(--sheet);
  box-shadow: var(--shadow);
}
.sheet.narrow { max-width: 720px; }

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.masthead nav { display: flex; gap: 20px; font-size: 16px; }
/* Narrow phones: keep the name on one line beside the two links. */
@media (max-width: 480px) {
  .masthead .brand { font-size: 17px; gap: 8px; }
  .masthead nav { gap: 14px; font-size: 15px; }
}

.footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--sage-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 15px;
  color: var(--quiet);
}
.footer .owner { margin-right: auto; }

/* ---- Home: the opening ---- */

.opening {
  display: grid;
  gap: 40px;
  margin-top: 40px;
}
.opening h1 {
  font-size: clamp(34px, 9vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.015em;
}
.opening .lede {
  margin-top: 18px;
  max-width: 30em;
  font-size: 20px;
  line-height: 1.45;
}
.ask { margin-top: 28px; }
.button {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 14px;
  background: var(--sage);
  color: var(--sheet);
  font-weight: 700;
  text-decoration: none;
}
.ask .note { margin-top: 12px; font-size: 15px; color: var(--quiet); }

/* ---- The fridge menu poster: the one loud thing on the page ---- */

.poster {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
  padding: 34px 26px 26px;
  border-radius: 6px;
  background: var(--paper);
  box-shadow: var(--shadow);
  font-family: var(--serif);
  transform: rotate(-1.2deg);
}
/* A fridge magnet holding it up. */
.poster::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.16), 0 2px 4px rgba(51, 41, 33, 0.25);
}
.poster h2 {
  font-size: 30px;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.01em;
}
.poster ol {
  margin-top: 20px;
  padding: 0;
  list-style: none;
}
.poster li { padding: 11px 0; border-top: 1px solid var(--sage-soft); }
.poster .day {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.poster .day b { font-size: 19px; }
.poster .day span { font: 14px/1.3 var(--rounded); color: var(--sage); text-align: right; }
.poster .meal { font-size: 22px; line-height: 1.25; }
.poster .meal.off { font-style: italic; color: var(--quiet); }
.poster-caption {
  margin-top: 22px;
  font-size: 15px;
  color: var(--quiet);
  text-align: center;
}

/* ---- Home: what it does ---- */

.does { margin-top: 64px; }
.does > h2,
.keeps > h2 { font-size: 30px; letter-spacing: -0.01em; }
.does dl {
  display: grid;
  gap: 28px 48px;
  margin-top: 24px;
}
.does dt { font-size: 20px; font-weight: 700; }
.does dd { margin-top: 4px; max-width: 34em; }

.keeps {
  margin-top: 64px;
  padding: 28px 24px;
  border-radius: 14px;
  background: var(--sage-soft);
}
.keeps p { margin-top: 10px; max-width: 40em; }
.keeps a { color: inherit; font-weight: 700; }

@media (min-width: 860px) {
  body { padding: 48px 32px 96px; }
  .sheet { padding: 32px 48px 36px; }
  /* The poster hangs off the right edge of the sheet, onto the tablecloth. */
  .opening {
    grid-template-columns: minmax(0, 1fr) 400px;
    align-items: center;
    gap: 56px;
    margin-top: 56px;
  }
  .opening figure { position: relative; left: 68px; margin: -24px 0; }
  .poster { transform: rotate(1.6deg); }
  .does dl { grid-template-columns: 1fr 1fr; }
  .keeps { padding: 36px 40px; }
}

/* ---- Privacy and support: plain reading ---- */

.prose { margin-top: 40px; max-width: 38em; }
.prose h1 { font-size: 38px; letter-spacing: -0.015em; }
.prose h2 { margin-top: 40px; font-size: 24px; }
.prose h3 { margin-top: 24px; font-size: 19px; }
.prose p, .prose ul { margin-top: 12px; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose .dated { color: var(--quiet); font-size: 15px; }
.prose .contact { font-size: 20px; }
