/* ============================================================
   Chef DinGen Recipe Site — Main Stylesheet
   Brand: DinnerGenerator | Dansbee Designs 2026
   Colors, Fonts & Tokens from official Brand Kit
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Brand Tokens ── */
:root {
  --terracotta:       #C4663A;
  --terracotta-light: #E8845A;
  --gold:             #D4A843;
  --olive:            #5C6B3A;
  --olive-light:      #8A9E55;
  --charcoal:         #1A1A18;
  --cream:            #FAF6F0;
  --warm-white:       #FFF9F2;
  --muted:            #8A8478;
  --border:           #E8E0D4;

  /* Chef DinGen character palette */
  --copper:           #B87333;
  --copper-dark:      #8B5E27;
  --amber:            #FFB347;
  --sage:             #8FAF8F;
  --wood:             #C68642;

  /* Typography */
  --font-display:  'Playfair Display', Georgia, serif;
  --font-body:     'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --max-width: 1180px;
  --nav-height: 68px;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 2px 16px rgba(26,26,24,.08);
  --shadow-card: 0 4px 24px rgba(26,26,24,.10);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--charcoal);
}
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Layout ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navigation ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--warm-white);
  border-bottom: 1.5px solid var(--border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(26,26,24,.05);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--terracotta);
}
.nav-logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.nav-logo span.site-sub {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  line-height: 1;
  margin-top: 1px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 13px;
  font-weight: 500;
}
.nav-links a {
  color: var(--charcoal);
  transition: color .2s;
}
.nav-links a:hover { color: var(--terracotta); }
.nav-links a.active { color: var(--terracotta); }

.nav-cta {
  background: var(--terracotta);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  transition: background .2s, transform .1s;
}
.nav-cta:hover {
  background: var(--terracotta-light) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  border-radius: 2px;
  transition: all .3s;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--terracotta);
  color: #fff;
}
.btn-primary:hover {
  background: var(--terracotta-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196,102,58,.3);
}
.btn-outline {
  background: transparent;
  color: var(--terracotta);
  border: 1.5px solid var(--terracotta);
}
.btn-outline:hover {
  background: var(--terracotta);
  color: #fff;
  transform: translateY(-2px);
}
.btn-gold {
  background: var(--gold);
  color: var(--charcoal);
}
.btn-gold:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
}

/* ── Hero ── */
.hero {
  background: var(--warm-white);
  border-bottom: 1.5px solid var(--border);
  padding: 60px 0 0;
  overflow: hidden;
  position: relative;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: end;
  gap: 40px;
}
.hero-text { padding-bottom: 60px; }
.hero-text .eyebrow { margin-bottom: 12px; }
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-bottom: 16px;
  color: var(--charcoal);
}
.hero-title em {
  font-style: italic;
  color: var(--terracotta);
}
.hero-desc {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 28px;
  max-width: 460px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-chef {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hero-chef img {
  width: 320px;
  max-width: 100%;
  filter: drop-shadow(0 12px 32px rgba(184,115,51,.18));
  animation: chefFloat 4s ease-in-out infinite;
}
@keyframes chefFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* Hero tagline strip */
.hero-strip {
  background: var(--terracotta);
  color: #fff;
  text-align: center;
  padding: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .06em;
}
.hero-strip span { color: var(--gold); font-weight: 700; }

/* ── Category Pills ── */
.categories {
  padding: 36px 0 0;
}
.categories-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--charcoal);
  background: var(--warm-white);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.pill:hover, .pill.active {
  border-color: var(--terracotta);
  background: var(--terracotta);
  color: #fff;
}

/* ── Ad Slots ── */
/* Philosophy: max 2 ads visible at once; never inside ingredients or steps */
.ad-slot {
  background: var(--warm-white);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ad-slot-banner {
  height: 90px;
  margin: 32px 0;
}
.ad-slot-sidebar {
  width: 100%;
  height: 260px;
  margin-bottom: 24px;
}
.ad-slot-inline {
  height: 90px;
  margin: 40px 0;
}

/* ── Recipe Grid ── */
.recipes-section {
  padding: 48px 0 64px;
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-header h2 { margin-bottom: 0; }
.view-all {
  font-size: 13px;
  font-weight: 500;
  color: var(--terracotta);
  display: flex;
  align-items: center;
  gap: 4px;
}
.view-all:hover { text-decoration: underline; }

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ── Recipe Card ── */
.recipe-card {
  background: var(--warm-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.recipe-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}
.card-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--border);
  position: relative;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.recipe-card:hover .card-image img { transform: scale(1.04); }
.card-category {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--terracotta);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.card-body {
  padding: 18px 20px 20px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 6px;
  line-height: 1.3;
}
.card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.card-meta span { display: flex; align-items: center; gap: 4px; }

/* ── Chef DinGen Callout ── */
.dingen-callout {
  background: linear-gradient(135deg, var(--terracotta) 0%, var(--copper-dark) 100%);
  border-radius: 16px;
  padding: 40px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  margin: 48px 0;
  color: #fff;
  overflow: hidden;
  position: relative;
}
.dingen-callout::before {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.dingen-callout img {
  width: 120px;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.25));
}
.callout-text h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 8px;
}
.callout-text p {
  color: rgba(255,255,255,.85);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.6;
}
.callout-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 20px;
}

