/* ==========================================================
   La Familia Hung — estilos
   ========================================================== */
:root {
	--red: #D3322B;
	--red-dark: #B5261F;
	--yellow: #E6D64D;
	--yellow-soft: #F1E37A;
	--green: #81C891;
	--peach: #F4A16B;
	--black: #000;
	--ink: #282828;
	--cream: #FEF6D8;
	--white: #FFF;
	--display: "Rammetto One", "Arial Black", system-ui, sans-serif;
	--body: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
	--radius: 22px;
	--shadow: 0 18px 40px -18px rgba(40, 40, 40, .45);
	--gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--white); font-size: 16px; line-height: 1.65; overflow-x: hidden; }
body.is-loading { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); }
button { font: inherit; }
.sr-only, .hp { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 1000; background: var(--yellow); color: var(--black); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 820px; }
.red { color: var(--red); }

/* ---------- Tipografía ---------- */
.h1, .h2, .hero__title, .plotip__title { font-family: var(--display); font-weight: 400; line-height: 1.08; letter-spacing: .01em; color: var(--black); margin: 0 0 .5em; text-transform: uppercase; }
.h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); }
.h2 { font-size: clamp(1.8rem, 3.8vw, 3rem); }
.h2 small { display: block; font-size: .62em; line-height: 1.2; margin-bottom: .1em; }
.eyebrow { font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--red); margin: 0 0 .4em; }

