/*
Theme Name: Crafty Yam Child
Template: generatepress
Version: 1.0.0
Description: Warm Idaho kitchen aesthetic for The Crafty Yam. Tokens documented in README.md — do NOT restyle back to default white.
Author: VeteranOp
*/

/* ============================================================
   TOKENS — see README.md. Do not invent a new palette.
   ============================================================ */
:root {
  --cream: #F7F1E8;          /* page bg */
  --cream-deep: #EFE6D8;     /* cards / alternating bands */
  --paper: #FFFCF7;          /* content well / recipe card surface */
  --ink: #2C241C;            /* body text */
  --ink-soft: #5C534A;       /* meta, captions, nav secondary */
  --yam: #B85C38;            /* primary accent */
  --yam-deep: #8E3F24;       /* pressed / footer / strong headers */
  --sage: #6B7F5A;           /* secondary accent / chips */
  --sage-soft: #E4EAD9;      /* chip bg / soft section tint */
  --gold: #C4A35A;           /* thin rules, stamp stroke */
  --border: #E0D5C4;         /* hairlines */
  --shadow: rgba(44,36,28,0.08);
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --radius-pill: 999px;
  --content-max: 1120px;
  --read-max: 720px;
}

/* ============================================================
   BASE
   ============================================================ */
body {
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.01em;
}
a { color: var(--yam-deep); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--yam); }
:focus-visible { outline: 2px solid var(--yam); outline-offset: 2px; }
.site-content { background: transparent; }
.inside-article, .widget, .comments-area, .page-header {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px var(--shadow);
}
button, .button, .wp-block-button__link, input[type="submit"] {
  background: var(--yam);
  color: #fff;
  border-radius: 8px;
  padding: 0.65em 1.4em;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}
button:hover, .button:hover, .wp-block-button__link:hover, input[type="submit"]:hover {
  background: var(--yam-deep);
  color: #fff;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header { background: var(--paper); border-bottom: 1px solid var(--border); }
.site-header .site-branding .main-title a { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.6rem; }
.site-description { color: var(--ink-soft); font-size: 0.9rem; letter-spacing: 0.02em; }
.main-navigation, .main-navigation ul ul { background: var(--paper); }
.main-navigation .main-nav ul li a { color: var(--ink); font-weight: 600; }
.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
  color: var(--yam-deep);
  box-shadow: inset 0 -2px 0 var(--yam);
}
.main-navigation .menu-toggle { color: var(--ink); }

/* ============================================================
   HOMEPAGE — hero, chips, sections, about
   ============================================================ */
.cy-hero {
  background:
    radial-gradient(ellipse 120% 90% at 85% 20%, rgba(196,163,90,0.18), transparent 55%),
    linear-gradient(135deg, var(--yam-deep) 0%, #6F2F1B 100%);
  color: #FBF4EA;
  border-radius: var(--radius);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 3.5rem);
  margin: 0 auto clamp(2rem, 4vw, 3rem);
  max-width: var(--content-max);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.cy-hero h1 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  line-height: 1.15;
  color: #FBF4EA;
  margin: 0 0 0.4em;
}
.cy-hero .cy-hero-sub { font-size: 1.15rem; color: rgba(251,244,234,0.85); margin-bottom: 1.4em; }
.cy-hero .cy-hero-cta {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  padding: 0.8em 1.8em;
  border-radius: 8px;
  text-decoration: none;
  margin-right: 1rem;
}
.cy-hero .cy-hero-cta:hover { background: #D5B56E; color: var(--ink); }
.cy-hero .cy-hero-link { color: rgba(251,244,234,0.9); text-decoration: underline; text-underline-offset: 3px; }
.cy-hero-card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(30,14,8,0.35);
  text-decoration: none;
  display: block;
}
.cy-hero-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.cy-hero-card .cy-hero-card-body { padding: 1rem 1.25rem 1.25rem; }
.cy-hero-card .cy-hero-card-kicker { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--yam); font-weight: 700; margin-bottom: 0.3em; }
.cy-hero-card .cy-hero-card-title { font-family: var(--font-head); font-size: 1.15rem; color: var(--ink); margin: 0 0 0.5em; }
.cy-hero-card .cy-hero-card-link { font-weight: 600; color: var(--yam-deep); font-size: 0.9rem; }

