/*
Theme Name: Resultado Neto 2C
Theme URI: https://resultadoneto.com/
Author: Resultado Neto
Description: Tema editorial oscuro "Carbón y ámbar" para Resultado Neto: portada tipo revista, artículos con índice, calculadora de fondo de emergencia y diseño responsive.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: resultado-neto-2c
*/

:root {
  --bg: #131211;
  --card: #1E1C1A;
  --rule: #35322E;
  --text: #F4F0EA;
  --muted: #ABA59B;
  --placeholder: #5C574F;
  --accent: #FF8F3F;
  --on-accent: #131211;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); margin: 0; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; left: 16px; top: 16px; z-index: 100; width: auto; height: auto;
  clip: auto; background: var(--accent); color: var(--on-accent); padding: 12px 18px; font-weight: 700;
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Cabecera ---------- */
.topstrip {
  display: flex; justify-content: space-between; gap: 16px; padding: 20px 0;
  font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--rule);
  letter-spacing: .04em; text-transform: uppercase;
}
.topstrip a { color: var(--accent); font-weight: 700; }
.masthead { text-align: center; padding: 48px 0 28px; }
.masthead .brand {
  font-family: var(--serif); font-size: 96px; font-weight: 800;
  letter-spacing: -.03em; line-height: 1; display: inline-block;
}
.brand em { font-style: italic; font-weight: 400; color: var(--accent); }
.masthead .tagline {
  font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--muted); margin: 12px 0 0;
}
.mainnav { border-top: 2px solid var(--text); border-bottom: 1px solid var(--rule); }
.mainnav ul {
  list-style: none; margin: 0; padding: 18px 0; display: flex; justify-content: center; gap: 44px; flex-wrap: wrap;
  font-size: 15px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase;
}
.mainnav .current-menu-item > a, .mainnav .current-cat > a, .mainnav a.is-accent { color: var(--accent); }
.mobilebar { display: none; }
.nav-toggle {
  width: 44px; height: 44px; background: none; border: 1px solid var(--rule); color: var(--text);
  display: flex; flex-direction: column; gap: 5px; align-items: center; justify-content: center; padding: 0;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); }
.nav-toggle span:last-child { width: 14px; background: var(--accent); }

/* ---------- Portada ---------- */
.home-hero {
  display: grid; grid-template-columns: 2fr 1fr; gap: 48px; padding: 48px 0;
  border-bottom: 1px solid var(--rule);
}
.feature { display: flex; flex-direction: column; gap: 22px; }
.feature-visual {
  aspect-ratio: 16 / 10; background: var(--card); border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.feature-visual img { width: 100%; height: 100%; object-fit: cover; }
.feature-visual .big {
  font-family: var(--serif); font-size: 320px; font-weight: 800; color: var(--accent);
  line-height: 1; letter-spacing: -.05em;
}
.feature-visual .big-label {
  position: absolute; bottom: 24px; left: 28px; font-family: var(--serif); font-style: italic; font-size: 26px;
}
.kicker {
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700;
}
.feature h2 { font-size: 50px; font-weight: 600; line-height: 1.08; letter-spacing: -.02em; }
.feature p { margin: 0; font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 720px; }

.latest h2 {
  font-size: 26px; font-weight: 600; padding-bottom: 16px; border-bottom: 2px solid var(--text);
}
.latest ol { list-style: none; margin: 0; padding: 0; }
.latest li { border-bottom: 1px solid var(--rule); }
.latest li:last-child { border-bottom: 0; }
.latest a { display: flex; gap: 18px; padding: 22px 0; font-size: 18px; line-height: 1.35; font-weight: 500; }
.latest .num {
  font-family: var(--serif); font-size: 40px; font-style: italic; color: var(--accent); line-height: 1; min-width: 26px;
}

.section-head {
  padding: 48px 0 16px; display: flex; justify-content: space-between; align-items: baseline;
}
.section-head h2 { font-size: 40px; font-weight: 600; letter-spacing: -.02em; }
.section-head a { font-size: 15px; color: var(--accent); font-weight: 700; }
.cols3 {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding-bottom: 48px;
  border-bottom: 1px solid var(--rule);
}
.cols3 > .card {
  padding: 0; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden;
  background: var(--card); display: flex; flex-direction: column;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.cols3 > .card:hover {
  transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 12px 28px rgba(0,0,0,0.4);
}
.card-media {
  aspect-ratio: 16 / 9; background: #0c0b0a; overflow: hidden; border-bottom: 1px solid var(--rule);
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease;
}
.cols3 > .card:hover .card-media img {
  transform: scale(1.04);
}
.card-media--empty {
  display: flex; align-items: center; justify-content: center; background: #181615;
}
.card-media-ph {
  font-family: var(--serif); font-size: 16px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
}
.card-body {
  padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1;
}
.card h3 {
  font-size: 21px; font-weight: 600; line-height: 1.25; margin: 0; transition: color .2s ease;
}
.cols3 > .card:hover h3 {
  color: var(--accent);
}
.card p {
  margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted);
}
.card-meta {
  margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--muted); border-top: 1px solid rgba(255,255,255,0.06);
}
.card-arrow {
  color: var(--accent); font-weight: 700;
}

