/* =========================================================================
   FOGÓN — hoja de estilos
   Índice:
   1. Reset y variables (tokens de diseño)
   2. Utilidades y accesibilidad
   3. Header y navegación
   4. Hero
   5. Categorías
   6. Carrusel de destacadas
   7. Populares y grilla de recetas
   8. Filtros
   9. Modal de receta
   10. Footer
   11. Botón volver arriba
   12. Animaciones y scroll-reveal
   13. Responsive
   ========================================================================= */

/* ---------- 1. RESET Y VARIABLES ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
  /* Paleta cálida — inspirada en brasas, especias y madera quemada */
  --ivory: #FBF3E7;
  --ivory-soft: #F3E7D6;
  --ink: #2B211B;
  --ink-soft: #5B4E44;
  --ember: #C1440E;
  --ember-dark: #9C3509;
  --saffron: #E3A438;
  --olive: #6C7A46;
  --wine: #7A2E2E;
  --line: rgba(43, 33, 27, 0.12);

  --bg: var(--ivory);
  --bg-elevated: #FFFFFF;
  --bg-soft: var(--ivory-soft);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --accent: var(--ember);
  --accent-contrast: #FFF6EC;
  --border: var(--line);
  --shadow: 0 20px 45px -25px rgba(43, 33, 27, 0.45);
  --shadow-sm: 0 10px 20px -14px rgba(43, 33, 27, 0.4);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;
  --font-mono: "Space Mono", "Courier New", monospace;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --header-h: 78px;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

[data-theme="dark"] {
  --bg: #1C1512;
  --bg-elevated: #251C17;
  --bg-soft: #2A201B;
  --text: #F3E7D9;
  --text-soft: #C9B8AA;
  --accent: #E8935A;
  --accent-contrast: #241610;
  --border: rgba(243, 231, 217, 0.12);
  --shadow: 0 25px 50px -20px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 12px 24px -16px rgba(0, 0, 0, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background .35s var(--ease), color .35s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; color: var(--text); }
p { margin: 0; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
select, input { font: inherit; color: inherit; }

/* ---------- 2. UTILIDADES ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -60px; left: 12px;
  background: var(--ember); color: #fff;
  padding: 10px 16px; border-radius: var(--radius-sm);
  z-index: 1000; transition: top .2s var(--ease);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2.5px solid var(--ember);
  outline-offset: 3px;
  border-radius: 4px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

.section { padding: 88px 0; }
.section-inner { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.section-head { margin-bottom: 44px; max-width: 640px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  max-width: none; gap: 24px; flex-wrap: wrap;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--ember); color: #FFF6EC;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); background: var(--ember-dark); }
.btn-primary svg { transition: transform .25s var(--ease); }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-ghost {
  border: 1.5px solid var(--border); color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-outline {
  border: 1.5px solid var(--accent); color: var(--accent);
  background: transparent;
}
.btn-outline:hover { background: var(--accent); color: var(--accent-contrast); }
.btn-outline.is-active { background: var(--accent); color: var(--accent-contrast); }

.btn-text { color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; padding: 8px 4px; }
.btn-text:hover { color: var(--accent); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  color: var(--text); position: relative;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.icon-btn:hover { background: var(--bg-soft); transform: translateY(-1px); }

.fav-count {
  position: absolute; top: -2px; right: -2px;
  background: var(--ember); color: #fff;
  font-family: var(--font-mono); font-size: 0.65rem;
  min-width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

.is-fav svg { fill: var(--ember); stroke: var(--ember); }

/* ---------- 3. HEADER ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .35s var(--ease), transform .35s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.site-header.is-hidden { transform: translateY(-100%); }

.header-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 32px;
  height: 100%; display: flex; align-items: center; gap: 28px;
}

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark { color: var(--ember); display: inline-flex; }
.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.01em; }

.main-nav { flex: 1; }
.main-nav ul { display: flex; gap: 30px; }
.main-nav a {
  font-weight: 500; font-size: 0.95rem; color: var(--text-soft);
  position: relative; padding: 6px 0;
  transition: color .2s var(--ease);
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 2px; background: var(--ember);
  transition: right .25s var(--ease);
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.search-form {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 16px; margin-right: 6px;
  width: 240px; transition: width .3s var(--ease), border-color .2s var(--ease);
}
.search-form:focus-within { width: 290px; border-color: var(--accent); }
.search-icon { color: var(--text-soft); flex-shrink: 0; }
.search-form input {
  border: none; background: transparent; outline: none;
  width: 100%; font-size: 0.9rem; color: var(--text);
}
.search-form input::placeholder { color: var(--text-soft); }

.icon-sun, .icon-moon { transition: opacity .2s, transform .3s var(--ease); }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: inline-flex !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 10px; }
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }

/* ---------- 4. HERO ---------- */
.hero {
  padding: calc(var(--header-h) + 64px) 32px 80px;
  background: radial-gradient(ellipse at top right, var(--bg-soft), var(--bg) 60%);
  overflow: hidden;
}
.hero-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 60px; align-items: center;
}
.hero-copy h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08; letter-spacing: -0.015em;
  margin-bottom: 22px;
}
.hero-copy h1 em {
  font-style: italic; color: var(--ember);
  background: linear-gradient(transparent 62%, color-mix(in srgb, var(--saffron) 45%, transparent) 0);
}
.hero-lede { font-size: 1.08rem; color: var(--text-soft); max-width: 46ch; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-stats { display: flex; gap: 40px; }
.hero-stats dt { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; color: var(--text-soft); letter-spacing: .04em; margin-bottom: 4px; }
.hero-stats dd { margin: 0; font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--text); }

