/* Purposefully Thankful. Tokens and rules: _design/MASTER.md */
@font-face {
  font-family: "Lora";
  src: url("/fonts/lora-latin-wght.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #fbf7f0;
  --ground-2: #f3ebdd;
  --footer: #3a2f29;
  --footer-ink: #f3ebdd;
  --ink: #2b2521;
  --ink-soft: #6b5f57;
  --line: #e4d9c8;
  --accent: #b8432b;
  --accent-deep: #8f3220;
  --mark: #f7e39a;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --w-page: 1040px;
  --w-read: 680px;
  --gutter: 1.25rem;
  --pad-section: 2.5rem;
  --radius-img: 6px;
}

@media (min-width: 760px) {
  :root { --gutter: 2rem; --pad-section: 3.5rem; }
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.1875rem;
  line-height: 1.6;
}

@media (min-width: 760px) { body { font-size: 1.25rem; } }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--ink);
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.5rem; margin-top: 1.6em; }
h3 { font-size: 1.2rem; margin-top: 1.4em; }
@media (min-width: 760px) {
  h1 { font-size: 2.8rem; }
  h2 { font-size: 1.75rem; }
}
.read > h1:first-child, .read > h2:first-child { margin-top: 0; }

p, ul, ol, figure { margin: 0 0 1.1em; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-deep); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

img { display: block; max-width: 100%; height: auto; border-radius: var(--radius-img); }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--ground); padding: 0.6rem 1rem; z-index: 10;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* Two widths */
.page-width { max-width: var(--w-page); margin: 0 auto; padding: 0 var(--gutter); }
.read { max-width: var(--w-read); }

/* Header */
.site-header { background: var(--ground); border-bottom: 1px solid var(--line); }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.4rem 1.5rem; padding-top: 1rem; padding-bottom: 0.9rem;
}
.site-name {
  font-family: var(--serif); font-size: 1.45rem; font-weight: 600;
  color: var(--ink); text-decoration: none;
}
.site-name:hover { color: var(--accent-deep); }
.nav { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem 1.4rem; }
.nav a {
  display: inline-block; padding: 0.55rem 0 0.35rem; min-height: 44px;
  color: var(--ink); text-decoration: none; font-size: 1.05rem;
  border-bottom: 4px solid transparent;
}
.nav a:hover { color: var(--accent-deep); }
.nav a[aria-current="page"] { border-bottom-color: var(--mark); font-weight: 600; }

/* Sections: one padding, background set by class */
.band { padding: var(--pad-section) 0; }
.band--plain { background: var(--ground); }
.band--tint { background: var(--ground-2); }

/* Home */
.home-hero h1 { margin: 0; }
.feature { display: grid; gap: 1.25rem; }
.feature figure { margin: 0; }
.feature-text h3 { margin-top: 0; font-size: 1.45rem; }
.feature-text h3 a { color: var(--ink); text-decoration: none; }
.feature-text h3 a:hover { color: var(--accent-deep); text-decoration: underline; }
.feature-img { display: block; }
@media (min-width: 640px) {
  .feature { grid-template-columns: 220px 1fr; align-items: start; }
}

/* Post lists */
.post-list { list-style: none; padding: 0; margin: 0 0 1.4em; border-top: 1px solid var(--line); }
.post-list li {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.2rem 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line);
}
@media (max-width: 639px) {
  .post-list li { flex-direction: column; align-items: flex-start; }
}
.post-list a { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; text-decoration: none; }
.post-list a:hover { text-decoration: underline; }

/* Dates and meta */
.date {
  display: inline-block; background: var(--mark); color: var(--ink);
  font-size: 0.85rem; line-height: 1.4; padding: 0.1rem 0.5rem; border-radius: 3px; white-space: nowrap;
}
.post-meta { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1.4em; }
.post-meta .by { margin-left: 0.5rem; }
.post-section { margin: 0 0 0.4rem; font-size: 0.95rem; }
.post-section a { color: var(--ink-soft); }

/* Post body */
.post-body h2 { border-top: 1px solid var(--line); padding-top: 1.1em; }
.post-body > h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.recipe-label { font-size: 1.1rem; margin: 1.2em 0 0.5em; }
.post-body > .recipe-label:first-child { margin-top: 0; }
ul.ingredients {
  list-style: none; padding: 0.9rem 1.1rem; margin-left: 0;
  background: var(--ground-2); border-radius: var(--radius-img);
}
ul.ingredients li { padding: 0.3rem 0 0.3rem 1.4rem; position: relative; border-bottom: 1px solid var(--line); }
ul.ingredients li:last-child { border-bottom: 0; }
ul.ingredients li::before {
  content: ""; position: absolute; left: 0.1rem; top: 0.95em;
  width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--accent);
}
ol.steps { padding-left: 1.6rem; }
ol.steps li { padding-left: 0.3rem; margin-bottom: 0.6rem; }
ol.steps li::marker { font-family: var(--serif); font-weight: 700; color: var(--accent-deep); }

.print-row { margin: 0 0 1.4em; }
.print-btn {
  font: inherit; font-size: 1rem; cursor: pointer; min-height: 44px;
  padding: 0.5rem 1.1rem; border-radius: 4px;
  background: var(--accent); color: #fff; border: 0;
}
.print-btn:hover { background: var(--accent-deep); }
.back { margin-top: 2rem; }

/* Footer */
.site-footer { background: var(--footer); color: var(--footer-ink); padding: 2rem 0; font-size: 1rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.5rem; }
.footer-name { font-family: var(--serif); font-size: 1.15rem; margin: 0; }
.footer-nav { list-style: none; display: flex; gap: 1.2rem; margin: 0; padding: 0; }
.footer-nav a { color: var(--footer-ink); display: inline-block; padding: 0.5rem 0; }
.footer-copy { margin: 0 0 0 auto; color: var(--footer-ink); opacity: 0.9; }

/* Print: the recipe only, black on white */
@media print {
  @page { margin: 1.6cm; }
  body { background: #fff; color: #000; font-size: 12pt; line-height: 1.45; }
  .site-header, .site-footer, .skip, .print-row, .back, .post-section, figure { display: none !important; }
  .band { padding: 0; background: #fff !important; }
  .page-width, .read { max-width: none; padding: 0; }
  h1 { font-size: 20pt; margin-bottom: 4pt; }
  h2 { font-size: 15pt; }
  h3, .recipe-label { font-size: 12.5pt; }
  .date { background: none; padding: 0; font-size: 10pt; }
  .post-meta { color: #000; font-size: 10pt; }
  ul.ingredients { background: none; padding: 0; }
  ul.ingredients li { border: 0; padding: 1pt 0 1pt 12pt; }
  ul.ingredients li::before { background: #000; top: 0.6em; }
  ol.steps li::marker { color: #000; }
  a { color: #000; text-decoration: none; }
  h2, h3 { break-after: avoid; }
  li { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
