/*
Theme Name: TomatoChef Kitchen (Kadence Child)
Theme URI: https://tomatochef.com
Description: Child theme for Kadence. Recipe-first layout designed for phone-in-the-kitchen reading: high contrast, large touch targets, and a sticky prep sheet that keeps ingredients and method one tap apart. Palette is swappable from the :root block below.
Author: TomatoChef
Version: 1.0.0
Template: kadence
License: GNU General Public License v2 or later
Text Domain: kadence-child
*/

/* ==========================================================================
   1. PALETTE  —  swap this block per site, nothing else changes
   ========================================================================== */

:root {
  /* --- TOMATOCHEF --- */
  --tc-ink:        #1A1614;  /* headings, body text */
  --tc-ink-soft:   #6E6560;  /* meta, captions */
  --tc-paper:      #FBFAF7;  /* page background */
  --tc-surface:    #FFFFFF;  /* cards */
  --tc-line:       #E4DED6;  /* hairlines */
  --tc-accent:     #D6202A;  /* true tomato — links, active tab, numbers */
  --tc-accent-ink: #8E1218;  /* hover / pressed */
  --tc-accent-wash:#FDECEC;  /* tinted fills */
  --tc-leaf:       #4A6B3D;  /* vine green — success, checked state only */

  /* --- TWINTASTES  (comment the block above, uncomment this one) ---
  --tc-ink:        #14181A;
  --tc-ink-soft:   #5F6B6A;
  --tc-paper:      #FAFAF8;
  --tc-surface:    #FFFFFF;
  --tc-line:       #DDE3E1;
  --tc-accent:     #16766B;
  --tc-accent-ink: #0C4A43;
  --tc-accent-wash:#E6F2F0;
  --tc-leaf:       #C9821A;
  --- */

  /* type */
  --tc-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --tc-prose:   "Newsreader", Georgia, "Times New Roman", serif;

  /* scale — fluid, mobile first */
  --tc-step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --tc-step-0:  clamp(1.05rem, 1rem + 0.25vw, 1.18rem);
  --tc-step-1:  clamp(1.3rem, 1.2rem + 0.5vw, 1.55rem);
  --tc-step-2:  clamp(1.6rem, 1.4rem + 1vw, 2.1rem);
  --tc-step-3:  clamp(2.1rem, 1.7rem + 2vw, 3.2rem);

  --tc-radius: 3px;
  --tc-gutter: clamp(1rem, 4vw, 2rem);
  --tc-measure: 68ch;
}

/* ==========================================================================
   2. BASE
   ========================================================================== */

body {
  background: var(--tc-paper);
  color: var(--tc-ink);
  font-family: var(--tc-prose);
  font-size: var(--tc-step-0);
  line-height: 1.7;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
  font-family: var(--tc-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.022em;
  color: var(--tc-ink);
}

h1, .entry-title { font-size: var(--tc-step-3); }
h2 { font-size: var(--tc-step-2); margin-top: 2.2em; }
h3 { font-size: var(--tc-step-1); margin-top: 1.8em; }

a { color: var(--tc-accent-ink); text-underline-offset: 0.18em; }
a:hover { color: var(--tc-accent); }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--tc-accent);
  outline-offset: 2px;
}

.entry-content p { max-width: var(--tc-measure); }

/* ==========================================================================
   3. POST HEADER  —  type leads, image follows
   ========================================================================== */

.tc-post-head {
  max-width: var(--tc-measure);
  margin: clamp(1.5rem, 5vw, 3rem) auto 1.5rem;
  padding-inline: var(--tc-gutter);
}

.tc-eyebrow {
  font-family: var(--tc-display);
  font-size: var(--tc-step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tc-accent);
  margin-bottom: 0.6rem;
  display: block;
}

.tc-dek {
  font-size: var(--tc-step-1);
  line-height: 1.45;
  color: var(--tc-ink-soft);
  margin-top: 0.7em;
}

