/* ReceTica · sitio público: encabezado, pie, landing, acceso, legales y receta compartida. */

/* ---------- Encabezado ---------- */
.pub-header-wrap { position: sticky; top: 0; z-index: 50; padding-top: 12px; }
.pub-header {
  display: flex; align-items: center; gap: 12px;
  min-height: 66px;
  padding: 10px 10px 10px 16px !important;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-radius: var(--r-lg);
  max-width: calc(var(--page-max) - 0px);
  width: calc(100% - var(--page-pad) * 2);
  transition: box-shadow var(--t) var(--ease);
}
.is-scrolled .pub-header { box-shadow: var(--shadow-pop); }
.pub-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.pub-brand .wordmark { width: 112px; height: auto; }
.pub-brand .wordmark-dark { display: none; }
:root[data-theme="dark"] .pub-brand .wordmark-light { display: none; }
:root[data-theme="dark"] .pub-brand .wordmark-dark { display: block; }
.pub-nav { display: flex; gap: 2px; margin-left: 12px; }
.pub-nav a {
  padding: 10px 14px; border-radius: 12px;
  font-weight: 700; text-decoration: none; color: var(--ink);
}
.pub-nav a:hover { background: var(--surface-2); color: var(--ink); }
.pub-nav a[aria-current="page"] { background: var(--surface-2); }
.pub-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pub-menu-btn { display: none; }
@media (max-width: 860px) {
  .pub-nav {
    position: fixed; left: 12px; right: 12px; top: 88px;
    flex-direction: column; gap: 4px; margin: 0; padding: 10px;
    background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-float);
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  }
  .pub-nav a { padding: 14px; font-size: 17px; }
  .pub-menu-open .pub-nav { opacity: 1; transform: none; pointer-events: auto; }
  .pub-menu-btn { display: inline-grid; }
}
@media (max-width: 520px) {
  .hide-mobile-sm { display: none; }
  .pub-brand .wordmark { width: 92px; }
  .pub-actions .btn { padding: 0 14px; min-height: 44px; }
}

