/*
Theme Name: DomoSmart
Description: Tema propio de DomoSmart. Una sola tipografía alojada en el servidor, paisaje animado con ciclo de día y noche, asistente Sol/Luna para encontrar artículos. Sin rastreadores propios.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Author: DomoSmart
License: GPL-2.0-or-later
Text Domain: domosmart
*/
/* ============================================================
   DomoSmart · hoja de estilos única
   Una familia tipográfica (Source Sans Pro, la del tema, alojada en el propio servidor).
   El color de toda la página sigue la hora del paisaje: día → atardecer → noche.
   ============================================================ */
@font-face { font-family: "Source Sans Pro"; src: url(assets/fonts/SourceSansPro-Regular.woff2) format("woff2"), url(assets/fonts/SourceSansPro-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url(assets/fonts/SourceSansPro-Italic.woff2) format("woff2"), url(assets/fonts/SourceSansPro-Italic.ttf) format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url(assets/fonts/SourceSansPro-SemiBold.woff2) format("woff2"), url(assets/fonts/SourceSansPro-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Sans Pro"; src: url(assets/fonts/SourceSansPro-Bold.woff2) format("woff2"), url(assets/fonts/SourceSansPro-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --font: "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* escala tipográfica (1.25) */
  --t-xs: .8125rem; --t-s: .9375rem; --t-m: 1.0625rem; --t-l: 1.3125rem; --t-xl: 1.75rem; --t-2xl: clamp(2rem, 3.4vw, 2.75rem); --t-3xl: clamp(2.5rem, 5.6vw, 4.25rem);
  --sp: 8px;
  --wrap: 1160px; --narrow: 760px;
  --radius: 12px;
  --ease: cubic-bezier(.2,.7,.2,1);

  /* Día */
  --ink: #0f1f33; --ink-2: #44526a; --ink-3: #66748a;
  --surface: rgba(250, 251, 253, .93); --surface-solid: #fafbfd; --raise: rgba(255,255,255,.7);
  --line: rgba(15, 31, 51, .12); --line-2: rgba(15, 31, 51, .2);
  --accent: #315eff; --accent-ink: #2147d6; --on-accent: #fff;
  --cheap: #0f8a5f; --dear: #d9572a; --bar: #b9c8ff;
  --p: 0; --dusk: 0;
}
body.is-night {
  --ink: #eef2f8; --ink-2: #b4c0d3; --ink-3: #8d9ab0;
  --surface-solid: #0a1024; --raise: rgba(255,255,255,.05);
  --line: rgba(255,255,255,.12); --line-2: rgba(255,255,255,.22);
  --accent: #8fa8ff; --accent-ink: #b5c6ff; --on-accent: #0a1024;
  --cheap: #4fd1a1; --dear: #ff8a5c; --bar: #46559a;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font: 400 var(--t-m)/1.65 var(--font); color: var(--ink); background: #bfe3ff; -webkit-font-smoothing: antialiased; transition: color .8s var(--ease); }
h1, h2, h3 { font-family: var(--font); line-height: 1.15; letter-spacing: -.015em; margin: 0; }
h1 { font-size: var(--t-3xl); font-weight: 700; }
h2 { font-size: var(--t-2xl); font-weight: 700; }
h3 { font-size: var(--t-l); font-weight: 600; letter-spacing: -.005em; line-height: 1.3; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: var(--narrow); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; z-index: 50; } .skip:focus { left: 16px; top: 12px; background: var(--surface-solid); padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.kicker { font-size: var(--t-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; transition: color .8s; }
.kicker.an { color: var(--cheap); }
.intro, .lead { font-size: var(--t-l); color: var(--ink-2); line-height: 1.5; max-width: 38em; transition: color .8s; }
.meta { font-size: var(--t-s); color: var(--ink-3); margin: 0; }
.method { font-size: var(--t-xs); color: var(--ink-3); margin: 12px 0 0; }
.note { color: var(--ink-2); }

/* ---------- Botones y enlaces ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 var(--t-m)/1 var(--font); padding: 14px 22px; border-radius: 999px; border: 1.5px solid var(--accent); background: var(--accent); color: var(--on-accent); text-decoration: none; cursor: pointer; transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease); }
.btn:hover { transform: translateY(-1px); background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.arrow-link { font-weight: 600; color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.arrow-link::after { content: "→"; transition: transform .25s var(--ease); }
.arrow-link:hover::after { transform: translateX(4px); }

/* ---------- Cielo y paisaje (fondo fijo) ---------- */
.sky, .scene { position: fixed; inset: 0; width: 100%; height: 100lvh; z-index: -2; pointer-events: none; }
.scene { z-index: -1; }
.sky > div { position: absolute; inset: 0; }
.sky-day { background: linear-gradient(#7cc4ff 0%, #bfe3ff 55%, #eaf6ff 100%); }
.sky-dusk { background: linear-gradient(#3a3f8f 0%, #c7607a 45%, #ffb36b 75%, #ffd9a0 100%); opacity: var(--dusk); }
.sky-night { background: linear-gradient(#050a1f 0%, #0d1a40 55%, #1d2b5c 100%); opacity: clamp(0, calc((var(--p) - .55) * 3), 1); }
.scene .sun { transform: translate(calc(1180px + var(--p) * 120px), calc(140px + var(--p) * 760px)); }
.scene .moon { transform: translate(calc(260px + var(--p) * 140px), calc(820px - var(--p) * 680px)); opacity: clamp(0, calc((var(--p) - .45) * 3), 1); }
.scene .stars { opacity: clamp(0, calc((var(--p) - .5) * 2.5), 1); }
.scene .stars circle { fill: #fff; animation: twinkle var(--tw) ease-in-out var(--td) infinite alternate; }
.scene .cloud { fill: #fff; opacity: calc(.92 - var(--p) * .7); animation: drift var(--dur) linear var(--delay) infinite; }
.scene .hill.h1 { fill: #a9d3a2; } .scene .hill.h2 { fill: #84bd7c; } .scene .hill.h3 { fill: #5f9f5c; }
.scene .tower, .scene .rotor path, .scene .hub { fill: #f7f9fb; }
.scene .t.far { opacity: .8; }
.scene .rotor { animation: spin linear infinite; transform-origin: 0 0; }
.scene .wall { fill: #f3e6d3; } .scene .roof { fill: #c4643f; } .scene .solar { fill: #2b3f6b; }
.scene .win { fill: #6e7f99; }
.scene .night-tint { fill: #0b1433; mix-blend-mode: multiply; opacity: calc(var(--p) * .72); }
.scene .lights .wall, .scene .lights .roof, .scene .lights .solar { display: none; }
.scene .lights .win { fill: #ffd76a; opacity: clamp(0, calc((var(--p) - .5 - var(--o) * .3) * 6), 1); }
.scene .lights { filter: drop-shadow(0 0 3px #ffcf5a); }

/* ---------- Cabecera ---------- */
.site-h { position: sticky; top: 0; z-index: 30; background: var(--surface); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--line); transition: background .8s var(--ease), border-color .8s; }
.bar { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.375rem; letter-spacing: -.02em; text-decoration: none; margin: 0; }
.brand-mark { width: 30px; height: 30px; }
.bm-house { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; transition: stroke .8s; }
.bm-sun { fill: #ffb400; }
.is-night .bm-sun { fill: #e9e6ff; }
.nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav li { position: relative; display: flex; align-items: center; }
.nav ul a { display: block; padding: 8px 12px; font-weight: 600; color: var(--ink-2); text-decoration: none; border-radius: 8px; transition: color .2s, background .2s; position: relative; }
.nav ul a:hover { color: var(--ink); background: var(--raise); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -15px; height: 2px; background: var(--accent); border-radius: 2px; }
.sub-toggle { background: none; border: 0; padding: 6px 4px; margin-left: -8px; cursor: pointer; color: var(--ink-2); }
.sub-toggle svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .25s; }
.sub { position: absolute; top: calc(100% + 14px); left: 0; min-width: 260px; list-style: none; margin: 0; padding: 8px; display: block !important; background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(10,20,45,.14); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s var(--ease), visibility .2s; }
.has-sub:hover .sub, .has-sub:focus-within .sub, .has-sub.open .sub { opacity: 1; visibility: visible; transform: none; }
.has-sub.open .sub-toggle svg, .has-sub:hover .sub-toggle svg { transform: rotate(180deg); }
.sub a { padding: 9px 12px !important; font-weight: 400 !important; }
.nav-cta { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--t-s); padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); text-decoration: none; white-space: nowrap; transition: border-color .2s, background .2s; }
.nav-cta:hover { border-color: var(--accent); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cheap); animation: live 2s infinite; flex: none; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line-2); background: none; border-radius: 10px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle i { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] i:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] i:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] i:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Cabeceras de página (sobre el paisaje) ---------- */
.hero { padding: 96px 0 160px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: end; }
.hero h1 { margin-bottom: 24px; }
.hl { color: var(--accent-ink); position: relative; white-space: nowrap; }
.hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .14em; background: #ffd23f; z-index: -1; border-radius: 2px; transform-origin: left; animation: underline 1s .5s var(--ease) both; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.page-h { padding: 80px 0 120px; }
.page-h h1 { font-size: var(--t-2xl); max-width: 22em; }
.pg-analisis .page-h h1, .pg-guias .page-h h1 { font-size: clamp(2rem, 3vw, 2.5rem); }
.page-h .intro { margin-top: 16px; }
.page-h .meta { margin-top: 16px; }
.crumbs { display: flex; gap: 8px; font-size: var(--t-s); color: var(--ink-2); margin-bottom: 20px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { text-decoration: underline; }

/* ---------- La superficie: el contenido se apoya en un velo continuo, sin tarjetas ---------- */
.surface { position: relative; }
.surface > .band, .surface > article.band { background: var(--surface); backdrop-filter: blur(14px) saturate(1.15); -webkit-backdrop-filter: blur(14px) saturate(1.15); }
.surface::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 120px; background: linear-gradient(to bottom, transparent, var(--surface)); pointer-events: none; }
.band { padding: 88px 0; border-top: 1px solid var(--line); transition: border-color .8s; }
.surface > .band:first-child { border-top: 0; padding-top: 48px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.sub-h { font-size: var(--t-s); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin: 64px 0 16px; }

/* Precio (widget) */
.pw { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: background .8s, border-color .8s; }
.pw-label { display: flex; align-items: center; gap: 8px; font-size: var(--t-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 6px; }
.pw-now { margin: 0 0 18px; color: var(--ink-2); }
.pw-now b { font-size: 3rem; line-height: 1; font-weight: 700; color: var(--ink); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pw-now span { font-size: var(--t-s); color: var(--ink-3); }
.pw-bars { list-style: none; margin: 0; padding: 0; height: 112px; display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; }
.pw-bars li { height: var(--h); min-height: 3px; background: var(--bar); border-radius: 3px 3px 0 0; transform-origin: bottom; animation: grow .7s var(--ease) both; animation-delay: calc(var(--i) * 22ms + .25s); transition: background .8s, opacity .2s; }
.pw-bars li.cheap { background: var(--cheap); } .pw-bars li.dear { background: var(--dear); }
.pw-bars li.now { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 3.5px var(--ink); }
.pw-bars:hover li { opacity: .55; } .pw-bars li:hover { opacity: 1; }
.pw-axis { display: flex; justify-content: space-between; font-size: var(--t-xs); color: var(--ink-3); margin: 8px 0 18px; }
.pw-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 16px; border-top: 1px solid var(--line); }
.pw-stats div { padding: 12px 0 0; }
.pw-stats div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.pw-stats dt { font-size: var(--t-xs); color: var(--ink-3); }
.pw-stats dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.sw { width: 8px; height: 8px; border-radius: 2px; display: inline-block; } .sw.cheap { background: var(--cheap); } .sw.dear { background: var(--dear); }

/* Cifras */
.facts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.fact { padding: 0 32px; } .fact:first-child { padding-left: 0; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact .num { font-size: clamp(2.5rem, 4.5vw, 3.5rem); font-weight: 700; line-height: 1; letter-spacing: -.03em; margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.fact p:last-child { color: var(--ink-2); margin: 0; max-width: 22em; }
.src { font-size: var(--t-xs); color: var(--ink-3); margin-top: 32px; }

/* Listados */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 32px; }
.item { display: flex; flex-direction: column; }
.item-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius); margin-bottom: 18px; background: var(--raise); }
.item-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.item-img img.chart { object-fit: contain; background: #fcfcfb; }
.item:hover .item-img img { transform: scale(1.035); }
.item h3 { margin-bottom: 10px; }
.item h3 a, .an-txt h3 a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease); }
.item:hover h3 a, .an-row:hover h3 a { background-size: 100% 1.5px; }
.item[hidden] { display: none; }

.an-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; padding: 48px 0; border-top: 1px solid var(--line); }
.an-row:first-child { border-top: 0; padding-top: 0; }
.an-feature .an-row { padding-bottom: 64px; }
.an-fig { display: block; border-radius: var(--radius); overflow: hidden; background: #fcfcfb; }
.an-fig img { transition: transform .7s var(--ease); }
.an-row:hover .an-fig img { transform: scale(1.02); }
.an-txt h3 { font-size: var(--t-xl); margin-bottom: 14px; }
.an-txt p:not(.kicker) { color: var(--ink-2); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.split h2 { margin-bottom: 16px; }
.split .lead { margin-bottom: 28px; }
.tool-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tool-links a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 4px; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .3s var(--ease), color .2s; }
.tool-links a::after { content: "→"; color: var(--accent); transition: transform .3s var(--ease); }
.tool-links a:hover { padding-left: 12px; }
.tool-links a:hover::after { transform: translateX(4px); }
.tool-links b { font-size: var(--t-l); font-weight: 600; }
.tool-links span { color: var(--ink-3); margin-left: auto; font-size: var(--t-s); }

.topics { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.topic { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; transition: color .2s, padding .3s var(--ease); }
.topic:nth-child(3n+2), .topic:nth-child(3n+3) { padding-left: 24px; border-left: 1px solid var(--line); }
.topic small { color: var(--ink-3); font-weight: 400; }
.topic:hover { color: var(--accent); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filters button { font: 600 var(--t-s)/1 var(--font); padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); cursor: pointer; transition: all .2s; }
.filters button:hover { color: var(--ink); border-color: var(--ink-3); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface-solid); }
.count { font-size: var(--t-s); color: var(--ink-3); margin-bottom: 32px; }

.checks { padding: 0; list-style: none; margin: 24px 0 0; }
.checks li { padding: 14px 0 14px 32px; border-bottom: 1px solid var(--line); position: relative; color: var(--ink-2); }
.checks li::before { content: ""; position: absolute; left: 4px; top: 22px; width: 12px; height: 7px; border-left: 2px solid var(--cheap); border-bottom: 2px solid var(--cheap); transform: rotate(-45deg); }

/* Calculadoras */
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.tool { padding: 0 48px 0 0; display: flex; flex-direction: column; scroll-margin-top: 100px; }
.tool + .tool { padding: 0 0 0 48px; border-left: 1px solid var(--line); }
.tool h3 { font-size: var(--t-xl); margin-bottom: 8px; }
.tool-desc { color: var(--ink-2); margin-bottom: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-weight: 600; font-size: var(--t-s); }
.field small { font-size: var(--t-xs); color: var(--ink-3); }
.field input, .field textarea { font: inherit; color: var(--ink); background: var(--raise); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; transition: border-color .2s, box-shadow .2s, background .8s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.field input[aria-invalid="true"] { border-color: var(--dear); }
.tool .btn { align-self: flex-start; margin-top: 6px; }
.tool output:not(:empty), .contact output:not(:empty) { display: block; margin-top: 20px; padding: 16px 0 0; border-top: 2px solid var(--cheap); font-size: var(--t-l); animation: rise .4s var(--ease) both; }
.tool output.err { border-top-color: var(--dear); font-size: var(--t-m); }
.tool output b { font-weight: 700; }

.price-split { grid-template-columns: 1fr 1.1fr; }
.tbl-wrap { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: var(--t-s); }
.ptable caption { text-align: left; font-weight: 600; padding-bottom: 12px; color: var(--ink-2); }
.ptable th, .ptable td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.ptable td:last-child { width: 55%; }
.tbar { display: inline-block; height: 8px; min-width: 2px; border-radius: 0 3px 3px 0; background: var(--bar); vertical-align: middle; margin-right: 10px; }
.ptable tr.cheap .tbar { background: var(--cheap); } .ptable tr.dear .tbar { background: var(--dear); }
.ptable .tag { font-size: var(--t-xs); font-weight: 600; color: var(--ink-2); }

/* Artículo */
.prose { font-size: 1.125rem; line-height: 1.75; }
.prose h2 { font-size: var(--t-xl); margin: 2.2em 0 .7em; scroll-margin-top: 100px; }
.prose h3 { margin: 1.8em 0 .6em; }
.prose a { color: var(--accent-ink); }
.prose ul, .prose ol { padding-left: 1.3em; } .prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--t-s); margin: 1.5em 0; font-variant-numeric: tabular-nums; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose thead th, .prose tr:first-child th { font-weight: 700; border-bottom: 2px solid var(--line-2); }
.prose figure { margin: 2em 0; }
.prose .wp-block-table { margin: 0; }
.prose blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 3px solid var(--accent); color: var(--ink-2); }
.prose [class*="toc"], .prose .ez-toc-container, .prose nav { background: var(--raise); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; font-size: var(--t-s); }
.post-hero { margin: 0 0 2em; border-radius: var(--radius); overflow: hidden; }
.chart-fig img { border-radius: var(--radius); background: #fcfcfb; }
.chart-fig figcaption { font-size: var(--t-xs); color: var(--ink-3); margin-top: 10px; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.prevnext a { text-decoration: none; font-weight: 600; display: flex; flex-direction: column; gap: 4px; }
.prevnext small { color: var(--ink-3); font-weight: 400; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .08em; }
.prevnext .next { text-align: right; }
.prevnext a:hover { color: var(--accent); }
.contact .field { margin-bottom: 22px; }

/* ---------- Pie ---------- */
.site-f { background: var(--surface-solid); border-top: 1px solid var(--line); padding: 72px 0 32px; transition: background .8s; position: relative; }
.f-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1fr; gap: 40px; }
.f-brand p:last-child { color: var(--ink-2); max-width: 26em; margin-top: 14px; }
.site-f h2 { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 14px; }
.site-f ul { list-style: none; margin: 0; padding: 0; }
.site-f li { margin-bottom: 10px; }
.site-f ul a { text-decoration: none; color: var(--ink-2); } .site-f ul a:hover { color: var(--ink); text-decoration: underline; }
.f-legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: var(--t-s); color: var(--ink-3); }
.f-legal p { margin: 0; }

/* ---------- Sol ---------- */
.sol { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; font-family: var(--font); }
.sol-btn { width: 68px; height: 68px; border: 0; padding: 0; background: none; cursor: pointer; animation: bob 3.4s ease-in-out infinite; filter: drop-shadow(0 6px 14px rgba(255,170,0,.4)); transition: transform .25s var(--ease); }
.sol-btn:hover { transform: scale(1.08) rotate(-6deg); }
.sol-face { width: 100%; height: 100%; overflow: visible; }
.sol-rays rect { fill: #ffb400; }
.sol-rays { animation: spin 18s linear infinite; transform-origin: 0 0; }
.sol-disc { fill: #ffd23f; stroke: #ffb400; stroke-width: 3; }
.sol-eyes ellipse { fill: #3b2a12; }
.sol-eyes { animation: blink 5s infinite; transform-origin: 0 -6px; }
.sol-cheek { fill: #ff8a5b; opacity: .55; }
.sol-smile { fill: none; stroke: #3b2a12; stroke-width: 3; stroke-linecap: round; }
.sol-moon { display: none; }
.moon-disc { fill: #e9e6ff; stroke: #b9b2f0; stroke-width: 2; }
.moon-eye { fill: none; stroke: #2b2552; stroke-width: 3; stroke-linecap: round; }
.zz { font: 700 14px var(--font); fill: #e9e6ff; animation: zz 2.4s ease-in-out infinite; }
.zz.z2 { animation-delay: 1.2s; font-size: 11px; }
.is-night .sol-sun { display: none; } .is-night .sol-moon { display: inline; }
.is-night .sol-btn { filter: drop-shadow(0 6px 16px rgba(160,150,255,.45)); }
.sol-tip { margin: 0; background: var(--surface-solid); color: var(--ink); border: 1px solid var(--line); font-weight: 600; font-size: var(--t-s); padding: 10px 14px; border-radius: 14px 14px 4px 14px; box-shadow: 0 10px 30px rgba(10,20,45,.15); animation: pop .45s cubic-bezier(.2,1.4,.4,1) both; }
.sol-panel { width: min(380px, calc(100vw - 32px)); max-height: min(560px, 75vh); display: flex; flex-direction: column; background: var(--surface-solid); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(10,20,45,.25); overflow: hidden; transform-origin: bottom right; animation: pop .35s cubic-bezier(.2,1.3,.4,1) both; transition: background .8s; }
.sol-panel[hidden], .sol-tip[hidden] { display: none; }
.sol-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); }
.sol-mini { width: 40px; height: 40px; flex: none; }
.sol-head h2 { font-size: var(--t-m); margin: 0; letter-spacing: 0; }
.sol-head p { margin: 0; font-size: var(--t-s); color: var(--ink-2); }
.sol-close { margin-left: auto; border: 1px solid var(--line); background: none; color: var(--ink); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }
.sol-log { padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.msg { margin: 0; padding: 10px 13px; border-radius: 14px; max-width: 92%; font-size: var(--t-s); line-height: 1.45; animation: rise .3s both; }
.msg.bot { background: var(--raise); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.user { background: var(--accent); color: var(--on-accent); margin-left: auto; border-bottom-right-radius: 4px; }
.res { display: block; text-decoration: none; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 6px; transition: border-color .2s, transform .25s var(--ease); animation: rise .35s both; }
.res:hover { border-color: var(--accent); transform: translateX(3px); }
.res b { display: block; font-size: var(--t-s); line-height: 1.3; font-weight: 600; }
.res span { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.res.an span { color: var(--cheap); }
.typing { display: inline-flex; gap: 4px; } .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: dots 1s infinite; } .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.sol-chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 10px; }
.sol.asked .sol-chips { flex-wrap: nowrap; overflow-x: auto; }
.sol-chips button { flex: none; font: 600 var(--t-xs)/1.2 var(--font); border: 1px solid var(--line-2); background: none; color: var(--ink); border-radius: 999px; padding: 7px 11px; cursor: pointer; transition: border-color .2s; }
.sol-chips button:hover { border-color: var(--accent); }
.sol-form { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.sol-form input { flex: 1; min-width: 0; font: inherit; font-size: var(--t-s); color: var(--ink); background: var(--raise); padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 999px; }
.sol-form button { width: 42px; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 18px; cursor: pointer; }
.sol-note { margin: 0; padding: 0 14px 12px; font-size: 11.5px; color: var(--ink-3); }

/* ---------- Movimiento ---------- */
.reveal { animation: rise .8s var(--ease) both; animation-delay: calc(var(--d, 0) * 90ms); }
@supports (animation-timeline: view()) {
  .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 5% cover 25%; animation-delay: 0s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { from { transform: translateX(-1600px); } to { transform: translateX(1700px); } }
@keyframes twinkle { from { opacity: .3; } to { opacity: 1; } }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--cheap) 50%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
@keyframes underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes blink { 0%,92%,100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes pop { from { opacity: 0; transform: scale(.6) translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes zz { 0% { opacity: 0; transform: translate(0,4px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translate(6px,-8px); } }
@keyframes dots { 0%,100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001s !important; }
  .reveal { animation: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .nav-cta { display: none; }
}
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav { position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 24px; background: var(--surface-solid); border-bottom: 1px solid var(--line); max-height: calc(100vh - 72px); overflow-y: auto; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s var(--ease), visibility .25s; }
  .nav.open { opacity: 1; transform: none; visibility: visible; }
  .nav ul { flex-direction: column; }
  .nav li { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .nav ul a { padding: 16px 0; font-size: var(--t-l); flex: 1; }
  .nav a[aria-current="page"]::after { left: -24px; right: auto; top: 18px; bottom: 18px; width: 3px; height: auto; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 12px 12px; display: none !important; width: 100%; background: none; }
  .has-sub.open .sub { display: block !important; }
  .has-sub:hover .sub-toggle svg { transform: none; } .has-sub.open .sub-toggle svg { transform: rotate(180deg); }
  .sub-toggle { padding: 16px 8px; } .sub-toggle svg { width: 16px; height: 16px; }
  .nav-cta { display: inline-flex; margin-top: 20px; align-self: flex-start; }
  .hero-grid, .split, .an-row, .tools, .price-split { grid-template-columns: 1fr; gap: 40px; }
  .tool, .tool + .tool { padding: 0; border-left: 0; }
  .tool + .tool { padding-top: 48px; border-top: 1px solid var(--line); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .f-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 56px 0 120px; }
  .topics { grid-template-columns: 1fr 1fr; }
  .topic:nth-child(n) { padding-left: 4px; border-left: 0; }
  .topic:nth-child(2n) { padding-left: 20px; border-left: 1px solid var(--line); }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 16px; }
  .grid-3, .facts-grid, .topics { grid-template-columns: 1fr; }
  .fact, .fact:first-child { padding: 24px 0; } .fact + .fact { border-left: 0; border-top: 1px solid var(--line); }
  .topic:nth-child(n) { padding-left: 4px; border-left: 0; }
  .band { padding: 64px 0; }
  .page-h { padding: 48px 0 96px; }
  .pw-now b { font-size: 2.5rem; }
  .pw-stats { font-size: var(--t-s); }
  .prevnext { grid-template-columns: 1fr; } .prevnext .next { text-align: left; }
  .f-grid { grid-template-columns: 1fr; }
  .sol { right: 14px; bottom: 14px; } .sol-btn { width: 58px; height: 58px; }
  .tool-links span { display: none; }
}
.menu-open .sol { display: none; }

/* Ventanas al paisaje entre secciones */
.vista { height: 46vh; min-height: 260px; position: relative; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 28px;
  background: linear-gradient(var(--surface), transparent 28%, transparent 72%, var(--surface)); }
.vista p { margin: 0; font-size: var(--t-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.35); opacity: .9; }
.surface > .vista + .band { border-top: 0; }
/* el pie también deja ver la noche */
.site-f { background: var(--surface); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.is-night .site-f { background: rgba(6, 10, 26, .82); }
.sub, .sol-panel, .sol-tip { background: var(--surface-solid); }
/* Sol se aparta de los anuncios fijos */
.sol { bottom: calc(24px + var(--ad-bottom, 0px)); right: calc(24px + var(--ad-right, 0px)); }
@media (max-width: 600px) { .sol { bottom: calc(14px + var(--ad-bottom, 0px)); right: calc(14px + var(--ad-right, 0px)); } }
/* Rendimiento */
.scene-paused .scene *, .scene-paused .sol-rays { animation-play-state: paused !important; }
.scene .rotor, .scene .cloud { will-change: transform; }
@media (max-width: 900px), (hover: none) {
  .site-h, .surface > .band, .surface > article.band, .pw, .site-f { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .scene .lights { filter: none; }
  .scene .stars circle:nth-child(2n) { display: none; }
}
/* Lectura estable: el bloque del artículo no cambia de color con el scroll */
body[data-read="day"] .surface > .reading {
  --ink: #0f1f33; --ink-2: #44526a; --ink-3: #66748a; --line: rgba(15,31,51,.12); --line-2: rgba(15,31,51,.2);
  --accent: #315eff; --accent-ink: #2147d6; --raise: rgba(255,255,255,.7); --cheap: #0f8a5f; --dear: #d9572a;
  background: rgba(250, 251, 253, .96); color: var(--ink);
}
body[data-read="night"] .surface > .reading {
  --ink: #eef2f8; --ink-2: #b4c0d3; --ink-3: #8d9ab0; --line: rgba(255,255,255,.12); --line-2: rgba(255,255,255,.22);
  --accent: #8fa8ff; --accent-ink: #b5c6ff; --raise: rgba(255,255,255,.05); --cheap: #4fd1a1; --dear: #ff8a5c;
  background: rgba(10, 16, 36, .95); color: var(--ink);
}
.surface > .reading { transition: none; }

/* ---------- Integración con WordPress ---------- */
.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; width: 1px; word-wrap: normal !important; }
.prose .wp-block-image { margin: 2em 0; }
.prose .wp-block-image img { border-radius: var(--radius); background: #fcfcfb; }
.prose figcaption, .prose .wp-element-caption { font-size: var(--t-xs); color: var(--ink-3); margin-top: 10px; text-align: left; }
.prose .alignwide { margin-left: -80px; margin-right: -80px; max-width: calc(100% + 160px); }
.prose .aligncenter { margin-left: auto; margin-right: auto; }
.prose .wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose pre, .prose code { font-size: .9em; background: var(--raise); border-radius: 6px; padding: .1em .35em; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 56px; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); text-decoration: none; font-weight: 600; }
.pagination .current { background: var(--ink); color: var(--surface-solid); border-color: var(--ink); }
.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form input[type=search] { flex: 1; font: inherit; color: var(--ink); background: var(--raise); border: 1px solid var(--line-2); border-radius: 999px; padding: 12px 18px; }
/* Calculadoras del plugin dentro del tema */
.prose .dsc-calc fieldset { border-color: var(--line-2); }
.prose .dsc-precios h3 { font-size: var(--t-l); }
@media (max-width: 900px) { .prose .alignwide { margin-left: 0; margin-right: 0; max-width: 100%; } }
.prose .dsc-table { display: table; width: 100%; margin: 0; }
.prose .dsc-table-wrap { margin: 1em 0 1.5em; }
.prose .dsc-bar { background: var(--bar); } .prose .dsc-cheap .dsc-bar { background: var(--cheap); } .prose .dsc-dear .dsc-bar { background: var(--dear); }

/* ===========================================================
   Rendimiento (14/10/2026): mismo aspecto, mucho menos trabajo para el ordenador
   =========================================================== */
/* 1) Estrellas: dos grupos que titilan alternándose, no 90 animaciones */
.scene .stars circle { animation: none; fill: #fff; }
.scene .stars .tw1 { animation: twinkle 3.2s ease-in-out infinite alternate; }
.scene .stars .tw2 { animation: twinkle 4.1s ease-in-out -2s infinite alternate; }
/* 2) Molinos y nubes: se redibujan ~15 veces por segundo en vez de 60 (giran despacio, no se nota) */
.scene .rotor { animation-name: spin3; animation-timing-function: steps(30); }
@keyframes spin3 { to { transform: rotate(120deg); } }
.scene .cloud { animation-timing-function: steps(1400); }
/* 3) Sin desenfoque de cristal: es lo más costoso con un fondo animado detrás */
.site-h, .surface > .band, .surface > article.band, .pw, .site-f { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.site-h { background: color-mix(in srgb, var(--surface-solid) 94%, transparent); }
/* 4) Noche sin modo de fusión ni halo */
.scene .night-tint { mix-blend-mode: normal; fill: #0a1230; opacity: calc(var(--p) * .55); }
.scene .lights { filter: none; }
/* 5) Sin transiciones de fondo que se reinician en cada fotograma de scroll */
.site-h, .surface, .surface > .band, .site-f, .pw { transition: none; }
/* 6) Sin actividad durante 8 s: todo lo decorativo se queda quieto (vuelve al mover el ratón o hacer scroll) */
.scene-idle .scene *, .scene-idle .scene, .scene-idle .sol *, .scene-idle .sol-btn, .scene-idle .live-dot { animation-play-state: paused !important; }

/* ===========================================================
   Palas y nubes en capas propias (15/10/2026): 60 fps fluidos sin redibujar el paisaje
   =========================================================== */
.scene-fx { position: fixed; inset: 0; height: 100lvh; z-index: -1; pointer-events: none; overflow: hidden; --k: 1; --ox: 0; --oy: 0; }
.fx-rotor, .fx-cloud { position: absolute; will-change: transform; }
.fx-rotor svg, .fx-cloud svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fx-rotor {
  left: calc((var(--ox) + (var(--x) - var(--r)) * var(--k)) * 1px);
  top: calc((var(--oy) + (var(--y) - var(--r)) * var(--k)) * 1px);
  width: calc(var(--r) * 2 * var(--k) * 1px); height: calc(var(--r) * 2 * var(--k) * 1px);
  fill: #f7f9fb; animation: spin var(--dur) linear infinite;
  filter: brightness(calc(1 - var(--p) * .55));
}
.fx-rotor.far { opacity: .8; }
.fx-cloud {
  left: calc((var(--ox) + var(--x) * var(--k) - 110 * var(--s) * var(--k)) * 1px);
  top: calc((var(--oy) + var(--y) * var(--k) - 46 * var(--s) * var(--k)) * 1px);
  width: calc(220 * var(--s) * var(--k) * 1px); height: calc(80 * var(--s) * var(--k) * 1px);
  fill: #fff; opacity: calc(.92 - var(--p) * .7);
  animation: drift2 var(--dur) linear var(--delay) infinite;
}
@keyframes drift2 { from { transform: translateX(calc(-1600px * var(--k))); } to { transform: translateX(calc(1700px * var(--k))); } }
.scene-paused .scene-fx *, .scene-idle .scene-fx * { animation-play-state: paused !important; }

/* ===========================================================
   Rendimiento II (15/10/2026): mismos efectos, hechos por la tarjeta gráfica
   =========================================================== */
/* Puntos «en directo»: latido con un anillo que escala (sin animar sombras) */
.live-dot { position: relative; animation: none !important; box-shadow: none; }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--cheap); animation: ping 2s ease-out infinite; will-change: transform, opacity; }
@keyframes ping { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
/* Sol: halo fijo en lugar de sombra recalculada; rayos giran al pasar el ratón */
.sol-btn { filter: none !important; position: relative; will-change: transform; }
.sol-btn::before { content: ""; position: absolute; inset: -14%; border-radius: 50%; background: radial-gradient(circle, rgba(255,190,40,.38), rgba(255,190,40,0) 68%); z-index: -1; }
.is-night .sol-btn::before { background: radial-gradient(circle, rgba(170,160,255,.4), rgba(170,160,255,0) 68%); }
.sol-rays { animation: none; }
.sol-btn:hover .sol-rays, .sol-btn:focus-visible .sol-rays { animation: spin 6s linear infinite; }
/* Estrellas: solo titilan de noche, que es cuando se ven */
body:not(.is-night) .scene .stars g { animation: none !important; }
.scene-idle .live-dot::after { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .live-dot::after { animation: none; } }