.hero-media { position: relative; }
.hero-media-frame {
  position: relative; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 4/4.6;
  animation: floatY 7s ease-in-out infinite;
}
.hero-media-frame img { width: 100%; height: 100%; object-fit: cover; }

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.steam {
  position: absolute; bottom: 30%; width: 10px; height: 10px;
  border-radius: 50%; background: rgba(255,255,255,.55); filter: blur(6px);
  opacity: 0; animation: steamRise 4.5s ease-in infinite;
}
.steam-a { left: 40%; animation-delay: 0s; }
.steam-b { left: 52%; animation-delay: 1.4s; }
.steam-c { left: 46%; animation-delay: 2.7s; }
@keyframes steamRise {
  0% { opacity: 0; transform: translateY(0) scale(.6); }
  20% { opacity: .5; }
  80% { opacity: .15; }
  100% { opacity: 0; transform: translateY(-90px) scale(1.4); }
}

.hero-badge {
  position: absolute; left: -18px; bottom: 34px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  padding: 14px 18px; display: flex; flex-direction: column;
  transform: rotate(-3deg);
}
.hero-badge strong { font-family: var(--font-mono); font-size: 1.15rem; color: var(--ember); }
.hero-badge small { font-size: 0.72rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- 5. CATEGORÍAS ---------- */
.category-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.category-card {
  position: relative; border-radius: var(--radius-md);
  overflow: hidden; aspect-ratio: 3/3.6; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  border: none;
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.category-card:hover img { transform: scale(1.08); }
.category-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(20,13,9,.82) 0%, rgba(20,13,9,.15) 55%, rgba(20,13,9,0) 100%);
}
.category-card-label {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2;
  color: #fff; text-align: left;
}
.category-card-label span {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; display: block;
}
.category-card-label small {
  font-family: var(--font-mono); font-size: 0.68rem; opacity: .85; text-transform: uppercase; letter-spacing: .04em;
}

/* ---------- 6. CARRUSEL ---------- */
.carousel-controls { display: flex; gap: 8px; }
.carousel { overflow: hidden; }
.carousel-track {
  display: flex; gap: 24px;
  transition: transform .55s var(--ease);
  scroll-snap-type: x mandatory;
}
.carousel-track:focus-visible { outline-offset: 6px; }

