/* ==========================================================================
   EVER IGNIS — Sistema de diseño
   Concepto: "Brasa nocturna" — historias que arden y nunca se apagan.
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, canvas { display: block; max-width: 100%; }
input, button, textarea { font: inherit; }
a { color: inherit; }
ul, ol { list-style: none; padding: 0; }

/* ---------- Tokens ---------- */
:root {
  /* Color — noche cálida + brasa */
  --bg-0: #0C0A09;
  --bg-1: #14100E;
  --bg-2: #1C1714;
  --bg-3: #261F1A;
  --line: rgba(255, 196, 145, 0.10);
  --line-strong: rgba(255, 196, 145, 0.22);
  --text-1: #F5EEE5;
  --text-2: #BCAFA3;
  --text-3: #8A7C6E;
  --ember: #FF6B2C;
  --flame: #FF8A2C;
  --gold: #FFC873;
  --fire-grad: linear-gradient(118deg, #FF4D00 0%, #FF8A2C 48%, #FFC873 100%);

  /* Tipografía */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --container: 1180px;
  --nav-h: 76px;
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 26px;

  /* Movimiento */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* ---------- Base ---------- */
:root { color-scheme: dark; }

body {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-1);
  background-color: var(--bg-0);
  overflow-x: hidden;
}

/* Barras de desplazamiento integradas en la identidad */
html { scrollbar-width: thin; scrollbar-color: #3D3128 var(--bg-0); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: #3D3128;
  border-radius: 999px;
  border: 2px solid var(--bg-0);
}
::-webkit-scrollbar-thumb:hover { background: #55443A; }

/* Sin botón nativo de borrar en los campos de búsqueda */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

/* Grano sutil de película — textura premium */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgba(255, 107, 44, 0.35); color: var(--text-1); }

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

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 3000;
  padding: 12px 20px;
  background: var(--gold);
  color: #1A0D04;
  font-weight: 600;
  border-radius: 0 0 12px 12px;
  text-decoration: none;
  transition: top 0.25s var(--ease-out);
}
.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 44px, var(--container));
  margin-inline: auto;
}
.container--narrow { width: min(100% - 44px, 780px); }

main { display: block; }

/* ---------- Tipografía utilitaria ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--fire-grad);
}

.accent-fire {
  font-style: italic;
  padding-right: 0.06em;
  background: var(--fire-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Botones ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  overflow: hidden;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out),
              color 0.3s var(--ease-out);
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--fire-grad);
  color: #1F0C02;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.4) 50%, transparent 68%);
  transform: translateX(-130%);
  transition: transform 0.7s var(--ease-out);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(255, 107, 44, 0.38);
}
.btn-primary:hover::after { transform: translateX(130%); }

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text-1);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--gold);
  background: rgba(255, 200, 115, 0.06);
  transform: translateY(-2px);
}

.btn-small { padding: 10px 22px; font-size: 0.88rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--gold);
  text-decoration: none;
}
.link-arrow .arrow { transition: transform 0.3s var(--ease-spring); }
.link-arrow:hover .arrow { transform: translateX(5px); }
button.link-arrow {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

/* ---------- Bloques publicitarios (Google AdSense) ----------
   La altura mínima SIEMPRE queda reservada para que el anuncio
   cargue sin provocar CLS. Al activar AdSense, sustituye el
   interior de cada hueco por tu bloque <ins class="adsbygoogle">. */
.ad-slot {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  margin: 2.4em 0;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-m);
  background: var(--bg-1);
}
.ad-slot::before {
  content: "Publicidad";
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
}
.ad-slot > span {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-3);
  text-align: center;
  padding: 0 20px;
}
.ad-slot--horizontal { min-height: 140px; }
.ad-slot--sidebar { min-height: 600px; margin: 0; }
/* Hueco con anuncio real cargado: fuera el marco punteado del marcador */
.ad-slot--live {
  display: block;
  border-color: transparent;
  background: transparent;
}