/* Category chips */
.cy-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  max-width: var(--content-max);
  margin: 0 auto 2rem;
  padding: 0 1rem;
}
.cy-chips a {
  background: var(--sage-soft);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: var(--radius-pill);
  padding: 0.45em 1.1em;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.cy-chips a:hover { background: var(--sage); color: #fff; }

/* Category sections */
.cy-section { max-width: var(--content-max); margin: 0 auto 2.5rem; padding: 0 1rem; }
.cy-section:nth-child(even) .cy-section-inner { background: var(--cream-deep); }
.cy-section-inner { border-radius: var(--radius); padding: 2.2rem 1.5rem; }
.cy-section-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.cy-section-head .cy-stamp { width: 42px; height: 42px; flex: 0 0 42px; }
.cy-section-head h2 { margin: 0; font-size: 1.75rem; }
.cy-section-head p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.cy-section-head .cy-viewall { margin-left: auto; font-weight: 600; font-size: 0.9rem; text-decoration: none; white-space: nowrap; }

/* Recipe cards */
.cy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.cy-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cy-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px var(--shadow); }
.cy-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.cy-card-body { padding: 0.9rem 1.1rem 1.1rem; flex: 1; display: flex; flex-direction: column; }
.cy-card-title { font-family: var(--font-head); font-size: 1.15rem; line-height: 1.3; color: var(--ink); margin: 0 0 0.4em; }
.cy-card-meta { margin-top: auto; font-size: 0.8rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }

/* About strip */
.cy-about {
  max-width: var(--content-max);
  margin: 0 auto 2.5rem;
  padding: 2.2rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
}
.cy-about img { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; border: 3px solid var(--gold); }
.cy-about .cy-stamp { width: 110px; height: 110px; }
.cy-about h2 { margin: 0 0 0.4em; font-size: 1.4rem; }
.cy-about p { margin: 0 0 0.6em; color: var(--ink-soft); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer .site-info { background: var(--yam-deep); color: rgba(251,244,234,0.85); }
.site-footer .site-info a { color: #FBF4EA; }
.site-footer .site-info a:hover { color: var(--gold); }

/* ============================================================
   SINGLE POST / RECIPE
   ============================================================ */
.single .inside-article { max-width: var(--read-max); margin: 0 auto; padding: 2rem clamp(1.2rem, 4vw, 2.5rem); }
.single .entry-title { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.single .post-image img { border-radius: var(--radius); }

/* WPRM harmony */
.wprm-recipe { background: var(--paper) !important; border: 1px solid var(--border) !important; border-radius: var(--radius) !important; }
.wprm-recipe-name, .wprm-recipe-header { font-family: var(--font-head) !important; color: var(--ink) !important; }
.wprm-recipe a { color: var(--yam-deep) !important; }
.wprm-recipe .wprm-recipe-rating .wprm-rating-star.wprm-rating-star-full svg * { fill: var(--gold) !important; }
.wprm-recipe .wprm-recipe-instruction-text, .wprm-recipe .wprm-recipe-ingredient-group-name { font-family: var(--font-body) !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .cy-hero { grid-template-columns: 1fr; }
  .cy-hero-card { max-width: 480px; }
  .cy-grid { grid-template-columns: repeat(2, 1fr); }
  .cy-about { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}
@media (max-width: 560px) {
  .cy-grid { grid-template-columns: 1fr; }
  .cy-section-head { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .cy-section-head .cy-viewall { margin-left: 0; }
}
