/*
Theme Name: Two Cooks
Description: The recipe-box design for Two Cooks Cooking (2026). Keeps the 2011 site's name, tagline, colors and banner photos.
Version: 1.0.0
Requires PHP: 8.1
Author: Zach Katagiri
Text Domain: twocooks
*/

:root {
	--paper: #f7f1e6;
	--card: #fffdf8;
	--ink: #2b2420;
	--ink-2: #4a403a;
	--muted: #7a6d62;
	--line: #e6dccb;
	--red: #8e1b1b;
	--red-soft: #f3e2dc;
	--pink-rule: #e9a6a6;
	--green: #3f6b3a;
	--green-soft: #e3ecdc;
	--rule: #dfe7ef;
	--display: "Cormorant SC", Georgia, serif;
	--italic: "Cormorant Garamond", Georgia, serif;
	--body: "Source Serif 4", Georgia, serif;
	--ui: "Work Sans", system-ui, sans-serif;
	--shadow: 0 1px 0 rgba(0, 0, 0, .03), 0 8px 20px -14px rgba(60, 40, 20, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--body); }
a { color: inherit; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 4px; z-index: 9; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- header ---------- */
.site { padding: 44px 0 0; text-align: center; }
.brand { margin: 0; font: 700 clamp(34px, 8.6vw, 68px)/1 var(--display); letter-spacing: .02em; }
.brand a { color: var(--red); text-decoration: none; }
.brand--small { font-size: 28px; }
.tagline { font: italic 500 clamp(19px, 2.4vw, 24px)/1.3 var(--italic); color: var(--muted); margin: 10px 0 0; }
.menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 28px; margin: 24px 0 0; font: 600 13px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; }
.menu a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.menu a:hover, .menu a[aria-current], .menu .current-menu-item > a { border-color: var(--red); color: var(--red); }

/* the original banner photos, three at a time */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; height: 120px; margin: 28px 0 0; border-radius: 4px; overflow: hidden; }
.strip img { width: 100%; height: 120px; object-fit: cover; display: block; }

/* ---------- meat / veg switch ---------- */
.switch { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 30px 0 0; }
.switch__item { font: 600 14px/1 var(--ui); text-decoration: none; padding: 11px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); }
.switch__item--meat { color: var(--red); }
.switch__item--veg { color: var(--green); }
.switch__item:hover { border-color: currentColor; }
.switch__item[aria-current] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.dot--meat { background: var(--red); }
.dot--veg { background: var(--green); }
.switch__item[aria-current] .dot { box-shadow: 0 0 0 2px var(--paper); }

/* ---------- section labels ---------- */
.section { font: 600 13px/1.3 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 44px 0 16px; display: flex; align-items: center; gap: 14px; }
.section::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section--page { color: var(--red); font-size: 14px; }
.empty { font-size: 18px; color: var(--ink-2); }

