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

/* ============================================================
   TIME'S UP CUISINE — Scoreboard

   A sports scoreboard meets a kitchen. Countdown timers,
   speed stripes, bold red, monospace digits. Every second counts.
   ============================================================ */

:root {
  --color-primary: #E63946;
  --color-primary-dark: #C62B38;
  --color-accent: #F4A261;
  --color-accent-faint: rgba(244, 162, 97, 0.1);
  --color-navy: #1D3557;
  --color-navy-light: #2A4A73;
  --color-teal: #A8DADC;
  --color-teal-faint: rgba(168, 218, 220, 0.12);
  --color-bg: #FFF8F0;
  --color-bg-card: #FFFFFF;
  --color-bg-dark: #1D3557;
  --color-text: #1D3557;
  --color-text-light: #457B9D;
  --color-text-muted: #8FA7BF;
  --color-border: #E8DDD0;
  --color-hairline: rgba(29, 53, 87, 0.06);

  --font-mono: 'Space Mono', 'Courier New', monospace;
  --font-display: 'Outfit', sans-serif;

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

  --header-height: 56px;
  --container-max: 1140px;
  --container-narrow: 740px;
}

/* === 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-display);
  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-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: 800;
  line-height: 1.1;
  color: var(--color-navy);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

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

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

/* =============================================
   HEADER — Bold red stripe on top
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  border-top: 4px solid var(--color-primary);
  box-shadow: 0 2px 12px rgba(29, 53, 87, 0.06);
}

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

.site-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.site-logo::before {
  content: '⏱';
  font-size: 0.9rem;
}

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

.nav-links a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  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: 4px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  position: relative;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: '';
  position: absolute;
  left: 9px;
  width: 20px;
  height: 2.5px;
  background: #fff;
  transition: all 0.3s ease;
}
.nav-toggle::before { top: 10px; }
.nav-toggle span { top: 18px; }
.nav-toggle::after { top: 26px; }

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

/* =============================================
   HERO — Full background image, countdown overlay
   ============================================= */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-navy);
}

.hero img,
.hero .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  filter: brightness(0.4) contrast(1.1);
}

/* Diagonal speed stripes overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 20px,
    rgba(230, 57, 70, 0.06) 20px,
    rgba(230, 57, 70, 0.06) 22px
  );
  pointer-events: none;
}

/* Dark gradient from bottom */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(to top, rgba(29, 53, 87, 0.8) 0%, transparent 60%);
}

.hero .container {
  position: relative;
  z-index: 3;
  text-align: center;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: var(--space-sm);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-teal);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn, .view-all {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn {
  background: var(--color-primary);
  color: #fff;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 4px;
}
.btn:hover { background: var(--color-primary-dark); color: #fff; transform: translateY(-2px); }

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

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

.latest-recipes h2 {
  text-align: center;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  margin-bottom: var(--space-lg);
}

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

/* =============================================
   RECIPE CARD — Timer badge dominant
   ============================================= */
.recipe-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--color-bg-card);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 8px rgba(29, 53, 87, 0.06);
  position: relative;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.1);
}

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

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

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

.card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

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

/* TIMER BADGE — the hero element of each card */
.card-time {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff;
  background: var(--color-primary);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  margin-top: var(--space-xs);
  width: fit-content;
  letter-spacing: 0.02em;
}

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

/* =============================================
   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-size: clamp(1.6rem, 4vw, 2.4rem);
  text-transform: none;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}

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

/* META — Scoreboard bar */
.recipe-meta {
  display: flex;
  justify-content: center;
  gap: 0;
  background: var(--color-navy);
  margin: var(--space-md) 0;
  border-radius: 6px;
  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.08);
}
.meta-item:last-child { border-right: none; }

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

.meta-item span {
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-teal);
}

.recipe-hero-image {
  margin: var(--space-lg) 0;
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
}

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

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