/* ---------- Pie ---------- */
.pub-footer { margin-top: 72px; background: var(--dark); color: var(--on-dark); padding: 56px 0 24px; border-radius: 36px 36px 0 0; }
:root[data-theme="dark"] .pub-footer { background: #0B0E10; }
.pub-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.pub-footer .muted-dark { color: var(--on-dark-muted); margin: 0; }
.pub-footer-links { display: flex; flex-wrap: wrap; gap: 32px 56px; }
.pub-footer-links div { display: flex; flex-direction: column; gap: 8px; }
.pub-footer-links strong { color: var(--lime); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.pub-footer-links a { color: var(--on-dark); text-decoration: none; }
.pub-footer-links a:hover { color: #FF8A5C; }
.pub-footer-base { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--dark-3); color: var(--on-dark-muted); font-size: 13px; }

/* ---------- Landing ---------- */
.hero { position: relative; padding: clamp(28px, 6vw, 72px) 0 32px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--surface); font-weight: 600; font-size: 15px;
}
.hero-badge .chip { border-radius: 999px; background: var(--olive); color: #fff; }
.hero h1 { margin: 20px 0 18px; }
.hero .lead { max-width: 46ch; margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-proof { margin-top: 26px; display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 15px; }
.avatar-stack { display: flex; }
.avatar-stack span {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid var(--bg); margin-left: -10px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 14px; color: #fff;
}
.avatar-stack span:first-child { margin-left: 0; }

.hero-stage { position: relative; min-height: 560px; }
@media (max-width: 960px) { .hero-stage { min-height: 520px; max-width: 560px; width: 100%; margin: 0 auto; } }
@media (max-width: 520px) { .hero-stage { min-height: 470px; } }
.hero-blob { position: absolute; border-radius: 50%; }
.hero-blob--o { width: 62%; aspect-ratio: 1; right: 4%; top: 6%; background: var(--orange); }
.hero-blob--g { width: 34%; aspect-ratio: 1; left: 6%; bottom: 4%; background: var(--olive); }
.hero-card { position: absolute; border-radius: 26px; box-shadow: var(--shadow-float); will-change: transform; }
.hero-card--recipe { left: 0; top: 30px; width: min(300px, 58%); background: var(--surface); padding: 12px; }
.hero-card--recipe img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; }
.hero-card--recipe .body { padding: 12px 6px 4px; display: flex; flex-direction: column; gap: 4px; }
.hero-card--timer { right: 10px; top: 0; width: min(250px, 48%); background: #232B33; color: #fff; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.hero-card--list { right: 30px; bottom: 30px; width: min(280px, 56%); background: var(--surface); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.hero-card--list .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 15px; }
.hero-card--list .sum { background: var(--olive-soft); color: var(--olive-ink); border-radius: 12px; padding: 10px 12px; font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.hero-ilu { position: absolute; left: 4%; bottom: 0; width: min(170px, 32%); filter: drop-shadow(0 18px 24px rgba(35, 43, 51, .25)); }
.timer-ring { width: 110px; height: 110px; margin: 0 auto; position: relative; }
.timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring circle { fill: none; stroke-width: 9; }
.timer-ring .t { stroke: #3A434D; }
.timer-ring .v { stroke: #F04E1C; stroke-linecap: round; stroke-dasharray: 276; animation: ringRun 6s linear infinite; }
.timer-ring .num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 28px; }
@keyframes ringRun { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -276; } }

.section-pub { padding: clamp(48px, 8vw, 96px) 0 0; }
.section-pub .section-title { max-width: 18ch; margin-bottom: 14px; }
.section-pub .section-lead { max-width: 52ch; margin: 0 0 32px; }

.feature-bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); }
.feature-bento .tile { min-height: 260px; }
.feature-bento .f-2 { grid-column: span 2; }
.feature-bento .f-3 { grid-column: span 3; }
.feature-bento .f-4 { grid-column: span 4; }
@media (max-width: 960px) { .feature-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .feature-bento .f-2, .feature-bento .f-3 { grid-column: span 1; } .feature-bento .f-4 { grid-column: span 2; } }
@media (max-width: 600px) { .feature-bento { grid-template-columns: 1fr; } .feature-bento .f-2, .feature-bento .f-3, .feature-bento .f-4 { grid-column: auto; } }
.feature-bento .tile .tile-title { font-size: 28px; }
.feature-bento .tile p { margin: 0; color: inherit; opacity: .85; }
.feature-ilu { position: absolute; right: -16px; bottom: -16px; width: 140px; pointer-events: none; }

.merge-demo { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.merge-demo .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface); color: var(--ink); border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.merge-demo .row.total { background: var(--dark); color: var(--on-dark); }
.merge-demo .plus { text-align: center; font-weight: 800; opacity: .6; }

.portion-demo { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.portion-demo .num { font-size: 64px; }
.portion-demo .qty { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }

.steps-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
@media (max-width: 860px) { .steps-3 { grid-template-columns: 1fr; } }
.step-card { background: var(--surface); border-radius: var(--r-xl); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.step-card img { width: 100%; height: 190px; object-fit: contain; background: var(--surface-2); border-radius: 22px; padding: 18px; }
.step-card .n { width: 44px; height: 44px; border-radius: 14px; background: var(--orange); color: var(--orange-ink); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 22px; }

.free-band {
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--dark); color: var(--on-dark);
  border-radius: 36px; padding: clamp(32px, 6vw, 72px);
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center;
  position: relative; overflow: hidden;
}
@media (max-width: 860px) { .free-band { grid-template-columns: 1fr; } }
.free-band .display { color: var(--on-dark); }
.free-band p { color: var(--on-dark-muted); font-size: 18px; }
.free-band .photo { border-radius: 26px; overflow: hidden; aspect-ratio: 4 / 3; }
.free-band .photo img { width: 100%; height: 100%; object-fit: cover; }

.community-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--gap); }

.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border-radius: var(--r-lg); padding: 0 20px; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font-weight: 800; font-family: var(--font-display); font-size: 20px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { transition: transform var(--t) var(--ease); }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq details p { color: var(--ink-2); padding-bottom: 20px; margin: 0; }

/* ---------- Acceso ---------- */
.auth-wrap { min-height: calc(100dvh - 100px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); padding: 16px 0 24px; }
.public-body.compact .auth-wrap { min-height: 100dvh; padding: 12px 0; }
@media (max-width: 920px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none !important; } }
.auth-art {
  position: relative; border-radius: var(--r-xl); overflow: hidden; min-height: 560px;
  display: flex; flex-direction: column; justify-content: flex-end; background: var(--dark);
}
.auth-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-art .float-card { max-width: 420px; }
.auth-panel {
  background: var(--surface); border-radius: var(--r-xl);
  padding: clamp(22px, 4vw, 48px);
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
}
.auth-panel .inner { width: 100%; max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.auth-panel form { display: flex; flex-direction: column; gap: 14px; }
.or-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.or-sep::before, .or-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn-google { --btn-bg: var(--surface); --btn-fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.pass-field { position: relative; }
.pass-field .input { padding-right: 52px; }
.pass-field button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }

/* ---------- Legales ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 32px 0; }
.legal .panel { display: flex; flex-direction: column; gap: 4px; }
.legal h2 { font-size: 24px; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--ink-2); line-height: 1.65; }
.legal ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 1em; }

/* ---------- Errores ---------- */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 0; }
.error-page .num { font-size: clamp(96px, 18vw, 200px); color: var(--orange); }
.error-page img { width: 180px; margin: 0 auto 12px; }

