/*
Theme Name: El Método del Sorteo
Theme URI: https://www.instagram.com/elmetododelsorteo/
Author: El Método del Sorteo
Description: Tema de landing para vender el ebook "Cómo crear tu negocio de productos digitales con sorteos en Chile". Compatible con WooCommerce: el botón de compra, el precio y la oferta se leen desde el producto que elijas en el escritorio (menú "El Método del Sorteo").
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elmetodo
*/

:root {
	--ink: #13213C;
	--ink-2: #2B3A57;
	--ink-line: #2A3A5C;
	--amber: #F2A541;
	--amber-dark: #9A5F12;
	--amber-mid: #B9741A;
	--cream: #FBF8F3;
	--line: #E6DFD3;
	--text: #1F2633;
	--muted: #4A5468;
	--red: #C8553D;
	--serif: "Fraunces", Georgia, serif;
	--sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--cream); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); }
a:hover { color: var(--amber-mid); }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.1; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto; background: #fff; padding: 10px 14px; border-radius: 6px; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 16px 30px; border-radius: 999px; font-weight: 700; font-size: 1.05rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-amber { background: var(--amber); color: var(--ink); box-shadow: 0 10px 24px rgba(242,165,65,.28); }
.btn-amber:hover { background: #F5B35C; color: var(--ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-2); color: #fff; }
.btn-ghost { color: #fff; border-color: #4A5D85; }
.btn-ghost:hover { color: #fff; border-color: #fff; }
.btn-sm { min-height: 44px; padding: 10px 20px; font-size: .9rem; }
.btn-lg { padding: 20px 40px; font-size: 1.15rem; }

/* ---------- cabecera ---------- */
.site-header { background: var(--ink); border-bottom: 1px solid var(--ink-line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; background: var(--amber); display: flex; align-items: center; justify-content: center; flex: none; }
.brand-mark span { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 18px; color: #fff; line-height: 1.1; display: block; }
.brand-handle { font-size: 12px; color: var(--amber); display: block; }
.header-nav { display: flex; align-items: center; gap: 18px; }
.header-nav a.nav-link { color: #C9D0DE; text-decoration: none; font-size: 14px; font-weight: 500; }
.header-nav a.nav-link:hover { color: #fff; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .header-nav a.nav-link { display: none; } .brand-handle { display: none; } }

/* ---------- secciones ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-white { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-ink { background: var(--ink); color: #fff; }
.section-ink h2, .section-ink h3 { color: #fff; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--amber-dark); }
.section-ink .eyebrow { color: var(--amber); }
.h2 { font-weight: 900; font-size: clamp(2rem, 3.6vw, 3rem); margin: 12px 0 0; max-width: 820px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 620px; margin: 20px 0 0; }

/* hero */
.hero { background: var(--ink); color: #fff; overflow: hidden; }
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 104px); }
.hero-copy { flex: 1 1 520px; min-width: 0; }
.pill { display: inline-block; border: 1px solid #3A4D74; color: var(--amber); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 8px 14px; border-radius: 999px; }
.hero h1 { color: #fff; font-weight: 900; font-size: clamp(2.4rem, 5vw, 4.1rem); line-height: 1.04; letter-spacing: -.01em; margin: 24px 0 0; }
.hero h1 em { font-weight: 400; color: var(--amber); }
.hero-sub { font-size: 1.2rem; color: #D6DBE6; margin: 24px 0 0; max-width: 600px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 36px; font-size: 14px; color: #C9D0DE; }
.hero-proof span { display: flex; align-items: center; gap: 8px; }
.hero-price-note { margin-top: 18px; font-size: 14px; color: #C9D0DE; }
.hero-price-note del { color: #8C97AE; }
.hero-price-note strong { color: var(--amber); }
.hero-art { flex: 1 1 400px; display: flex; justify-content: center; }
.hero-art img { width: min(100%, 440px); height: auto; filter: drop-shadow(0 30px 40px rgba(0,0,0,.35)); }

/* portada del libro */
.book { position: relative; width: 300px; height: 420px; background: #0E1930; border-radius: 4px 12px 12px 4px; box-shadow: 0 30px 60px rgba(0,0,0,.45), inset 6px 0 0 #0A1224; overflow: hidden; transform: rotate(-3deg); }
.book .c1 { position: absolute; right: -90px; top: -90px; width: 280px; height: 280px; border-radius: 50%; background: var(--amber); }
.book .c2 { position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; border: 2px solid rgba(19,33,60,.35); }
.book .c3 { position: absolute; right: 20px; top: 20px; width: 60px; height: 60px; border-radius: 50%; background: var(--ink); }
.book .bt { position: absolute; left: 26px; right: 26px; bottom: 34px; }
.book .bk { font-family: var(--serif); font-style: italic; color: var(--amber); font-size: 13px; }
.book .bh { font-family: var(--serif); font-weight: 900; color: #fff; font-size: 25px; line-height: 1.08; margin-top: 8px; }
.book .bh em { font-weight: 400; color: var(--amber); }
.book .bf { border-top: 1px solid #34456A; margin-top: 22px; padding-top: 10px; font-size: 11px; color: #fff; font-weight: 600; }

/* tarjetas */
.cards-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 48px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.card .num { font-family: var(--serif); font-weight: 900; font-size: 44px; color: var(--red); line-height: 1; }
.card h3 { font-size: 1.35rem; margin: 14px 0 8px; }
.card p { margin: 0; color: var(--muted); }

/* comparación */
.compare { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 48px; }
.compare-col { flex: 1 1 340px; border-radius: 16px; padding: 32px; }
.compare-bad { border: 1.5px solid #E7B9AC; background: #FBEFEB; }
.compare-good { border: 1.5px solid var(--ink); background: var(--ink); color: #fff; }
.compare-head { display: flex; align-items: center; gap: 12px; }
.compare-head h3 { font-size: 1.5rem; margin: 0; }
.compare-bad h3 { color: #8E3420; }
.compare-good h3 { color: var(--amber); }
.ico { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.ico-bad { background: var(--red); }
.ico-good { background: var(--amber); }
.compare ul { margin: 22px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.compare-bad ul { color: #4A2A22; }
.compare-good ul { color: #E6EAF2; }

/* calculadora */
.calc-grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.calc-copy { flex: 1 1 380px; min-width: 0; }
.calc-box { flex: 1 1 460px; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: 0 20px 50px rgba(19,33,60,.08); }
.calc-label { font-size: 13px; font-weight: 700; color: var(--ink); margin: 0 0 10px; }
.calc-label + .calc-opts + .calc-label { margin-top: 22px; }
.calc-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.calc-opt { min-height: 56px; padding: 10px 8px; border-radius: 12px; cursor: pointer; font-family: var(--sans); text-align: center; background: var(--cream); color: var(--ink); border: 1.5px solid var(--line); transition: background .15s, color .15s, border-color .15s; }
.calc-opt b { display: block; font-size: 15px; }
.calc-opt small { display: block; font-size: 12px; opacity: .8; }
.calc-opt[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.calc-result { background: var(--ink); color: #fff; border-radius: 14px; padding: 26px; margin-top: 26px; text-align: center; }
.calc-result .k { font-size: 13px; color: #C9D0DE; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.calc-result .v { font-family: var(--serif); font-weight: 900; font-size: 64px; line-height: 1.05; color: var(--amber); margin-top: 6px; }
.calc-result .s { font-size: 14px; color: #D6DBE6; }
.calc-note { font-size: 12px; color: #5B6478; margin: 14px 0 0; }

/* capítulos */
.chapters { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--ink-line); border: 1px solid var(--ink-line); border-radius: 16px; overflow: hidden; margin-top: 48px; }
.chapters div { background: var(--ink); padding: 24px; }
.chapters b { display: block; font-family: var(--serif); font-weight: 900; font-size: 28px; color: var(--amber); }
.chapters span { display: block; font-weight: 600; margin-top: 6px; }

/* incluye */
.includes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px 40px; margin-top: 44px; }
.includes > div { display: flex; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.tool-ico { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--ink); color: var(--amber); display: flex; align-items: center; justify-content: center; }
.includes strong { display: block; color: var(--ink); }
.includes p { margin: 0; color: var(--muted); font-size: 15px; }

/* para quién */
.fit { display: flex; flex-wrap: wrap; gap: 24px; }
.fit > div { flex: 1 1 380px; border-radius: 16px; padding: 36px; }
.fit-yes { background: var(--cream); }
.fit-no { border: 1px solid var(--line); }
.fit h3 { font-weight: 900; font-size: 1.8rem; margin: 0; }
.fit ul { margin: 20px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.fit-yes ul { color: var(--ink-2); }
.fit-no ul { color: var(--muted); }

/* precio */
.price-card { max-width: 760px; margin: 0 auto; background: var(--ink); color: #fff; border-radius: 24px; padding: 56px 40px; text-align: center; box-shadow: 0 30px 70px rgba(19,33,60,.25); }
.price-card h2 { color: #fff; font-weight: 900; font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.12; margin: 14px 0 0; }
.price-badge { display: inline-block; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 7px 14px; border-radius: 999px; margin-top: 26px; }
.price-row { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; }
.price-old { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.2rem); color: #8C97AE; text-decoration-thickness: 2px; }
.price-now { font-family: var(--serif); font-weight: 900; font-size: clamp(3.5rem, 8vw, 5.5rem); color: var(--amber); line-height: 1; }
.price-save { color: var(--amber); font-weight: 700; margin-top: 10px; }
.price-meta { color: #C9D0DE; margin-top: 8px; }
.price-why { color: #E6EAF2; margin: 28px auto 0; max-width: 520px; }
.price-card .btn { margin-top: 32px; }
.price-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; margin-top: 26px; font-size: 13px; color: #C9D0DE; }
.countdown { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.countdown div { background: #1D2E4F; border-radius: 10px; padding: 10px 12px; min-width: 64px; }
.countdown b { display: block; font-family: var(--serif); font-size: 26px; color: #fff; line-height: 1; }
.countdown small { font-size: 11px; color: #9AA5BC; text-transform: uppercase; letter-spacing: .08em; }

/* faq */
.faq { max-width: 820px; margin: 0 auto; }
.faq h2 { font-weight: 900; font-size: clamp(2rem, 3.6vw, 2.8rem); margin: 0 0 32px; text-align: center; }
.faq-list { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-weight: 700; color: var(--ink); font-size: 1.05rem; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary span { font-size: 24px; color: var(--amber-mid); transition: transform .2s; }
.faq details[open] summary span { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--muted); }

/* cta final */
.final-cta { background: var(--amber); padding: 80px 0; text-align: center; }
.final-cta h2 { font-weight: 900; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.08; margin: 0 auto; max-width: 900px; }
.final-cta .btn { margin-top: 34px; }

/* pie */
.site-footer { background: var(--ink); color: #9AA5BC; padding: 44px 0; font-size: 13px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.site-footer a { color: #C9D0DE; }
.site-footer .brand-name { font-size: 17px; }
.footer-menu { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-legal { margin: 0; max-width: 560px; }

/* barra fija móvil */
.mobile-buy { display: none; }
@media (max-width: 700px) {
	.mobile-buy { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; justify-content: space-between; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 16px; padding: 10px 10px 10px 18px; box-shadow: 0 12px 30px rgba(0,0,0,.3); }
	.mobile-buy .p { font-family: var(--serif); font-weight: 900; font-size: 22px; color: var(--amber); }
	body.home { padding-bottom: 84px; }
}

/* ---------- páginas internas y WooCommerce ---------- */
.page-main { padding: 64px 0 96px; }
.page-main .wrap { max-width: 860px; }
.page-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: clamp(24px, 5vw, 56px); }
.page-title { font-weight: 900; font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 24px; }
.entry-content h2 { font-size: 1.6rem; margin: 2em 0 .5em; }
.entry-content h3 { font-size: 1.25rem; margin: 1.6em 0 .4em; }
.entry-content p, .entry-content li { color: var(--text); }
.woo-main .wrap { max-width: 1100px; }

.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce #place_order,
.wp-block-button__link, .wc-block-components-button:not(.is-link) {
	background: var(--amber) !important; color: var(--ink) !important; border-radius: 999px !important; font-weight: 700 !important; border: 0 !important; padding: 14px 26px !important; font-family: var(--sans) !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce #place_order:hover { background: #F5B35C !important; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select,
.wc-block-components-text-input input { border: 1.5px solid var(--line) !important; border-radius: 10px !important; padding: 12px 14px !important; background: #fff; }
.woocommerce-info, .woocommerce-message { border-top-color: var(--amber) !important; background: var(--cream) !important; }
.woocommerce-info::before, .woocommerce-message::before { color: var(--amber-mid) !important; }
.woocommerce table.shop_table { border-radius: 12px; border-color: var(--line); }
.woocommerce span.onsale { background: var(--red); }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price { color: var(--ink); font-weight: 700; }

.checkout-trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 24px; padding: 14px 18px; background: var(--cream); border-radius: 12px; font-size: 14px; color: var(--ink-2); }
.checkout-trust span::before { content: "✓ "; color: var(--amber-mid); font-weight: 700; }

/* En la portada móvil la compra va en la barra fija inferior */
@media (max-width: 700px) {
	.home .site-header .btn { display: none; }
	.site-header .wrap { flex-wrap: nowrap; }
}

/* franja de confianza bajo el hero */
.trust-strip { background: #fff; border-bottom: 1px solid var(--line); }
.trust-strip .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.trust-item { display: flex; align-items: center; gap: 14px; padding: 26px 20px; color: var(--amber-mid); }
.trust-item + .trust-item { border-left: 1px solid var(--line); }
.trust-item strong { display: block; color: var(--ink); font-size: 15px; }
.trust-item small { display: block; color: var(--muted); font-size: 13px; }
@media (max-width: 960px) {
	.trust-item + .trust-item { border-left: 0; }
	.trust-item { border-top: 1px solid var(--line); padding: 18px 4px; }
	.trust-strip .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
}
@media (max-width: 520px) { .trust-strip .wrap { grid-template-columns: 1fr; } }

/* calculadora: otros costos */
.calc-other { display: block; margin-top: 22px; }
.calc-other small { font-weight: 500; color: var(--muted); }
.calc-input { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: var(--cream); padding: 0 14px; }
.calc-input:focus-within { border-color: var(--ink); }
.calc-input span { font-weight: 700; color: var(--ink); }
.calc-input input { flex: 1; border: 0; background: transparent; font: 600 16px var(--sans); color: var(--ink); padding: 14px 8px; min-width: 0; outline: none; }

/* checkout simplificado */
.woocommerce-checkout .form-row input.input-text { width: 100%; box-sizing: border-box; }
.woocommerce-checkout #customer_details .col-1, .woocommerce-checkout #customer_details .col-2 { width: 100%; float: none; }
.woocommerce-checkout #customer_details .col-2:empty { display: none; }
.woocommerce-checkout .form-row .description { font-size: 13px; color: var(--muted); margin-top: 4px; }