/* ---------- Header / Navegación ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out),
              backdrop-filter 0.4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(12, 10, 9, 0.78);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--line);
}

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand .logo-mark { width: 30px; height: 30px; flex: none; }
/* Logo en imagen (llama sobre negro): el blend funde el negro con el fondo oscuro */
img.logo-mark { object-fit: contain; mix-blend-mode: screen; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  color: var(--text-1);
}
.brand-name em {
  font-style: italic;
  background: var(--fire-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  position: relative;
  padding: 9px 15px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
.nav-links a:hover { color: var(--text-1); background: rgba(255, 200, 115, 0.07); }

.nav-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-1);
  transition: transform 0.35s var(--ease-spring), opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 auto 0;
  z-index: 990;
  padding: 18px 22px 30px;
  background: rgba(12, 10, 9, 0.96);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  display: none;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-12px);
  opacity: 0;
  transition: transform 0.35s var(--ease-out), opacity 0.3s var(--ease-out);
}
.mobile-menu.is-open { transform: translateY(0); opacity: 1; }
.mobile-menu a {
  padding: 15px 10px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-1);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-of-type { border-bottom: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(64px, 10vh, 110px)) 0 clamp(70px, 9vw, 120px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -260px;
  left: -180px;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 44, 0.16) 0%, transparent 62%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -300px;
  right: -160px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 200, 115, 0.09) 0%, transparent 60%);
  pointer-events: none;
}

#embers {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(36px, 5vw, 72px);
}

.hero-copy .eyebrow { margin-bottom: 22px; }

.hero-title {
  font-size: clamp(2.7rem, 5.6vw, 4.5rem);
  font-weight: 600;
  margin-bottom: 24px;
  max-width: 13ch;
}

.hero-sub {
  font-size: clamp(1.02rem, 1.4vw, 1.16rem);
  color: var(--text-2);
  max-width: 50ch;
  margin-bottom: 38px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 48px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  background: var(--fire-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stat span {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Pila de portadas flotantes */
.hero-stack {
  position: relative;
  height: clamp(420px, 46vw, 560px);
}
.hero-stack::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%);
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 44, 0.22) 0%, transparent 62%);
  filter: blur(8px);
}
.hero-stack .cover {
  position: absolute;
  width: clamp(190px, 21vw, 252px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}
.stack-front {
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  animation: float-a 7s ease-in-out infinite;
}
.stack-left {
  top: 22%;
  left: 2%;
  z-index: 2;
  transform: rotate(-9deg) scale(0.86);
  opacity: 0.92;
  animation: float-b 8.5s ease-in-out infinite;
}
.stack-right {
  top: 26%;
  right: 0;
  z-index: 1;
  transform: rotate(8deg) scale(0.8);
  opacity: 0.85;
  animation: float-c 9.5s ease-in-out infinite;
}
@keyframes float-a { 50% { transform: translateX(-50%) translateY(-14px); } }
@keyframes float-b { 50% { transform: rotate(-9deg) scale(0.86) translateY(-18px); } }
@keyframes float-c { 50% { transform: rotate(8deg) scale(0.8) translateY(-12px); } }

/* ---------- Secciones ---------- */
.section { padding: clamp(72px, 9vw, 128px) 0; }
.section + .section { padding-top: 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head .eyebrow { margin-bottom: 14px; }
.section-title { font-size: clamp(1.9rem, 3.4vw, 2.8rem); max-width: 22ch; }
.section-sub { margin-top: 12px; color: var(--text-2); max-width: 52ch; }

/* Entrada suave cuando el encabezado cambia con las pestañas */
.title-swap { animation: title-swap 0.45s var(--ease-out); }
@keyframes title-swap {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Continuar leyendo (estante en portada) ---------- */
.continue-card {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: clamp(16px, 2.5vw, 28px);
  padding: 18px clamp(18px, 2.5vw, 28px);
  margin-bottom: clamp(28px, 4vw, 44px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  background:
    linear-gradient(120deg, rgba(255, 107, 44, 0.12) 0%, transparent 55%),
    var(--bg-1);
  text-decoration: none;
  transition: transform 0.35s var(--ease-spring), border-color 0.35s var(--ease-out);
}
.continue-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.continue-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.continue-body { min-width: 0; display: grid; gap: 2px; }
.continue-body strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.continue-body span {
  font-size: 0.85rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.continue-progress {
  width: 120px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 196, 145, 0.16);
  overflow: hidden;
}
.continue-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--fire-grad);
}
.continue-cta { color: var(--gold); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }

@media (max-width: 640px) {
  .continue-card { grid-template-columns: 1fr auto; }
  .continue-label { grid-column: 1 / -1; }
  .continue-progress { display: none; }
}

/* ---------- Últimas entregas ---------- */
.release-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.release {
  display: grid;
  grid-template-columns: 64px 1fr auto auto;
  align-items: center;
  gap: 20px;
  padding: 22px 16px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background-color 0.3s var(--ease-out), padding-left 0.3s var(--ease-out);
}
.release:hover { background: rgba(255, 200, 115, 0.045); padding-left: 26px; }
.release-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--text-3);
  transition: color 0.3s;
}
.release:hover .release-num { color: var(--gold); }
.release-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.release-work {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.release-ch {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.release-time { font-size: 0.86rem; color: var(--text-3); white-space: nowrap; }
.badge-new {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1F0C02;
  background: var(--fire-grad);
  padding: 5px 12px;
  border-radius: 999px;
}

/* ---------- Spotlight (obra destacada) ---------- */
.spotlight {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(36px, 5vw, 72px);
  padding: clamp(36px, 5.5vw, 76px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: linear-gradient(155deg, #1A1310 0%, #0F0C0A 70%);
}
.spotlight::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -120px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 44, 0.18) 0%, transparent 62%);
  pointer-events: none;
}
.spotlight-copy { position: relative; z-index: 1; }
.spotlight-copy .eyebrow { margin-bottom: 18px; }
.spotlight-title { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 18px; }
.spotlight-tag {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--gold);
  margin-bottom: 18px;
}
.spotlight-text { color: var(--text-2); max-width: 52ch; margin-bottom: 32px; }
.spotlight-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-size: 0.86rem;
  color: var(--text-3);
  margin: -16px 0 30px;
}
.spotlight-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.spotlight-art {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}
.spotlight-art .cover {
  width: clamp(230px, 24vw, 310px);
  transform: rotate(3.5deg);
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.55), 0 0 80px rgba(255, 107, 44, 0.18);
  transition: transform 0.5s var(--ease-spring);
}
.spotlight-art .cover:hover { transform: rotate(0deg) scale(1.02); }

