/* LAM — revista cultural / diario de opinión · v1.1 */

/* —— Paleta B: Noche + acento (alternativa) —— */
.palette-b {
  --ink: #e8eaef;
  --ink-soft: #9aa3b2;
  --paper: #0f1218;
  --paper-deep: #1a1f2a;
  --accent: #d4785a;
  --line: rgba(232, 234, 239, 0.14);
  --hero-text: #f0f2f6;
  --nav-bg: rgba(15, 18, 24, 0.88);
  --project-bg: rgba(26, 31, 42, 0.9);
  --feature-empty: #252b38;
  --top-text: #f0f2f6;
}

/* —— Paleta C: Luz blanca andaluza (elegida) —— */
.palette-c {
  --ink: #14161a;
  --ink-soft: #5a6170;
  --paper: #f4f6f8;
  --paper-deep: #e6ebf0;
  --accent: #2f5f7a;
  --line: rgba(20, 22, 26, 0.12);
  --hero-text: #f7f9fb;
  --nav-bg: rgba(244, 246, 248, 0.94);
  --project-bg: rgba(255, 255, 255, 0.72);
  --feature-empty: #d5dde6;
  --top-text: #f7f9fb;
}

:root {
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 68rem;
  --narrow: 42rem;
  --lam-hero-image: none;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}
a:hover { color: var(--ink); }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip:focus { top: 1rem; }

/* —— Hero (solo home) —— */
.hero {
  position: relative;
  min-height: min(78vh, 42rem);
  display: grid;
  align-items: end;
  color: var(--hero-text);
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  background:
    var(--paper-deep)
    var(--lam-hero-image)
    center 35% / cover no-repeat;
  transform: scale(1.04);
  animation: rise 1.4s var(--ease) both;
}
.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 10, 12, 0.18) 0%, rgba(8, 10, 12, 0.5) 42%, rgba(8, 10, 12, 0.9) 100%),
    radial-gradient(ellipse 80% 55% at 70% 18%, transparent 0%, rgba(8, 10, 12, 0.35) 100%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0 0 clamp(2.25rem, 5vw, 3.5rem);
  animation: fade-up 0.9s var(--ease) 0.18s both;
}
.brand {
  font-size: clamp(1.85rem, 4.2vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  line-height: 1.05;
}
.headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.5vw, 3.55rem);
  line-height: 1.08;
  margin: 0 0 1rem;
  max-width: 16ch;
}
.deck {
  max-width: 34rem;
  margin: 0 0 1.5rem;
  color: rgba(244, 246, 243, 0.88);
  font-size: 1.08rem;
}
.hero__cta { margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.25rem;
  background: var(--hero-text);
  color: #14161a;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
  color: #14161a;
  background: #fff;
}

