@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Bitter:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ============================================================
   KWIZINE FOR LAZY — Couch Mode Dashboard

   A streaming app that happens to have recipes. Dark header,
   horizontal cards, minimal effort aesthetic. Moody, modern,
   unapologetically effortless.
   ============================================================ */

:root {
  --color-primary: #2D3142;
  --color-primary-light: #3D4259;
  --color-accent: #EF8354;
  --color-accent-light: #F4A682;
  --color-accent-faint: rgba(239, 131, 84, 0.06);
  --color-slate: #4F5D75;
  --color-bg: #F7F5F0;
  --color-bg-card: #FFFFFF;
  --color-bg-dark: #2D3142;
  --color-text: #2D3142;
  --color-text-light: #4F5D75;
  --color-text-muted: #8D93A5;
  --color-border: #DDD9D0;
  --color-hairline: rgba(45, 49, 66, 0.06);

  --font-display: 'Manrope', sans-serif;
  --font-body: 'Bitter', Georgia, serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3.5rem;
  --space-xl: 6rem;

  --header-height: 56px;
  --container-max: 1100px;
  --container-narrow: 700px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 2rem); }

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: all 0.2s ease; }
a:hover { color: var(--color-text); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-primary);
}

p { margin-bottom: 1.3em; }
::selection { background: var(--color-accent); color: #fff; }

.container {
  width: 100%; max-width: var(--container-max);
  margin: 0 auto; padding: 0 var(--space-md);
}

/* =============================================
   HEADER — Dark, minimal, streaming-app energy
   ============================================= */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  height: var(--header-height);
  background: var(--color-primary);
  display: flex; align-items: center;
}

.site-header .container {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
}

.site-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.nav-links { display: flex; align-items: center; gap: var(--space-sm); list-style: none; }

.nav-links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--color-accent); }

.nav-toggle {
  display: none; background: none; border: none;
  width: 34px; height: 34px; cursor: pointer; position: relative;
}

.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: ''; position: absolute; left: 5px; width: 24px; height: 2px;
  background: #fff; transition: all 0.3s ease;
}
.nav-toggle::before { top: 9px; }
.nav-toggle span { top: 16px; }
.nav-toggle::after { top: 23px; }

.nav-open .nav-toggle::before { top: 16px; transform: rotate(45deg); background: var(--color-accent); }
.nav-open .nav-toggle span { opacity: 0; }
.nav-open .nav-toggle::after { top: 16px; transform: rotate(-45deg); background: var(--color-accent); }

/* =============================================
   HERO — Minimal dark band. Lazy hero.
   ============================================= */
.hero {
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-xl) 0;
  text-align: center;
  position: relative;
}

/* Subtle diagonal cut at bottom */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--color-bg);
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
}

.hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.03em;
}

.hero h1 em { color: var(--color-accent); font-style: normal; }

