/* ─────────────────────────────────────────────────────────────
   Mi Propio Bake Off — estilos del sitio público
   Tailwind (Play CDN) se inyecta después de este archivo, así que
   acá solo se usan selectores de clase para no pelear con preflight.
   ───────────────────────────────────────────────────────────── */

:root {
  --harina: #fcf8f1;
  --pato: #e3eeeb;
  --hondo: #2c5a5e;
  --teal: #629498;
  --terracota: #ae6c5d;
  --terracota-tinta: #8e4d40;
  --rose: #e8c9be;
  --tinta: #2e2a26;
  --display: 'Calistoga', Georgia, serif;
  --nav-h: 72px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--hondo); color: var(--harina); padding: .6rem 1rem; border-radius: .5rem;
}
.skip-link:focus { top: 1rem; }

/* Foco visible y consistente en todo el sitio */
.site-nav a:focus-visible, main a:focus-visible, main button:focus-visible, main input:focus-visible,
.site-footer a:focus-visible, .wa-float:focus-visible, #hamburger:focus-visible, .skip-link:focus-visible {
  outline: 3px solid var(--terracota); outline-offset: 3px; border-radius: 6px;
}

/* ── Navegación ─────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(252, 248, 241, .94);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(44, 90, 94, .1);
}
.nav-link {
  position: relative; font-weight: 700; color: rgba(46, 42, 38, .75);
  padding: .4rem 0; transition: color .2s;
}
.nav-link:hover { color: var(--hondo); }
.nav-link[aria-current="page"] { color: var(--hondo); }
.nav-link[aria-current="page"]::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px;
  border-radius: 3px; background: var(--terracota);
}
#mobile-menu { border-top: 1px solid rgba(44, 90, 94, .1); padding: .5rem 1rem 1rem; }
.mobile-link {
  display: block; padding: .85rem .25rem; font-weight: 700; font-size: 1.125rem; color: var(--tinta);
  border-bottom: 1px solid rgba(44, 90, 94, .08);
}
.mobile-link[aria-current="page"] { color: var(--terracota-tinta); }

/* ── Tipografía ─────────────────────────────────────────────── */
.hero-title {
  font-family: var(--display); font-weight: 400; color: var(--hondo);
  font-size: clamp(2.75rem, 7vw, 5.25rem); line-height: 1.02; letter-spacing: -.01em;
  max-width: 11ch; text-wrap: balance;
}
.section-title {
  font-family: var(--display); font-weight: 400; color: var(--hondo);
  font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.1; text-wrap: balance;
}
.page-title {
  font-family: var(--display); font-weight: 400; color: var(--hondo);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem); line-height: 1.05; text-wrap: balance;
}
.prose-body { font-size: 1.125rem; line-height: 1.7; color: rgba(46, 42, 38, .85); max-width: 60ch; }
.prose-body p + p { margin-top: 1rem; }
.link-strong {
  font-weight: 700; color: var(--terracota-tinta);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px;
  text-decoration-color: rgba(174, 108, 93, .4); transition: text-decoration-color .2s;
}
.link-strong:hover { text-decoration-color: currentColor; }

/* ── Botones y chips ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .75rem 1.6rem; border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1.2; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn.btn-primary { background: var(--terracota-tinta); color: #fff; }
.btn.btn-primary:hover { background: #7a4035; }
.btn.btn-dark { background: var(--hondo); color: var(--harina); }
.btn.btn-dark:hover { background: #224a4d; }
.btn.btn-light { background: var(--harina); color: var(--hondo); }
.btn.btn-light:hover { background: #fff; }
.btn-outline-light { border: 2px solid rgba(252, 248, 241, .5); color: var(--harina); }
.btn-outline-light:hover { border-color: var(--harina); }

.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: .45rem 1rem; border-radius: 999px;
  background: #fff; border: 1.5px solid rgba(44, 90, 94, .18);
  font-weight: 700; font-size: .95rem; color: var(--hondo); transition: border-color .2s, background-color .2s;
}
.chip:hover { border-color: var(--hondo); }
.chip[aria-current="true"] { background: var(--hondo); border-color: var(--hondo); color: var(--harina); }
.chip--ghost { background: transparent; border-style: dashed; }

/* ── Buscador ───────────────────────────────────────────────── */
.search {
  position: relative; display: flex; align-items: center; gap: .4rem;
  max-width: 34rem; padding: .35rem; border-radius: 999px;
  background: #fff; border: 2px solid rgba(44, 90, 94, .2);
  box-shadow: 0 6px 20px -12px rgba(44, 90, 94, .35);
  transition: border-color .2s;
}
.search:focus-within { border-color: var(--hondo); }
.search__icon { position: absolute; left: 1.25rem; color: rgba(44, 90, 94, .6); pointer-events: none; }
.search input {
  flex: 1; min-width: 0; height: 44px; padding: 0 .5rem 0 2.6rem;
  background: transparent; border: 0; outline: none; font-size: 1.0625rem; color: var(--tinta);
}
.search input::placeholder { color: rgba(46, 42, 38, .5); }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search .btn { min-height: 44px; padding: .5rem 1.4rem; }
main .search input:focus-visible { outline: none; }