/* ---------- Motion de la landing ---------- */
[data-hero-title] .line { display: inline-block; }
.js [data-hero-title] .line { opacity: 0; transform: translateY(.45em) rotate(2deg); }
.js .hero.is-ready [data-hero-title] .line { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .9s var(--ease); }
.js .hero.is-ready [data-hero-title] .line + br + .line { transition-delay: .12s; }
.js [data-enter] { opacity: 0; translate: 0 40px; scale: .92; }
.js .hero.is-ready [data-enter] { opacity: 1; translate: 0 0; scale: 1; transition: opacity .7s var(--ease), translate .9s var(--ease-pop), scale .9s var(--ease-pop); }
.js .hero.is-ready [data-enter="1"] { transition-delay: .25s; }
.js .hero.is-ready [data-enter="2"] { transition-delay: .4s; }
.js .hero.is-ready [data-enter="3"] { transition-delay: .55s; }
.js .hero-blob { scale: .4; opacity: 0; }
.js .hero.is-ready .hero-blob { scale: 1; opacity: 1; transition: scale 1.1s var(--ease-pop), opacity .6s var(--ease); }
.hero-stage [data-depth] { transition: transform .5s var(--ease); }

.week-cell { display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; background: var(--c); }
.js [data-week-demo] .week-cell { scale: 0; }
.js [data-week-demo].is-in .week-cell { scale: 1; transition: scale .5s var(--ease-pop); transition-delay: calc(.2s + var(--d) * 60ms); }

[data-m] { display: inline-block; }
[data-m].is-swap { animation: pop .4s var(--ease-pop); }
[data-p-q].pop { animation: pop .35s var(--ease-pop); }

.page-hero { padding: clamp(32px, 7vw, 88px) 0 8px; }
.page-hero .display { margin: 14px 0 16px; }
.page-hero .lead { max-width: 52ch; }
.feature-rows { display: flex; flex-direction: column; gap: var(--gap); }
.feature-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; background: var(--surface); border-radius: var(--r-xl); padding: clamp(22px, 4vw, 44px); }
.feature-row:nth-child(even) .feature-art { order: -1; }
@media (max-width: 860px) { .feature-row { grid-template-columns: 1fr; } .feature-row:nth-child(even) .feature-art { order: 0; } }
.feature-row ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.feature-row li { display: flex; gap: 10px; align-items: flex-start; }
.feature-row li .i { color: var(--olive); flex-shrink: 0; margin-top: 3px; }
.feature-art { border-radius: 24px; overflow: hidden; min-height: 260px; position: relative; display: grid; place-items: center; }
.feature-art > img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.feature-art--ilu { background: var(--surface-2); }
.feature-art--ilu > img { position: static; width: 60%; height: auto; object-fit: contain; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--gap); }
.stat-row .tile { min-height: 0; }
.author-chip { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 999px; padding: 6px 16px 6px 6px; text-decoration: none; color: var(--ink); }
.author-chip img, .author-chip .av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--olive); color: #fff; font-weight: 800; }
