@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&family=Patrick+Hand&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ============================================================
   EASY EATSY — Sticky-Note Kitchen

   A fridge covered in sticky notes, a notebook with doodles,
   chat bubbles from a friend who just figured this out.
   Not a cooking school. A friend texting you a recipe.
   ============================================================ */

:root {
  --color-primary: #FF6B35;
  --color-primary-dark: #E55A24;
  --color-accent: #4ECDC4;
  --color-accent-faint: rgba(78, 205, 196, 0.08);
  --color-sunny: #FFE66D;
  --color-sunny-light: #FFF3B5;
  --color-bg: #FFFDF7;
  --color-bg-card: #FFFFFF;
  --color-bg-sticky: #FFF9C4;
  --color-bg-notebook: #F5F5FF;
  --color-text: #2B2B2B;
  --color-text-light: #6B6B6B;
  --color-text-muted: #9A9A9A;
  --color-border: #F0EBE1;
  --color-doodle: rgba(43, 43, 43, 0.08);

  --font-hand: 'Patrick Hand', cursive;
  --font-display: 'Quicksand', sans-serif;
  --font-body: 'DM Sans', sans-serif;

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

  --header-height: 60px;
  --container-max: 1100px;
  --container-narrow: 720px;
}

/* === Reset === */
*, *::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;
}

/* Notebook ruled lines background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 31px,
    rgba(78, 205, 196, 0.04) 31px, rgba(78, 205, 196, 0.04) 32px
  );
  pointer-events: none;
  z-index: -1;
}

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

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

p { margin-bottom: 1.3em; }
::selection { background: var(--color-sunny); color: var(--color-text); }

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

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 253, 247, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  border-bottom: 3px solid var(--color-primary);
}

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

.site-logo {
  font-family: var(--font-hand);
  font-size: 1.6rem;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.site-logo::before { content: '🍴'; font-size: 1.1rem; }

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

.nav-links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--color-text-light);
}
.nav-links a:hover { color: var(--color-primary); }

.nav-toggle {
  display: none;
  background: var(--color-primary);
  border: none;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  position: relative;
}

.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: '';
  position: absolute;
  left: 10px;
  width: 22px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.nav-toggle::before { top: 12px; }
.nav-toggle span { top: 20px; }
.nav-toggle::after { top: 28px; }

.nav-open .nav-toggle::before { top: 20px; transform: rotate(45deg); }
.nav-open .nav-toggle span { opacity: 0; }
.nav-open .nav-toggle::after { top: 20px; transform: rotate(-45deg); }

/* =============================================
   HERO — Split screen: text left, tilted photo right
   ============================================= */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-xl) 0;
  min-height: 70vh;
  overflow: hidden;
}

.hero .container {
  display: contents;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  padding-left: var(--space-md);
}

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

/* Highlighter underline on emphasized text */
.hero h1 em::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: -4px;
  right: -4px;
  height: 12px;
  background: var(--color-sunny);
  z-index: -1;
  transform: rotate(-1deg);
  border-radius: 2px;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text-light);
  padding-left: var(--space-md);
  margin-top: var(--space-sm);
  max-width: 420px;
  line-height: 1.6;
}

/* Tilted Polaroid photo on the right */
.hero img,
.hero picture,
.hero .hero-image {
  width: 85%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  transform: rotate(3deg);
  box-shadow: 6px 8px 24px rgba(43, 43, 43, 0.12);
  border: 6px solid #fff;
  margin: 0 auto;
}

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

.btn {
  background: var(--color-primary);
  color: #fff;
  padding: 0.8rem 1.8rem;
  border: none;
  border-radius: 50px;
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.3);
}
.btn:hover { background: var(--color-primary-dark); color: #fff; transform: translateY(-2px); }

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

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

.latest-recipes h2 {
  font-family: var(--font-hand);
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: var(--space-lg);
  color: var(--color-text);
}

.latest-recipes h2::after { content: ' 👀'; }

/* =============================================
   RECIPE GRID
   ============================================= */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

/* =============================================
   RECIPE CARD — Tilted sticky notes
   ============================================= */
.recipe-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--color-bg-card);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 4px 16px rgba(43, 43, 43, 0.07);
  position: relative;
}

