/* cooking with sundi — brand theme v1
   Cream is the page. Cocoa is all body text. Terracotta leads,
   blush and sage support. Mustard is rare: Sundi's notes only. */

:root {
  --cream: #FDF8F0;
  --terracotta: #B0533C;
  --mustard: #D9A441;
  --sage: #B9C3A0;
  --blush: #F2D3C2;
  --cocoa: #3B2218;
  --olive: #5F6D40;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;

  --radius-lg: 24px;
  --radius-md: 18px;
  --line: 1px solid var(--cocoa);
  --max: 1100px;
  --gutter: clamp(16px, 4vw, 48px);
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--cocoa);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; display: block; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Type ---------- */

.display, .heading, .title, h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  text-transform: lowercase;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
}

.display { font-size: clamp(52px, 8vw, 96px); color: var(--terracotta); }
.heading { font-size: clamp(36px, 5vw, 56px); }
.title   { font-size: clamp(26px, 3vw, 34px); }
.title-sm { font-size: 24px; }

.label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 12px;
}

.label--cocoa { color: var(--cocoa); }

.lede { font-size: 18px; max-width: 34em; margin: 16px 0 0; }

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

.site-header { padding-top: 28px; }

.site-header .wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.site-header__bar {
  border-bottom: var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  gap: 24px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: 28px;
  line-height: 1;
  color: var(--terracotta);
  text-decoration: none;
  padding-bottom: 14px;
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 28px;
}

.nav-links a {
  display: inline-block;
  text-decoration: none;
  font-size: 15px;
  padding: 0 0 14px;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.nav-links a:hover { border-bottom-color: var(--cocoa); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--terracotta); }

.menu-toggle { display: none; }

@media (max-width: 760px) {
  .site-header__bar {
    border: var(--line);
    border-radius: 999px;
    padding: 6px 6px 6px 18px;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .wordmark { font-size: clamp(19px, 6vw, 24px); padding: 0; }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: var(--cocoa);
    color: var(--cream);
    font: 700 15px var(--font-body);
    cursor: pointer;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 8px 12px 12px 12px;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 10px 0; font-size: 17px; }
  .site-header__bar:has(.is-open) { border-radius: var(--radius-lg); }
}

/* ---------- Buttons, pills, links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1.5px solid var(--cocoa);
  background: transparent;
  color: var(--cocoa);
  font: 700 15px var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.btn:hover { background: var(--cocoa); color: var(--cream); }

.btn--primary { background: var(--terracotta); border-color: var(--terracotta); color: var(--cream); }
.btn--primary:hover { background: var(--cocoa); border-color: var(--cocoa); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--cream);
  color: var(--cocoa);
  text-decoration: none;
  border: 1.5px solid transparent;
}
.pill--blush { background: var(--blush); }
.pill--sage { background: var(--sage); }
.pill--outline { border-color: var(--cocoa); }
.pill--dark { background: var(--cocoa); color: var(--cream); }
.pill--dark:hover { background: var(--terracotta); }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

.text-link {
  color: var(--terracotta);
  font-weight: 700;
  font-size: 15px;
  text-underline-offset: 4px;
}
.text-link:hover { color: var(--cocoa); }

/* ---------- Frames (photo or line art) ---------- */

.frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--blush);
  aspect-ratio: 4 / 3;
}
.frame--sage { background: var(--sage); }
.frame--cream { background: var(--cream); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame__placeholder {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Home: hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding: 32px 0 40px;
}
/* Sized off viewport height too, so laptop screens see the featured recipe */
.hero .display { font-size: clamp(44px, min(6vw, 10vh), 80px); }
.hero .lede { margin-top: 12px; }
.hero .btn-row { margin-top: 22px; }
.hero .frame { width: 100%; aspect-ratio: 4 / 3; max-height: 48vh; }
.hero .frame img { object-position: 50% 60%; }

/* ---------- Home: feature card ---------- */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  background: var(--blush);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.5vw, 28px);
}
.feature__text { padding: 8px 0 8px clamp(0px, 1vw, 8px); }
.feature .title { font-size: clamp(30px, 3.6vw, 42px); }
.feature p { margin: 12px 0 0; max-width: 28em; }
.feature .pill-row { margin-top: 18px; }
.feature .frame { width: 100%; aspect-ratio: 16 / 10; max-height: 44vh; }

/* ---------- Section heads + card grid ---------- */