/* ---------- Calendario semanal de entregas ---------- */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
}
.day-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--bg-1);
  text-decoration: none;
  transition: transform 0.35s var(--ease-spring), border-color 0.35s var(--ease-out),
              background-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.day-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: var(--bg-2);
}
.day-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}
.day-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  flex-grow: 1;
}
.day-type {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid;
}
.day-type--novela   { color: #FF9E66; border-color: rgba(255, 138, 60, 0.45); }
.day-type--manga    { color: #FF7D90; border-color: rgba(232, 72, 96, 0.45); }
.day-type--articulo { color: var(--gold); border-color: rgba(255, 200, 115, 0.45); }
.day-title {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 600;
  line-height: 1.22;
  color: var(--text-1);
}
.day-sub { font-size: 0.78rem; color: var(--text-3); margin-top: auto; }

/* Día actual: borde de fuego + insignia (la añade JS con la fecha real) */
.day-card.is-today {
  border-color: transparent;
  background:
    linear-gradient(var(--bg-2), var(--bg-2)) padding-box,
    var(--fire-grad) border-box;
  box-shadow: 0 12px 44px rgba(255, 107, 44, 0.18);
}
.day-today {
  position: absolute;
  top: -11px;
  right: 14px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1F0C02;
  background: var(--fire-grad);
  padding: 4px 11px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(255, 107, 44, 0.35);
}

/* ---------- Carrusel infinito de destacados ---------- */
.carousel { position: relative; }
.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius-l);
  touch-action: pan-y;
}
.carousel-track {
  display: flex;
  align-items: stretch;
  transition: transform 0.65s var(--ease-out);
  will-change: transform;
}
.carousel-slide { flex: 0 0 100%; min-width: 100%; }
.carousel-slide .spotlight { height: 100%; }

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
}
.carousel-dots { display: flex; align-items: center; gap: 10px; }
.carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--line-strong);
  cursor: pointer;
  transition: width 0.35s var(--ease-out), background-color 0.35s var(--ease-out);
}
.carousel-dot:hover { background: var(--gold); }
.carousel-dot[aria-current="true"] {
  width: 30px;
  background: var(--fire-grad);
}
.carousel-arrows { display: flex; gap: 10px; }
.carousel-arrow {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--text-1);
  font-size: 1.05rem;
  cursor: pointer;
  transition: border-color 0.25s var(--ease-out), background-color 0.25s var(--ease-out),
              transform 0.2s var(--ease-spring);
}
.carousel-arrow:hover { border-color: var(--gold); background: rgba(255, 200, 115, 0.07); }
.carousel-arrow:active { transform: scale(0.92); }

