/*
Theme Name: Recetas Prácticas Editorial
Theme URI: https://recetaspracticas.com.ar
Author: Oscar Horacio Videla
Author URI: https://recetaspracticas.com.ar
Description: Tema editorial ultraliviano para Recetas Prácticas. Dirección de arte "The page is the object" (design-taste-frontend, seed 74732709): revista de cocina impresa en papel crema, tinta tabaco y acento tomate, tipografía EB Garamond. Calculadora de porciones en vivo, lista interactiva de ingredientes con transiciones de transitions.dev, SEO Schema.org Recipe integrado y ubicación estratégica de alta visibilidad para Google AdSense. Cero Elementor, cero plugins extra.
Version: 3.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: recetas-practicas
*/

/* ==========================================================================
   1. TRANSITIONS.DEV - Universal Install Block (verbatim tokens)
   ========================================================================== */
:root {
  /* Card resize */
  --resize-dur: 300ms;
  --resize-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Number pop-in */
  --digit-dur: 500ms;
  --digit-distance: 8px;
  --digit-stagger: 70ms;
  --digit-blur: 2px;
  --digit-ease: cubic-bezier(0.34, 1.45, 0.64, 1);
  --digit-dir-x: 0;
  --digit-dir-y: 1;
  /* Notification badge */
  --badge-slide-dur: 260ms;
  --badge-pop-dur: 500ms;
  --badge-pop-close-dur: 180ms;
  --badge-fade-dur: 400ms;
  --badge-fade-close-dur: 180ms;
  --badge-blur: 2px;
  --badge-offset-x: -8.2px;
  --badge-offset-y: 12.4px;
  --badge-slide-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --badge-pop-ease: cubic-bezier(0.34, 1.36, 0.64, 1);
  --badge-close-ease: cubic-bezier(0.4, 0, 0.2, 1);
  /* Text states swap */
  --text-swap-dur: 200ms;
  --text-swap-translate-y: 8px;
  --text-swap-blur: 2px;
  --text-swap-ease: ease-out;
  /* Menu dropdown */
  --dropdown-open-dur: 250ms;
  --dropdown-close-dur: 150ms;
  --dropdown-pre-scale: 0.97;
  --dropdown-closing-scale: 0.99;
  --dropdown-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Modal open / close */
  --modal-open-dur: 250ms;
  --modal-close-dur: 150ms;
  --modal-scale: 0.96;
  --modal-scale-close: 0.96;
  --modal-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Panel reveal */
  --panel-open-dur: 400ms;
  --panel-close-dur: 350ms;
  --panel-translate-y: 100px;
  --panel-blur: 2px;
  --panel-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Page side-by-side */
  --page-slide-dur: 200ms;
  --page-fade-dur: 200ms;
  --page-slide-distance: 8px;
  --page-blur: 3px;
  --page-stagger: 0ms;
  --page-exit-enabled: 1;
  --page-slide-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page-fade-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Icon swap */
  --icon-swap-dur: 200ms;
  --icon-swap-blur: 2px;
  --icon-swap-start-scale: 0.25;
  --icon-swap-ease: ease-in-out;
  /* Success check */
  --check-opacity-dur: 550ms;
  --check-rotate-dur: 550ms;
  --check-rotate-from: 80deg;
  --check-bob-dur: 450ms;
  --check-y-amount: 14px;
  --check-blur-dur: 500ms;
  --check-blur-from: 6px;
  --check-path-dur: 550ms;
  --check-path-delay: 60ms;
  --check-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --check-ease-opacity: cubic-bezier(0.22, 1, 0.36, 1);
  --check-ease-rotate: cubic-bezier(0.22, 1, 0.36, 1);
  --check-ease-bob: cubic-bezier(0.34, 1.35, 0.64, 1);
  --check-ease-path: cubic-bezier(0.22, 1, 0.36, 1);
  /* Avatar group hover */
  --avatar-lift: -4px;
  --avatar-dur: 320ms;
  --avatar-scale: 1.05;
  --avatar-falloff: 0.45;
  --avatar-ease-in: cubic-bezier(0.22, 1, 0.36, 1);
  --avatar-ease-out: cubic-bezier(0.34, 3.85, 0.64, 1);
  /* Error state shake */
  --shake-distance: 6px;
  --shake-overshoot: 4px;
  --shake-dur-a: 80ms;
  --shake-dur-b: 60ms;
  --shake-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --revert-hold: 3000ms;
  --revert-dur: 280ms;

  /* ==========================================================================
     2. DESIGN-TASTE-FRONTEND - Palette "Tabaco y oliva" (cálida, revista de
        cocina impresa) + Type "EB Garamond"
     ========================================================================== */
  --bg: #faf4e6;              /* papel crema de revista */
  --surface: #f2e7d0;         /* crema más tostado: paneles y fichas */
  --surface-strong: #e7d8ba;  /* borde tonal de superficie */
  --ink: #2b1a0c;             /* tinta marrón tabaco */
  --muted: #6f5a41;           /* secundario cálido */
  --accent: #bf3c14;          /* tomate / paprika: acciones */
  --accent-ink: #fdf6e8;      /* crema sobre tomate */
  --accent-deep: #9c2f0d;     /* hover del tomate */
  --field-1: #472913;         /* campo tabaco (footer) */
  --field-1-ink: #efe6d2;
  --field-2: #565f1e;         /* oliva: cintas y sellos */
  --field-2-ink: #f6f2e2;
  --field-3: #c79a3e;         /* ocre trigo: acentos de banda */
  --field-3-ink: #2b1a0c;

  --font-display: 'EB Garamond', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-text: 'EB Garamond', 'Iowan Old Style', Georgia, 'Times New Roman', serif;

  /* 5 strict type steps (floor >= 13px, body 17-19px; Garamond corre chico:
     se sube un semitono el cuerpo) */
  --step-small: clamp(0.875rem, 0.84rem + 0.15vw, 0.96875rem);
  --step-body: clamp(1.125rem, 1.06rem + 0.3vw, 1.25rem);
  --step-lead: clamp(1.3125rem, 1.18rem + 0.65vw, 1.6875rem);
  --step-subhead: clamp(1.75rem, 1.42rem + 1.35vw, 2.5rem);
  --step-head: clamp(2.375rem, 1.8rem + 2.5vw, 3.75rem);

  --page-gutter: clamp(16px, 2.2vw, 28px);
  --section-gap: clamp(88px, 10vw, 160px);
}

