/*
Theme Name: Einladungsbote
Description: Tema de Einladungsbote – invitaciones digitales para WhatsApp.
Version: 1.5.2
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: kifur
*/

/* ---------- Tipografías (alojadas localmente, licencia OFL) ---------- */
@font-face {
	font-family: "Fraunces";
	src: url("assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Fraunces";
	src: url("assets/fonts/fraunces-latin-wght-italic.woff2") format("woff2");
	font-weight: 100 900;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "Plus Jakarta Sans";
	src: url("assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
	--bg: #FBF7F1;
	--bg-tint: #F4ECE2;
	--surface: #FFFFFF;
	--ink: #1F1A17;
	--ink-2: #3D3530;
	--muted: #776C63;
	--line: #E9DED2;
	--accent: #E8573F;
	--accent-dark: #C9432D;
	--accent-soft: #FCE6E0;
	--sage: #5E7A67;
	--gold: #B8925A;
	--wa: #25D366;
	--wa-dark: #128C4B;
	--radius: 18px;
	--radius-lg: 28px;
	--shadow-sm: 0 1px 2px rgba(31, 26, 23, .06), 0 2px 8px rgba(31, 26, 23, .05);
	--shadow: 0 2px 6px rgba(31, 26, 23, .06), 0 14px 34px rgba(31, 26, 23, .10);
	--shadow-lg: 0 10px 30px rgba(31, 26, 23, .12), 0 30px 70px rgba(31, 26, 23, .16);
	--serif: "Fraunces", Georgia, "Times New Roman", serif;
	--sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--wrap: 1180px;

	/* Variables que usa el plugin InviCard */
	--ic-bg: var(--bg);
	--ic-surface: var(--surface);
	--ic-ink: var(--ink);
	--ic-muted: var(--muted);
	--ic-line: var(--line);
	--ic-accent: var(--accent);
	--ic-accent-dark: var(--accent-dark);
	--ic-accent-soft: var(--accent-soft);
	--ic-btn: var(--ink);
	--ic-serif: var(--serif);
	--ic-sans: var(--sans);
	--ic-sticky-top: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .5em; font-variation-settings: "opsz" 72, "SOFT" 30; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 500; color: var(--accent); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.wrap--narrow { max-width: 780px; }
.center { text-align: center; }
.skip { position: absolute; left: -9999px; }
.show-s { display: none; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }

/* ---------- Botones ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 48px; padding: 0 24px;
	border: 2px solid var(--ink); border-radius: 999px;
	background: var(--ink); color: #fff;
	font: 700 16px/1 var(--sans); text-decoration: none; letter-spacing: .005em;
	cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
	box-shadow: 0 6px 18px rgba(31, 26, 23, .18);
}
.btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--big { min-height: 58px; padding: 0 30px; font-size: 17px; }
.btn--small { min-height: 40px; padding: 0 18px; font-size: 14px; box-shadow: none; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: none; }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Barra superior y cabecera ---------- */
.topbar { background: var(--ink); color: #F3EADF; font-size: 13px; font-weight: 600; }
.topbar__inner { display: flex; justify-content: center; gap: 28px; padding: 8px 0; flex-wrap: wrap; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 247, 241, .86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(31, 26, 23, .06); }
.site-header__inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.site-header__brand { text-decoration: none; }
.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.site-nav a:hover { color: var(--accent); }

.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); }
.logo__mark svg { width: 32px; height: 32px; display: block; }
.logo__text { font-family: var(--serif); font-size: 29px; font-weight: 600; font-style: italic; letter-spacing: -.03em; line-height: 1; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 72px; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 4px rgba(37, 211, 102, .18); }
.hero h1 { font-size: clamp(36px, 6.4vw, 78px); margin: 22px 0 20px; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 34em; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 22px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; flex-wrap: wrap; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.checks li::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 7px; vertical-align: -3px; border-radius: 50%; background: var(--sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }

.hero__visual { position: relative; min-height: 600px; }
.blob { position: absolute; border-radius: 50%; filter: blur(2px); }
.blob--1 { width: 440px; height: 440px; background: radial-gradient(circle at 30% 30%, #FFD9CC, #F7B9A8 60%, transparent 61%); right: 10%; top: 40px; opacity: .8; }
.blob--2 { width: 240px; height: 240px; background: radial-gradient(circle, #DDE7DA, #C5D6C3 60%, transparent 61%); left: 0; bottom: 30px; opacity: .9; }

/* ---------- Móvil ---------- */
.phone {
	position: relative; width: 100%; aspect-ratio: 10 / 17.5; padding: 10px;
	background: linear-gradient(145deg, #2C2724, #0F0D0C); border-radius: 46px;
	box-shadow: var(--shadow-lg), inset 0 0 0 2px #4A433E;
}
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 30%; height: 22px; background: #0F0D0C; border-radius: 999px; z-index: 2; }
.phone__screen { position: relative; width: 100%; height: 100%; border-radius: 37px; overflow: hidden; background: #F4ECE2; display: flex; align-items: center; }
.phone__screen::before { content: ""; position: absolute; inset: -20px; background: var(--img) center / cover; filter: blur(18px) saturate(1.1); transform: scale(1.1); opacity: .9; }
.phone__screen img { position: relative; width: 100%; height: auto; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.hero__visual .phone { position: absolute; width: 270px; }
.phone--front { right: 26%; top: 0; z-index: 2; transform: rotate(-4deg); }
.phone--back { right: 0; top: 70px; z-index: 1; transform: rotate(7deg) scale(.88); opacity: .96; }

/* Burbuja de WhatsApp */
.wa-bubble { position: absolute; z-index: 3; left: 0; bottom: 18px; width: 268px; background: #EFE7DD; border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; font-size: 13px; transform: rotate(-2deg); }
.wa-bubble__head { display: flex; gap: 10px; align-items: center; background: #075E54; color: #fff; padding: 10px 14px; }
.wa-bubble__head small { display: block; opacity: .8; font-size: 11px; }
.wa-avatar { width: 32px; height: 32px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 16px; }
.wa-msg { margin: 12px 12px 6px auto; width: 82%; background: #D9FDD3; border-radius: 12px 4px 12px 12px; padding: 5px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.wa-msg__preview { background: rgba(0,0,0,.05); border-radius: 8px; overflow: hidden; }
.wa-msg__preview img { width: 100%; height: 120px; object-fit: cover; object-position: top; }
.wa-msg__preview span { display: block; padding: 6px 8px; line-height: 1.3; }
.wa-msg__preview small { color: #667781; }
.wa-msg p { margin: 6px 6px 0; }
.wa-msg__time { display: block; text-align: right; font-size: 10px; color: #53BDEB; padding: 0 6px 2px; }
.wa-reply { margin: 0 auto 14px 12px; width: fit-content; background: #fff; border-radius: 4px 12px 12px 12px; padding: 6px 12px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }

/* ---------- Secciones ---------- */
.section { padding: 84px 0; }
.section--tint { background: var(--bg-tint); }
.section--dark { background: var(--ink); color: #F3EADF; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark h2 em { color: #FF8D78; }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 46px; }
.section__head h2 { font-size: clamp(34px, 4.6vw, 54px); }
.section__head p { color: var(--muted); font-size: 18px; }

/* Ocasiones */
.occasions__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }
.occasion { position: relative; display: block; text-decoration: none; background: var(--surface); border-radius: var(--radius); padding: 10px 10px 16px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.occasion:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.occasion__img { display: block; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--bg-tint); margin-bottom: 12px; }
.occasion__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform .4s; }
.occasion:hover .occasion__img img { transform: scale(1.05); }
.occasion__name { display: block; font-family: var(--serif); font-size: 20px; font-weight: 600; padding: 0 6px; line-height: 1.2; }
.occasion__count { display: block; font-size: 13px; color: var(--muted); padding: 2px 6px 0; }

/* Rejilla de plantillas */
.tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px 28px; margin-bottom: 44px; }
.tpl { text-decoration: none; display: flex; flex-direction: column; align-items: center; text-align: center; }
.tpl .phone { width: 82%; transition: transform .25s ease, box-shadow .25s ease; }
.tpl:hover .phone { transform: translateY(-6px) rotate(-1.5deg); }
.tpl__meta { margin-top: 18px; }
.tpl__title { display: block; font-weight: 700; font-size: 16px; line-height: 1.3; }
.tpl__cat { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--sage); background: #E6EEE6; border-radius: 999px; padding: 3px 10px; }
.tpl__cta { margin-top: 10px; font-weight: 700; font-size: 14px; color: var(--accent); }

/* Pasos */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.step { background: var(--surface); border-radius: var(--radius-lg); padding: 34px 30px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.step__num { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-family: var(--serif); font-size: 26px; font-weight: 600; margin-bottom: 18px; }
.step h3 { font-size: 25px; }
.step p { color: var(--muted); margin: 0; }

/* Ventajas */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.feature__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgba(255,255,255,.08); color: #FF8D78; margin-bottom: 16px; }
.feature__icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 22px; }
.feature p { color: #CBBFB3; font-size: 16px; margin: 0; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 56px 20px 24px; font-weight: 700; font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; background: var(--bg-tint); display: grid; place-items: center; font-size: 20px; font-weight: 500; transition: transform .2s; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 24px 22px; margin: 0; color: var(--ink-2); }

/* Llamada final */
.cta-band { padding: 0 0 90px; }
.cta-band__inner { background: linear-gradient(135deg, #E8573F, #D2426B); color: #fff; border-radius: 36px; padding: 64px 32px; text-align: center; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.cta-band__inner::before, .cta-band__inner::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.1); }
.cta-band__inner::before { width: 320px; height: 320px; left: -80px; top: -120px; }
.cta-band__inner::after { width: 260px; height: 260px; right: -60px; bottom: -120px; }
.cta-band h2 { font-size: clamp(32px, 4.4vw, 52px); color: #fff; position: relative; }
.cta-band h2 em { color: #FFE3A3; }
.cta-band p { font-size: 18px; opacity: .92; position: relative; }
.cta-band .btn { position: relative; margin-top: 10px; }

/* ---------- Pie ---------- */
.site-footer { background: #F1E8DD; padding: 64px 0 28px; font-size: 15px; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.site-footer__about p { color: var(--muted); margin-top: 14px; max-width: 30em; }
.site-footer__about a { text-decoration: none; }
.site-footer h2 { font-family: var(--sans); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.site-footer nav a { display: block; text-decoration: none; padding: 4px 0; color: var(--ink-2); font-weight: 500; }
.site-footer nav a:hover { color: var(--accent); }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid #DFD2C3; margin-top: 44px; padding-top: 22px; color: var(--muted); font-size: 14px; }

/* ---------- Páginas ---------- */
.kf-page { padding: 56px 0 90px; }
.kf-page--app { padding-top: 36px; }
.page__title { font-size: clamp(32px, 5vw, 56px); margin-bottom: 30px; overflow-wrap: break-word; }
h1, h2, h3 { overflow-wrap: break-word; }

.prose { font-size: 17px; }
.prose h2 { font-size: 28px; margin-top: 1.6em; }
.prose h3 { font-size: 21px; margin-top: 1.4em; font-family: var(--sans); font-weight: 700; letter-spacing: 0; }
.prose a { color: var(--accent-dark); }
.prose ul, .prose ol { padding-left: 1.3em; }


/* ---------- Landings, artículos y migas ---------- */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; padding: 0; font-size: 14px; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: #B9AEA3; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.kf-head { max-width: 760px; margin: 0 auto 34px; text-align: center; }
.kf-head .page__title { margin-bottom: 14px; }
.page__title em { font-style: italic; font-weight: 500; color: var(--accent); }
.kf-lead { font-size: 19px; color: var(--ink-2); margin: 0; }
.kf-article .kf-head { text-align: left; margin-left: 0; }
.kf-article .breadcrumbs, .kf-article .kf-content, .kf-article .kf-section { max-width: 760px; }
.kf-content > :not(.invicard):not(.wp-block-shortcode) { max-width: 760px; margin-left: auto; margin-right: auto; }
.kf-article .kf-content > * { margin-left: 0; }
.kf-content > .invicard, .kf-content > .wp-block-shortcode { margin-bottom: 56px; }
.kf-content h2 { font-size: clamp(26px, 3vw, 34px); margin: 1.6em 0 .5em; }
.kf-content h3 { font-family: var(--sans); font-weight: 700; font-size: 19px; letter-spacing: 0; margin: 1.4em 0 .4em; }
.kf-content p, .kf-content li { font-size: 17px; }
.kf-content a { color: var(--accent-dark); }
.kf-content .invicard a, .kf-content a.btn { color: inherit; }
.kf-content a.btn { color: #fff; text-decoration: none; }
.kf-content ol, .kf-content ul:not(.kf-texts):not(.invicard-grid) { padding-left: 1.3em; }
.kf-texts { list-style: none; padding: 0; margin: 18px auto 10px; display: grid; gap: 12px; }
.kf-texts > li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 110px 18px 20px; white-space: pre-line; line-height: 1.55; box-shadow: var(--shadow-sm); }
.kf-copy { position: absolute; right: 12px; top: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: 700 13px var(--sans); cursor: pointer; }
.kf-copy:hover { border-color: var(--ink); }
.kf-copy.is-done { background: #E6EEE6; border-color: #B9D2BF; color: #2F4A38; }
.kf-cta { text-align: center; margin: 30px auto; }
.kf-section { max-width: 760px; margin: 56px auto 0; }
.kf-section h2 { font-size: clamp(26px, 3vw, 34px); }
.kf-related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.kf-related a { display: inline-block; padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 15px; }
.kf-related a:hover { border-color: var(--ink); }
@media (max-width: 620px) {
	.kf-head { text-align: left; }
	.kf-lead { font-size: 17px; }
	.kf-texts > li { padding: 16px 16px 52px; }
	.kf-copy { top: auto; bottom: 12px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
	.tpl-grid { grid-template-columns: repeat(3, 1fr); }
	.features { grid-template-columns: repeat(2, 1fr); }
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
	:root { --ic-sticky-top: 64px; }
	.site-nav { display: none; }
	.site-header__inner { justify-content: space-between; height: 64px; }
	.hero { padding: 34px 0 56px; }
	.hero__grid { grid-template-columns: 1fr; gap: 10px; }
	.hero__visual { min-height: 500px; max-width: 420px; width: 100%; margin: 0 auto; }
	.hero__visual .phone { width: 220px; }
	.phone--front { right: 30%; }
	.wa-bubble { width: 230px; bottom: 0; }
	.blob--1 { width: 330px; height: 330px; right: 0; }
	.steps { grid-template-columns: 1fr; }
	.section { padding: 64px 0; }
}
@media (max-width: 620px) {
	body { font-size: 16px; }
	.logo__text { font-size: 21px; }
	.hero h1 { font-size: 34px; }
	.page__title { font-size: 30px; }
	.logo__mark svg { width: 26px; height: 26px; }
	.site-header .btn--small { padding: 0 14px; font-size: 13px; min-height: 36px; }
	.hide-s { display: none; }
	.show-s { display: inline; }
	.topbar__inner { gap: 16px; }
	.hero h1 { margin-top: 18px; }
	.hero__cta .btn { width: 100%; }
	.hero__visual { min-height: 440px; }
	.hero__visual .phone { width: 190px; }
	.phone--front { right: 34%; }
	.phone--back { right: 0; top: 50px; }
	.wa-bubble { width: 210px; left: -4px; }
	.wa-msg__preview img { height: 90px; }
	.tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
	.tpl .phone { width: 100%; border-radius: 30px; padding: 6px; }
	.tpl .phone::before { top: 12px; height: 14px; }
	.tpl .phone__screen { border-radius: 25px; }
	.occasions__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.occasion__name { font-size: 17px; hyphens: auto; overflow-wrap: anywhere; }
	.features { grid-template-columns: 1fr; }
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
	.site-footer__about { grid-column: 1 / -1; }
	.cta-band__inner { border-radius: 26px; padding: 48px 22px; }
	.phone { border-radius: 36px; }
	.phone__screen { border-radius: 28px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
