/* Tipografía: carga ligera; si falla la red, el sistema cubre el blog */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,600;0,9..144,700;1,9..144,600&family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&display=swap");

:root {
  --bg: #f4f1eb;
  --bg-pattern: radial-gradient(ellipse 120% 80% at 10% -20%, rgba(109, 40, 217, 0.08), transparent 50%),
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(217, 119, 6, 0.06), transparent 45%);
  --surface: #ffffff;
  --surface-elevated: #fffefb;
  --text: #1c1917;
  --text-soft: #44403c;
  --muted: #78716c;
  --accent: #6d28d9;
  --accent-hover: #5b21b6;
  --accent-soft: rgba(109, 40, 217, 0.12);
  --accent-border: rgba(109, 40, 217, 0.35);
  --border: #e7e5e0;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.06);
  --shadow-md: 0 4px 14px rgba(28, 25, 23, 0.08);
  --shadow-card: 0 2px 8px rgba(28, 25, 23, 0.06), 0 8px 24px rgba(28, 25, 23, 0.06);
  --radius: 14px;
  --radius-sm: 8px;
  --font-ui: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --content-width: 720px;
  --layout-width: 920px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  background: var(--bg);
  background-image: var(--bg-pattern);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* ——— Cabecera tipo revista ——— */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 254, 251, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--layout-width);
  margin: 0 auto;
  padding: 1rem 1.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo:hover {
  text-decoration: none;
  color: var(--accent);
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  align-items: center;
}

nav a {
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 600;
}

nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ——— Contenido ——— */
main {
  max-width: var(--layout-width);
  margin: 0 auto;
  padding: 2.5rem 1.35rem 4rem;
}

.hero {
  margin-bottom: 2.75rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 4rem;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(109, 40, 217, 0.3));
  border-radius: 2px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.5vw, 2.55rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: var(--text);
}

.hero p {
  color: var(--muted);
  font-size: 1.125rem;
  margin: 0;
  max-width: 38rem;
  line-height: 1.65;
}

.intro-editorial {
  max-width: var(--content-width);
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.intro-editorial h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.intro-editorial h2:first-child {
  margin-top: 0;
}

.intro-editorial p {
  margin: 0 0 1rem;
  color: var(--text-soft);
}

.intro-editorial ul {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  color: var(--text-soft);
}

.intro-editorial li {
  margin-bottom: 0.4rem;
}

/* Listado de entradas */
.post-list {
  display: grid;
  gap: 1.35rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.65rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md), 0 12px 32px rgba(109, 40, 217, 0.08);
  transform: translateY(-2px);
}

.card h2 {
  font-family: var(--font-display);
  margin: 0 0 0.65rem;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.card h2 a {
  color: var(--text);
}

.card h2 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.card .meta {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.card .meta::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

/* Artículo individual */
.article-header {
  margin-bottom: 2.25rem;
  max-width: var(--content-width);
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.8vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
  color: var(--text);
}

.article-header .meta {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.article-body {
  max-width: var(--content-width);
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.article-body p {
  margin: 0 0 1.1rem;
  color: var(--text-soft);
}

.article-body ul {
  margin: 0 0 1.1rem;
  padding-left: 1.35rem;
  color: var(--text-soft);
}

.article-body li {
  margin-bottom: 0.4rem;
}

.article-body a {
  font-weight: 600;
}

.sources {
  margin-top: 2.75rem;
  padding: 1.25rem 1.35rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  font-size: 0.92rem;
  color: var(--muted);
}

.sources h2 {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.back-link {
  margin-top: 2.5rem;
  font-weight: 600;
}

.back-link a {
  color: var(--muted);
}

.back-link a:hover {
  color: var(--accent);
}

.ad-slot {
  margin: 2rem 0 2.25rem;
  padding: 1.15rem 1.25rem;
  border: 1px dashed var(--accent-border);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  background: var(--accent-soft);
  line-height: 1.5;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.35rem;
  margin-top: auto;
  background: rgba(255, 254, 251, 0.65);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner {
  max-width: var(--layout-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a {
  font-weight: 600;
  color: var(--text-soft);
}

.footer-links a:hover {
  color: var(--accent);
}

.page-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.15rem;
  font-weight: 600;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

@media (max-width: 540px) {
  main {
    padding: 1.75rem 1rem 3rem;
  }

  .header-inner {
    padding: 0.85rem 1rem;
  }

  .card {
    padding: 1.25rem 1.2rem;
  }
}
