/*
Theme Name: Spot On
Theme URI: https://spoton.app/
Author: Spot On
Description: Theme de una página para la landing de Spot On: hero con bokeh de colores, formulario de suscripción con consentimiento y páginas de texto (Aviso de privacidad) con el mismo estilo oscuro. Incluye gestor de suscriptores con exportación CSV.
Version: 1.4.1
Requires at least: 6.3
Tested up to: 7.1
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: spoton
Tags: one-column, dark, custom-logo, custom-menu, translation-ready, accessibility-ready
*/

/* ------------------------------------------------------------------
   Tokens (sistema de diseño Spot On)
------------------------------------------------------------------ */
:root {
	--so-bg: #0B0F10;
	--so-surface: #191E22;
	--so-line: #1F2529;
	--so-line-strong: #313842;
	--so-ink: #D9D8D2;
	--so-ink-soft: #B9B6AC;
	--so-ink-muted: #8E8F8A;
	--so-on-ink: #0B0F10;

	--so-ship: #86A8EE;
	--so-sheep: #E6C27A;
	--so-cat: #B49AF2;
	--so-book: #4FB8C8;
	--so-moon: #F2A36B;
	--so-cut: #7CC98A;
	--so-cot: #EE8FA6;
	--so-this: #D98BD9;
	--so-record: #F07D6E;

	--so-serif: "Newsreader", Georgia, serif;
	--so-sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

	--so-radius-card: 16px;
	--so-control-h: 54px;
	--so-tap: 44px;
}

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--so-bg);
	color: var(--so-ink);
	font-family: var(--so-sans);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--so-ink-soft); }
a:hover { color: var(--so-ink); }

:focus-visible {
	outline: 2px solid var(--so-ship);
	outline-offset: 3px;
	border-radius: 4px;
}

img { max-width: 100%; height: auto; }

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: var(--so-ink);
	color: var(--so-on-ink);
	clip: auto !important;
	clip-path: none;
	display: block;
	height: auto;
	left: 8px;
	top: 8px;
	padding: 12px 20px;
	width: auto;
	z-index: 100000;
	border-radius: 8px;
	text-decoration: none;
}

/* ------------------------------------------------------------------
   Estructura
------------------------------------------------------------------ */
.site {
	position: relative;
	overflow: hidden;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	padding: 24px;
	background: var(--so-bg);
}

.admin-bar .site { min-height: calc(100vh - 32px); }

.site > *:not(.bokeh) { position: relative; }

.site-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}

.site--landing .site-header { justify-content: flex-end; }

/* ------------------------------------------------------------------
   Bokeh
------------------------------------------------------------------ */
.bokeh {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.spot {
	position: absolute;
	border-radius: 50%;
}

@keyframes so-breathe {
	0%, 100% { opacity: .35; }
	50% { opacity: .8; }
}

/* Portada: nueve luces que respiran */
.bokeh--landing .spot { opacity: .35; animation: so-breathe var(--d, 6s) ease-in-out infinite var(--delay, 0s); }
.bokeh--still .spot { animation: none; opacity: .55; }

.bokeh--landing .spot--1 { left: 7%;  top: 14%; width: 150px; height: 150px; background: var(--so-ship);  filter: blur(34px); --d: 7s; }
.bokeh--landing .spot--2 { left: 22%; top: 68%; width: 90px;  height: 90px;  background: var(--so-sheep); filter: blur(16px); --d: 5s; --delay: .8s; }
.bokeh--landing .spot--3 { left: 80%; top: 12%; width: 110px; height: 110px; background: var(--so-sheep); filter: blur(24px); --d: 6s; --delay: .4s; }
.bokeh--landing .spot--4 { left: 86%; top: 62%; width: 190px; height: 190px; background: var(--so-cat);   filter: blur(44px); --d: 8s; --delay: 1.2s; }
.bokeh--landing .spot--5 { left: 66%; top: 80%; width: 56px;  height: 56px;  background: var(--so-book);  filter: blur(9px);  --d: 5.5s; --delay: 2s; }
.bokeh--landing .spot--6 { left: 12%; top: 42%; width: 44px;  height: 44px;  background: var(--so-moon);  filter: blur(7px);  --d: 6.5s; --delay: 1.5s; }
.bokeh--landing .spot--7 { left: 70%; top: 34%; width: 34px;  height: 34px;  background: var(--so-cut);   filter: blur(6px);  --d: 4.5s; --delay: .2s; }
.bokeh--landing .spot--8 { left: 34%; top: 7%;  width: 40px;  height: 40px;  background: var(--so-cot);   filter: blur(8px);  --d: 7.5s; --delay: 2.4s; }
.bokeh--landing .spot--9 { left: 42%; top: 88%; width: 74px;  height: 74px;  background: var(--so-this);  filter: blur(20px); --d: 6s; --delay: 3s; }

/* Páginas interiores: tres luces quietas y suaves (posición fija en px
   desde arriba para que no se desplacen en páginas muy largas) */
.bokeh--page .spot--1 { left: 6%;  top: 50px;  width: 150px; height: 150px; background: var(--so-ship);  filter: blur(44px); opacity: .35; }
.bokeh--page .spot--2 { left: 84%; top: 90px;  width: 110px; height: 110px; background: var(--so-sheep); filter: blur(34px); opacity: .3; }
.bokeh--page .spot--3 { left: 88%; top: 70%;   width: 180px; height: 180px; background: var(--so-cat);   filter: blur(54px); opacity: .25; }

@media (prefers-reduced-motion: reduce) {
	.spot { animation: none !important; }
}

/* ------------------------------------------------------------------
   Selector de idioma (ES · EN)
------------------------------------------------------------------ */
.lang-switch {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
	font: 500 12px/1.3 var(--so-sans);
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--so-ink-muted);
}

