/* =====================================================================
   La Ley de Atracción — design system editorial
   Estética: revista impresa premium. Papel crema, tinta profunda,
   acentos dorados, serif Fraunces para títulos, hairlines y aire.
   ===================================================================== */

:root {
	/* Paleta */
	--paper: #FAF7F1;        /* papel crema cálido */
	--paper-deep: #F2EDE3;   /* franjas alternas */
	--ink: #1F1D2B;          /* tinta casi negra con matiz índigo */
	--ink-soft: #4E4B5C;     /* texto secundario */
	--ink-faint: #8B8798;    /* metadatos */
	--gold: #A8853B;         /* dorado editorial */
	--gold-soft: #C9AC6A;
	--gold-wash: #F4EBD7;    /* fondo de callouts dorados */
	--night: #211E36;        /* bloques nocturnos (footer, hero invertido) */
	--night-ink: #EDEAF4;    /* texto sobre nocturno */
	--line: #E3DCCC;         /* hairlines sobre papel */
	--line-night: #3A3654;

	/* Tipografía */
	--serif: "Fraunces", Georgia, "Times New Roman", serif;
	--sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;

	/* Ritmo */
	--shell: 1200px;
	--shell-narrow: 720px;
	--radius: 4px;           /* esquinas casi rectas: imprenta, no app */
}

/* ------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.18; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

.skip-link {
	position: absolute; left: -9999px; top: 0;
	background: var(--ink); color: #fff; padding: 10px 18px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Kicker: etiqueta pequeña en versalitas — firma visual del portal */
.kicker, .guide-card-kicker, .newsletter-kicker, .footer-heading {
	font-family: var(--sans);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--gold);
}

/* ------------------------------------------------------------ Header */
.site-header {
	background: var(--paper);
	border-bottom: 1px solid var(--line);
	position: sticky; top: 0; z-index: 50;
}
.masthead {
	max-width: var(--shell);
	margin: 0 auto;
	padding: 0 24px;
	height: 68px;
	display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-mark { color: var(--gold); font-size: 15px; }
.brand-name {
	font-family: var(--serif);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.01em;
}
.site-nav .nav-list { display: flex; gap: 28px; list-style: none; }
.site-nav a {
	text-decoration: none;
	font-size: 14px; font-weight: 500;
	color: var(--ink-soft);
	padding: 6px 0;
	border-bottom: 2px solid transparent;
	transition: color .15s, border-color .15s;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--gold); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s; }

@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.site-nav {
		display: none;
		position: absolute; left: 0; right: 0; top: 68px;
		background: var(--paper); border-bottom: 1px solid var(--line);
		padding: 12px 24px 20px;
	}
	.site-nav.is-open { display: block; }
	.site-nav .nav-list { flex-direction: column; gap: 4px; }
	.site-nav a { display: block; padding: 10px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
}

/* ------------------------------------------------------------ Shells */
.shell { max-width: var(--shell); margin: 0 auto; padding: 0 24px; }
.shell-narrow { max-width: var(--shell-narrow); margin: 0 auto; padding: 0 24px; }