/* ---------- Botones ---------- */
.btn { --bg: var(--yellow); --fg: var(--black); display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .95em 1.9em; border-radius: 999px; border: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-weight: 800; font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; text-decoration: none; cursor: pointer; box-shadow: 0 5px 0 rgba(0,0,0,.85); transition: transform .18s ease, box-shadow .18s ease, background .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 rgba(0,0,0,.85); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.85); }
.btn--yellow { --bg: var(--yellow); --fg: var(--black); }
.btn--yellow:hover { --bg: var(--yellow-soft); }
.btn--red { --bg: var(--red); --fg: var(--white); }
.btn--red:hover { --bg: var(--red-dark); }
.btn--lg { font-size: 1rem; padding: 1.05em 2.1em; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- Preloader ---------- */
.preloader { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; background: var(--red) url(../img/pattern-light.svg) center / 280px; transition: opacity .6s ease, visibility .6s; }
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__inner { display: flex; flex-direction: column; align-items: center; position: relative; }
.preloader__logo { width: min(260px, 62vw); height: auto; filter: drop-shadow(0 14px 18px rgba(0,0,0,.28)); animation: pl-pop .9s cubic-bezier(.34,1.56,.64,1) both, pl-bob 1.6s ease-in-out .9s infinite; transform-origin: 50% 80%; }
.preloader__steam { position: absolute; top: -14px; right: 18%; display: flex; gap: 10px; }
.preloader__steam span { width: 8px; height: 34px; border-radius: 8px; background: rgba(255,255,255,.75); filter: blur(1px); animation: pl-steam 1.8s ease-in-out infinite; opacity: 0; }
.preloader__steam span:nth-child(2) { animation-delay: .35s; height: 44px; }
.preloader__steam span:nth-child(3) { animation-delay: .7s; }
.preloader__bar { width: 180px; height: 8px; margin-top: 26px; border-radius: 99px; background: rgba(0,0,0,.25); overflow: hidden; }
.preloader__bar span { display: block; height: 100%; width: 40%; border-radius: 99px; background: var(--yellow); animation: pl-bar 1.1s ease-in-out infinite; }
.preloader__text { margin: 14px 0 0; color: var(--white); font-weight: 700; letter-spacing: .06em; font-size: .85rem; text-transform: uppercase; }
@keyframes pl-pop { 0% { transform: scale(.4) rotate(-8deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes pl-bob { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(-2deg); } }
@keyframes pl-steam { 0% { transform: translateY(10px) scaleY(.6); opacity: 0; } 40% { opacity: .9; } 100% { transform: translateY(-26px) scaleY(1.1); opacity: 0; } }
@keyframes pl-bar { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--red); transition: box-shadow .3s, padding .3s, background .3s; }
.site-header.is-front { position: fixed; left: 0; right: 0; background: transparent; }
.site-header.is-scrolled { background: var(--red); box-shadow: 0 6px 24px -10px rgba(0,0,0,.5); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
.site-header__logo img { width: 96px; height: auto; transition: width .3s; }
.site-header.is-scrolled .site-header__logo img { width: 74px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; }
.site-nav__list a { color: var(--white); text-decoration: none; font-weight: 600; text-transform: uppercase; font-size: .88rem; letter-spacing: .06em; position: relative; padding: 6px 0; }
.site-nav__list a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.site-nav__list a:hover::after, .site-nav__list a.is-active::after { transform: scaleX(1); }
.site-nav__social { display: flex; gap: 10px; }
.site-nav__social a, .social-pill { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--yellow); color: var(--black); transition: transform .2s; }
.site-nav__social a:hover, .social-pill:hover { transform: rotate(-8deg) scale(1.08); }
.site-nav__social svg, .social-pill svg { width: 19px; height: 19px; }
.nav-toggle { display: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--yellow); cursor: pointer; padding: 0; position: relative; z-index: 2; }
.nav-toggle span { position: absolute; left: 13px; right: 13px; height: 3px; border-radius: 3px; background: var(--black); transition: transform .3s, opacity .3s; }
.nav-toggle span:nth-child(1) { top: 15px; } .nav-toggle span:nth-child(2) { top: 22px; } .nav-toggle span:nth-child(3) { top: 29px; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--red); color: var(--white); overflow: hidden; min-height: min(100vh, 900px); display: flex; align-items: center; padding: 140px 0 90px; }
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 100%; }
.hero__inner { position: relative; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(211,50,43,.92) 0%, rgba(211,50,43,.75) 34%, rgba(211,50,43,0) 55%); pointer-events: none; }
.hero__inner { z-index: 1; }
.hero__copy { max-width: 560px; }
.hero__title { color: var(--white); font-size: clamp(2rem, 4.3vw, 3.4rem); text-shadow: 0 4px 0 rgba(0,0,0,.18); }
.hero__title span { color: var(--yellow); }
.hero__lead { font-size: 1.02rem; margin: 0 0 1.2em; max-width: 520px; }
.hero__copy > * { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; animation-play-state: paused; }
.hero__copy > :nth-child(2) { animation-delay: .1s; } .hero__copy > :nth-child(3) { animation-delay: .2s; } .hero__copy > :nth-child(4) { animation-delay: .3s; }
.is-ready .hero__copy > * { animation-play-state: running; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.checklist { list-style: none; padding: 0; margin: 0 0 1.8em; display: grid; gap: .55em; }
.checklist li { position: relative; padding-left: 30px; font-weight: 600; font-size: .95rem; line-height: 1.45; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%; background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat; }
.checklist--light li { text-transform: uppercase; font-size: .8rem; letter-spacing: .03em; font-weight: 700; }

/* ---------- Franja amarilla ---------- */
.stripe { height: 34px; background: var(--yellow); position: relative; }
.stripe--badge { display: flex; justify-content: center; height: 46px; z-index: 3; }
.stripe--badge img { width: 92px; height: auto; margin-top: -26px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.2)); }

/* ---------- Secciones ---------- */
.section { padding: clamp(70px, 9vw, 120px) 0; position: relative; }
.section--pattern { background: var(--white) url(../img/pattern.svg) center / 340px; }