/* Alternate cards tilt slightly */
.recipe-card:nth-child(odd) { transform: rotate(-0.8deg); }
.recipe-card:nth-child(even) { transform: rotate(0.6deg); }

.recipe-card:hover {
  transform: rotate(0deg) translateY(-6px) !important;
  box-shadow: 0 12px 32px rgba(255, 107, 53, 0.15);
}

/* Sticky-note corner fold */
.recipe-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 24px 24px 0;
  border-color: transparent var(--color-bg) transparent transparent;
  transition: border-width 0.3s ease;
}
.recipe-card:hover::after { border-width: 0 32px 32px 0; }

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

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.recipe-card:hover .card-image img { transform: scale(1.05); }

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

.card-body h3 {
  font-family: var(--font-hand);
  font-size: 1.25rem;
  color: var(--color-text);
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

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

.card-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--color-accent);
  background: var(--color-accent-faint);
  padding: 3px 10px;
  border-radius: 50px;
  margin-top: var(--space-xs);
  width: fit-content;
}

.card-time::before { content: '⏱'; font-size: 0.7rem; }

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

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

.recipe-header h1 {
  font-family: var(--font-hand);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin-bottom: var(--space-sm);
}

.recipe-description {
  font-size: 1rem;
  color: var(--color-text-light);
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto;
}

.recipe-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--color-bg-sticky);
  padding: var(--space-sm) var(--space-md);
  border-radius: 4px;
  transform: rotate(-1deg);
  box-shadow: 2px 3px 6px rgba(0,0,0,0.06);
  min-width: 80px;
}

.meta-item:nth-child(even) { transform: rotate(1.5deg); }

.meta-item strong {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: var(--color-primary);
}

.meta-item span {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.recipe-hero-image {
  margin: var(--space-lg) 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(43, 43, 43, 0.08);
  transform: rotate(-0.5deg);
}

.recipe-hero-image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* =============================================
   RECIPE BODY
   ============================================= */
.recipe-body {
  font-size: 1rem;
  line-height: 1.8;
}

.recipe-body h2 {
  font-family: var(--font-hand);
  font-size: 1.5rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--color-text);
  position: relative;
  display: inline-block;
}

/* Highlighter underline on h2 */
.recipe-body h2::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: -4px;
  right: -4px;
  height: 10px;
  background: var(--color-sunny);
  z-index: -1;
  border-radius: 2px;
  transform: rotate(-0.5deg);
}

/* =============================================
   INGREDIENTS — Torn notebook page
   ============================================= */
.recipe-ingredients {
  background: var(--color-bg-notebook);
  border-radius: 8px;
  padding: var(--space-md);
  margin: var(--space-lg) 0;
  position: relative;
  border: 2px dashed var(--color-accent);
  /* Notebook lines */
  background-image: repeating-linear-gradient(
    0deg, transparent, transparent 27px,
    rgba(78, 205, 196, 0.08) 27px, rgba(78, 205, 196, 0.08) 28px
  );
  background-position: 0 3rem;
}

/* Label */
.recipe-ingredients::before {
  content: '📝 what you need';
  position: absolute;
  top: -13px;
  left: 16px;
  font-family: var(--font-hand);
  font-size: 1rem;
  color: var(--color-primary);
  background: var(--color-bg);
  padding: 0 var(--space-xs);
}

.recipe-ingredients h2,
.recipe-ingredients h3 {
  margin-bottom: var(--space-sm);
}

.recipe-ingredients h2::after,
.recipe-ingredients h3::after { display: none; }

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

.recipe-ingredients li {
  padding: 0.35em 0 0.35em 2rem;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Checkbox bullet */
.recipe-ingredients li::before {
  content: '☐';
  position: absolute;
  left: 0;
  top: 0.35em;
  color: var(--color-accent);
  font-size: 1rem;
}

.recipe-ingredients li:hover::before {
  content: '☑';
}

/* =============================================
   INSTRUCTIONS — Chat bubbles (texting a friend)
   ============================================= */
.recipe-instructions {
  margin: var(--space-lg) 0;
  counter-reset: chat-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: chat-step;
  position: relative;
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-sm);
  margin-left: 3rem;
  background: var(--color-bg-card);
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 2px 8px rgba(43, 43, 43, 0.06);
  line-height: 1.7;
  max-width: 85%;
}