/* ---------- Portadas (arte CSS) ---------- */
.cover {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 70% at 78% 96%, rgba(255, 255, 255, 0.16) 0%, transparent 55%);
}
.cover::after {
  content: "";
  position: absolute;
  top: -34%;
  right: -38%;
  width: 110%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  z-index: -1;
}
/* Foto de portada opcional: cubre el degradado; el velo mantiene legible el texto. */
.cover-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.cover-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(12, 10, 9, 0.12) 0%, rgba(12, 10, 9, 0.55) 58%, rgba(12, 10, 9, 0.82) 100%);
}
.cover-tag,
.cover-mark,
.cover-title {
  position: relative;
  z-index: 2;
}
.cover-tag {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.cover-title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  font-weight: 600;
  line-height: 1.14;
  color: #FFF8EE;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}
.cover-title small {
  display: block;
  margin-top: 7px;
  font-family: var(--font-ui);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.cover-mark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 600;
  line-height: 1;
  align-self: center;
  margin: auto 0;
  color: rgba(255, 246, 230, 0.92);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.cover--cenizas       { background: linear-gradient(162deg, #2A0E05 0%, #7A1E00 58%, #D4480E 115%); }
.cover--vapor         { background: linear-gradient(162deg, #0C1B1E 0%, #14555A 66%, #6FA98E 130%); }
.cover--lumen         { background: linear-gradient(162deg, #0B1026 0%, #28369C 66%, #5E8FE8 128%); }
.cover--bibliotecaria { background: linear-gradient(162deg, #1C0E2A 0%, #54287E 66%, #A86BD4 128%); }
.cover--kitsune       { background: linear-gradient(162deg, #26060C 0%, #8E1230 60%, #E84860 124%); }
.cover--marea         { background: linear-gradient(162deg, #04101C 0%, #0E3A5C 66%, #3E94C4 130%); }
.cover--cielo         { background: linear-gradient(162deg, #2A1A0E 0%, #91541E 70%, #E8B36A 132%); }
.cover--eco           { background: linear-gradient(162deg, #0E1410 0%, #2F5640 70%, #7CBA96 132%); }
.cover--articulo      { background: linear-gradient(162deg, #241505 0%, #8A5A14 68%, #F0BE62 135%); }
/* Portadas de artículo por categoría (varios colores, como las obras) */
.cover--art-marketing    { background: linear-gradient(162deg, #241505 0%, #8A5A14 68%, #F0BE62 135%); }
.cover--art-finanzas     { background: linear-gradient(162deg, #0C1E14 0%, #1E6E3C 66%, #74D08E 132%); }
.cover--art-productividad{ background: linear-gradient(162deg, #1C0E2A 0%, #54287E 66%, #A86BD4 128%); }
.cover--art-tecnologia   { background: linear-gradient(162deg, #0B1026 0%, #28369C 66%, #5E8FE8 128%); }
.cover--art-bienestar    { background: linear-gradient(162deg, #06201E 0%, #0E6B66 66%, #5FC9BE 130%); }
.cover--art-hogar        { background: linear-gradient(162deg, #2A0E05 0%, #9A3410 60%, #E8784A 124%); }

/* ---------- Catálogo ---------- */
.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-1);
}
.tab {
  padding: 10px 26px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: color 0.3s var(--ease-out), background-color 0.3s var(--ease-out),
              box-shadow 0.3s var(--ease-out);
}
.tab:hover { color: var(--text-1); }
.tab[aria-selected="true"] {
  background: var(--fire-grad);
  color: #1F0C02;
  box-shadow: 0 4px 18px rgba(255, 107, 44, 0.3);
}

/* Catálogo por categorías (home): encabezado centrado + pestañas en su fila */
.section-head--center { justify-content: center; text-align: center; }
.cat-tabs-row {
  display: flex;
  overflow-x: auto;
  margin-bottom: clamp(28px, 4vw, 44px);
  padding-bottom: 4px;
}
.cat-tabs-row .tabs { width: auto; flex: none; margin: 0 auto; }
.cat-tabs-row .tab { flex: 0 0 auto; }

.works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 2.6vw, 30px);
  margin-top: clamp(30px, 4vw, 44px);
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
  transition: transform 0.4s var(--ease-spring);
}
.work-card:hover { transform: translateY(-7px); }
.work-card .cover { transition: box-shadow 0.4s var(--ease-out); }
.work-card:hover .cover { box-shadow: 0 22px 52px rgba(0, 0, 0, 0.5), 0 0 50px rgba(255, 107, 44, 0.14); }

.work-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-2);
  border: 1px solid var(--line-strong);
  padding: 4px 11px;
  border-radius: 999px;
}
.chip--status { color: var(--gold); border-color: rgba(255, 200, 115, 0.4); }
.work-sub { font-size: 0.86rem; color: var(--text-3); }
.work-desc { font-size: 0.9rem; color: var(--text-2); line-height: 1.55; }

/* ---------- Artículos ---------- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.6vw, 30px);
}
.articles-grid--cat { grid-template-columns: repeat(4, 1fr); }
/* Tarjeta de artículo: portada "Ever Ignis · Artículo" como las obras */
.article-card {
  display: block;
  text-decoration: none;
  transition: transform 0.4s var(--ease-spring);
}
.article-card:hover { transform: translateY(-7px); }
.article-card .cover { transition: box-shadow 0.4s var(--ease-out); }
.article-card:hover .cover {
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.5), 0 0 50px rgba(255, 107, 44, 0.18);
}
.article-card .cover-title { font-size: clamp(0.98rem, 1.4vw, 1.18rem); }
.cover-flame {
  width: clamp(40px, 6vw, 58px);
  height: auto;
  filter: drop-shadow(0 0 22px rgba(255, 240, 220, 0.35));
}
/* Estilos base reutilizados por el destacado y la cabecera del artículo */
.article-cat {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.article-title {
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.28;
}
.article-excerpt { font-size: 0.92rem; color: var(--text-2); }
.article-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-3);
}

/* ---------- Comunidad ---------- */
.community {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(48px, 7vw, 88px) clamp(24px, 5vw, 80px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background:
    radial-gradient(70% 120% at 50% 118%, rgba(255, 107, 44, 0.2) 0%, transparent 58%),
    linear-gradient(180deg, #16110E 0%, #0F0C0A 100%);
}
.community .eyebrow { margin-bottom: 18px; }
.community-title { font-size: clamp(1.9rem, 3.6vw, 2.9rem); margin-bottom: 16px; }
.community-text {
  color: var(--text-2);
  max-width: 54ch;
  margin: 0 auto 36px;
}
.community-note { font-size: 0.84rem; color: var(--text-3); margin-top: 6px; }
.action-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(12, 10, 9, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  text-decoration: none;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), gap 0.35s var(--ease-out);
}
.action-pill:hover { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 200, 115, 0.12); gap: 0; }
.action-pill .btn-primary:hover { transform: none; box-shadow: none; }
.action-pill-label {
  flex: 1;
  min-width: 0;
  padding: 12px 20px;
  color: var(--text-3);
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 1;
  transition: flex-grow 0.35s var(--ease-out), opacity 0.25s var(--ease-out), padding 0.35s var(--ease-out);
}
.action-pill .btn { flex-grow: 0; flex-shrink: 0; transition: flex-grow 0.35s var(--ease-out); }
.action-pill:hover .action-pill-label { flex-grow: 0; opacity: 0; padding-left: 0; padding-right: 0; }
.action-pill:hover .btn { flex-grow: 1; }
@media (max-width: 640px) {
  .action-pill { flex-direction: column; border-radius: var(--radius-m); padding: 10px; }
  .action-pill .btn { width: 100%; }
}

/* ---------- Pestaña "Próximamente" del catálogo (home) ---------- */
.tab-coming {
  margin-top: clamp(30px, 4vw, 44px);
  text-align: center;
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background:
    radial-gradient(70% 120% at 50% 118%, rgba(255, 107, 44, 0.16) 0%, transparent 60%),
    linear-gradient(180deg, #16110E 0%, #0F0C0A 100%);
}
.tab-coming .eyebrow { margin-bottom: 16px; }
.tab-coming-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 14px; }
.tab-coming-text {
  color: var(--text-2);
  max-width: 52ch;
  margin: 0 auto 28px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: clamp(56px, 7vw, 88px) 0 36px;
  background: linear-gradient(180deg, var(--bg-0) 0%, #0A0807 100%);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(32px, 4vw, 56px);
  margin-bottom: 56px;
}
.footer-brand p {
  margin-top: 16px;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text-2);
  max-width: 26ch;
}
.footer-social { display: flex; gap: 12px; margin-top: 24px; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text-2);
  transition: color 0.3s, border-color 0.3s, transform 0.3s var(--ease-spring),
              background-color 0.3s;
}
.footer-social a:hover {
  color: #1F0C02;
  background: var(--gold);
  border-color: var(--gold);
  transform: translateY(-3px);
}
.footer-social svg { width: 17px; height: 17px; }
.footer-col h3 {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 20px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.94rem;
  transition: color 0.25s;
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--text-3);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-legal a { color: var(--text-3); text-decoration: none; transition: color 0.25s; }
.footer-legal a:hover { color: var(--gold); }
.footer-legal button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: var(--text-3);
  transition: color 0.25s;
}
.footer-legal button:hover { color: var(--gold); }

/* ---------- Banner de consentimiento de cookies ---------- */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 16px);
  z-index: 1600;
  width: min(100% - 32px, 660px);
  padding: 24px 26px;
  background: rgba(18, 14, 12, 0.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-l);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-spring),
              visibility 0.45s;
}
.cookie-banner.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.cookie-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--text-1);
  margin-bottom: 8px;
}
.cookie-text {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 18px;
}
.cookie-text a { color: var(--gold); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 640px) {
  .cookie-banner { padding: 20px; bottom: 12px; }
  .cookie-actions .btn { flex: 1; }
}

/* ---------- Buscador (botón en nav + superposición) ---------- */
.search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}
.search-trigger:hover { color: var(--gold); border-color: var(--gold); background: rgba(255, 200, 115, 0.06); }
.search-trigger svg { width: 17px; height: 17px; }

/* Barra de búsqueda visible en la navegación (escritorio) */
.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 250px;
  max-width: 34vw;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.nav-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 200, 115, 0.12); }
.nav-search-icon { display: inline-flex; color: var(--text-3); flex: none; }
.nav-search-icon svg { width: 16px; height: 16px; }
.nav-search-input {
  flex: 1; min-width: 0; border: none; background: transparent;
  color: var(--text-1); font: inherit; font-size: 0.92rem;
}
.nav-search-input:focus { outline: none; }
.nav-search-input::placeholder { color: var(--text-3); }
.nav-search-results {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 380px;
  max-width: 80vw;
  max-height: 62vh;
  overflow-y: auto;
  padding: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-l);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  z-index: 1600;
}
.nav-search-results[hidden] { display: none; }
@media (max-width: 860px) { .nav-search { display: none; } }

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1700;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: 12vh 16px 40px;
  background: rgba(8, 6, 5, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-out), visibility 0.3s;
}
.search-overlay.is-open { opacity: 1; visibility: visible; }
.search-panel {
  width: min(100%, 620px);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.35s var(--ease-spring);
}
.search-overlay.is-open .search-panel { transform: translateY(0) scale(1); }
.search-input-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
}
.search-input-row svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.search-input-row input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text-1);
  font-size: 1.05rem;
}
.search-input-row input:focus { outline: none; }
.search-input-row input::placeholder { color: var(--text-3); }
.search-input-row kbd {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--text-3);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 3px 7px;
}
.search-results {
  max-height: 52vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 196, 145, 0.25) transparent;
}
.search-results::-webkit-scrollbar { width: 8px; }
.search-results::-webkit-scrollbar-track { background: transparent; }
.search-results::-webkit-scrollbar-thumb {
  background: rgba(255, 196, 145, 0.22);
  border: none;
  border-radius: 999px;
}
.search-results::-webkit-scrollbar-thumb:hover { background: rgba(255, 196, 145, 0.4); }
.search-result {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  transition: background-color 0.2s;
}
.search-result:hover, .search-result:focus-visible { background: rgba(255, 200, 115, 0.06); }
.search-result-body { min-width: 0; display: grid; gap: 2px; }
.search-result-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-desc {
  display: block;
  font-size: 0.82rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-empty { padding: 26px 22px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 0.92rem; }

/* ---------- Comentarios (Giscus) ----------
   Usa variables --r-* cuando existen (lectores) y cae a las globales. */
.comments { margin-top: clamp(48px, 7vw, 72px); font-family: var(--font-ui); }
.comments h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  margin-bottom: 8px;
  color: var(--r-text, var(--text-1));
}
.comments-sub {
  color: var(--r-muted, var(--text-2));
  font-size: 0.92rem;
  margin-bottom: 24px;
}
.comments-placeholder {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px dashed var(--r-line, var(--line-strong));
  border-radius: var(--radius-m);
  background: var(--r-panel, var(--bg-1));
  color: var(--r-muted, var(--text-2));
  font-size: 0.95rem;
  line-height: 1.6;
}
.comments-placeholder > span { font-size: 1.6rem; flex: none; }
.comments-placeholder a { color: var(--r-accent, var(--gold)); }
.comments-placeholder p { margin: 0; }

/* ---------- Aviso flotante (toast) ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translate(-50%, 12px);
  z-index: 1650;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: min(100% - 32px, 560px);
  padding: 14px 24px;
  background: rgba(18, 14, 12, 0.95);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: var(--text-1);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-spring),
              visibility 0.35s;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast-action {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.toast-action:hover { text-decoration: underline; }

/* ====================================================================
   VALORACIÓN (estrellas)
   ==================================================================== */
.rating-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  color: var(--text-2);
}
.rating-inline .stars-static { color: var(--gold); letter-spacing: 1px; }
.rating-inline strong { color: var(--text-1); font-weight: 600; }
.rating-inline span { color: var(--text-3); }

.rating-box {
  margin: clamp(40px, 5vw, 56px) 0 0;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--bg-1);
  text-align: center;
  font-family: var(--font-ui);
}
.rating-box h3 { font-size: 1.2rem; margin-bottom: 6px; }
.rating-box p { color: var(--text-2); font-size: 0.92rem; margin-bottom: 16px; }
.stars-input { display: inline-flex; gap: 6px; }
.stars-input button {
  border: none;
  background: transparent;
  padding: 2px;
  font-size: 2rem;
  line-height: 1;
  color: var(--line-strong);
  cursor: pointer;
  transition: color 0.15s var(--ease-out), transform 0.15s var(--ease-spring);
}
.stars-input button:hover { transform: scale(1.15); }
.stars-input button.on { color: var(--gold); }
.rating-thanks { margin-top: 14px; font-size: 0.9rem; color: var(--gold); min-height: 1.2em; }

/* ---------- Página 404 ---------- */
.page-404 {
  min-height: 72vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + 40px) 0 60px;
  position: relative;
  overflow: hidden;
}
.page-404::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 44, 0.14) 0%, transparent 60%);
  pointer-events: none;
}
.code-404 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(6rem, 18vw, 11rem);
  font-weight: 600;
  line-height: 1;
  background: var(--fire-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
}
.page-404 h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 14px; }
.page-404 p { color: var(--text-2); max-width: 46ch; margin: 0 auto 32px; }
.page-404 .hero-cta { justify-content: center; }