/* ── Site Footer ── */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,.7);
  padding: 48px 0 28px;
  font-size: 13px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand .nav-logo { color: var(--cream); margin-bottom: 12px; }
.footer-brand p { font-size: 13px; line-height: 1.7; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  margin-bottom: 14px;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,.65);
  margin-bottom: 8px;
  transition: color .2s;
  font-size: 13px;
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,.35);
}
.footer-bottom a { color: var(--terracotta-light); }

/* ── Recipe Detail Page ── */
.recipe-hero {
  background: var(--warm-white);
  border-bottom: 1.5px solid var(--border);
  padding: 48px 0;
}
.recipe-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
  padding: 48px 0 64px;
}
.recipe-main {}
.recipe-sidebar {}

.recipe-header .eyebrow { margin-bottom: 10px; }
.recipe-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 12px;
}
.recipe-description {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.65;
}
.recipe-stats {
  display: flex;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 36px;
  background: var(--warm-white);
}
.stat-item {
  flex: 1;
  padding: 16px 12px;
  text-align: center;
  border-right: 1.5px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--terracotta);
}

.recipe-image {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  margin-bottom: 40px;
}
.recipe-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ingredients */
.recipe-section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--charcoal);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--terracotta);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ingredients-list {
  margin-bottom: 40px;
}
.ingredients-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.ingredient-amount {
  font-weight: 500;
  color: var(--terracotta);
  min-width: 80px;
}

/* Instructions */
.instructions-list {
  counter-reset: steps;
  margin-bottom: 40px;
}
.step {
  counter-increment: steps;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  margin-bottom: 28px;
  align-items: start;
}
.step-number {
  width: 44px;
  height: 44px;
  background: var(--terracotta);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.step-text {
  font-size: 15px;
  line-height: 1.7;
  padding-top: 10px;
}

/* Sidebar card */
.sidebar-card {
  background: var(--warm-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.sidebar-card h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 14px;
  color: var(--charcoal);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nutrition-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.nutrition-row:last-child { border-bottom: none; }
.nutrition-row .nval { font-weight: 500; color: var(--terracotta); }

/* Tag row */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 32px;
}
.tag {
  padding: 4px 12px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 40px 0 20px;
}
.page-btn {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  background: var(--warm-white);
}
.page-btn:hover, .page-btn.active {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #fff;
}

/* ── Search Bar ── */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
}
.search-input {
  flex: 1;
  padding: 12px 18px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--charcoal);
  background: var(--warm-white);
  outline: none;
  transition: border-color .2s;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--terracotta); }
.search-btn {
  background: var(--terracotta);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s;
}
.search-btn:hover { background: var(--terracotta-light); }

/* ── Unsplash Photo Attribution ── */
/* Required by Unsplash API guidelines — must be visible, linked */
.photo-credit {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 10px;
  color: rgba(255,255,255,.75);
  background: rgba(0,0,0,.35);
  padding: 3px 7px;
  border-radius: 4px;
  line-height: 1.4;
  backdrop-filter: blur(2px);
}
.photo-credit a {
  color: rgba(255,255,255,.9);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.photo-credit a:hover { color: #fff; }

/* Recipe hero attribution — below the main image */
.recipe-image-wrap { position: relative; }
.recipe-hero-credit {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  margin-top: 6px;
  margin-bottom: 28px;
}
.recipe-hero-credit a { color: var(--terracotta); }
.recipe-hero-credit a:hover { text-decoration: underline; }

/* ── Loading skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--warm-white) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Toast notification ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--charcoal);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  z-index: 999;
  transition: transform .3s;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-chef { display: none; }
  .recipe-layout { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .dingen-callout { grid-template-columns: 1fr; text-align: center; }
  .dingen-callout img { margin: 0 auto; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--warm-white);
    border-bottom: 1.5px solid var(--border);
    padding: 16px 24px 20px;
    gap: 14px;
    box-shadow: 0 8px 24px rgba(26,26,24,.1);
  }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .recipe-stats { flex-wrap: wrap; }
  .stat-item { min-width: 50%; border-bottom: 1.5px solid var(--border); }
  .section-header { flex-direction: column; gap: 8px; }
}