.section { padding: 56px 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.card a { text-decoration: none; display: block; }
.card .frame { margin-bottom: 14px; }
.card .label { margin: 0 4px 4px; }
.card h3 { font-size: 26px; margin: 0 4px; }
.card a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.card p { margin: 6px 4px 0; font-size: 15px; }
.card .meta {
  margin: 12px 4px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Category rows (no images) ---------- */

.category-rows { list-style: none; margin: 0; padding: 0; }
.category-rows a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 4px;
  border-top: var(--line);
  text-decoration: none;
}
.category-rows li:last-child a { border-bottom: var(--line); }
.category-rows .title { font-size: clamp(30px, 4vw, 40px); }
.category-rows .arrow { font-size: 24px; transition: transform .15s; }
.category-rows a:hover .arrow { transform: translateX(6px); }
.category-rows a:hover .title { color: var(--terracotta); }

/* ---------- Page header (listing pages) ---------- */

.page-head { padding: 48px 0 8px; }
.page-head .display { font-size: clamp(48px, 7vw, 80px); }

.empty {
  border: var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}

/* ---------- Recipe page ---------- */

.breadcrumb {
  font-size: 13px;
  margin: 20px 0 0;
}
.breadcrumb a { color: var(--terracotta); text-underline-offset: 3px; }
.breadcrumb span[aria-hidden] { margin: 0 6px; }

.recipe-hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding: 40px 0 56px;
}
.recipe-hero .display { font-size: clamp(48px, 6.5vw, 76px); }
.recipe-hero .frame { aspect-ratio: 5 / 6; }

.recipe-body {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 40px;
  align-items: start;
}

.ingredients {
  background: var(--blush);
  border-radius: var(--radius-lg);
  padding: 32px 28px 20px;
}
.ingredients h2 { font-size: 36px; }
.ingredients .hint { font-size: 14px; margin: 6px 0 12px; }
.ingredients ul { list-style: none; margin: 0; padding: 0; }
.ingredients li { border-bottom: 1px solid rgba(59, 34, 24, .25); }
.ingredients label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  cursor: pointer;
  font-size: 16px;
}
.ingredients input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1.5px solid var(--cocoa);
  border-radius: 4px;
  background: var(--cream);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.ingredients input[type="checkbox"]::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid var(--cream);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0;
}
.ingredients input:checked { background: var(--terracotta); border-color: var(--terracotta); }
.ingredients input:checked::after { opacity: 1; }
.ingredients input:checked + span { text-decoration: line-through; opacity: .6; }

@media (min-width: 901px) {
  .recipe-body .ingredients { position: sticky; top: 24px; }
}

.ingredients .gear-title { font-size: 22px; margin: 28px 0 6px; }
.ingredients .gear { list-style: disc; padding-left: 20px; font-size: 15px; }
.ingredients .gear li { border: 0; padding: 3px 0; }

.credit { font-size: 14px; font-style: italic; margin: 16px 0 0; }

.note p + p { margin-top: 12px; }

.method h2 { font-size: 36px; margin-bottom: 8px; }
.method ol { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.method li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 56px 1fr;
  padding: 20px 0;
  border-bottom: 1px solid rgba(59, 34, 24, .2);
}
.method li:last-child { border-bottom: 0; }
.method li::before {
  content: counter(step);
  font-family: var(--font-display);
  font-weight: 900;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: 44px;
  line-height: 1;
  color: var(--terracotta);
}
.method h3 { font-size: 22px; margin-bottom: 4px; }
.method p { margin: 0; }

.note {
  background: var(--mustard);
  color: var(--cocoa);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: start;
  margin: 56px 0 0;
}
.note h2 { font-size: 30px; }
.note p { margin: 0; }

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

.site-footer {
  background: var(--cocoa);
  color: var(--cream);
  margin-top: 56px;
  font-size: 14px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.site-footer p { margin: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--cocoa);
  color: var(--cream);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

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

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

@media (max-width: 760px) {
  .hero, .feature, .recipe-hero { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
  .hero .frame { order: -1; aspect-ratio: 4 / 3; }
  .recipe-hero .frame { aspect-ratio: 4 / 3; }
  .feature__text { padding: 8px 0 0; }
  .cards { grid-template-columns: 1fr; }
  .note { grid-template-columns: 1fr; gap: 12px; padding: 28px 24px; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

/* ---------- Print ---------- */

@media print {
  .site-header, .site-footer, .btn-row, .breadcrumb, .more-to-cook, .recipe-hero .frame, .toast { display: none !important; }
  body { background: #fff; }
  .recipe-hero, .recipe-body { grid-template-columns: 1fr; padding: 0; gap: 16px; }
  .display { color: var(--cocoa); }
  .ingredients, .note { background: none; border: var(--line); }
}

.nowrap { white-space: nowrap; }
@media (max-width: 760px) { .hero .nowrap { white-space: normal; } }