/* ── Banderines (firma visual) ──────────────────────────────── */
.bunting { display: block; width: 100%; height: clamp(64px, 8.5vw, 140px); overflow: visible; }
.bunting .flag { transform-box: fill-box; transform-origin: 50% 0; }
.bunting--animated .flag {
  animation: flag-hang .9s cubic-bezier(.3, 1.6, .5, 1) both;
  animation-delay: calc(var(--i) * 45ms + 150ms);
}
@keyframes flag-hang {
  0%   { transform: rotate(-28deg) scaleY(.2); opacity: 0; }
  60%  { opacity: 1; }
  100% { transform: rotate(0) scaleY(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .bunting--animated .flag { animation: none; }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero { overflow: hidden; }
.arch {
  display: block; overflow: hidden; background: var(--pato);
  border-radius: 999px 999px 1.5rem 1.5rem;
  aspect-ratio: 4 / 5;
}
.arch img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
a.arch:hover img { transform: scale(1.03); }
.hero-feature { position: relative; max-width: 26rem; margin-inline: auto; width: 100%; }
.hero-feature .arch { box-shadow: 0 0 0 10px #fff, 0 0 0 11px rgba(44, 90, 94, .14); }
.hero-feature__caption {
  position: relative; margin: -3.5rem 1.25rem 0; padding: 1rem 1.25rem 1.1rem;
  background: #fff; border-radius: 1rem; border: 1px solid rgba(44, 90, 94, .12);
  box-shadow: 0 14px 30px -18px rgba(44, 90, 94, .45);
}
.arch--about { max-width: 22rem; margin-inline: auto; aspect-ratio: 3 / 4; }

/* ── Tarjeta de receta ──────────────────────────────────────── */
.recipe-card { display: flex; flex-direction: column; }
.recipe-card__img {
  display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 1.25rem; background: var(--pato);
}
.recipe-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.recipe-card:hover .recipe-card__img img { transform: scale(1.04); }
.recipe-card__placeholder {
  display: flex; width: 100%; height: 100%; align-items: center; justify-content: center;
  font-size: 2.5rem; color: rgba(44, 90, 94, .3);
}
.recipe-card__cat { margin-top: 1.1rem; font-size: .9rem; font-weight: 700; color: var(--terracota-tinta); }
.recipe-card__title {
  margin-top: .25rem; font-family: var(--display); font-weight: 400; color: var(--hondo);
  font-size: 1.5rem; line-height: 1.15;
}
.recipe-card__img + .recipe-card__title { margin-top: 1.1rem; }
.recipe-card__title a { background-image: linear-gradient(currentColor, currentColor); background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .3s; }
.recipe-card:hover .recipe-card__title a, .recipe-card__title a:focus-visible { background-size: 100% 2px; }
.recipe-card__desc { margin-top: .5rem; color: rgba(46, 42, 38, .75); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recipe-card__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem;
  margin-top: .75rem; font-size: .925rem; color: rgba(46, 42, 38, .75);
}
.recipe-card__meta i { color: var(--teal); margin-right: .2rem; }

/* Dificultad ●●○ */
.dif { display: inline-flex; align-items: center; gap: .45rem; }
.dif-dots { display: inline-flex; gap: 3px; }
.dif-dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--terracota); }
.dif-dot.is-on { background: var(--terracota); }

/* ── Videos (embed liviano) ─────────────────────────────────── */
.yt {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 1rem;
  background: #1d3d40; cursor: pointer;
}
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .3s; }
.yt:hover img { opacity: 1; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt .yt__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--harina); color: var(--hondo); font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center; padding-left: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3); transition: transform .2s;
}
.yt:hover .yt__play { transform: scale(1.08); }
#videos .yt__play:focus-visible { outline: 3px solid var(--harina); outline-offset: 4px; border-radius: 50%; }