/* ==========================================================================
   3. RESET & BROWSER SURFACES (Impeccable Craft Floor)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  accent-color: var(--accent);
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-size: var(--step-body);
  line-height: 1.55;
  overflow-x: hidden;
  font-feature-settings: "kern" 1, "liga" 1;
}

::selection {
  background-color: var(--accent);
  color: var(--accent-ink);
}

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

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 160ms ease, background-color 160ms ease;
}

a:hover {
  color: var(--accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.04;
  margin: 0 0 0.55em 0;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: var(--step-head);
}

h2 {
  font-size: var(--step-subhead);
}

h3 {
  font-size: var(--step-lead);
  line-height: 1.15;
}

p {
  margin: 0 0 1.15em 0;
  max-width: 68ch;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* Skip link for keyboard accessibility (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 999;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px 20px;
  font-size: var(--step-body);
  text-decoration: none;
}
.skip-link:focus {
  left: 12px;
}

/* ==========================================================================
   4. TRANSITIONS.DEV - Verbatim Snippets (Card Resize, Digit Pop-in, Dropdown, Success Check)
   ========================================================================== */
.t-resize {
  transition:
    width  var(--resize-dur) var(--resize-ease),
    height var(--resize-dur) var(--resize-ease);
  will-change: width, height;
}

@keyframes t-digit-pop-in {
  0% {
    transform: translate(
      calc(var(--digit-distance) * var(--digit-dir-x)),
      calc(var(--digit-distance) * var(--digit-dir-y))
    );
    opacity: 0;
    filter: blur(var(--digit-blur));
  }
  100% { transform: translate(0, 0); opacity: 1; filter: blur(0); }
}