/* ---------- Página de obra ---------- */
.work-hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(48px, 7vh, 80px)) 0 clamp(56px, 7vw, 88px);
  overflow: hidden;
}
.work-hero::before {
  content: "";
  position: absolute;
  top: -240px;
  right: -160px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 44, 0.14) 0%, transparent 60%);
  pointer-events: none;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--text-3);
  margin-bottom: clamp(32px, 4vw, 48px);
}
.breadcrumb a { color: var(--text-3); text-decoration: none; transition: color 0.25s; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb [aria-current] { color: var(--text-2); }

.work-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}
.work-hero-grid > .cover {
  box-shadow: 0 32px 72px rgba(0, 0, 0, 0.55), 0 0 70px rgba(255, 107, 44, 0.15);
}
.work-info .work-meta { margin-bottom: 20px; }
.work-info h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); margin-bottom: 14px; }
.work-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.18rem;
  color: var(--gold);
  margin-bottom: 26px;
}
.work-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 34px;
  padding: 20px 0;
  margin-bottom: 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.work-stat { display: flex; flex-direction: column; }
.work-stat strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--text-1); }
.work-stat span {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.work-synopsis { color: var(--text-2); max-width: 62ch; margin-bottom: 14px; }
.work-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.work-update { margin-top: 18px; font-size: 0.88rem; color: var(--text-3); }
.work-update strong { color: var(--gold); font-weight: 600; }

/* Lista de capítulos */
.chapter-list { border-top: 1px solid var(--line); }
.chapter-row {
  display: grid;
  grid-template-columns: 76px 1fr auto auto;
  align-items: center;
  gap: 18px;
  padding: 19px 14px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background-color 0.3s var(--ease-out), padding-left 0.3s var(--ease-out);
}
.chapter-row:hover { background: rgba(255, 200, 115, 0.045); padding-left: 24px; }
.chapter-no {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--text-3);
  transition: color 0.3s;
}
.chapter-row:hover .chapter-no { color: var(--gold); }
.chapter-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chapter-date { font-size: 0.84rem; color: var(--text-3); white-space: nowrap; }