.lang-switch li { display: flex; align-items: center; }
.lang-switch li + li::before { content: "·"; padding: 0 2px; }

.lang-switch a,
.lang-switch span[aria-current] {
	display: inline-flex;
	align-items: center;
	min-height: var(--so-tap);
	padding: 0 6px;
	text-decoration: none;
	color: var(--so-ink-muted);
}

.lang-switch a:hover { color: var(--so-ink); }
.lang-switch [aria-current] { color: var(--so-ink); }

/* ------------------------------------------------------------------
   Marca (Sp●t ●n)
------------------------------------------------------------------ */
.wordmark {
	display: inline-flex;
	align-items: center;
	font-family: var(--so-serif);
	font-weight: 400;
	line-height: 1;
	color: var(--so-ink);
	text-decoration: none;
}

.wordmark__dot {
	display: inline-block;
	width: .5em;
	height: .5em;
	border-radius: 50%;
	margin: .1em .03em 0;
}

.wordmark__dot--a { background: var(--so-ship); }
.wordmark__dot--b { background: var(--so-sheep); }
.wordmark__gap { display: inline-block; width: .26em; }

.wordmark--hero { font-size: clamp(51px, 9.6vw, 109px); }

.wordmark--small {
	font-size: 28px;
	min-height: var(--so-tap);
}

a.wordmark:hover { color: var(--so-ink); }

.custom-logo-link { display: inline-flex; align-items: center; min-height: var(--so-tap); }
.custom-logo { display: block; width: auto; max-height: 40px; }
.hero .custom-logo { max-height: 128px; }

/* ------------------------------------------------------------------
   Portada
------------------------------------------------------------------ */
.hero {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 24px;
	padding: 40px 0;
}

.hero__title { margin: 0; }

.hero__tagline-line { display: block; }

.hero__tagline {
	margin: 0;
	max-width: 560px;
	font-family: var(--so-serif);
	font-size: clamp(22px, 3vw, 28px);
	line-height: 1.2;
	color: var(--so-ink);
}

/* ------------------------------------------------------------------
   Formulario de suscripción
------------------------------------------------------------------ */
.subscribe {
	width: 100%;
	max-width: 460px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 16px;
	text-align: left;
	scroll-margin-top: 24px;
}

.subscribe__intro {
	margin: 0 0 12px;
	font-size: 16px;
	line-height: 1.5;
	color: var(--so-ink-soft);
	text-align: center;
}

.subscribe__label {
	font-size: 13px;
	color: var(--so-ink-muted);
}

.subscribe__label--mail { margin-top: 8px; }