.t-digit-group {
  display: inline-flex;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
}
.t-digit {
  display: inline-block;
  will-change: transform, opacity, filter;
}
.t-digit-group.is-animating .t-digit {
  animation: t-digit-pop-in var(--digit-dur) var(--digit-ease) both;
}
.t-digit-group.is-animating .t-digit[data-stagger="1"] {
  animation-delay: var(--digit-stagger);
}
.t-digit-group.is-animating .t-digit[data-stagger="2"] {
  animation-delay: calc(var(--digit-stagger) * 2);
}

.t-dropdown {
  transform-origin: top left;
  transform: scale(var(--dropdown-pre-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--dropdown-open-dur) var(--dropdown-ease),
    opacity   var(--dropdown-open-dur) var(--dropdown-ease);
  will-change: transform, opacity;
}
.t-dropdown[data-origin="top-right"]     { transform-origin: top right; }
.t-dropdown[data-origin="top-center"]    { transform-origin: top center; }
.t-dropdown[data-origin="bottom-left"]   { transform-origin: bottom left; }
.t-dropdown[data-origin="bottom-center"] { transform-origin: bottom center; }
.t-dropdown[data-origin="bottom-right"]  { transform-origin: bottom right; }

.t-dropdown.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}
.t-dropdown.is-closing {
  transform: scale(var(--dropdown-closing-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--dropdown-close-dur) var(--dropdown-ease),
    opacity   var(--dropdown-close-dur) var(--dropdown-ease);
}

.t-success-check {
  display: inline-block;
  transform-origin: center;
  opacity: 0;
  will-change: transform, opacity, filter;
}
.t-success-check svg { display: block; overflow: visible; }
.t-success-check svg path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}
.t-success-check[data-state="in"] {
  animation:
    t-check-fade   var(--check-opacity-dur) var(--check-ease-opacity) forwards,
    t-check-rotate var(--check-rotate-dur)  var(--check-ease-rotate)  forwards,
    t-check-blur   var(--check-blur-dur)    var(--check-ease-out)     forwards,
    t-check-bob    var(--check-bob-dur)     var(--check-ease-bob)     forwards;
}
.t-success-check[data-state="in"] svg path {
  animation: t-check-draw var(--check-path-dur) var(--check-ease-path) var(--check-path-delay, 0ms) forwards;
}

@keyframes t-check-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes t-check-rotate {
  from { transform: rotate(var(--check-rotate-from)); }
  to   { transform: rotate(0deg); }
}
@keyframes t-check-blur {
  from { filter: blur(var(--check-blur-from)); }
  to   { filter: blur(0); }
}
@keyframes t-check-bob {
  from { translate: 0 var(--check-y-amount); }
  to   { translate: 0 0; }
}
@keyframes t-check-draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .t-resize { transition: none !important; }
  .t-digit-group .t-digit { animation: none !important; }
  .t-dropdown { transition: none !important; }
  .t-success-check { animation: none !important; opacity: 1; }
  .t-success-check svg path { animation: none !important; stroke-dashoffset: 0 !important; }
}

/* ==========================================================================
   5. NAVIGATION BAR & SEARCH DRAWER
   ========================================================================== */
.mobile-nav-wrap {
  display: none;
  position: static;
}

.mobile-menu {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 100%;
  width: auto;
  max-height: min(70vh, 560px);
  overflow-y: auto;
  background: var(--surface);
  padding: 18px;
  z-index: 80;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition:
    opacity var(--text-swap-dur) ease-out,
    transform var(--text-swap-dur) var(--text-swap-ease);
}

.mobile-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.mobile-menu__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 12px;
  margin-bottom: 6px;
  text-decoration: none;
  background: var(--bg);
}

.mobile-menu__list a:hover {
  color: var(--accent);
}

.mobile-menu__count {
  font-size: var(--step-small);
  color: var(--muted);
}

.mobile-menu__cta {
  width: 100%;
  margin-top: 18px;
}

.site-header {
  padding: 16px var(--page-gutter);
  background: var(--bg);
  position: relative;
  z-index: 40;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1600px;
  margin: 0 auto;
}