/* -------------------------------------------------------- Botones */
.btn {
	display: inline-block;
	background: var(--ink);
	color: #fff;
	font-family: var(--sans);
	font-size: 15px; font-weight: 600;
	text-decoration: none;
	padding: 14px 28px;
	border: 0; border-radius: var(--radius);
	cursor: pointer;
	transition: background .15s;
}
.btn:hover { background: #34314a; }
.btn-gold { background: var(--gold); }
.btn-gold:hover { background: #937431; }
.btn-ghost {
	background: transparent; color: var(--ink);
	border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* -------------------------------------------------------- Breadcrumbs */
.breadcrumbs { padding: 18px 0 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; font-size: 13px; color: var(--ink-faint); }
.breadcrumbs li + li::before { content: "·"; margin-right: 6px; color: var(--line); }
.breadcrumbs a { color: var(--ink-faint); text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold); }

/* -------------------------------------------------------- Guide cards */
.guide-card { display: flex; flex-direction: column; }
.guide-card-media { display: block; overflow: hidden; border-radius: var(--radius); background: var(--paper-deep); }
.guide-card-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .35s ease; }
.guide-card:hover .guide-card-media img { transform: scale(1.03); }
.guide-card-media-fallback {
	display: flex; align-items: center; justify-content: center;
	aspect-ratio: 3 / 2;
	background: linear-gradient(150deg, var(--night) 0%, #35304f 100%);
}
.guide-card-media-fallback::after {
	content: attr(data-letter);
	font-family: var(--serif);
	font-size: 64px; font-weight: 600;
	color: var(--gold-soft);
	opacity: .9;
}
.guide-card-body { padding: 16px 4px 0; }
.guide-card-kicker { text-decoration: none; }
.guide-card-kicker:hover { color: var(--ink); }
.guide-card-title { font-size: 21px; margin: 8px 0 8px; }
.guide-card-title a { text-decoration: none; }
.guide-card-title a:hover { color: var(--gold); }
.guide-card-excerpt { font-size: 15px; color: var(--ink-soft); }
.guide-card-meta { margin-top: 10px; font-size: 13px; color: var(--ink-faint); }

/* Grillas */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* -------------------------------------------------------- Portada */
.home-hero {
	background: var(--night);
	color: var(--night-ink);
	padding: 72px 0 64px;
	position: relative;
	overflow: hidden;
}
.home-hero::after {
	/* constelación sutil, dibujada en CSS: sin imágenes genéricas */
	content: "";
	position: absolute; inset: 0;
	background-image:
		radial-gradient(1.5px 1.5px at 18% 30%, rgba(201,172,106,.9) 50%, transparent 51%),
		radial-gradient(1px 1px at 32% 68%, rgba(237,234,244,.6) 50%, transparent 51%),
		radial-gradient(2px 2px at 71% 22%, rgba(201,172,106,.7) 50%, transparent 51%),
		radial-gradient(1px 1px at 84% 55%, rgba(237,234,244,.5) 50%, transparent 51%),
		radial-gradient(1.5px 1.5px at 55% 80%, rgba(201,172,106,.6) 50%, transparent 51%),
		radial-gradient(1px 1px at 9% 82%, rgba(237,234,244,.45) 50%, transparent 51%);
	pointer-events: none;
}
.home-hero .shell { position: relative; z-index: 1; }
.home-hero-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .home-hero-grid { grid-template-columns: 1fr; gap: 36px; } }

.home-hero .kicker { color: var(--gold-soft); }
.home-hero h1 {
	font-size: clamp(34px, 5vw, 54px);
	font-weight: 600;
	margin: 14px 0 18px;
	color: #fff;
}
.lede { font-size: 1.15rem; line-height: 1.65; color: var(--ink-soft); max-width: 54ch; }
.home-hero .lede { font-size: 18px; line-height: 1.65; color: #C9C5DA; max-width: 54ch; }
.home-hero-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.home-hero .btn-ghost { color: var(--night-ink); border-color: var(--line-night); }
.home-hero .btn-ghost:hover { background: var(--night-ink); color: var(--night); }

.hero-featured {
	border: 1px solid var(--line-night);
	border-radius: var(--radius);
	padding: 26px;
	background: rgba(255,255,255,0.03);
}
.hero-featured .kicker { color: var(--gold-soft); }
.hero-featured h2 { font-size: 24px; color: #fff; margin: 10px 0 10px; }
.hero-featured h2 a { text-decoration: none; }
.hero-featured h2 a:hover { color: var(--gold-soft); }
.hero-featured p { font-size: 15px; color: #B7B2CC; }
.hero-featured .hero-featured-link {
	display: inline-block; margin-top: 14px;
	color: var(--gold-soft); font-size: 14px; font-weight: 600; text-decoration: none;
	border-bottom: 1px solid var(--gold-soft);
}

/* Secciones de portada */
.home-section { padding: 64px 0 8px; }
.home-section-head {
	display: flex; align-items: baseline; justify-content: space-between;
	border-bottom: 2px solid var(--ink);
	padding-bottom: 12px; margin-bottom: 32px;
}
.home-section-head h2 { font-size: 26px; }
.home-section-head .see-all {
	font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
	color: var(--gold); text-decoration: none;
}
.home-section-head .see-all:hover { color: var(--ink); }

/* Destacada + secundarias (grilla asimétrica de revista) */
.home-lead { display: grid; grid-template-columns: 7fr 5fr; gap: 44px; padding: 56px 0 12px; }
@media (max-width: 900px) { .home-lead { grid-template-columns: 1fr; } }
.home-lead-main .guide-card-title { font-size: clamp(26px, 3vw, 34px); }
.home-lead-main .guide-card-excerpt { font-size: 17px; }
.home-lead-side { display: flex; flex-direction: column; gap: 26px; border-left: 1px solid var(--line); padding-left: 44px; }
@media (max-width: 900px) { .home-lead-side { border-left: 0; padding-left: 0; } }
.home-lead-side .guide-card-media { display: none; }
.home-lead-side .guide-card { border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.home-lead-side .guide-card:last-child { border-bottom: 0; }
.home-lead-side .guide-card-title { font-size: 19px; }

/* Franja de herramienta destacada */
.home-tool {
	background: var(--gold-wash);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	padding: 56px 0;
	margin-top: 56px;
}
.home-tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 800px) { .home-tool-grid { grid-template-columns: 1fr; } }
.home-tool h2 { font-size: 30px; margin: 12px 0 14px; }
.home-tool p { color: var(--ink-soft); max-width: 52ch; }
.home-tool .btn { margin-top: 22px; }
.home-tool-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.home-tool-list a {
	display: flex; justify-content: space-between; align-items: center;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 18px 22px;
	text-decoration: none;
	font-weight: 600; font-size: 16px;
	transition: border-color .15s, transform .15s;
}
.home-tool-list a:hover { border-color: var(--gold); transform: translateX(4px); }
.home-tool-list a::after { content: "→"; color: var(--gold); }

/* ---------------------------------------------------- Newsletter */
.newsletter-block { padding: 64px 0; }
.newsletter-inner { max-width: 620px; margin: 0 auto; text-align: center; padding: 0 24px; }
.newsletter-title { font-size: 28px; margin: 12px 0 12px; }
.newsletter-text { color: var(--ink-soft); font-size: 16px; }
.newsletter-form { display: flex; gap: 10px; margin-top: 24px; }
.newsletter-form input[type="email"] {
	flex: 1;
	font-family: var(--sans); font-size: 15px;
	padding: 13px 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	color: var(--ink);
}
.newsletter-form input[type="email"]:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
.newsletter-form button {
	font-family: var(--sans); font-size: 15px; font-weight: 600;
	background: var(--ink); color: #fff;
	border: 0; border-radius: var(--radius);
	padding: 13px 24px; cursor: pointer;
}
.newsletter-form button:hover { background: #34314a; }
.newsletter-note { margin-top: 12px; font-size: 13px; color: var(--ink-faint); }
.newsletter-note[data-state="ok"] { color: #2E7D4F; font-weight: 600; }
.newsletter-note[data-state="error"] { color: #A94438; }
.lda-hp { position: absolute; left: -9999px; }
@media (max-width: 560px) { .newsletter-form { flex-direction: column; } }

/* Newsletter en footer (fondo nocturno) */
.footer-newsletter { background: var(--night); border-bottom: 1px solid var(--line-night); }
.footer-newsletter .newsletter-title { color: #fff; }
.footer-newsletter .newsletter-text, .footer-newsletter .newsletter-note { color: #B7B2CC; }
.footer-newsletter .newsletter-kicker { color: var(--gold-soft); }
.footer-newsletter .newsletter-form input[type="email"] { background: rgba(255,255,255,.06); border-color: var(--line-night); color: #fff; }
.footer-newsletter .newsletter-form button { background: var(--gold); }
.footer-newsletter .newsletter-form button:hover { background: var(--gold-soft); color: var(--night); }

/* ------------------------------------------------------------ Footer */
.site-footer { background: var(--night); color: var(--night-ink); }
.footer-grid {
	max-width: var(--shell); margin: 0 auto;
	padding: 56px 24px 40px;
	display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { font-family: var(--serif); font-size: 20px; font-weight: 700; color: #fff; }
.footer-logo span { color: var(--gold-soft); margin-right: 6px; }
.footer-tag { margin-top: 12px; font-size: 14px; color: #B7B2CC; max-width: 34ch; }
.footer-heading { color: var(--gold-soft); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: 14px; color: #C9C5DA; text-decoration: none; }
.footer-col a:hover { color: var(--gold-soft); }
.footer-legal { border-top: 1px solid var(--line-night); }
.footer-legal p {
	max-width: var(--shell); margin: 0 auto;
	padding: 20px 24px; font-size: 12.5px; color: #8B86A3;
}

/* -------------------------------------------------- Category hub */
.hub-head { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.hub-head .kicker { display: block; margin-bottom: 12px; }
.hub-head h1 { font-size: clamp(30px, 4vw, 44px); max-width: 20ch; }
.hub-intro { margin-top: 18px; font-size: 17px; color: var(--ink-soft); max-width: 68ch; line-height: 1.75; }
.hub-list { padding: 48px 0 72px; }
.hub-list .grid-3 { row-gap: 52px; }

/* Paginación */
.pagination { display: flex; gap: 8px; justify-content: center; padding: 12px 0 64px; }
.pagination .page-numbers {
	font-size: 14px; font-weight: 600;
	padding: 9px 15px;
	border: 1px solid var(--line); border-radius: var(--radius);
	text-decoration: none; color: var(--ink-soft);
}
.pagination .page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination a.page-numbers:hover { border-color: var(--gold); color: var(--ink); }

/* ------------------------------------------------------- Página genérica */
.page-plain { padding: 56px 0 72px; }
.page-plain h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 26px; }
.page-plain .entry-content { font-size: 17px; line-height: 1.8; color: var(--ink-soft); }
.page-plain .entry-content h2 { font-size: 26px; color: var(--ink); margin: 40px 0 14px; }
.page-plain .entry-content h3 { font-size: 21px; color: var(--ink); margin: 30px 0 12px; }
.page-plain .entry-content p { margin-bottom: 18px; }
.page-plain .entry-content ul, .page-plain .entry-content ol { margin: 0 0 18px 22px; }
.page-plain .entry-content a { color: var(--gold); }

/* --------------------------------------------------------------- 404 */
.error-404 { text-align: center; padding: 110px 24px 130px; }
.error-404 .kicker { display: block; margin-bottom: 14px; }
.error-404 h1 { font-size: clamp(32px, 5vw, 48px); }
.error-404 p { margin: 18px auto 30px; color: var(--ink-soft); max-width: 46ch; }

/* -------------------------------------------------- Aviso de setup */
.setup-notice {
	max-width: 760px; margin: 80px auto; padding: 40px;
	border: 1px dashed var(--gold);
	border-radius: var(--radius);
	text-align: center;
	background: var(--gold-wash);
}
.setup-notice h2 { font-size: 24px; margin-bottom: 10px; }
.setup-notice p { color: var(--ink-soft); }