/* meta strip — reads at arm's length */
.tc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.4rem;
  margin: 1.4rem 0 0;
  padding: 0.85rem 0;
  border-block: 1px solid var(--tc-line);
  list-style: none;
  font-family: var(--tc-display);
  font-size: var(--tc-step--1);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tc-ink-soft);
}

.tc-meta li { display: flex; align-items: baseline; gap: 0.4rem; }
.tc-meta b {
  font-weight: 700;
  font-size: var(--tc-step-0);
  color: var(--tc-ink);
  letter-spacing: -0.01em;
  text-transform: none;
}

/* jump / print bar */
.tc-actions {
  display: flex;
  gap: 0.6rem;
  margin: 1.2rem 0 0;
  flex-wrap: wrap;
}

.tc-btn {
  font-family: var(--tc-display);
  font-size: var(--tc-step--1);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.85rem 1.3rem;
  border: 1.5px solid var(--tc-ink);
  border-radius: var(--tc-radius);
  background: transparent;
  color: var(--tc-ink);
  cursor: pointer;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.tc-btn--go {
  background: var(--tc-accent);
  border-color: var(--tc-accent);
  color: #fff;
}

.tc-btn:hover { background: var(--tc-ink); color: var(--tc-paper); }
.tc-btn--go:hover { background: var(--tc-accent-ink); border-color: var(--tc-accent-ink); color: #fff; }

/* hero image — 4:5, the shape Pinterest actually wants */
.tc-hero {
  margin: 1.8rem auto 0;
  max-width: 760px;
  padding-inline: var(--tc-gutter);
}

.tc-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--tc-radius);
  display: block;
}

@media (min-width: 900px) {
  .tc-hero img { aspect-ratio: 3 / 2; }
}

/* ==========================================================================
   4. PREP SHEET  —  the signature element
   ========================================================================== */

.tc-prep {
  max-width: 760px;
  margin: clamp(2rem, 6vw, 3.5rem) auto;
  border: 2px solid var(--tc-ink);
  border-radius: var(--tc-radius);
  background: var(--tc-surface);
  overflow: hidden;
}

.tc-prep__head {
  padding: 1.2rem var(--tc-gutter) 0;
}

.tc-prep__title {
  font-family: var(--tc-display);
  font-size: var(--tc-step-2);
  margin: 0 0 0.15em;
}

.tc-prep__yield {
  font-family: var(--tc-display);
  font-size: var(--tc-step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tc-ink-soft);
}

/* tabs — sticky so they stay reachable mid-cook */
.tc-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--tc-surface);
  border-block: 2px solid var(--tc-ink);
  margin-top: 1.1rem;
}

.tc-tab {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: var(--tc-display);
  font-size: var(--tc-step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1.05rem 0.5rem;
  min-height: 52px;
  cursor: pointer;
  color: var(--tc-ink-soft);
  border-bottom: 4px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tc-tab + .tc-tab { border-left: 2px solid var(--tc-ink); }

.tc-tab[aria-selected="true"] {
  color: var(--tc-ink);
  border-bottom-color: var(--tc-accent);
  background: var(--tc-accent-wash);
}

.tc-panel { padding: 1.4rem var(--tc-gutter) 1.8rem; }
.tc-panel[hidden] { display: none; }

/* ingredients — tap to cross off */
.tc-ings { list-style: none; margin: 0; padding: 0; }

.tc-ings li { border-bottom: 1px solid var(--tc-line); }
.tc-ings li:last-child { border-bottom: 0; }

.tc-ing {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.85rem 0;
  min-height: 48px;
  cursor: pointer;
  font-family: var(--tc-display);
  font-size: var(--tc-step-0);
  font-weight: 500;
  line-height: 1.45;
}

.tc-ing input { position: absolute; opacity: 0; width: 0; height: 0; }

.tc-ing__box {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  border: 2px solid var(--tc-ink);
  border-radius: var(--tc-radius);
  display: grid;
  place-items: center;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.tc-ing__box::after {
  content: "";
  width: 11px;
  height: 6px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) scale(0);
  transition: transform 0.12s ease;
}

.tc-ing input:checked + .tc-ing__box {
  background: var(--tc-leaf);
  border-color: var(--tc-leaf);
}

.tc-ing input:checked + .tc-ing__box::after { transform: rotate(-45deg) scale(1); }

.tc-ing input:checked ~ .tc-ing__text {
  color: var(--tc-ink-soft);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}

.tc-ing input:focus-visible + .tc-ing__box {
  outline: 3px solid var(--tc-accent);
  outline-offset: 2px;
}

.tc-ing__amt { font-weight: 700; }

/* method — numbers carry the sequence, so they're allowed to be loud */
.tc-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }

.tc-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--tc-line);
}