.site-wordmark {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.2rem + 0.8vw, 2rem);
  font-weight: 500;
  font-style: italic;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 28px);
  flex-wrap: wrap;
}

.site-nav a {
  font-size: var(--step-body);
  text-decoration: none;
  color: var(--ink);
  padding: 8px 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons: flat, square-cornered per direction sheet */
.btn-primary,
.btn-surface {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  font-family: var(--font-text);
  font-size: var(--step-body);
  font-weight: 500;
  text-decoration: none;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, color 140ms ease;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background-color: var(--accent-deep);
  color: var(--accent-ink);
}

.btn-surface {
  background-color: var(--surface);
  color: var(--ink);
}

.btn-surface:hover {
  background-color: var(--surface-strong);
  color: var(--ink);
}

.btn-primary:active,
.btn-surface:active {
  transform: scale(0.985);
}

/* Dropdown Search Panel */
.search-popover-wrap {
  position: relative;
}

.search-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(420px, calc(100vw - 32px));
  background: var(--surface);
  padding: 20px;
  z-index: 80;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-form input[type="search"] {
  flex: 1;
  min-height: 48px;
  padding: 10px 14px;
  font-family: var(--font-text);
  font-size: var(--step-body);
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
}

/* ==========================================================================
   6. HERO - "The Split Stage" (Menu column + Sticky photograph)
   ========================================================================== */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 var(--page-gutter);
  max-width: 1600px;
  margin: 0 auto;
  min-height: calc(100svh - 84px);
}

.hero-split__sheet {
  background-color: var(--surface);
  padding: clamp(28px, 4.5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100svh - 96px);
}

.hero-split__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: var(--step-small);
  color: var(--muted);
}

.hero-split__center {
  margin: auto 0;
  padding: 36px 0;
}

.hero-split__title {
  font-size: clamp(2.25rem, 3.5vw, 3.6rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 18ch;
  margin-bottom: 28px;
}

.hero-split__lead {
  font-size: var(--step-body);
  color: var(--ink);
  max-width: 42ch;
  margin-bottom: 32px;
}

.hero-split__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-split__quickcats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
}

.quickcat-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 20px 8px;
  background: var(--surface-strong);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--step-small);
  font-style: italic;
  /* Motivo del objeto: pestaña de carpeta con hombros cortados */
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 100%, 0 100%);
  transition: background-color 160ms ease, color 160ms ease;
}

.quickcat-link:nth-child(2n) {
  background: #ecdcba;
}

