/* Thoughts For Food — warm cream page, terracotta accents, serif headings */
:root {
  --bg: #2b2320;
  --page: #fffdfa;
  --text: #3d3733;
  --heading: #2f2825;
  --muted: #7a6f68;
  --accent: #b05430;        /* terracotta, same as the site icon */
  --accent-dark: #8a3f22;
  --bar: #332924;
  --footer: #2b2320;
  --line: #e7ded4;
  --tint: #fbf4ec;
  --error: #b3261e;
  --font-body: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-head: "Yrsa", Georgia, "Times New Roman", serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.125rem/1.7 var(--font-body);
}

a { color: var(--accent); }
a:hover, a:focus { color: var(--accent-dark); }
img { max-width: 100%; height: auto; }

.visually-hidden, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--accent); color: #fff; padding: .6rem 1rem; text-decoration: none;
}
.skip-link:focus { left: 0; color: #fff; }

.page {
  max-width: 1180px;
  margin: 0 auto;
  background: var(--page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- header ---------- */
.site-header { text-align: center; padding: 0 0 1.75rem; }

/* The banner is 2.41:1; it is cropped to a shallower band on wide screens so it
   doesn't push the writing below the fold. The name sits in the middle of the
   frame, so a centred crop keeps it. */
.site-banner { display: block; }          /* full-bleed: no side padding here */
.site-banner img {
  display: block; width: 100%;
  height: clamp(9.5rem, 23vw, 17rem); object-fit: cover; object-position: center 52%;
}

/* the text keeps its own gutter, since the header itself has none */
.site-title {
  margin: 1.5rem 0 0; padding: 0 1rem;
  font: 700 clamp(2.1rem, 6vw, 3.1rem)/1.1 var(--font-head); letter-spacing: -.01em;
}
.site-title a { color: var(--heading); text-decoration: none; }
.site-title a:hover, .site-title a:focus { color: var(--accent); }
.site-description {
  margin: .6rem auto 0; padding: 0 1rem; max-width: 42rem;
  color: var(--muted); font-style: italic;
}

/* ---------- menu ---------- */
.main-nav { background: var(--bar); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; }
.main-nav a {
  display: block; padding: .9rem 1.05rem; color: #fff; text-decoration: none;
  font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.main-nav a:hover, .main-nav a:focus, .main-nav a[aria-current="page"] { background: var(--accent); color: #fff; }
.menu-toggle-box { position: absolute; opacity: 0; pointer-events: none; }
.menu-toggle { display: none; }

/* ---------- content ---------- */
.content { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: 2.75rem 1.5rem 3.5rem; }
.entry { max-width: 40rem; margin: 0 auto; }
.entry-title { color: var(--heading); font: 700 clamp(1.9rem, 5vw, 2.6rem)/1.18 var(--font-head); margin: 0 0 1.25rem; }
.entry-title a { color: inherit; text-decoration: none; }
.entry p { margin: 0 0 1.15rem; }
.entry ul { padding-left: 1.4rem; }
.entry li { margin: .3rem 0; }
.entry h2, .entry h3 { color: var(--heading); font-family: var(--font-head); line-height: 1.25; margin: 2rem 0 .75rem; }
.entry h2 { font-size: 1.7rem; }
.entry h3 { font-size: 1.35rem; }
.centered { text-align: center; }

.standfirst {
  font: italic 400 1.2rem/1.6 var(--font-head);
  color: var(--muted);
  margin: -.4rem 0 1.75rem;
}
.breadcrumb {
  margin: 0 0 .5rem; font-size: .78rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover, .breadcrumb a:focus { color: var(--accent); }

figure.photo { margin: 1.75rem 0; text-align: center; }
figure.photo img { border-radius: 3px; }
figure.photo figcaption { margin-top: .6rem; color: var(--muted); font-size: .92rem; font-style: italic; }

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 1.5rem 0 2rem; }
.quotes blockquote {
  margin: 0; padding: 1.1rem 1.25rem; background: var(--tint);
  border-left: 3px solid var(--accent); border-radius: 0 3px 3px 0;
}
.quotes blockquote p { margin: 0 0 .5rem; font: italic 400 1.05rem/1.5 var(--font-head); color: var(--heading); }
.quotes cite { color: var(--muted); font-size: .88rem; font-style: normal; }

.cta { margin-top: 2rem; }
.button {
  display: inline-block; padding: .75rem 1.9rem; border-radius: 3px;
  background: var(--accent); color: #fff; text-decoration: none;
  font: 600 .88rem var(--font-body); letter-spacing: .08em; text-transform: uppercase;
}
.button:hover, .button:focus { background: var(--accent-dark); color: #fff; }

/* tables (the college-cooking meal plan and grocery list) */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
.entry table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .88rem; line-height: 1.45; }
.entry td, .entry th { border: 1px solid var(--line); padding: .5rem .6rem; vertical-align: top; text-align: left; }
.entry tr:nth-child(odd) td { background: var(--tint); }

/* ---------- home: section cards ---------- */
.sections { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.sections-heading {
  margin: 0 0 1.5rem; text-align: center; color: var(--heading);
  font: 700 1.6rem var(--font-head);
}
.section-cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem;
}
.section-card-link {
  display: flex; flex-direction: column; height: 100%;
  color: inherit; text-decoration: none;
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
  background: #fff; transition: border-color .15s, transform .15s;
}
.section-card-link:hover, .section-card-link:focus {
  border-color: var(--accent); transform: translateY(-2px); color: inherit;
}
.section-card-link > img, .section-card-plate {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
}
.section-card-plate { background: var(--tint) url("../img/icon.png") center/3.25rem no-repeat; }
.section-card-body { display: block; padding: 1rem 1.15rem 1.25rem; }
.section-card-title {
  display: block; color: var(--heading); font: 700 1.3rem/1.25 var(--font-head);
}
.section-card-link:hover .section-card-title, .section-card-link:focus .section-card-title { color: var(--accent); }
.section-card-text { display: block; margin-top: .4rem; font-size: .95rem; color: var(--text); }
.section-card-count {
  display: block; margin-top: .6rem; color: var(--muted);
  font-size: .76rem; letter-spacing: .09em; text-transform: uppercase;
}

/* ---------- section pages: the article list ---------- */
.article-list { list-style: none; margin: 2rem auto 0; padding: 0; max-width: 40rem; }
.article-item + .article-item { border-top: 1px solid var(--line); }
.article-item a {
  display: flex; align-items: center; gap: 1.15rem;
  padding: 1rem .5rem; text-decoration: none; color: inherit;
}
.article-item a:hover, .article-item a:focus { background: var(--tint); color: inherit; }
/* contain, not cover: a couple of these are much wider than 4:3 and cropping
   them cuts the subject (the MY4SONS licence plate, for one) */
.article-item img {
  flex: none; width: 7.5rem; aspect-ratio: 4 / 3; object-fit: contain;
  border-radius: 3px; background: var(--tint);
}
.article-item-title { font: 600 1.22rem/1.3 var(--font-head); color: var(--heading); }
.article-item a:hover .article-item-title, .article-item a:focus .article-item-title { color: var(--accent); }
.article-list-plain .article-item a { padding: .85rem .5rem; }

.entry-nav {
  max-width: 40rem; margin: 2.5rem auto 0; padding-top: 1.5rem;
  border-top: 1px solid var(--line); font-size: .95rem;
}
.entry-nav a { text-decoration: none; font-weight: 600; }
.entry-nav a:hover, .entry-nav a:focus { text-decoration: underline; }

/* ---------- forms ---------- */
.contact-form { margin-top: 2rem; max-width: 560px; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .3rem; }
.req { font-weight: 400; color: var(--muted); font-size: .9em; }
input[type="text"], input[type="email"], input[type="url"], input[type="password"], textarea {
  width: 100%; padding: .6rem .7rem; font: inherit; color: inherit;
  border: 1px solid #d6c9bc; border-radius: 3px; background: #fff;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
[aria-invalid="true"] { border-color: var(--error); }
.error { color: var(--error); margin: .3rem 0 0; font-size: .95rem; }
button {
  font: 600 .88rem var(--font-body); letter-spacing: .08em; text-transform: uppercase;
  color: #fff; background: var(--bar); border: 0; border-radius: 3px; padding: .75rem 1.6rem; cursor: pointer;
}
button:hover, button:focus { background: var(--accent); }
.notice { background: var(--tint); border-left: 4px solid var(--accent); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.notice h2 { margin: 0 0 .25rem; font: 700 1.5rem var(--font-head); color: var(--heading); }
.notice p { margin: .25rem 0; }

/* /admin */
form.inline { display: inline; }
.link-button { background: none; color: var(--accent); padding: 0; text-transform: none; letter-spacing: 0; font-size: .95rem; text-decoration: underline; }
.link-button:hover, .link-button:focus { background: none; color: var(--accent-dark); }
.message { border: 1px solid var(--line); border-radius: 4px; padding: 1rem 1.25rem; margin: 1rem 0; }
.message .meta { display: block; color: var(--muted); font-size: .9rem; }
.message .body { white-space: pre-wrap; margin: .75rem 0; }
.admin code { background: var(--tint); padding: .1rem .35rem; border-radius: 3px; font-size: .9em; }

/* ---------- footer ---------- */
.site-footer { background: var(--footer); color: #fff; text-align: center; padding: 1.75rem 1rem 2rem; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .section-cards { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
  .quotes { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .site-header { padding: 0 0 1.25rem; }
  .site-title { margin-top: 1.1rem; }
  .content { padding: 1.75rem 1rem 2.5rem; }
  .section-cards { grid-template-columns: 1fr; }
  .article-item img { width: 5.5rem; }
  .article-item a { gap: .9rem; }
  .menu-toggle {
    display: block; padding: .9rem 1rem; color: #fff; cursor: pointer; text-align: center;
    font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  }
  .main-nav ul { display: none; flex-direction: column; }
  .menu-toggle-box:checked ~ ul { display: flex; }
  .menu-toggle-box:focus-visible + .menu-toggle { outline: 2px solid #fff; outline-offset: -4px; }
  .main-nav a { text-align: center; border-top: 1px solid #4a3d36; }
}