/* ---------- Banner Calculadora ---------- */
.calc-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  background: linear-gradient(135deg, #1C1A18 0%, #26221E 100%);
  border: 1px solid var(--rule); border-left: 5px solid var(--accent);
  border-radius: 10px; padding: 32px 36px; margin: 48px 0; box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.calc-badge {
  display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); margin-bottom: 8px;
}
.calc-banner h3 {
  font-family: var(--serif); font-size: 26px; margin: 0 0 8px 0; color: var(--text);
}
.calc-banner p {
  color: var(--muted); font-size: 16px; margin: 0; max-width: 62ch; line-height: 1.5;
}
.btn-calc {
  display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: 15px; padding: 14px 24px; border-radius: 6px; text-decoration: none;
  white-space: nowrap; transition: opacity .15s ease, transform .15s ease;
}
.btn-calc:hover {
  opacity: .92; transform: translateY(-2px); color: var(--on-accent);
}

/* ---------- Boletín ---------- */
.newsletter {
  margin: 48px 0; background: var(--accent); color: var(--on-accent); padding: 48px 56px;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center;
}
.newsletter h2 { font-size: 44px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.newsletter p { margin: 12px 0 0; font-size: 18px; line-height: 1.5; }
.newsletter form { display: flex; }
.newsletter input[type=email] {
  flex-grow: 1; min-width: 0; border: 0; background: var(--text); color: var(--bg); padding: 18px 20px; font-size: 17px;
  font-family: var(--sans);
}
.newsletter input::placeholder { color: var(--placeholder); }
.newsletter button {
  border: 0; background: var(--bg); color: var(--text); padding: 18px 28px; font-size: 17px; font-weight: 700;
}
.newsletter .nl-embed input[type=email], .newsletter .nl-embed input[type=text] { width: 100%; }
.newsletter .nl-note { font-size: 14px; }

/* ---------- Artículo ---------- */
.crumbs { display: flex; gap: 10px; padding: 22px 0; font-size: 14px; color: var(--muted); }
.crumbs .cur { color: var(--accent); font-weight: 700; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 72px; padding-bottom: 64px; }
.article-head { display: flex; flex-direction: column; gap: 26px; }
.article-head h1 { font-size: 64px; font-weight: 800; line-height: 1.04; letter-spacing: -.03em; }
.article-head .dek {
  margin: 0; font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.45; color: var(--muted);
}
.byline {
  display: flex; gap: 18px; font-size: 14px; color: var(--muted); padding: 16px 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.byline strong { color: var(--text); }
.article-cover { margin: 8px 0 0; }
.article-cover img { width: 100%; height: auto; display: block; border: 1px solid var(--rule); }
.numeral-cover {
  height: 400px; background: var(--card); border: 1px solid var(--rule); display: flex; align-items: center;
  justify-content: center; margin-top: 8px; font-family: var(--serif); font-size: 240px; font-weight: 800;
  color: var(--accent); letter-spacing: -.05em; line-height: 1;
}

.entry-content { font-size: 20px; line-height: 1.7; margin-top: 8px; }
.entry-content > * { margin: 0 0 22px; }
.entry-content h2 {
  font-size: 38px; font-weight: 600; line-height: 1.15; letter-spacing: -.02em; margin: 40px 0 18px; scroll-margin-top: 24px;
}
.entry-content h3 { font-size: 28px; font-weight: 600; line-height: 1.2; margin: 32px 0 14px; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content strong { font-weight: 700; }
.entry-content ul, .entry-content ol { padding-left: 0; list-style: none; font-size: 19px; line-height: 1.6; }
.entry-content li { position: relative; padding-left: 40px; margin-bottom: 14px; }
.entry-content ul li::before {
  content: '\2192'; position: absolute; left: 0; color: var(--accent); font-weight: 800;
}
.entry-content ol { counter-reset: rn; }
.entry-content ol li { counter-increment: rn; }
.entry-content ol li::before {
  content: counter(rn); position: absolute; left: 0; top: -4px; font-family: var(--serif); font-style: italic;
  font-size: 30px; color: var(--accent); line-height: 1.2;
}
.entry-content figure { margin: 28px 0; }
.entry-content figure img { width: 100%; border: 1px solid var(--rule); }
.entry-content figcaption { font-size: 14px; color: var(--muted); font-style: italic; margin-top: 10px; }
.entry-content table {
  width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--rule); font-size: 16px;
}
.entry-content th { background: var(--accent); color: var(--on-accent); text-align: left; padding: 14px 20px; font-weight: 700; }
.entry-content td { padding: 16px 20px; border-bottom: 1px solid var(--rule); }
.entry-content tr:last-child td { border-bottom: 0; }
.entry-content blockquote {
  margin: 28px 0; padding: 4px 0 4px 26px; border-left: 3px solid var(--accent);
  font-family: var(--serif); font-style: italic; font-size: 26px; line-height: 1.4;
}
.entry-content hr { border: 0; border-top: 1px solid var(--rule); margin: 40px 0; }
.entry-content .is-style-callout, .entry-content .callout {
  padding: 22px 26px; border-left: 3px solid var(--rule); font-size: 14px; line-height: 1.6; color: var(--muted);
}
.entry-content .wp-block-image.alignwide, .alignwide { max-width: 100%; }

.aside { display: flex; flex-direction: column; gap: 32px; align-self: start; position: sticky; top: 24px; }
.box { border: 1px solid var(--rule); background: var(--card); padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.box h2 { font-size: 22px; font-weight: 600; }
.box a { font-size: 15px; line-height: 1.4; color: var(--muted); }
.box a:hover { color: var(--accent); }
.cta-box { background: var(--accent); color: var(--on-accent); padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.cta-box h2 { font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.cta-box p { margin: 0; font-size: 15px; line-height: 1.5; }
.cta-box .btn { background: var(--bg); color: var(--text); padding: 14px 18px; font-weight: 700; font-size: 15px; text-align: center; }
.cta-box .btn:hover { color: var(--accent); }
.more h2 { font-size: 22px; font-weight: 600; padding-bottom: 14px; border-bottom: 2px solid var(--text); }
.more a { display: block; padding: 18px 0; border-bottom: 1px solid var(--rule); font-size: 17px; line-height: 1.35; font-weight: 500; }
.more a:last-child { border-bottom: 0; }

/* ---------- Páginas, archivos ---------- */
.page-head { padding: 56px 0 32px; display: flex; flex-direction: column; gap: 16px; }
.page-head h1 { font-size: 64px; font-weight: 800; line-height: 1.04; letter-spacing: -.03em; }
.page-head p { margin: 0; font-size: 20px; line-height: 1.55; color: var(--muted); max-width: 720px; }
.page-body { max-width: 820px; padding-bottom: 64px; }
.archive-list { border-top: 1px solid var(--rule); margin-bottom: 48px; }
.archive-item {
  display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; padding: 28px 0; align-items: start; border-bottom: 1px solid var(--rule);
}
.archive-item h2 { font-size: 30px; font-weight: 600; line-height: 1.15; letter-spacing: -.02em; margin: 10px 0; }
.archive-item p { margin: 0; color: var(--muted); font-size: 16px; }
.archive-item .thumb { display: block; aspect-ratio: 3 / 2; height: auto; background: var(--card); border: 1px solid var(--rule); overflow: hidden; }
.archive-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pagination { display: flex; gap: 12px; padding-bottom: 48px; font-weight: 700; }
.pagination .page-numbers { padding: 10px 16px; border: 1px solid var(--rule); min-width: 44px; text-align: center; }
.pagination .current { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.search-form { display: flex; max-width: 520px; }
.search-form input[type=search] {
  flex-grow: 1; padding: 16px 18px; background: var(--card); border: 1px solid var(--rule); color: var(--text); font-size: 17px;
}
.search-form button { padding: 16px 22px; background: var(--accent); border: 0; color: var(--on-accent); font-weight: 700; }

/* ---------- Calculadora ---------- */
.calc { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); }
.calc-inputs { padding: 44px; display: flex; flex-direction: column; gap: 36px; background: var(--card); }
.calc-group { display: flex; flex-direction: column; gap: 14px; }
.calc-group h2 { font-size: 26px; font-weight: 600; }
.calc-group .hint { font-size: 15px; color: var(--muted); }
.chips { display: flex; gap: 12px; }
.chip {
  flex: 1 1 0; padding: 18px 10px; font-size: 20px; font-weight: 700; background: var(--bg); color: var(--text);
  border: 1px solid var(--rule); min-height: 44px;
}
.chip[aria-pressed=true] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.calc-custom { display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--muted); }
.calc-custom input {
  padding: 16px 18px; background: var(--bg); border: 1px solid var(--rule); color: var(--text); font-size: 20px;
  font-family: var(--sans); max-width: 260px;
}
.calc-result {
  padding: 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  background: var(--accent); color: var(--on-accent);
}
.calc-result .label { font-size: 15px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.calc-result .total {
  font-family: var(--serif); font-size: 120px; font-weight: 800; letter-spacing: -.05em; line-height: 1; word-break: break-all;
}
.calc-result .sum { display: flex; flex-direction: column; gap: 10px; border-top: 2px solid var(--on-accent); padding-top: 20px; font-size: 18px; }
.calc-result .sum strong { font-weight: 700; }
.calc-note { font-size: 14px; color: var(--muted); margin-top: 16px; }

/* ---------- Pie ---------- */
.site-footer {
  margin-top: 32px; padding: 32px 0; border-top: 2px solid var(--text);
  display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted);
}
.site-footer .brand { font-family: var(--serif); font-size: 20px; color: var(--text); font-weight: 800; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  :root { --gutter: 32px; }
  .masthead .brand { font-size: 72px; }
  .feature-visual .big { font-size: 240px; }
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .aside { position: static; }
}
@media (max-width: 860px) {
  :root { --gutter: 20px; }
  body { font-size: 17px; }
  .topstrip, .masthead .tagline { display: none; }
  .masthead { display: none; }
  .mobilebar {
    display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 2px solid var(--text);
    min-height: 44px;
  }
  .mobilebar .brand { font-family: var(--serif); font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
  .mainnav { border-top: 0; display: none; }
  .mainnav.is-open { display: block; }
  .mainnav ul { flex-direction: column; gap: 0; padding: 8px 0; align-items: stretch; }
  .mainnav li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--rule); min-height: 44px; }
  .home-hero { grid-template-columns: 1fr; gap: 32px; padding: 28px 0; }
  .feature-visual { aspect-ratio: 16 / 10; }
  .feature-visual .big { font-size: 170px; }
  .feature-visual .big-label { font-size: 18px; bottom: 12px; left: 16px; }
  .feature h2 { font-size: 32px; }
  .feature p { font-size: 16px; }
  .latest a { padding: 18px 0; font-size: 17px; }
  .latest .num { font-size: 34px; }
  .section-head { padding-top: 32px; }
  .section-head h2 { font-size: 30px; }
  .cols3 { grid-template-columns: 1fr; gap: 20px; padding-bottom: 24px; }
  .cols3 > .card { padding: 0; }
  .card h3 { font-size: 20px; }
  .calc-banner { flex-direction: column; align-items: flex-start; gap: 20px; padding: 24px 20px; }
  .btn-calc { width: 100%; justify-content: center; }
  .newsletter { grid-template-columns: 1fr; padding: 28px 22px; gap: 20px; margin: 32px 0; }
  .newsletter h2 { font-size: 32px; }
  .newsletter form { flex-direction: column; gap: 0; }
  .newsletter button { min-height: 48px; }
  .article-head h1, .page-head h1 { font-size: 40px; }
  .article-head .dek { font-size: 20px; }
  .numeral-cover { height: 240px; font-size: 150px; }
  .entry-content { font-size: 18px; }
  .entry-content h2 { font-size: 30px; }
  .entry-content table { display: block; overflow-x: auto; }
  .archive-item { grid-template-columns: 1fr; }
  .archive-item .thumb { order: -1; }
  .calc { grid-template-columns: 1fr; }
  .calc-inputs, .calc-result { padding: 28px 22px; }
  .calc-result .total { font-size: 76px; }
  .chips { flex-wrap: wrap; }
  .chip { flex-basis: 40%; }
  .site-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 0 0 40px; font-size: 14px; color: var(--muted); }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: var(--accent); }