.quickcat-link:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Right sticky stage with Slow Crossfade */
.hero-split__stage {
  position: sticky;
  top: 12px;
  height: calc(100svh - 24px);
  background-color: var(--field-1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-stage__slides {
  position: absolute;
  inset: 0;
}

.hero-stage__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1600ms ease-in-out;
}

.hero-stage__slide.is-active {
  opacity: 1;
}

.hero-stage__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-stage__bar {
  position: relative;
  z-index: 3;
  background-color: var(--surface);
  color: var(--ink);
  min-height: 58px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: var(--step-small);
}

.hero-stage__bar a {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

/* ==========================================================================
   7. GOOGLE ADSENSE - High-Viewability, Zero-CLS Containers
   ========================================================================== */
.rp-ad-slot {
  max-width: 1600px;
  margin: 40px auto;
  padding: 0 var(--page-gutter);
}

.rp-ad {
  background-color: var(--surface);
  padding: 16px;
  margin: 28px auto;
  width: 100%;
  max-width: 728px;
  overflow: hidden;
  text-align: center;
}

/* Riel lateral: display de columna, la posición de mayor Active View */
.rp-ad--rail {
  max-width: 100%;
  padding: 0;
  background-color: transparent;
}

.rp-ad__caption {
  font-size: var(--step-small);
  color: var(--muted);
  margin-bottom: 8px;
  text-align: left;
}

/* Etiqueta de publicidad: si el bloque queda vacío, se lee como un espacio
   reservado y no como una caja rota. */
.rp-ad__label {
  display: block;
  font-size: var(--step-small);
  color: var(--muted);
  margin-bottom: 8px;
  text-align: left;
}

.rp-ad--rail .rp-ad__label {
  text-align: center;
}

.rp-ad ins.adsbygoogle {
  display: block;
  width: 100%;
  max-width: 100% !important;
  margin: 0 auto;
}

/* Sin inventario, el bloque desaparece completo: cero huecos grises en la página */
.rp-ad:has(ins.adsbygoogle[data-ad-status="unfilled"]),
.rp-ad.is-empty {
  display: none !important;
}

/* Cualquier bloque de AdSense fuera de nuestras cajas se oculta:
   el sitio no usa auto-ads ni anclas flotantes. */
ins.adsbygoogle:not(.rp-ad ins.adsbygoogle),
.google-auto-placed,
body > div[id^="google-auto-placed"],
body > iframe[id^="google_ads_iframe"] {
  display: none !important;
}

/* ==========================================================================
   8. SECTION 1: SHOWCASE + LIVE PROPORTION CALCULATOR (50/50 Split)
   ========================================================================== */
.section-block {
  max-width: 1600px;
  margin: var(--section-gap) auto;
  padding: 0 var(--page-gutter);
}

.showcase-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  background-color: var(--surface);
  min-height: 78svh;
}

.showcase-split__media {
  padding: clamp(20px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--field-1);
  color: var(--field-1-ink);
}

.showcase-split__imgwrap {
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  background: #222222;
}

.showcase-split__imgwrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-split__caption {
  padding-top: 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.showcase-split__caption h3 {
  color: var(--field-1-ink);
  margin: 0;
}

.showcase-split__caption a {
  color: var(--field-1-ink);
  white-space: nowrap;
}

.showcase-split__interactive {
  padding: clamp(24px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.calc-tab {
  min-height: 44px;
  padding: 8px 18px;
  font-family: var(--font-text);
  font-size: var(--step-body);
  background: var(--bg);
  color: var(--muted);
  border: none;
  cursor: pointer;
}

.calc-tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0 32px 0;
}

.calc-cell {
  background: var(--bg);
  padding: 18px 20px;
}

.calc-cell__label {
  font-size: var(--step-small);
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

.calc-cell__val {
  font-size: var(--step-subhead);
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.showcase-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.showcase-actions a,
.showcase-actions button {
  min-height: 64px;
}

/* ==========================================================================
   9. SECTION 2: LIST - GIANT WORD + FILLED BAR ROWS (<details> stack)
   ========================================================================== */
.list-section-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.list-section__intro {
  position: sticky;
  top: 24px;
}

.list-section__photo {
  margin-top: 28px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface);
}

.list-section__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bar-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar-row {
  background-color: var(--surface);
}

.bar-row summary {
  min-height: 58px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  font-size: var(--step-body);
  font-weight: 500;
  user-select: none;
}

.bar-row summary::-webkit-details-marker {
  display: none;
}

.bar-row summary:hover {
  background-color: var(--surface-strong);
}

.bar-row__meta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.bar-row__sign {
  font-size: 1.35rem;
  line-height: 1;
  color: var(--ink);
  transition: transform 200ms ease;
}

.bar-row[open] .bar-row__sign {
  transform: rotate(45deg);
}

.bar-row__panel {
  padding: 8px 22px 22px 22px;
  background-color: var(--surface);
}

.bar-row__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bar-row__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  background: var(--bg);
}

.bar-row__item a {
  text-decoration: none;
  font-weight: 500;
}

.bar-row__item a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.bar-row__time {
  font-size: var(--step-small);
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   10. SECTION 3: HOW-IT-WORKS - ITINERARY ON A SLIP ("Mesa de la semana")
   ========================================================================== */
.slip-section {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.slip-card {
  background-color: var(--surface);
  padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 44px) 52px;
  clip-path: polygon(
    0% 0%, 100% 0%, 100% 96%,
    96% 100%, 92% 96%, 88% 100%, 84% 96%, 80% 100%, 76% 96%, 72% 100%,
    68% 96%, 64% 100%, 60% 96%, 56% 100%, 52% 96%, 48% 100%, 44% 96%,
    40% 100%, 36% 96%, 32% 100%, 28% 96%, 24% 100%, 20% 96%, 16% 100%,
    12% 96%, 8% 100%, 4% 96%, 0% 100%
  );
}

.slip-group + .slip-group {
  margin-top: 28px;
}

.slip-group__title {
  font-size: var(--step-body);
  font-weight: 600;
  margin-bottom: 12px;
}

.slip-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  font-variant-numeric: tabular-nums;
}

.slip-row a {
  text-decoration: none;
}

.slip-row a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.slip-row__dots {
  flex: 1;
  border-bottom: 3px dotted var(--muted);
  min-width: 24px;
}

.slip-row__val {
  color: var(--muted);
  font-size: var(--step-small);
  white-space: nowrap;
}

.slip-total {
  margin-top: 28px;
  background-color: var(--field-1);
  color: var(--field-1-ink);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 500;
}

/* Banda de campo a ancho completo: la carta de menú sobre el mantel oliva.
   La sección rompe el contenedor 1600px y el contenido vuelve a centrarse. */
.section-block--band-olive {
  max-width: none;
  background: var(--field-2);
  padding: calc(var(--section-gap) / 1.6) var(--page-gutter);
  margin-top: var(--section-gap);
  margin-bottom: var(--section-gap);
}

.section-block--band-olive .slip-section {
  max-width: 1600px;
  margin: 0 auto;
}

.section-block--band-olive h2,
.section-block--band-olive .slip-section > div > p {
  color: var(--field-2-ink);
}

/* ==========================================================================
   11. EDITORIAL ARCHIVE SHOWCASE (Visual Browsing for High Pageviews)
   ========================================================================== */
.recipe-feed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.recipe-item {
  background-color: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.recipe-item__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e2e2e2;
  display: block;
}

.recipe-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.recipe-item:hover .recipe-item__media img {
  transform: scale(1.03);
}

.recipe-item__body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.recipe-item__title {
  font-size: var(--step-lead);
  line-height: 1.15;
  margin-bottom: 10px;
}

.recipe-item__title a {
  text-decoration: none;
}

.recipe-item__excerpt {
  font-size: var(--step-small);
  color: var(--muted);
  margin-bottom: 18px;
}

.recipe-item__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--step-small);
  color: var(--muted);
}

.recipe-item__foot a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

/* ==========================================================================
   12. SINGLE RECIPE PAGE - Split-Stage Reader + Interactive Kitchen Mode
   ========================================================================== */
.single-recipe-stage {
  max-width: 1600px;
  margin: 24px auto var(--section-gap);
  padding: 0 var(--page-gutter);
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.single-recipe__main {
  min-width: 0;
}

.single-recipe__rail {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.recipe-rail-card {
  background: var(--surface);
  padding: 20px;
}

.recipe-rail-card__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: 16px;
  background: #e2e2e2;
}

.recipe-rail-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-meta-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}

.recipe-meta-strip__cell {
  background: var(--bg);
  padding: 10px 8px;
}

.recipe-meta-strip__label {
  display: block;
  font-size: var(--step-small);
  color: var(--muted);
}

.recipe-meta-strip__val {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.recipe-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 32px;
}

/* Interactive Ingredient & Step Checklist */
.kitchen-panel {
  background: var(--surface);
  padding: clamp(22px, 3.5vw, 40px);
  margin: 32px 0;
}

.kitchen-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.portion-scaler {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  padding: 6px 12px;
}

.portion-scaler button {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
}

.portion-scaler button:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

.ing-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Título de opción ("Budín individual (1 huevo)" / "Budín familiar (3 huevos)"):
   voz de sección de revista, en versalitas oliva, sobre cada sublista.
   La separación es tonal y de espacio: el bloque siguiente es una lista con
   fondo propio sobre el panel, no una línea. */
.ing-group-title {
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--field-2);
  margin: 30px 0 12px;
}