.hero-tagline {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  max-width: 480px;
  margin: 0 auto var(--space-md);
  line-height: 1.5;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn, .view-all {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn {
  background: var(--color-accent); color: #fff;
  padding: 0.75rem 1.8rem; border: none; border-radius: 6px;
}
.btn:hover { background: var(--color-accent-light); color: #fff; transform: translateY(-1px); }

.view-all {
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
  border-radius: 6px; padding: 0.6rem 1.5rem; background: none;
}
.view-all:hover { background: var(--color-accent); color: #fff; }

/* =============================================
   LATEST RECIPES
   ============================================= */
.latest-recipes { padding: var(--space-lg) 0 var(--space-xl); }

.latest-recipes h2 {
  font-size: 1.2rem; font-weight: 700;
  margin-bottom: var(--space-lg);
  position: relative;
  display: inline-block;
}

/* Accent underline */
.latest-recipes h2::after {
  content: ''; display: block;
  width: 30px; height: 3px;
  background: var(--color-accent);
  margin-top: var(--space-xs);
  border-radius: 2px;
}

/* =============================================
   RECIPE GRID — Horizontal cards (streaming layout)
   ============================================= */
.recipe-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* =============================================
   RECIPE CARD — Horizontal: image left, text right
   ============================================= */
.recipe-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  text-decoration: none;
  color: inherit;
  background: var(--color-bg-card);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: 0 1px 6px rgba(45, 49, 66, 0.05);
  border: 1px solid var(--color-border);
}

.recipe-card:hover {
  box-shadow: 0 4px 18px rgba(45, 49, 66, 0.1);
  border-color: var(--color-accent);
  transform: translateX(4px);
}

.card-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
  filter: saturate(0.9);
}
.recipe-card:hover .card-image img { transform: scale(1.04); filter: saturate(1); }

.card-body {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-body h3 {
  font-size: 1rem; font-weight: 700;
  margin-bottom: 0.2rem; line-height: 1.25;
}

.card-body p {
  font-size: 0.82rem; color: var(--color-text-light);
  line-height: 1.5; margin: 0;
}

.card-time {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.7rem; color: var(--color-accent);
  margin-top: var(--space-xs); width: fit-content;
  text-transform: uppercase; letter-spacing: 0.04em;
}

.card-time::before {
  content: ''; display: inline-block;
  width: 14px; height: 2px;
  background: var(--color-accent); border-radius: 1px;
}

/* =============================================
   SINGLE RECIPE
   ============================================= */
.recipe-single {
  max-width: var(--container-narrow); margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

.recipe-header { margin-bottom: var(--space-lg); }

.recipe-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: var(--space-sm);
}

.recipe-description {
  font-size: 0.95rem; color: var(--color-text-light);
  font-style: italic; line-height: 1.7;
}

/* Meta — dark panel like a streaming-app info bar */
.recipe-meta {
  display: flex; gap: 0;
  background: var(--color-primary); border-radius: 8px;
  margin: var(--space-md) 0; overflow: hidden;
}

.meta-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 0.15rem;
  padding: var(--space-sm);
  border-right: 1px solid rgba(255,255,255,0.06);
}
.meta-item:last-child { border-right: none; }

.meta-item strong {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.15rem; color: var(--color-accent);
}

.meta-item span {
  font-family: var(--font-display); font-size: 0.55rem;
  font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.35);
}

.recipe-hero-image {
  margin: var(--space-lg) 0; border-radius: 10px;
  overflow: hidden;
}
.recipe-hero-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.recipe-body { font-size: 1rem; line-height: 1.8; }

.recipe-body h2 {
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-top: var(--space-lg); margin-bottom: var(--space-sm);
  color: var(--color-text-muted);
  position: relative; padding-left: var(--space-sm);
}

.recipe-body h2::before {
  content: ''; position: absolute; left: 0;
  top: 3px; bottom: 3px; width: 3px;
  background: var(--color-accent); border-radius: 2px;
}

/* =============================================
   INGREDIENTS — Compact dark-bg checklist
   ============================================= */
.recipe-ingredients {
  background: var(--color-primary); color: rgba(255,255,255,0.85);
  border-radius: 10px; padding: var(--space-md);
  margin: var(--space-lg) 0;
}

.recipe-ingredients h2, .recipe-ingredients h3 {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: var(--space-sm); padding-left: 0;
}
.recipe-ingredients h2::before, .recipe-ingredients h3::before { display: none; }

.recipe-ingredients ul { list-style: none; padding: 0; }

.recipe-ingredients li {
  padding: 0.35em 0 0.35em 1.5rem; position: relative;
  font-family: var(--font-display); font-size: 0.88rem;
  font-weight: 400; line-height: 1.5;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.recipe-ingredients li:last-child { border-bottom: none; }

/* Square checkbox bullet */
.recipe-ingredients li::before {
  content: ''; position: absolute; left: 0; top: 0.55em;
  width: 10px; height: 10px;
  border: 1.5px solid var(--color-accent); border-radius: 2px;
}

/* =============================================
   INSTRUCTIONS — Collapsed/compact steps
   ============================================= */
.recipe-instructions {
  margin: var(--space-lg) 0; counter-reset: lazy-step;
}

.recipe-instructions h2, .recipe-instructions h3 { margin-bottom: var(--space-sm); }
.recipe-instructions ol { list-style: none; padding: 0; }

.recipe-instructions li {
  counter-increment: lazy-step; position: relative;
  padding: var(--space-sm) var(--space-sm) var(--space-sm) 3.5rem;
  border-bottom: 1px solid var(--color-border);
  line-height: 1.75;
}
.recipe-instructions li:last-child { border-bottom: none; }

/* Compact leading-zero number */
.recipe-instructions li::before {
  content: counter(lazy-step, decimal-leading-zero);
  position: absolute; left: 0; top: var(--space-sm);
  font-family: var(--font-display); font-weight: 800;
  font-size: 1rem; color: var(--color-accent);
  letter-spacing: -0.02em;
}

/* =============================================
   NUTRITION
   ============================================= */
.recipe-nutrition {
  margin: var(--space-lg) 0; padding: var(--space-sm) var(--space-md);
  background: var(--color-bg-card); border: 1px solid var(--color-border);
  border-radius: 8px; font-size: 0.88rem; color: var(--color-text-light);
}

.recipe-nutrition h2, .recipe-nutrition h3 {
  font-size: 0.7rem; color: var(--color-text-muted); margin-bottom: var(--space-xs);
  padding-left: 0;
}
.recipe-nutrition h2::before, .recipe-nutrition h3::before { display: none; }

/* =============================================
   RECIPE FOOTER / TAGS
   ============================================= */
.recipe-footer { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--color-border); }
.recipe-categories, .recipe-tags { margin-bottom: var(--space-sm); }

.recipe-categories h4, .recipe-tags h4 {
  font-family: var(--font-display); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--color-text-muted); margin-bottom: 0.3rem;
}