/* —— Nav —— */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0.85rem 0;
}
.nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__list a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.15rem;
}
.nav__list a:hover {
  color: var(--ink);
}
.nav__list .current-menu-item > a,
.nav__list .current-menu-item a {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* Menú flotante (home): sobre el hero */
.nav--float {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  background: transparent;
  border-bottom: 1px solid transparent;
  backdrop-filter: none;
  transition: background 0.28s var(--ease), border-color 0.28s var(--ease), backdrop-filter 0.28s var(--ease);
}
.nav--float .nav__list a {
  color: rgba(247, 249, 251, 0.86);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}
.nav--float .nav__list a:hover,
.nav--float .nav__list .current-menu-item > a,
.nav--float .nav__list .current-menu-item a {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.85);
}
.nav--float.is-scrolled {
  position: fixed;
  background: rgba(12, 16, 20, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

/* —— Cabecera interna: franja de foto + menú —— */
.site-top {
  position: sticky;
  top: 0;
  z-index: 30;
  color: var(--top-text);
  min-height: clamp(5.25rem, 12vw, 7.25rem);
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(180deg, rgba(10, 14, 18, 0.25) 0%, rgba(10, 14, 18, 0.72) 100%),
    var(--lam-hero-image) center 38% / cover no-repeat;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.site-top__inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.95rem 0 1rem;
}
.site-top__brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--top-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-top__brand:hover { color: #fff; }
.site-top .nav {
  position: static;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}
.site-top .nav__inner {
  width: auto;
  margin: 0;
  padding: 0;
}
.site-top .nav__list a {
  color: rgba(247, 249, 251, 0.78);
}
.site-top .nav__list a:hover {
  color: #fff;
}
.site-top .nav__list .current-menu-item > a,
.site-top .nav__list .current-menu-item a {
  color: #fff;
  border-bottom-color: #fff;
}

/* —— Sections —— */
.section {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: clamp(2.25rem, 5vw, 3.5rem) 0;
}
.section--narrow { width: min(var(--narrow), calc(100% - 2.5rem)); }
.section__head { margin-bottom: 1.75rem; max-width: 36rem; }
.section__head h1,
.section__head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 2.5rem);
  font-weight: 400;
  margin: 0 0 0.35rem;
  line-height: 1.15;
}
.section__head p,
.archive-desc {
  margin: 0;
  color: var(--ink-soft);
}

.meta {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.meta span { color: var(--accent); font-weight: 600; }

/* —— Listado: foto + titular —— */
.list { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem 1.15rem;
  align-items: center;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  animation: fade-up 0.55s var(--ease) both;
}
@media (min-width: 640px) {
  .row {
    grid-template-columns: 10rem 1fr;
    gap: 1.25rem 1.5rem;
  }
}
.row__media {
  display: block;
  overflow: hidden;
  background: var(--paper-deep);
  aspect-ratio: 4 / 3;
  text-decoration: none;
}
.row__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}
.row:hover .row__media img { transform: scale(1.04); }
.row__media--empty {
  background:
    linear-gradient(135deg, var(--feature-empty), var(--paper-deep));
}
.row__body { min-width: 0; }
.row h2,
.row h3 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 400;
  margin: 0;
  line-height: 1.25;
}
.row h2 a,
.row h3 a {
  color: inherit;
  text-decoration: none;
}
.row h2 a:hover,
.row h3 a:hover { color: var(--accent); }
.row__excerpt {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.projects {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin: 0.75rem 0 0;
}
.projects--compact { margin-top: 0.75rem; }
.project {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: 0;
}
.project:hover { color: var(--accent); }
.project strong { font-size: 1rem; }
.project span { color: var(--ink-soft); font-size: 0.9rem; }

/* —— Single: titular → imagen → texto —— */
.section--reading {
  width: min(46rem, calc(100% - 2.5rem));
}
.entry__header {
  margin: 0 0 1.75rem;
  max-width: 40rem;
}
.entry__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.95rem, 4.2vw, 2.75rem);
  line-height: 1.12;
  margin: 0 0 0.75rem;
}
.entry__deck {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0;
}
.entry__byline {
  margin: 0.85rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.entry__media {
  margin: 0 0 2rem;
  overflow: hidden;
  background: var(--paper-deep);
}
.entry__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.entry__media--empty {
  min-height: 12rem;
  background: linear-gradient(135deg, var(--feature-empty), var(--paper-deep));
}
.entry__content {
  font-size: 1.08rem;
  max-width: 40rem;
}
.entry__content > *:first-child { margin-top: 0; }
.entry__content p { margin: 0 0 1.15rem; }
.entry__content h2,
.entry__content h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  margin: 2rem 0 0.75rem;
}
.entry-nav {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  max-width: 40rem;
}
@media (min-width: 700px) {
  .entry-nav { grid-template-columns: 1fr 1fr; }
}
.entry-nav__prev,
.entry-nav__next {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
  padding: 0.85rem 0;
}
.entry-nav__next { text-align: right; }
.entry-nav__label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.entry-nav__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--ink);
}
.entry-nav__prev:hover .entry-nav__title,
.entry-nav__next:hover .entry-nav__title {
  color: var(--accent);
}

.project--soon {
  opacity: 0.72;
  cursor: default;
}

.navigation.pagination { margin-top: 2rem; }
.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.navigation.pagination .page-numbers,
.navigation.pagination a,
.navigation.pagination .current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  list-style: none;
}
.navigation.pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.navigation.pagination .current,
.navigation.pagination span.current {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* —— Footer —— */
.footer {
  border-top: 1px solid var(--line);
  padding: 2.25rem 0 3rem;
  color: var(--ink-soft);
}
.footer__inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}
@media (min-width: 720px) {
  .footer__inner {
    grid-template-columns: 1.1fr 1fr;
    align-items: start;
  }
}
.footer__bottom {
  margin-top: 2rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}
.footer__bottom-inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.5rem;
}
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
}
.footer__legal a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}
.footer__legal a:hover {
  color: var(--ink);
}
.footer__copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.brand--sm {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.35rem;
}

.social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.1rem;
}
.social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  text-decoration: none;
  border: 0;
  background: transparent;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.social__link:hover {
  transform: translateY(-2px);
  opacity: 0.88;
}
.social__link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.empty-note { color: var(--ink-soft); }

@keyframes rise {
  from { transform: scale(1.08); opacity: 0.7; }
  to { transform: scale(1.04); opacity: 1; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