.ing-group-title:first-of-type,
.kitchen-panel__head + .ing-group-title {
  margin-top: 0;
}

.ing-check-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg);
  cursor: pointer;
  min-height: 48px;
  user-select: none;
}

.ing-check-item.is-done .ing-check-text {
  text-decoration: line-through;
  color: var(--muted);
}

.ing-check-box {
  width: 26px;
  height: 26px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ing-check-item.is-done .ing-check-box {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Recipe prose content */
.recipe-prose {
  font-size: var(--step-body);
  line-height: 1.65;
}

.recipe-prose h2,
.recipe-prose h3,
.recipe-prose h4 {
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

.recipe-prose ul,
.recipe-prose ol {
  padding-left: 1.4em;
  margin: 0 0 1.5em 0;
}

.recipe-prose li {
  margin-bottom: 0.65em;
  max-width: 66ch;
}

/* ==========================================================================
   13. ABOUT LETTER & FULL-BLEED PHOTOGRAPH FOOTER
   ========================================================================== */
.founder-sheet {
  max-width: 680px;
  margin: 0 auto;
  background-color: var(--surface);
  padding: clamp(32px, 5vw, 60px);
}

.founder-sheet__sign {
  margin-top: 24px;
  font-style: italic;
  font-size: var(--step-lead);
}

/* ==========================================================================
   13b. FOOTER — Contratapa de la revista (cierre sobrio en campo tabaco)
   ========================================================================== */
.site-footer {
  background-color: var(--field-1);
  color: var(--field-1-ink);
  margin-top: var(--section-gap);
}

.site-footer__inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(36px, 4.5vw, 64px) var(--page-gutter) clamp(8px, 1vw, 16px);
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.site-footer__wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.3rem);
  line-height: 1.1;
  color: var(--field-1-ink);
  margin: 0 0 10px;
}

.site-footer__tagline {
  font-size: var(--step-small);
  color: rgba(239, 230, 210, 0.78);
  max-width: 40ch;
  margin: 0;
}

.site-footer__cols {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
  gap: clamp(28px, 6vw, 88px);
}

.site-footer__col-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--step-body);
  color: var(--field-1-ink);
  margin: 0 0 14px;
}