.tag {
  display: inline-block; font-family: var(--font-display);
  font-weight: 500; font-size: 0.75rem;
  color: var(--color-slate); padding: 4px 12px;
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: 4px; margin: 0 0.25rem 0.5rem 0;
  text-decoration: none; transition: all 0.2s ease;
}
.tag:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* =============================================
   LIST / EMPTY / PAGINATION
   ============================================= */
.list-page { padding: var(--space-xl) 0; }
.list-page h1 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: var(--space-xs); }
.list-description { font-style: italic; font-size: 0.9rem; color: var(--color-text-light); max-width: 460px; margin-bottom: var(--space-lg); }
.empty-message { text-align: center; padding: var(--space-xl) var(--space-md); font-family: var(--font-display); font-size: 0.88rem; color: var(--color-text-muted); }

.pagination { display: flex; justify-content: center; gap: 0.4rem; margin-top: var(--space-lg); }

.page-item {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 0.78rem;
  color: var(--color-text); border: 1px solid var(--color-border);
  border-radius: 4px; text-decoration: none; transition: all 0.2s ease;
}
.page-item:hover, .page-item.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--color-primary); color: rgba(255,255,255,0.4);
  padding: var(--space-lg) 0; text-align: center;
  font-family: var(--font-display); font-size: 0.78rem;
}

.site-footer a { color: var(--color-accent-light); }
.site-footer a:hover { color: #fff; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: var(--header-height); left: 0; right: 0; bottom: 0;
    background: var(--color-primary);
    flex-direction: column; justify-content: center; align-items: center;
    gap: var(--space-md); opacity: 0; visibility: hidden;
    transition: all 0.3s ease; z-index: 999;
  }
  .nav-open .nav-links { opacity: 1; visibility: visible; }
  .nav-links a { font-size: 1rem; color: rgba(255,255,255,0.6); }

  .recipe-card { grid-template-columns: 150px 1fr; }
}

@media (max-width: 480px) {
  :root { --header-height: 50px; }

  .recipe-card {
    grid-template-columns: 1fr;
  }

  .card-image { aspect-ratio: 16 / 9; }

  .recipe-instructions li { padding-left: 2.8rem; }

  .recipe-ingredients { padding: var(--space-sm); }

  .meta-item { padding: 0.6rem 0.4rem; }
  .meta-item strong { font-size: 0.95rem; }
}

:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

@media print {
  .site-header, .site-footer, .nav-toggle, .pagination, .view-all, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .recipe-card { grid-template-columns: 1fr; }
  .recipe-ingredients { background: #f5f5f5; color: #000; }
  .recipe-meta { background: #f0f0f0; }
  .meta-item strong { color: #000; }
}