/* Autora */
.author-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 3vw, 40px);
  align-items: center;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--bg-1);
}
.author-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  color: #1F0C02;
  background: var(--fire-grad);
  box-shadow: 0 0 44px rgba(255, 107, 44, 0.3);
}
.author-card h3 { font-size: 1.45rem; margin-bottom: 4px; }
.author-role {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: block;
}
.author-card p { color: var(--text-2); font-size: 0.96rem; }

/* ---------- Animaciones de scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }
/* El hover de las tarjetas debe ganar a .reveal.is-visible (ambas tocan transform).
   Mayor especificidad → la elevación funciona igual aunque la tarjeta ya se reveló. */
.work-card.reveal:hover,
.article-card.reveal:hover { transform: translateY(-7px); }

/* Entrada del hero al cargar */
.hero-copy > * {
  opacity: 0;
  transform: translateY(22px);
  animation: hero-in 0.9s var(--ease-out) forwards;
}
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.16s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.27s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.38s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.5s; }
.hero-stack { opacity: 0; animation: hero-in 1.1s var(--ease-out) 0.35s forwards; }
@keyframes hero-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-stack { transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .works-grid { grid-template-columns: repeat(3, 1fr); }
  .week-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-actions .btn { display: none; }
  .mobile-menu { display: flex; pointer-events: none; visibility: hidden; }
  .mobile-menu.is-open { pointer-events: auto; visibility: visible; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-title { max-width: none; }
  .hero-stack { height: clamp(360px, 64vw, 460px); max-width: 520px; margin-inline: auto; width: 100%; }

  .spotlight { grid-template-columns: 1fr; }
  .spotlight-art { order: -1; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .work-hero-grid { grid-template-columns: 1fr; }
  .work-hero-grid > .cover { max-width: 280px; }
}

@media (max-width: 640px) {
  .tabs { width: 100%; display: flex; }
  .tab { flex: 1; padding: 10px 8px; font-size: 0.85rem; text-align: center; }
  .ad-slot { min-height: 250px; }
  .ad-slot--horizontal { min-height: 120px; }
  .week-grid { grid-template-columns: 1fr; gap: 10px; }
  .day-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
  }
  .day-sub { margin-top: 0; }
  .day-today { top: 50%; transform: translateY(-50%); right: 16px; }
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .cover-title { font-size: 1rem; }
  .release { grid-template-columns: 1fr auto; }
  .release-num, .release-time { display: none; }
  .chapter-row { grid-template-columns: 52px 1fr auto; }
  .chapter-date { display: none; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .author-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .hero-stats { gap: 12px 24px; }
}

/* ---------- Accesibilidad: movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .hero-copy > *, .hero-stack { opacity: 1; transform: none; }
}