/* ── Catálogo ───────────────────────────────────────────────── */
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .925rem; color: rgba(46, 42, 38, .65); }
.breadcrumb a:hover { color: var(--hondo); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb li + li::before { content: '/'; margin-right: .5rem; color: rgba(46, 42, 38, .35); }

.filter-row { display: flex; gap: .5rem; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-row .chip { white-space: nowrap; }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: #fff; border: 1.5px solid rgba(44, 90, 94, .18); }
.seg a {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 36px; padding: .3rem .9rem; border-radius: 999px;
  font-weight: 700; font-size: .925rem; color: rgba(46, 42, 38, .8); white-space: nowrap;
}
.seg a:hover { color: var(--hondo); }
.seg a[aria-current="true"] { background: var(--pato); color: var(--hondo); }

.pager a, .pager span {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-width: 44px; height: 44px; padding: 0 .9rem; border-radius: 999px; font-weight: 700;
}
.pager a { color: var(--hondo); border: 1.5px solid rgba(44, 90, 94, .18); background: #fff; }
.pager a:hover { border-color: var(--hondo); }
.pager a[aria-current="page"] { background: var(--hondo); border-color: var(--hondo); color: var(--harina); }
.pager .is-disabled { opacity: .35; pointer-events: none; }

/* ── Detalle de receta ──────────────────────────────────────── */
.arch--recipe { aspect-ratio: 4 / 5; max-width: 30rem; margin-inline: auto; }
.meta-facts { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; }
.meta-facts dt { font-size: .875rem; color: rgba(46, 42, 38, .65); }
.meta-facts dd { margin-top: .2rem; font-weight: 700; font-size: 1.125rem; color: var(--hondo); }

button.share-btn, a.share-btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 42px; padding: .4rem 1rem;
  border-radius: 999px; border: 1.5px solid rgba(44, 90, 94, .18); background: #fff;
  font-weight: 700; font-size: .925rem; color: var(--hondo); transition: border-color .2s;
}
.share-btn:hover { border-color: var(--hondo); }

/* Ficha de ingredientes: tarjeta rayada con margen, como una ficha de recetas */
.ficha {
  position: relative; background: #fff; border-radius: 1rem;
  border: 1px solid rgba(44, 90, 94, .14);
  box-shadow: 0 18px 40px -28px rgba(44, 90, 94, .5);
  padding: 1.5rem 1.25rem 1.25rem 3rem;
}
.ficha::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 2rem; width: 2px;
  background: rgba(174, 108, 93, .35);
}
.ficha__title { font-family: var(--display); font-weight: 400; font-size: 1.6rem; color: var(--hondo); line-height: 1.1; }
.ingredientes { margin-top: .75rem; }
.ingredientes li { border-bottom: 1px solid rgba(98, 148, 152, .28); }
.ingredientes label {
  display: flex; align-items: flex-start; gap: .75rem; padding: .7rem 0; cursor: pointer;
  font-size: 1.0625rem; line-height: 1.45;
}
.ingredientes input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ingredientes .check {
  flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; border-radius: 6px;
  border: 2px solid rgba(44, 90, 94, .4); background: #fff;
  display: flex; align-items: center; justify-content: center; transition: background-color .15s, border-color .15s;
}
.ingredientes .check::after {
  content: ''; width: 6px; height: 11px; margin-top: -2px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform .15s;
}
.ingredientes input:checked + .check { background: var(--teal); border-color: var(--teal); }
.ingredientes input:checked + .check::after { transform: rotate(45deg) scale(1); }
.ingredientes input:checked ~ .txt { color: rgba(46, 42, 38, .45); text-decoration: line-through; text-decoration-color: rgba(46, 42, 38, .35); }
.ingredientes input:focus-visible + .check { outline: 3px solid var(--terracota); outline-offset: 2px; }

.ficha-tools { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1rem; font-size: .925rem; }
.ficha-tools button { font-weight: 700; color: var(--terracota-tinta); text-decoration: underline; text-underline-offset: 3px; }
.toggle { display: flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 700; color: var(--hondo); }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { position: relative; width: 40px; height: 24px; border-radius: 999px; background: rgba(44, 90, 94, .25); transition: background-color .2s; flex-shrink: 0; }
.toggle .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + .track { background: var(--teal); }
.toggle input:checked + .track::after { transform: translateX(16px); }
.toggle input:focus-visible + .track { outline: 3px solid var(--terracota); outline-offset: 2px; }

/* Pasos: secuencia real, numeración grande en tipografía display */
.pasos { counter-reset: none; }
.pasos li { display: grid; grid-template-columns: 3.25rem 1fr; gap: 1rem; padding: 1.4rem 0; border-top: 1px solid rgba(44, 90, 94, .12); }
.pasos li:first-child { border-top: 0; padding-top: .5rem; }
.paso-num { font-family: var(--display); font-weight: 400; font-size: 2.25rem; line-height: 1; color: var(--terracota); }
.pasos p { font-size: 1.125rem; line-height: 1.7; max-width: 62ch; padding-top: .2rem; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer { background: #f5e8e2; margin-top: 0; }
.site-footer .bunting { height: clamp(56px, 7vw, 110px); }
.footer-heading { font-weight: 700; font-size: .95rem; color: rgba(46, 42, 38, .6); margin-bottom: .9rem; }
.footer-link { font-weight: 700; color: var(--hondo); }
.footer-link:hover { color: var(--terracota-tinta); text-decoration: underline; text-underline-offset: 3px; }

.wa-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 50;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #25d366; color: #fff; font-size: 1.75rem;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .35); transition: transform .2s;
}
.wa-float:hover { transform: scale(1.06); }

/* ── Ajustes para pantallas chicas ──────────────────────────── */
@media (max-width: 1023px) {
  .hero-feature { max-width: 30rem; }
  .hero-feature .arch, .arch--recipe { aspect-ratio: 5 / 4; }
}
@media (max-width: 639px) {
  .pasos li { grid-template-columns: 2.25rem 1fr; gap: .75rem; }
  .paso-num { font-size: 1.9rem; }
  .ficha { padding-left: 2.6rem; }
  .ficha::before { left: 1.6rem; }
}