/* Ebook */
.ebook__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.ebook__copy p { margin: 0 0 1.2em; }
.ebook__copy .checklist li { font-weight: 500; font-size: .93rem; }
.ebook__visual { position: relative; display: flex; justify-content: center; padding-top: 40px; }
.ebook__tablet { width: min(330px, 70%); position: relative; z-index: 2; transform: rotate(-4deg); filter: drop-shadow(0 26px 30px rgba(0,0,0,.3)); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.ebook__visual:hover .ebook__tablet { transform: rotate(0) translateY(-8px); }
.ebook__nina { position: absolute; width: min(330px, 66%); right: -6%; top: -60px; z-index: 1; }
.float { animation: float 5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* Quiénes somos */
.about { padding-top: 40px; }
.about__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(36px, 6vw, 90px); align-items: center; }
.about__photo { margin: 0; position: relative; }
.about__photo::before { content: ""; position: absolute; inset: -18px 26px 26px -18px; background: var(--green); border-radius: 6px; z-index: 0; }
.about__photo img { position: relative; border-radius: 6px; box-shadow: var(--shadow); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.about__copy p { margin: 0 0 1.1em; }
.about__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 1.6em; }

/* PloTip */
.plotip { background: var(--green) url(../img/pattern-light.svg) center / 280px; color: var(--white); text-align: center; padding: clamp(70px, 9vw, 110px) 0; position: relative; }
.plotip::before, .plotip::after { content: ""; position: absolute; left: 0; right: 0; height: 26px; background: var(--white); }
.plotip::before { top: -1px; clip-path: polygon(0 0, 100% 0, 100% 20%, 0 100%); }
.plotip::after { bottom: -1px; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.plotip__inner { max-width: 760px; }
.plotip__title { color: var(--red); font-size: clamp(2.4rem, 6vw, 4rem); margin: 0; text-shadow: 3px 3px 0 var(--white); transform: rotate(-3deg); display: inline-block; }
.plotip__sub { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.1rem, 2.4vw, 1.5rem); margin: .3em 0 .7em; color: var(--white); letter-spacing: .04em; }
.plotip__text { font-size: 1.12rem; margin: 0 auto 1.8em; text-shadow: 0 1px 2px rgba(0,0,0,.18); }

/* CTA final */
.cta__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 60px); align-items: center; }
.cta__lead { font-size: 1.15rem; max-width: 440px; }
.cta__visual { position: relative; display: flex; flex-direction: column; align-items: center; }
.cta__family { width: min(360px, 78%); margin-bottom: -90px; position: relative; z-index: 1; }
.offer { position: relative; z-index: 2; background: var(--white); border: 3px solid var(--black); border-radius: var(--radius); padding: 26px 26px 30px; text-align: center; box-shadow: 10px 10px 0 var(--black); max-width: 440px; width: 100%; }
.offer__text { margin: 0 0 16px; font-weight: 500; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 22px; }
.countdown div { display: flex; flex-direction: column; align-items: center; padding: 0 6px; }
.countdown div + div { border-left: 3px solid var(--red); }
.countdown b { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; color: var(--black); font-weight: 400; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.offer.is-expired .countdown { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--red); color: var(--white); text-align: center; padding: 60px 0 40px; }
.site-footer__logo { width: 200px; margin: 0 auto 18px; }
.site-footer__title { font-family: var(--body); font-weight: 800; text-transform: uppercase; font-size: .95rem; letter-spacing: .04em; line-height: 1.5; margin: 0 0 22px; }
.lead-form { display: grid; gap: 12px; }
.lead-form input[type=email], .lead-form input[type=text] { width: 100%; padding: .95em 1.3em; border-radius: 999px; border: 2px solid var(--black); font: inherit; font-weight: 500; background: var(--white); color: var(--ink); }
.lead-form--inline { grid-template-columns: 1fr auto; max-width: 520px; margin: 0 auto; }
.lead-form--inline input { border-color: transparent !important; }
.lead-form__msg { grid-column: 1 / -1; margin: 0; min-height: 1.4em; font-weight: 600; font-size: .9rem; }
.lead-form__msg.is-error { color: var(--yellow); }
.modal .lead-form__msg.is-error { color: var(--red); }
.lead-form__msg a { color: inherit; }
.site-footer__social { display: flex; gap: 22px; justify-content: center; margin: 30px 0 18px; flex-wrap: wrap; }
.site-footer__social a { display: inline-flex; align-items: center; gap: 8px; color: var(--white); text-decoration: none; font-weight: 600; }
.site-footer__social svg { width: 22px; height: 22px; }
.site-footer__social a:hover { color: var(--yellow); }
.site-footer__copy { font-size: .8rem; opacity: .85; margin: 0; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(20,10,10,.6); backdrop-filter: blur(3px); animation: fade .25s; }
.modal__card { position: relative; background: var(--cream); border: 3px solid var(--black); border-radius: var(--radius); box-shadow: 10px 10px 0 var(--black); max-width: 620px; width: 100%; display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 30px; animation: pop .35s cubic-bezier(.34,1.56,.64,1); max-height: calc(100vh - 32px); overflow: auto; }
.modal__close { position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--yellow); font-size: 1.5rem; line-height: 1; cursor: pointer; font-weight: 700; }
.modal__ebook { width: 150px; align-self: center; transform: rotate(-5deg); filter: drop-shadow(0 12px 14px rgba(0,0,0,.25)); }
.modal__title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 1.45rem; line-height: 1.15; margin: 0 0 .4em; color: var(--black); }
.modal__lead { margin: 0 0 1em; font-size: .95rem; }
.modal__fine { font-size: .75rem; margin: 10px 0 0; opacity: .75; }
.modal .lead-form.is-sent { display: none; }
.modal__done { font-weight: 600; font-size: 1.05rem; margin: 0; }
.modal__done a { color: var(--red); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(20px); } }