.recipe-body h2 {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.recipe-body h2::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

/* =============================================
   INGREDIENTS — Two-column compressed
   ============================================= */
.recipe-ingredients {
  background: var(--color-bg-card);
  border: 2px solid var(--color-accent);
  border-radius: 6px;
  padding: var(--space-md);
  margin: var(--space-lg) 0;
  position: relative;
}

/* GRAB LIST badge */
.recipe-ingredients::after {
  content: 'GRAB LIST';
  position: absolute;
  top: -10px;
  right: 16px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  background: var(--color-accent);
  color: #fff;
  padding: 2px 10px;
  border-radius: 3px;
}

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

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

.recipe-ingredients ul {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: var(--space-md);
}

.recipe-ingredients li {
  padding: 0.3em 0 0.3em 1.5rem;
  position: relative;
  font-size: 0.9rem;
  line-height: 1.5;
  break-inside: avoid;
  border-bottom: 1px solid var(--color-hairline);
}

/* Arrow bullet */
.recipe-ingredients li::before {
  content: '›';
  position: absolute;
  left: 0;
  top: 0.3em;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-primary);
}

/* =============================================
   INSTRUCTIONS — Timeline layout
   Vertical line left, time stamps, steps branch off
   ============================================= */
.recipe-instructions {
  margin: var(--space-lg) 0;
  counter-reset: speed-step;
  position: relative;
}

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

.recipe-instructions ol {
  list-style: none;
  padding: 0;
  position: relative;
}

/* Vertical timeline line */
.recipe-instructions ol::before {
  content: '';
  position: absolute;
  left: 1.5rem;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-accent));
  border-radius: 2px;
}

.recipe-instructions li {
  counter-increment: speed-step;
  position: relative;
  padding: var(--space-sm) var(--space-sm) var(--space-sm) 4.5rem;
  margin-bottom: var(--space-xs);
  line-height: 1.75;
}

/* Timeline dot */
.recipe-instructions li::before {
  content: '';
  position: absolute;
  left: calc(1.5rem - 5px);
  top: calc(var(--space-sm) + 0.4rem);
  width: 13px;
  height: 13px;
  background: var(--color-primary);
  border: 3px solid var(--color-bg);
  border-radius: 50%;
  z-index: 1;
}

/* Step number label */
.recipe-instructions li::after {
  content: counter(speed-step, decimal-leading-zero);
  position: absolute;
  left: 3.2rem;
  top: var(--space-sm);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--color-primary);
  letter-spacing: 0.02em;
}

/* Time stamp styling (embedded in text via <strong> or manual) */
.recipe-instructions li strong {
  font-family: var(--font-mono);
  color: var(--color-primary);
}

/* =============================================
   NUTRITION
   ============================================= */
.recipe-nutrition {
  margin: var(--space-lg) 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-teal-faint);
  border-radius: 6px;
  border: 1px solid rgba(168, 218, 220, 0.3);
  font-size: 0.9rem;
  color: var(--color-text-light);
}

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

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

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

.recipe-categories h4,
.recipe-tags h4 {
  font-size: 0.6rem;
  font-weight: 800;
  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: 600;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  padding: 0.35rem 0.8rem;
  border: 1.5px solid var(--color-border);
  border-radius: 4px;
  margin: 0 0.3rem 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 PAGE
   ============================================= */
.list-page { padding: var(--space-xl) 0; }

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

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

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

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

.page-item {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--color-text);
  border: 2px 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-navy);
  color: rgba(255, 255, 255, 0.5);
  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-teal));
}

.site-footer p {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.site-footer a {
  color: var(--color-accent);
  font-size: 0.72rem;
}
.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, 248, 240, 0.98);
    backdrop-filter: blur(10px);
    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; }

  .hero { min-height: 55vh; }

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

  .recipe-ingredients ul { columns: 1; }
}

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

  .hero { min-height: 45vh; }
  .hero h1 { font-size: 1.8rem; }

  .recipe-grid { grid-template-columns: 1fr; }
  .card-image { aspect-ratio: 4 / 3; }

  .recipe-instructions li { padding-left: 3.5rem; }
  .recipe-instructions li::after { left: 2.5rem; }
  .recipe-instructions ol::before { left: 1rem; }
  .recipe-instructions li::before { left: calc(1rem - 5px); }

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

  .meta-item { padding: 0.7rem 0.5rem; }
  .meta-item strong { font-size: 1rem; }
}

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

/* === Print === */
@media print {
  .site-header, .site-footer, .nav-toggle, .pagination, .view-all, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .hero { min-height: auto; background: #f5f5f5; }
  .hero img { display: none; }
  .hero::before, .hero::after { display: none; }
  .hero h1 { color: #000; text-shadow: none; }
  .recipe-meta { background: #f0f0f0; }
  .meta-item strong { color: #000; }
}
