/* From The Kitchens — warm brown/orange editorial site
   Contrast ratios below are COMPUTED (WCAG relative-luminance formula), not eyeballed.
   See build report for the full table. All body-text pairs clear 4.5:1; all
   large-text / non-text pairs clear 3:1. */

:root {
  --bg: #FFF8F2;            /* page background */
  --surface: #FFFFFF;       /* card background */
  --surface-alt: #FCE9D8;   /* notice / warm panel background */

  --text: #2A1810;          /* body text on --bg: 16.14:1 */
  --heading: #20130B;       /* headings on --bg: 17.22:1 */
  --text-muted: #5C3A26;    /* muted/secondary text on --bg or --surface: 9.56:1 / 8.9:1+ */

  --brand: #9C3B14;         /* primary button background; white text on it: 6.89:1 */
  --brand-accent: #C1521A;  /* decorative icon stroke/fill, non-text use */
  --category: #7A2E0E;      /* category labels on white cards: 9.44:1 */
  --notice-text: #5C2E0E;   /* text on --surface-alt: 9.60:1 */

  --rail-bg: #3B2415;
  --rail-text: #FDEBD9;     /* on --rail-bg: 12.46:1 */

  --footer-bg: #241309;
  --footer-text: #F0E2D3;   /* on --footer-bg: 14.10:1 */
  --footer-link: #F5B978;   /* on --footer-bg: 10.32:1 */

  --border: #E7D3C2;
  --focus: #9C3B14;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.55;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* Focus visibility — >=3:1 against adjacent backgrounds */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--heading);
}

.brand-mark {
  flex: none;
}

.brand-name {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--heading);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--brand-accent);
}

.rail {
  background: var(--rail-bg);
}

.rail-inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 20px;
  color: var(--rail-text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--bg);
  padding: 64px 0 56px;
}

.hero-inner {
  max-width: 760px;
}

.hero h1 {
  margin: 0 0 16px;
  color: var(--heading);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hero-sub {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--brand);
  color: #FFFFFF; /* 6.89:1 on --brand */
}

.btn-primary:hover {
  background: #832F0F;
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}

.btn-ghost:hover {
  background: var(--surface-alt);
}

/* ---------- Section heading ---------- */

.section-heading {
  color: var(--heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 28px;
}

/* ---------- Tiles ---------- */

.tiles {
  padding: 8px 0 56px;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
}

.tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--brand);
  margin-bottom: 14px;
}

.tile-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--heading);
}

.tile-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.96rem;
}

/* ---------- Featured stories ---------- */

.stories {
  padding: 8px 0 60px;
}

.notice {
  background: var(--surface-alt);
  color: var(--notice-text);
  border: 1px solid #EFC9A6;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 28px;
  font-size: 0.98rem;
}

.notice strong {
  color: var(--notice-text);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.story-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.story-media {
  height: 150px;
  width: 100%;
}

.story-media--a {
  background: linear-gradient(135deg, #E8672B 0%, #9C3B14 100%);
}

.story-media--b {
  background: linear-gradient(135deg, #F0A868 0%, #B5451A 100%);
}

.story-media--c {
  background: linear-gradient(135deg, #C1521A 0%, #5C2E0E 100%);
}

.story-media--d {
  background: linear-gradient(135deg, #D97B3F 0%, #7A2E0E 100%);
}

.story-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.story-cat {
  color: var(--category);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-title {
  margin: 2px 0 0;
  font-size: 1.15rem;
  color: var(--heading);
  line-height: 1.35;
}

.story-excerpt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.story-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  gap: 8px;
}

.story-btn {
  margin-top: 10px;
  align-self: flex-start;
  background: var(--surface-alt);
  color: var(--notice-text);
  border: 1px solid #EFC9A6;
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: not-allowed;
}

/* ---------- Food safety ---------- */

.safety {
  background: var(--surface-alt);
  padding: 48px 0;
}

.safety-inner {
  max-width: 760px;
}

.safety-inner p {
  color: var(--notice-text);
  font-size: 1.02rem;
}

.safety-disclaimer {
  background: var(--surface);
  border: 1px solid #EFC9A6;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  color: var(--text);
}

/* ---------- Interest / newsletter ---------- */

.interest {
  padding: 56px 0 64px;
  text-align: center;
}

.interest-inner {
  max-width: 620px;
  margin: 0 auto;
}

.interest-inner p {
  color: var(--text-muted);
}

.interest-note {
  font-size: 0.85rem;
  margin-top: 14px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 48px 0 32px;
}

.footer-mission-title {
  margin: 0 0 10px;
  font-size: 1.4rem;
  color: var(--footer-text);
}

.footer-progression {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 14px;
}

.footer-sibling {
  max-width: 62ch;
  margin: 0 0 28px;
}

.footer-sibling a,
.footer-links a {
  color: var(--footer-link);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding: 18px 0;
  border-top: 1px solid #3E271A;
  border-bottom: 1px solid #3E271A;
  margin-bottom: 18px;
}

.footer-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-credit {
  margin: 0;
  font-size: 0.88rem;
  color: var(--footer-text);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .tile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .tile-grid {
    grid-template-columns: 1fr;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .rail-inner {
    font-size: 0.7rem;
  }
}

/* ---------- Reduced motion ---------- */

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

/* ---------- Article page (food-safety-basics.html) ----------
   Reuses existing tokens only — no new colors introduced, so no new
   contrast ratios to compute; every pair below already has its ratio
   documented at the top of this file where the token is defined. */

.breadcrumb {
  padding: 18px 0 0;
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb-list li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--border);
}

.breadcrumb-list a {
  color: var(--text-muted);
  text-decoration: underline;
}

.breadcrumb-list li[aria-current="page"] {
  color: var(--heading);
  font-weight: 600;
}

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--brand-accent);
}

.article {
  padding: 24px 0 64px;
}

.article-wrap {
  max-width: 760px;
}

.article-head {
  margin-bottom: 22px;
}

.article-kicker {
  margin: 0 0 8px;
  color: var(--category);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-head h1 {
  margin: 0 0 14px;
  color: var(--heading);
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.article-dek {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 68ch;
}

.article-notice {
  background: var(--surface-alt);
  color: var(--notice-text);
  border: 1px solid #EFC9A6;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 24px 0 32px;
  font-size: 0.98rem;
  max-width: 70ch;
}

.article-notice strong {
  color: var(--notice-text);
}

.article-notice--repeat {
  margin-top: 40px;
  margin-bottom: 0;
}

.article-body {
  max-width: 70ch;
}

.article-body section {
  margin-bottom: 34px;
}

.article-body section:last-child {
  margin-bottom: 0;
}

.article-body h2 {
  color: var(--heading);
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  margin: 0 0 12px;
  line-height: 1.3;
}

.article-body p {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.7;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.faq {
  max-width: 70ch;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.faq h2 {
  color: var(--heading);
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  margin: 0 0 20px;
}

.faq-item {
  margin-bottom: 22px;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-item h3 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: 1.05rem;
  line-height: 1.4;
}

.faq-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.article-back {
  margin-top: 40px;
}

.article-back a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.article-back a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .article-head h1 {
    line-height: 1.2;
  }
}

/* ---------- index.html additions: Food Safety tile link + safety CTA ----------
   Reuses existing tokens only (--brand). No new colors. */

.tile-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}

.tile-link:hover {
  text-decoration: underline;
}

.safety-cta {
  margin-top: 20px;
}