.tc-steps li:last-child { border-bottom: 0; }

.tc-steps li::before {
  content: counter(step);
  font-family: var(--tc-display);
  font-size: var(--tc-step-2);
  font-weight: 800;
  line-height: 0.9;
  color: var(--tc-accent);
  font-variant-numeric: tabular-nums;
}

.tc-steps p { margin: 0; max-width: none; }

.tc-note {
  margin-top: 1.6rem;
  padding: 1rem 1.1rem;
  background: var(--tc-accent-wash);
  border-left: 4px solid var(--tc-accent);
  border-radius: 0 var(--tc-radius) var(--tc-radius) 0;
  font-size: var(--tc-step--1);
  line-height: 1.6;
}

.tc-note strong {
  font-family: var(--tc-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.85em;
}

/* ==========================================================================
   5. AD SLOTS  —  reserved height, zero layout shift
   ========================================================================== */

.tc-ad {
  margin: clamp(1.8rem, 5vw, 2.8rem) auto;
  max-width: 760px;
  padding-inline: var(--tc-gutter);
  text-align: center;
  min-height: 280px;          /* reserve — protects CLS, protects RPM */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.tc-ad::before {
  content: "Advertisement";
  font-family: var(--tc-display);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tc-ink-soft);
  opacity: 0.65;
}

@media (min-width: 900px) { .tc-ad { min-height: 300px; } }

/* ==========================================================================
   6. CARDS / ARCHIVE
   ========================================================================== */

.tc-card { background: transparent; }

.tc-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--tc-radius);
  display: block;
}

.tc-card h3 {
  font-size: var(--tc-step-1);
  margin: 0.7rem 0 0.25rem;
  letter-spacing: -0.02em;
}

.tc-card a { color: var(--tc-ink); text-decoration: none; }
.tc-card a:hover h3 { color: var(--tc-accent); }

.tc-card__meta {
  font-family: var(--tc-display);
  font-size: var(--tc-step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tc-ink-soft);
}

/* ==========================================================================
   7. HEADER / FOOTER TWEAKS OVER KADENCE
   ========================================================================== */

.site-header .site-title {
  font-family: var(--tc-display);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.site-header .site-title a { color: var(--tc-ink); text-decoration: none; }

.site-main-header-inner-wrap { border-bottom: 1px solid var(--tc-line); }

.primary-menu-container .menu-item > a {
  font-family: var(--tc-display);
  font-size: var(--tc-step--1);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.site-footer {
  background: var(--tc-ink);
  color: var(--tc-paper);
}

.site-footer a { color: var(--tc-paper); }
.site-footer a:hover { color: var(--tc-accent); }

/* ==========================================================================
   8. PRINT  —  recipe only, no chrome, no ads
   ========================================================================== */

@media print {
  .site-header, .site-footer, .tc-ad, .tc-actions,
  .tc-hero, .comments-area, .tc-tabs { display: none !important; }

  .tc-panel[hidden] { display: block !important; }

  body { background: #fff; font-size: 11pt; }
  .tc-prep { border: 1px solid #000; break-inside: avoid; }
  .tc-steps li::before { color: #000; }
}

/* ==========================================================================
   9. QUALITY FLOOR
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

img { max-width: 100%; height: auto; }

.tc-skip {
  position: absolute;
  left: -9999px;
}

.tc-skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 999;
  background: var(--tc-ink);
  color: var(--tc-paper);
  padding: 0.8rem 1.2rem;
  border-radius: var(--tc-radius);
}
