/* ============================================================
   NOMBRE AUTOR — Estilos Principales
   Estética: dark sci-fi/fantasy con humor socarrón
   ============================================================ */

/* ── Variables globales ── */
:root {
  --bg-void:       #050508;
  --bg-deep:       #0a0a14;
  --bg-mid:        #0f0f1e;
  --bg-card:       #12122a;
  --bg-card-hover: #181830;

  --accent-violet: #9d6dff;
  --accent-blue:   #6daaff;
  --accent-pink:   #ff6d9d;
  --accent-gold:   #ffd46d;

  --neon-violet:   #c49dff;
  --neon-blue:     #9dccff;

  --text-primary:  #e8e4f0;
  --text-muted:    #8a8499;
  --text-dim:      #4a4460;

  --border-subtle: rgba(157, 109, 255, 0.12);
  --border-glow:   rgba(157, 109, 255, 0.35);

  --font-display:  'Cinzel Decorative', serif;
  --font-body:     'Crimson Pro', Georgia, serif;
  --font-mono:     'JetBrains Mono', monospace;

  --nav-height:    70px;
  --section-pad:   6rem;

  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;

  --trans-fast:    150ms ease;
  --trans-mid:     300ms ease;
  --trans-slow:    600ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.1vw, 1.15rem);
  line-height: 1.75;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Tipografía base ── */
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.8em;
  letter-spacing: 0.08em;
}

/* ── Scrollbar personalizada ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb {
  background: var(--accent-violet);
  border-radius: 3px;
}

/* ============================================================
   NAVEGACIÓN
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  background: transparent;
  transition: background var(--trans-mid), backdrop-filter var(--trans-mid), border-color var(--trans-mid);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border-subtle);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.logo-glyph {
  color: var(--accent-violet);
  font-size: 1.2rem;
  animation: glyphPulse 5s ease-in-out infinite;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.15em;
  color: var(--text-primary);
}

@keyframes glyphPulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 8px var(--accent-violet); }
  50% { opacity: 0.6; text-shadow: none; }
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--trans-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent-violet);
  transition: width var(--trans-mid);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Toggle mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  transition: transform var(--trans-mid), opacity var(--trans-mid);
  border-radius: 2px;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all var(--trans-mid);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.05);
  opacity: 0;
  transition: opacity var(--trans-fast);
}

.btn:hover::before { opacity: 1; }

.btn-primary {
  background: var(--accent-violet);
  color: #fff;
  box-shadow: 0 0 20px rgba(157,109,255,0.3);
}

.btn-primary:hover {
  background: var(--neon-violet);
  box-shadow: 0 0 30px rgba(157,109,255,0.5);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-glow);
  box-shadow: 0 0 15px rgba(157,109,255,0.15);
}

.btn-sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.72rem;
}

/* ============================================================
   SECCIONES — Layout general
   ============================================================ */
.section {
  min-height: 100vh;
  padding: var(--section-pad) clamp(1.5rem, 8vw, 8rem);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-number {
  color: var(--accent-violet);
  opacity: 0.5;
  font-size: 0.75rem;
  display: block;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.section-sub {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

/* Fondo: estrellas */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.stars {
  position: absolute;
  inset: 0;
}

.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: twinkle var(--dur, 3s) steps(8, end) infinite var(--delay, 0s);
  opacity: 0;
  will-change: opacity;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; }
  50% { opacity: var(--brightness, 0.7); }
}

.nebula {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(157,109,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 50% at 80% 70%, rgba(109,170,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 50% 50%, rgba(255,109,157,0.04) 0%, transparent 70%);
  animation: nebulaDrift 40s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes nebulaDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(2%, 1%) scale(1.03); }
}

/* Contenido hero */
.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-text {
  max-width: 600px;
}

.hero-label {
  color: var(--accent-violet);
  opacity: 0.7;
  margin-bottom: 1rem;
  display: block;
  animation: fadeSlideUp 0.8s var(--trans-slow) both;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 1;
  margin-bottom: 1.5rem;
  animation: fadeSlideUp 0.8s 0.1s var(--trans-slow) both;
}

.title-line {
  display: block;
}

.title-line.accent {
  color: transparent;
  -webkit-text-stroke: 1px var(--accent-violet);
  text-stroke: 1px var(--accent-violet);
  filter: drop-shadow(0 0 12px rgba(157,109,255,0.4));
}

.hero-quote {
  border-left: 2px solid var(--accent-violet);
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
  font-style: italic;
  color: var(--text-muted);
  font-size: 1.05rem;
  animation: fadeSlideUp 0.8s 0.2s var(--trans-slow) both;
}

.hero-bio {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  animation: fadeSlideUp 0.8s 0.3s var(--trans-slow) both;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeSlideUp 0.8s 0.4s var(--trans-slow) both;
}

/* Foto del autor */
.hero-image-wrap {
  position: relative;
  animation: fadeSlideUp 0.8s 0.2s var(--trans-slow) both;
}

.author-photo-frame {
  position: relative;
  width: clamp(220px, 25vw, 320px);
}

.author-photo {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius-md);
  position: relative;
  z-index: 2;
  filter: grayscale(20%) contrast(1.05);
}