.meta { font: 600 11.5px/1.4 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.tag { padding: 4px 8px; border-radius: 3px; }
.tag--meat { background: var(--red-soft); color: var(--red); }
.tag--veg { background: var(--green-soft); color: var(--green); }

/* ---------- the newest post ---------- */
.lead { display: grid; grid-template-columns: minmax(0, 500px) 1fr; gap: 36px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 22px; box-shadow: var(--shadow); }
.lead--nophoto { grid-template-columns: 1fr; padding: 34px 40px; }
.lead__photo img { width: 100%; max-width: 500px; display: block; border-radius: 3px; }
.lead__title { font: 700 clamp(30px, 4vw, 40px)/1.05 var(--display); margin: 12px 0 12px; }
.lead__title a { color: var(--red); text-decoration: none; }
.lead p { margin: 0 0 16px; color: var(--ink-2); }
.more { font: 600 14px/1 var(--ui); color: var(--red); text-decoration: none; }
.more::after { content: " →"; }

/* ---------- recipe cards (index cards) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.card:hover { transform: translateY(-2px); }
.card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.card__photo { height: 170px; overflow: hidden; background: var(--line); }
.card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__nophoto { height: 40px; display: flex; align-items: center; justify-content: center; font: italic 500 15px/1 var(--italic); color: var(--muted); background: repeating-linear-gradient(-45deg, transparent 0 8px, rgba(142, 27, 27, .045) 8px 16px); border-bottom: 1px dashed var(--line); }
.card__meta { font: 600 11.5px/1.4 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; padding: 16px 22px 14px; border-bottom: 1.5px solid var(--pink-rule); }
.card__lines { flex: 1; display: flex; flex-direction: column; padding: 0 22px 4px; background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule) 31px 32px); }
.card__title { font: 700 26px/32px var(--display); color: var(--ink); margin: 0; padding: 28px 0 0; }
.card:hover .card__title { color: var(--red); }
.card__blurb { margin: 0; font-size: 15.5px; line-height: 32px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__date { margin-top: auto; padding: 24px 0 6px; font: italic 500 17px/32px var(--italic); color: var(--muted); }

/* ---------- pagination ---------- */
.pagination { margin: 36px 0 0; text-align: center; font: 600 14px/1 var(--ui); }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pagination .page-numbers { display: inline-block; padding: 10px 14px; border-radius: 999px; text-decoration: none; border: 1.5px solid var(--line); background: var(--card); }
.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination .dots { border: 0; background: none; }

/* ---------- every recipe, by course ---------- */
.index { columns: 3 240px; column-gap: 36px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 26px 30px 6px; }
.index__group { break-inside: avoid; margin: 0 0 22px; }
.index h3 { font: 700 23px/1 var(--display); color: var(--red); margin: 0 0 10px; }
.index ul { list-style: none; margin: 0; padding: 0; }
.index li { font-size: 15px; line-height: 1.45; padding: 3px 0; }
.index li a { text-decoration: none; border-bottom: 1px solid var(--line); }
.index li a:hover { color: var(--red); border-color: var(--red); }
.index .dot { width: 7px; height: 7px; margin: 0 0 0 6px; }
.index-key { font: 500 13px/1 var(--ui); color: var(--muted); margin: -4px 0 16px; }
.index-key .dot { margin: 0 4px 0 0; }

/* ---------- one recipe ---------- */
.recipe { max-width: 720px; margin: 40px auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 40px clamp(20px, 6vw, 64px) 36px; box-shadow: var(--shadow); }
.recipe__head { border-bottom: 1.5px solid var(--pink-rule); padding-bottom: 20px; margin-bottom: 28px; }
.recipe__title { font: 700 clamp(34px, 6vw, 50px)/1.02 var(--display); color: var(--red); margin: 12px 0 8px; }
.recipe--page .recipe__title { margin-top: 0; }
.recipe__date { font: italic 500 19px/1 var(--italic); color: var(--muted); margin: 0; }
.recipe__foot { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.recipe__foot p { margin: 4px 0; }
.label { font: 600 11px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }

.prose { font-size: 18px; line-height: 1.7; }
.prose p { margin: 0 0 1.1em; }
.prose h2, .prose h3, .prose h4 { font: 700 26px/1.15 var(--display); color: var(--red); margin: 1.6em 0 .5em; }
.prose strong { font-weight: 600; }
.prose a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose img { display: block; border-radius: 3px; margin: 0 auto; }
.prose .wp-caption, .prose figure { max-width: 100%; margin: 0 0 1.4em; width: auto !important; }
.prose .wp-caption-text, .prose figcaption { font: italic 500 17px/1.3 var(--italic); color: var(--muted); text-align: center; margin: 8px 0 0; }
.prose .alignleft { float: left; margin: 6px 22px 12px 0; }
.prose .alignright { float: right; margin: 6px 0 12px 22px; }
.prose .aligncenter { margin-left: auto; margin-right: auto; }
.prose::after { content: ""; display: block; clear: both; }

/* where a photo used to be */
.photo-missing { margin: 0 0 1.4em; padding: 14px 18px; border: 1.5px dashed var(--line); border-radius: 5px; background: repeating-linear-gradient(-45deg, transparent 0 8px, rgba(142, 27, 27, .035) 8px 16px); font: italic 500 17px/1.35 var(--italic); color: var(--muted); text-align: center; }
.photo-missing__what { font-style: normal; font-family: var(--body); font-size: 14px; }

/* ---------- old comments, read-only ---------- */
.comments { margin-top: 40px; padding-top: 24px; border-top: 1.5px solid var(--pink-rule); }
.comments__title { font: 700 22px/1.2 var(--display); color: var(--red); margin: 0 0 14px; }
.comments__list, .comments__list .children { list-style: none; margin: 0; padding: 0; }
.comments__list .children { margin-left: 22px; padding-left: 16px; border-left: 2px solid var(--line); }
.comments__list li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; line-height: 1.55; }
.comment__who { margin: 0 0 4px; font: 500 13px/1.3 var(--ui); color: var(--muted); }
.comment__who strong { color: var(--ink); font-weight: 600; margin-right: 6px; }
.comment__text p { margin: 0 0 .6em; }
.comments__closed { font: italic 500 16px/1 var(--italic); color: var(--muted); margin: 16px 0 0; }

.neighbors { max-width: 720px; margin: 22px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; font-size: 15px; }
.neighbors div:last-child { text-align: right; }
.neighbors a { text-decoration: none; display: inline-block; }
.neighbors a:hover { color: var(--red); }
.neighbors .label { display: block; margin-bottom: 4px; }

/* ---------- footer ---------- */
.foot { margin: 64px 0 0; padding: 36px 0 50px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 15px; }
.search { display: flex; justify-content: center; margin: 14px auto 0; max-width: 420px; }
.search input { flex: 1; min-width: 0; font: 16px var(--body); padding: 10px 16px; border: 1.5px solid var(--line); border-right: 0; border-radius: 999px 0 0 999px; background: var(--card); color: var(--ink); }
.search button { font: 600 14px var(--ui); padding: 0 18px; border: 0; border-radius: 0 999px 999px 0; background: var(--red); color: #fff; cursor: pointer; }
main > .search { margin: 0 auto 10px; }

@media (max-width: 720px) {
	body { font-size: 16.5px; }
	.site { padding-top: 32px; }
	.menu { gap: 6px 18px; }
	.strip { height: 84px; } .strip img { height: 84px; }
	.lead { grid-template-columns: 1fr; gap: 18px; padding: 14px; }
	.lead--nophoto { padding: 24px 20px; }
	.recipe { margin-top: 28px; padding-top: 28px; }
	.prose { font-size: 17px; }
	.prose .alignleft, .prose .alignright { float: none; margin: 0 auto 1.2em; }
	.neighbors { grid-template-columns: 1fr; }
	.neighbors div:last-child { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
	.card { transition: none; }
	.card:hover { transform: none; }
}

/* WordPress's screen-reader-only text */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