.feature-card {
  flex: 0 0 340px; scroll-snap-align: start;
  background: var(--bg-elevated); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.feature-card-media { position: relative; aspect-ratio: 4/2.8; overflow: hidden; }
.feature-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.feature-card:hover .feature-card-media img { transform: scale(1.06); }
.feature-tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--saffron); color: #241a0c;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  padding: 5px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em;
}
.feature-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.feature-card-body h3 { font-size: 1.15rem; }
.feature-card-body p { color: var(--text-soft); font-size: 0.9rem; flex: 1; }

.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 26px; }
.carousel-dots button {
  width: 8px; height: 8px; border-radius: 50%; background: var(--border);
  transition: background .2s var(--ease), width .3s var(--ease);
}
.carousel-dots button.is-active { background: var(--ember); width: 22px; border-radius: 5px; }

/* ---------- 7. TARJETAS DE RECETA (populares / grilla) ---------- */
.popular-grid, .recipe-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
}

.recipe-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .32s var(--ease), box-shadow .32s var(--ease);
  position: relative;
}
.recipe-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.recipe-card-media { position: relative; aspect-ratio: 4/2.9; overflow: hidden; }
.recipe-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.recipe-card:hover .recipe-card-media img { transform: scale(1.07); }

.recipe-card-cat {
  position: absolute; top: 12px; left: 12px;
  background: rgba(20,13,9,.72); color: #fff; backdrop-filter: blur(4px);
  font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; letter-spacing: .03em;
}

.recipe-card-fav {
  position: absolute; top: 8px; right: 8px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.85); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.recipe-card-fav:hover { transform: scale(1.08); }
.recipe-card-fav.is-fav svg { fill: var(--ember); stroke: var(--ember); }

.recipe-card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.recipe-card-body h3 { font-size: 1.12rem; line-height: 1.3; }

.recipe-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-soft);
}
.recipe-meta span { display: inline-flex; align-items: center; gap: 5px; }
.recipe-meta svg { flex-shrink: 0; opacity: .75; }

.diff-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.diff-Fácil .diff-dot { background: var(--olive); }
.diff-Media .diff-dot { background: var(--saffron); }
.diff-Alta .diff-dot { background: var(--wine); }

.recipe-card-body .btn { margin-top: auto; align-self: flex-start; }

/* ---------- 8. FILTROS ---------- */
.filters-bar {
  display: flex; flex-wrap: wrap; align-items: end; gap: 20px;
  padding: 22px 26px; margin-bottom: 34px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-group label {
  font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-soft);
}
.filter-group select {
  padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text);
  min-width: 150px;
}
.filter-favs label { flex-direction: row; align-items: center; gap: 8px; font-size: 0.88rem; text-transform: none; font-family: var(--font-body); }
.filter-favs input { width: 16px; height: 16px; accent-color: var(--ember); }

.results-count { color: var(--text-soft); font-size: 0.88rem; margin-bottom: 20px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-soft); font-size: 1.05rem; }