.photo-glow {
  position: absolute;
  inset: -20px;
  border-radius: var(--radius-lg);
  background: radial-gradient(ellipse, rgba(157,109,255,0.2) 0%, transparent 70%);
  z-index: 1;
  animation: photoGlowPulse 8s ease-in-out infinite;
}

@keyframes photoGlowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.photo-border-anim {
  position: absolute;
  inset: -3px;
  border-radius: calc(var(--radius-md) + 3px);
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-blue), var(--accent-pink), var(--accent-violet));
  background-size: 300% 300%;
  z-index: 1;
  animation: borderGradient 12s linear infinite;
  will-change: background-position;
}

.photo-border-anim::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--bg-deep);
  border-radius: calc(var(--radius-md) + 1px);
}

@keyframes borderGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.7rem;
  animation: scrollHintBounce 3s ease-in-out infinite;
  z-index: 2;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-violet), transparent);
}

@keyframes scrollHintBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* ============================================================
   NOVELAS SECTION
   ============================================================ */
.novelas-section {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(157,109,255,0.04) 0%, transparent 60%),
    var(--bg-deep);
}

.novelas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.novel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--trans-mid), border-color var(--trans-mid), box-shadow var(--trans-mid);
  position: relative;
}

.novel-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-glow);
  box-shadow: 0 20px 60px rgba(157,109,255,0.15);
}

.novel-cover-wrap {
  position: relative;
  overflow: hidden;
  height: 280px;
}

.novel-cover {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--trans-slow);
}

.novel-card:hover .novel-cover {
  transform: scale(1.05);
}

.novel-cover-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-card) 0%, transparent 50%);
  pointer-events: none;
}

/* Etiqueta en flujo normal, dentro de .novel-info — nunca se solapa con la imagen */
.novel-genre-tag {
  display: inline-block;
  align-self: flex-start;
  background: rgba(157,109,255,0.25);
  border: 1px solid rgba(157,109,255,0.4);
  color: var(--neon-violet);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.novel-genre-tag.blue {
  background: rgba(109,170,255,0.2);
  border-color: rgba(109,170,255,0.4);
  color: var(--neon-blue);
}

.novel-genre-tag.pink {
  background: rgba(255,109,157,0.2);
  border-color: rgba(255,109,157,0.4);
  color: #ff9dbf;
}

.novel-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.novel-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-primary);
}

.novel-year {
  color: var(--accent-violet);
  opacity: 0.6;
  font-size: 0.75rem;
}

.novel-synopsis {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  flex: 1;
}

.novel-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ============================================================
   RELATOS SECTION
   ============================================================ */
.relatos-section {
  background:
    radial-gradient(ellipse 60% 40% at 90% 50%, rgba(109,170,255,0.04) 0%, transparent 60%),
    var(--bg-mid);
}

.relatos-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.relato-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--trans-mid);
}

.relato-item:hover {
  border-color: var(--border-glow);
}

.relato-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  user-select: none;
}

.relato-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  flex-wrap: wrap;
}

.relato-num {
  color: var(--accent-violet);
  opacity: 0.5;
  font-size: 0.72rem;
  min-width: 28px;
}

.relato-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-primary);
  transition: color var(--trans-fast);
}

.relato-item:hover .relato-title {
  color: var(--neon-violet);
}

.relato-tag {
  background: rgba(157,109,255,0.1);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  padding: 0.15rem 0.65rem;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.relato-toggle-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans-mid);
  flex-shrink: 0;
}

.relato-toggle-btn:hover {
  border-color: var(--border-glow);
  color: var(--text-primary);
}

.toggle-icon {
  font-size: 1.1rem;
  line-height: 1;
  transition: transform var(--trans-mid);
}

.relato-item.open .toggle-icon {
  transform: rotate(45deg);
}

.relato-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 1.5rem;
}

.relato-item.open .relato-body {
  max-height: 600px;
  padding-bottom: 1.5rem;
}