/* ---------- Páginas internas ---------- */
.page-wrap { padding-top: 60px; min-height: 60vh; }
.entry { background: rgba(255,255,255,.92); border-radius: var(--radius); padding: 30px; margin-bottom: 24px; box-shadow: var(--shadow); }
.entry__title { font-family: var(--display); font-weight: 400; font-size: 1.4rem; margin: 0 0 .4em; }
.entry__title a { color: var(--black); text-decoration: none; }
.entry__thumb { border-radius: 12px; margin-bottom: 1.2em; }

/* ---------- Animaciones al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.nav-toggle { display: block; }
	.site-nav { position: fixed; inset: 0; background: var(--red) url(../img/pattern-light.svg) center / 280px; flex-direction: column; justify-content: center; gap: 36px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
	.nav-open .site-nav { opacity: 1; visibility: visible; }
	.site-nav__list { flex-direction: column; align-items: center; gap: 22px; }
	.site-nav__list a { font-family: var(--display); font-size: 1.6rem; font-weight: 400; }
	.site-nav__social a { width: 48px; height: 48px; }
	.nav-open { overflow: hidden; }

	.hero::after { display: none; }
	.hero { flex-direction: column; align-items: stretch; padding: 120px 0 0; min-height: 0; }
	.hero__bg { position: relative; order: 2; inset: auto; margin-top: 10px; }
	.hero__bg img { aspect-ratio: 1 / 1; height: auto; object-position: 82% 100%; }
	.hero__copy { max-width: none; }

	.ebook__grid, .about__grid, .cta__grid { grid-template-columns: 1fr; }
	.ebook__visual { padding-top: 70px; margin-top: 10px; }
	.ebook__nina { right: 0; top: 0; width: min(260px, 55%); }
	.about__photo { max-width: 420px; margin: 0 auto 10px; }
	.cta__copy { text-align: center; }
	.cta__lead { margin: 0 auto; }
}
@media (max-width: 560px) {
	.lead-form--inline { grid-template-columns: 1fr; }
	.modal__card { grid-template-columns: 1fr; padding: 26px 20px; text-align: center; }
	.modal__ebook { width: 110px; margin: 0 auto -6px; }
	.offer { box-shadow: 6px 6px 0 var(--black); padding: 22px 16px 26px; }
	.countdown div { padding: 0 2px; }
	.btn { padding: .95em 1.4em; }
	.site-header__logo img { width: 78px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
	.reveal { opacity: 1; transform: none; }
}