/* Chat bubble tail */
.recipe-instructions li::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: -8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 10px 10px 0;
  border-color: transparent var(--color-bg-card) transparent transparent;
}

/* Step number as avatar circle */
.recipe-instructions li::before {
  content: counter(chat-step);
  position: absolute;
  left: -3rem;
  top: var(--space-sm);
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =============================================
   NUTRITION
   ============================================= */
.recipe-nutrition {
  margin: var(--space-lg) 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-accent-faint);
  border-radius: 14px;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.recipe-nutrition h2,
.recipe-nutrition h3 {
  font-family: var(--font-hand);
  font-size: 1.1rem;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}
.recipe-nutrition h2::after,
.recipe-nutrition h3::after { display: none; }

/* =============================================
   RECIPE FOOTER
   ============================================= */
.recipe-footer {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 2px dashed var(--color-border);
}

.recipe-categories, .recipe-tags { margin-bottom: var(--space-sm); }

.recipe-categories h4, .recipe-tags h4 {
  font-family: var(--font-hand);
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 0.3rem;
}

.tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--color-text-light);
  padding: 4px 12px;
  background: var(--color-bg-sticky);
  border-radius: 50px;
  margin: 0 0.25rem 0.5rem 0;
  text-decoration: none;
  transition: all 0.2s ease;
  transform: rotate(-0.5deg);
}

.tag:nth-child(even) { transform: rotate(0.8deg); }

.tag:hover {
  background: var(--color-primary);
  color: #fff;
  transform: rotate(0deg);
}

/* =============================================
   LIST PAGE
   ============================================= */
.list-page { padding: var(--space-lg) 0 var(--space-xl); }

.list-page h1 {
  font-family: var(--font-hand);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  text-align: center;
  margin-bottom: var(--space-xs);
}

.list-description {
  text-align: center;
  font-size: 0.95rem;
  color: var(--color-text-light);
  max-width: 460px;
  margin: 0 auto var(--space-lg);
}

.empty-message {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  font-family: var(--font-hand);
  font-size: 1.2rem;
  color: var(--color-text-muted);
}

.empty-message::before { content: '🍳 '; }

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
}

.page-item {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-text);
  background: var(--color-bg-card);
  border: 2px solid var(--color-border);
  border-radius: 50%;
  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-text);
  color: rgba(255, 255, 255, 0.6);
  padding: var(--space-lg) 0;
  text-align: center;
}

.site-footer::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-sunny));
}

.site-footer p {
  font-family: var(--font-display);
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
}

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

/* =============================================
   RESPONSIVE — 768px
   ============================================= */
@media (max-width: 768px) {
  .nav-toggle { display: flex; align-items: center; justify-content: center; }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0; bottom: 0;
    background: rgba(255, 253, 247, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    justify-content: 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: 1.1rem; }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: var(--space-lg) 0;
    text-align: center;
  }

  .hero h1, .hero-tagline { padding-left: var(--space-md); padding-right: var(--space-md); }

  .hero img, .hero picture, .hero .hero-image {
    width: 70%;
    transform: rotate(2deg);
  }

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

  .recipe-instructions li { margin-left: 2.5rem; max-width: 90%; }
}

/* =============================================
   RESPONSIVE — 480px
   ============================================= */
@media (max-width: 480px) {
  :root { --header-height: 54px; }

  .hero img, .hero picture, .hero .hero-image { width: 85%; }

  .recipe-grid { grid-template-columns: 1fr; }
  .recipe-card:nth-child(odd), .recipe-card:nth-child(even) { transform: rotate(0); }
  .card-image { aspect-ratio: 4 / 3; }

  .recipe-instructions li { margin-left: 2rem; }
  .recipe-instructions li::before { left: -2rem; width: 24px; height: 24px; font-size: 0.65rem; }

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

  .meta-item { transform: rotate(0) !important; }
}

/* === Focus === */
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; border-radius: 4px; }

/* === Print === */
@media print {
  .site-header, .site-footer, .nav-toggle, .pagination, .view-all, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .recipe-card { transform: none !important; box-shadow: none; border: 1px solid #ccc; }
  .recipe-card::after { display: none; }
  .recipe-instructions li { border-radius: 0; margin-left: 0; }
  .recipe-hero-image { transform: none; }
}