.relato-desc {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.relato-fragment {
  background: rgba(157,109,255,0.05);
  border-left: 2px solid var(--accent-violet);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.fragment-label {
  color: var(--accent-violet);
  opacity: 0.6;
  font-size: 0.68rem;
  display: block;
  margin-bottom: 0.5rem;
}

.fragment-text {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================================
   REDES SECTION
   ============================================================ */
.redes-section {
  background:
    radial-gradient(ellipse 60% 60% at 30% 80%, rgba(255,109,157,0.04) 0%, transparent 60%),
    var(--bg-deep);
}

.redes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(1fr, max-content));
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto 4rem;
}

.red-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  transition: all var(--trans-mid);
  position: relative;
  overflow: hidden;
}

.red-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--trans-mid);
}

.red-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
}

.instagram { --card-accent: #e1306c; }
.xtwitter  { --card-accent: #ffffff; }
.bluesky   { --card-accent: #0085ff; }
.email     { --card-accent: #ffd46d; }

.red-card::before {
  background: radial-gradient(ellipse at top left, color-mix(in srgb, var(--card-accent) 8%, transparent) 0%, transparent 70%);
}

.red-card:hover::before { opacity: 1; }

.red-card:hover {
  border-color: color-mix(in srgb, var(--card-accent) 40%, transparent);
  box-shadow: 0 12px 40px color-mix(in srgb, var(--card-accent) 10%, transparent);
}

.red-icon-wrap {
  width: max-content; 
  min-width: 100%
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--card-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--card-accent) 25%, transparent);
  display: flex;
  white-space: nowrap
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--card-accent);
  transition: all var(--trans-mid);
}


.red-card:hover .red-icon-wrap {
  background: color-mix(in srgb, var(--card-accent) 20%, transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--card-accent) 20%, transparent);
}

.red-icon {
  width: 22px; height: 22px;
}

.red-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.red-platform {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-primary);
}

.red-handle {
  color: var(--card-accent);
  font-size: 0.72rem;
  opacity: 0.8;
}

.red-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 0.25rem;
  line-height: 1.5;
}

.red-arrow {
  color: var(--text-dim);
  font-size: 1.1rem;
  align-self: center;
  transition: transform var(--trans-mid), color var(--trans-mid);
  flex-shrink: 0;
}

.red-card:hover .red-arrow {
  transform: translateX(4px);
  color: var(--card-accent);
}

/* Cita final */
.final-quote {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-subtle);
}

.final-quote p {
  font-style: italic;
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-void);
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem clamp(1.5rem, 5vw, 4rem);
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.72rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  transition: color var(--trans-fast);
}

.footer-nav a:hover {
  color: var(--accent-violet);
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: max(3.5rem, calc(1.5rem + env(safe-area-inset-bottom, 0px)));
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  width: min(90vw, 680px);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  z-index: 2000;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
}

.cookie-banner.visible {
  transform: translateX(-50%) translateY(0);
}

.cookie-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-icon { font-size: 1.5rem; flex-shrink: 0; }

.cookie-text {
  flex: 1;
  min-width: 200px;
}

.cookie-text p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.cookie-text strong { color: var(--text-primary); }

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.cookie-policy-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--trans-fast);
}

.cookie-policy-link:hover { color: var(--text-muted); }

/* ============================================================
   MODAL PRIVACIDAD
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--trans-mid);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 560px;
  width: 100%;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--trans-slow);
}

.modal-overlay.open .modal-box {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--trans-fast);
}

.modal-close:hover {
  border-color: var(--border-glow);
  color: var(--text-primary);
}

.modal-title {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.modal-body a {
  color: var(--accent-violet);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   ANIMACIONES DE ENTRADA (scroll)
   ============================================================ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--trans-slow), transform 0.7s var(--trans-slow);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root { --section-pad: 4rem; }

  /* Nav mobile */
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(5,5,8,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--trans-slow), padding var(--trans-mid);
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-links.open {
    max-height: 300px;
    padding: 1.5rem 0;
  }

  .nav-links li { width: 100%; text-align: center; }

  .nav-link {
    display: block;
    padding: 0.85rem 2rem;
    font-size: 0.9rem;
  }

  /* Hero mobile */
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-image-wrap {
    order: -1;
    display: flex;
    justify-content: center;
  }

  .author-photo-frame {
    width: clamp(160px, 50vw, 220px);
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-quote { text-align: left; }

  /* Novelas */
  .novelas-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  /* Redes */
  .redes-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-nav { justify-content: center; }
}

@media (max-width: 480px) {
  .cookie-content { flex-direction: column; }
  .cookie-actions { width: 100%; justify-content: center; }
  .relato-meta { gap: 0.5rem; }
  .relato-tag { display: none; }
}