.subscribe__row {
	margin-top: 4px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.subscribe__input {
	width: 100%;
	height: var(--so-control-h);
	padding: 0 16px;
	border-radius: var(--so-radius-card);
	border: 1px solid var(--so-line-strong);
	background: var(--so-surface);
	color: var(--so-ink);
	font: 400 15px var(--so-sans);
	-webkit-appearance: none;
	appearance: none;
}

.subscribe__input::placeholder { color: var(--so-ink-muted); opacity: 1; }
.subscribe__input:focus { border-color: var(--so-ink-muted); }

.subscribe__row .subscribe__input {
	flex: 1 1 220px;
	min-width: 0;
	width: auto;
}

.subscribe__button {
	flex: 0 0 auto;
	height: var(--so-control-h);
	padding: 0 24px;
	border: 0;
	border-radius: var(--so-radius-card);
	background: var(--so-ink);
	color: var(--so-on-ink);
	font: 500 16px var(--so-sans);
	cursor: pointer;
	transition: background-color .15s ease;
}

.subscribe__button:hover { background: #fff; }

@media (max-width: 480px) {
	.subscribe__button { flex: 1 1 100%; }
}

.subscribe__consent {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: var(--so-tap);
	margin-top: 4px;
	font-size: 13px;
	color: var(--so-ink-muted);
	cursor: pointer;
}

.subscribe__consent input {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--so-ship);
	cursor: pointer;
}

/* Trampa anti-spam: invisible para personas */
.subscribe__hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.subscribe__notice {
	margin: 0 0 8px;
	padding: 14px 16px;
	border-radius: var(--so-radius-card);
	background: var(--so-surface);
	border: 1px solid var(--so-line-strong);
	font-size: 15px;
	line-height: 1.45;
	color: var(--so-ink);
	text-align: center;
}

.subscribe__notice-hint { color: var(--so-ink-muted); }

.subscribe__notice--ok { border-color: #3D5A3F; }
.subscribe__notice--error { border-color: #6A3A35; }

/* ------------------------------------------------------------------
   Pie de página
------------------------------------------------------------------ */
.site-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 8px 24px;
	padding: 20px 8px 0;
	border-top: 1px solid var(--so-line);
	font-size: 13px;
	color: var(--so-ink-muted);
}

.footer-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-nav a { text-decoration: none; }

/* ------------------------------------------------------------------
   Páginas de texto (Aviso de privacidad y similares)
------------------------------------------------------------------ */
.page-main {
	flex: 1;
	width: 100%;
	max-width: 680px;
	margin: 0 auto;
	padding: 72px 0 96px;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.page-main > article {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.page-head {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.back-link {
	font-size: 14px;
	text-decoration: none;
	min-height: var(--so-tap);
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
}

.page-title {
	margin: 0;
	font-family: var(--so-serif);
	font-weight: 400;
	font-size: clamp(40px, 6vw, 56px);
	line-height: 1.1;
	color: var(--so-ink);
}

.page-meta {
	margin: 0;
	font-size: 14px;
	color: var(--so-ink-muted);
}

/* Contenido escrito en el editor */
.entry-content {
	font-size: 16px;
	line-height: 1.65;
	color: var(--so-ink-soft);
}

.entry-content > * { margin-top: 0; margin-bottom: 12px; }
.entry-content > *:last-child { margin-bottom: 0; }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	font-family: var(--so-serif);
	font-weight: 500;
	line-height: 1.25;
	color: var(--so-ink);
}

.entry-content h2 { font-size: 24px; margin-top: 40px; }
.entry-content h3 { font-size: 20px; margin-top: 28px; }
.entry-content h4 { font-size: 18px; margin-top: 24px; }
.entry-content > h2:first-child,
.entry-content > h3:first-child { margin-top: 0; }

.entry-content ul,
.entry-content ol { padding-left: 20px; }

.entry-content strong { color: var(--so-ink); font-weight: 500; }

.entry-content a { color: var(--so-ink); text-underline-offset: 2px; }
.entry-content a:hover { color: #fff; }

.entry-content blockquote {
	margin-left: 0;
	padding-left: 20px;
	border-left: 2px solid var(--so-line-strong);
}

.entry-content hr {
	border: 0;
	border-top: 1px solid var(--so-line);
	margin: 40px 0;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	display: block;
	overflow-x: auto;
}

.entry-content th,
.entry-content td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--so-line);
	text-align: left;
	vertical-align: top;
}

.entry-content th { color: var(--so-ink); font-weight: 500; }

/* Listado de entradas (fallback de index.php) */
.post-list {
	display: flex;
	flex-direction: column;
	gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.post-list__title {
	margin: 0 0 6px;
	font-family: var(--so-serif);
	font-weight: 500;
	font-size: 24px;
	line-height: 1.25;
}

.post-list__title a { color: var(--so-ink); text-decoration: none; }
.post-list__excerpt { color: var(--so-ink-soft); }
.post-list__excerpt p { margin: 0; }

.pagination .nav-links {
	display: flex;
	gap: 16px;
	font-size: 14px;
}

/* Alineaciones mínimas de bloques */
.alignleft { float: left; margin: 0 24px 12px 0; }
.alignright { float: right; margin: 0 0 12px 24px; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text,
.wp-element-caption { font-size: 13px; color: var(--so-ink-muted); }