/* ---------- 9. MODAL ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(20, 13, 9, 0.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 30px; opacity: 0; transition: opacity .3s var(--ease);
}
.modal-overlay.is-open { opacity: 1; }
.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--bg-elevated); border-radius: var(--radius-lg);
  max-width: 880px; width: 100%; max-height: 88vh; overflow-y: auto;
  box-shadow: var(--shadow); position: relative;
  transform: translateY(24px) scale(.98); opacity: 0;
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.modal-overlay.is-open .modal { transform: translateY(0) scale(1); opacity: 1; }
.modal-small { max-width: 520px; }

.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 5;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s var(--ease);
}
.modal-close:hover { transform: rotate(90deg); }

.modal-media { position: relative; aspect-ratio: 16/7; }
.modal-media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.modal-category {
  position: absolute; left: 20px; bottom: -16px;
  background: var(--ember); color: #fff;
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px; letter-spacing: .03em; box-shadow: var(--shadow-sm);
}

.modal-body { padding: 40px 34px 34px; }
.modal-body h2 { font-size: 1.7rem; margin-bottom: 10px; }
.modal-desc { color: var(--text-soft); margin-bottom: 22px; }

.modal-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  padding: 18px; background: var(--bg-soft); border-radius: var(--radius-md);
  margin-bottom: 20px;
}
.modal-meta dt { font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase; color: var(--text-soft); letter-spacing: .04em; margin-bottom: 4px; }
.modal-meta dd { margin: 0; font-weight: 700; font-family: var(--font-mono); }

.modal-fav-btn { margin-bottom: 30px; }

.modal-columns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; margin-bottom: 30px; }
.modal-columns h3 { font-size: 1.05rem; margin-bottom: 16px; }

.ingredient-list li {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--border);
  font-size: 0.94rem;
}
.ingredient-list li::before { content: "—"; color: var(--accent); }

.steps-list { counter-reset: step; display: flex; flex-direction: column; gap: 18px; }
.steps-list li {
  list-style: none; position: relative; padding-left: 40px; font-size: 0.95rem;
}
.steps-list li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ember); color: #fff;
  font-family: var(--font-mono); font-weight: 700; font-size: 0.82rem;
  display: flex; align-items: center; justify-content: center;
}

.nutrition-box { background: var(--bg-soft); border-radius: var(--radius-md); padding: 22px; }
.nutrition-box h3 { font-size: 1rem; margin-bottom: 16px; }
.nutrition-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.nutrition-grid li {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; text-align: center;
}
.nutrition-grid strong { display: block; font-family: var(--font-mono); font-size: 1.1rem; color: var(--ember); }
.nutrition-grid span { font-size: 0.72rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: .03em; }

/* ---------- 10. FOOTER ---------- */
.site-footer { background: var(--ink); color: var(--ivory-soft); margin-top: 60px; }
[data-theme="dark"] .site-footer { background: #120C09; }

.footer-inner {
  max-width: 1240px; margin: 0 auto; padding: 72px 32px 40px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px;
}
.footer-brand p { color: rgba(243,231,217,.65); margin: 14px 0 20px; max-width: 32ch; }
.footer-brand .logo-mark, .footer-brand .logo-text { color: var(--ivory); }

.social-list { display: flex; gap: 10px; }
.social-list a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(243,231,217,.25);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.social-list a:hover { background: var(--ember); border-color: var(--ember); }

.footer-col h3 { color: var(--ivory); font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 18px; }
.footer-col ul { display: flex; flex-direction: column; gap: 11px; }
.footer-col a, .footer-col li { color: rgba(243,231,217,.7); font-size: 0.92rem; }
.footer-col a:hover { color: var(--saffron); }

.footer-bottom {
  border-top: 1px solid rgba(243,231,217,.14);
  padding: 22px 32px; text-align: center;
  font-size: 0.82rem; color: rgba(243,231,217,.55);
}

/* ---------- 11. VOLVER ARRIBA ---------- */
.back-to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 400;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--ember); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  opacity: 0; transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s var(--ease);
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--ember-dark); }
.back-to-top[hidden] { display: none; }

/* ---------- 12. SCROLL REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- 13. RESPONSIVE ---------- */
@media (max-width: 1080px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .popular-grid, .recipe-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 420px; margin: 0 auto; }
  .modal-columns { grid-template-columns: 1fr; }
  .nutrition-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .main-nav, .search-form { display: none; }
  .nav-toggle { display: flex; }

  .main-nav.is-open {
    display: flex; position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--bg-elevated); border-bottom: 1px solid var(--border);
    padding: 20px 32px; box-shadow: var(--shadow-sm);
  }
  .main-nav.is-open ul { flex-direction: column; gap: 18px; }

  .header-inner { gap: 12px; }
  .header-actions { gap: 2px; }

  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .popular-grid, .recipe-grid { grid-template-columns: 1fr; }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .filter-group select { min-width: 0; width: 100%; }
  .footer-inner { grid-template-columns: 1fr; }
  .modal-meta { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 60px 0; }
  .hero { padding-top: calc(var(--header-h) + 40px); }
}

@media (max-width: 480px) {
  .category-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 24px; }
  .modal-body { padding: 32px 20px 24px; }
  .nutrition-grid { grid-template-columns: repeat(2, 1fr); }
}