.site-footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0;
  font-size: var(--step-small);
}

/* Filas de 44px: cada enlace es un objetivo táctil completo (WCAG 2.5.8+) */
.site-footer__list a {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.site-footer a {
  color: rgba(239, 230, 210, 0.88);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--field-1-ink);
  text-decoration: underline;
}

/* Banda legal: relleno más profundo, sin reglas finas */
.site-footer__legal {
  background: rgba(0, 0, 0, 0.22);
  margin-top: clamp(28px, 3.5vw, 48px);
  padding: clamp(16px, 2vw, 24px) var(--page-gutter);
}
.site-footer__legal p {
  max-width: 1600px;
  margin: 0 auto;
  font-size: var(--step-small);
  color: rgba(239, 230, 210, 0.7);
}

/* ==========================================================================
   14. RESPONSIVE COMPOSITION (Tablet 768px & Phone 390px)
   ========================================================================== */
@media (max-width: 1024px) {
  .single-recipe-stage {
    grid-template-columns: 1fr;
  }
  .single-recipe__rail {
    position: static;
  }
  .recipe-feed {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .site-nav {
    display: none;
  }
  .mobile-nav-wrap {
    display: block;
  }
  .hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-split__stage {
    position: relative;
    top: 0;
    height: 52svh;
    order: -1;
  }
  .hero-split__sheet {
    min-height: auto;
  }
  .showcase-split,
  .list-section-grid,
  .slip-section {
    grid-template-columns: 1fr;
  }
  .list-section__intro {
    position: static;
  }
}

@media (max-width: 700px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .site-footer__cols {
    gap: 28px;
  }
}

@media (max-width: 600px) {
  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
    row-gap: 12px;
  }
  .site-header__actions {
    margin-left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .recipe-feed,
  .calc-grid,
  .showcase-actions {
    grid-template-columns: 1fr;
  }
  .btn-primary,
  .btn-surface {
    width: 100%;
  }
  .site-header__actions .btn-surface {
    width: auto;
  }
}
