:root {
  --bg-image: url('../imagenes/background.jpeg');
  --bg-darken: rgba(10, 12, 18, 0.7);
  --text: #fff;
  --accent: #ffcc66;
  --surface: rgba(255,255,255,0.06);
  --surface-strong: rgba(255,255,255,0.1);
  --muted: #cbd1dd;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 75px; /* evita que el header tape las secciones */
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  color: var(--text);
  background: #0b0d12;
  overflow-y: auto;
}

.bg-fixed {
  position: fixed;
  inset: 0;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
  background-color: rgba(0,0,0,0.5); /* capa negra semitransparente */
  background-blend-mode: darken;
}

header {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background: rgba(10,12,18,0.8);
  backdrop-filter: blur(4px);
  z-index: 1000;
}

/* Todos los enlaces */
a {
  color: var(--text);      /* Color por defecto */
  text-decoration: none;     /* Quitar subrayado */
  font-weight: 500;          /* Peso de fuente */
  transition: color 0.3s ease;
}

/* Enlaces ya visitados */
a:visited {
  color: var(--text);      /* Igual que los normales */
}

/* Enlaces al pasar el ratón */
a:hover {
  color: var(--accent); /* Otro color */

}

/* Enlace activo */
a:active {
  color: var(--accent);
}


.logo {
  font-family: 'kalam';
  /*font-size: 2rem;*/
  font-Color: #ffcc66;
  font-size: clamp(36px, 4.5vw, 40px); line-height: 1.1;
  color: var(--accent);
  text-decoration: none;
}

/* Botón hamburguesa */
 .menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 35px;
  height: 40px;
  font-size: 1.5rem;
  background: none;
  border: none;

  color: var(--text);
  cursor: pointer;
  z-index: 1100;

}
    .menu-toggle span {
      display: block;
      height: 3px;
      background: var(--text);
      border-radius: 2px;
      transition: all 0.4s ease;
    }
/* --- Estado activo (menú abierto) --- */
    .menu-toggle.active span:nth-child(1) {
      transform: rotate(45deg) translate(5px, 5px);
    }
    .menu-toggle.active span:nth-child(2) {
      opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
      transform: rotate(-45deg) translate(5px, -5px);
    }

 
.nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.nav li {
  margin-left: 20px;
  /*font-family: 'Caveat';
  font-size: clamp(28px, 3vw, 26px); line-height: 1.05;*/
}

/* Menú links efecto suave */
.nav a {
  position: relative;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav a:hover {
  color: var(--accent);
}
.nav a:hover::after {
  width: 100%;
}

.viewport {
  min-height: 100vh;
  padding: 100px 8px 60px;
  /*padding-top: 80px;*/
}

.panel{
  min-height: 94%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 5px;
  opacity: 1;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.panel.visible {
  opacity: 1;
  transform: translateY(0);
}
.panel-inner{
  width: 100%;
  font-family: 'kalam';
  background: rgba(10,12,18,.55);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.panel-padre{
  width: 100%;
   display: flex;
  font-family: 'kalam';
  background: rgba(10,12,18,.55);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.panel-hijo{
  width: 50%;

}

/* Fonts */
@font-face {
  font-family: 'Yesteryear';
  src: url(../fonts/Yesteryear-Regular.ttf);
  font-family: 'Caveat';
  src: url(../fonts/Caveat-VariableFont_wght.ttf);
  font-family: 'kalam';  
  src: url(../fonts/Kalam-Regular.ttf);}


/* ==== Tipografía y componentes ==== */
h1 {
  font-family: 'Yesteryear', normal;
  /*src: url(../fonts/Yesteryear-Regular.ttf);*/
  margin: 0 0 10px; 
}
h2 {
  /*font-family: 'Yesteryear', normal;*/
  /*src: url(../fonts/Yesteryear-Regular.ttf);*/
  font-family: 'Inter', sans-serif;
  margin: 0 0 10px; 
}
h3 {
  /*font-family: 'Caveat', normal;*/
  font-family: 'Inter', sans-serif;
  margin: 0 0 10px; 
}
h4 {
  font-family: 'Yesteryear', normal;
  /*src: url(../fonts/Yesteryear-Regular.ttf);*/
  margin: 0 0 10px; 
}
h5 {
  font-family: 'kalam', normal;
  /*src: url(../fonts/Yesteryear-Regular.ttf);*/
  margin: 0 0 10px; 
}

h1{ font-size: clamp(44px, 6vw, 56px); line-height: 1.05; }
/*h2{ font-size: clamp(36px, 4.5vw, 40px); line-height: 1.1; }*/
h2{ font-size: clamp(28px, 3vw, 26px); line-height: 1.1; }
h3{ font-size: clamp(28px, 3vw, 26px); }
h4{ font-size: clamp(35px, 6vw, 45px); line-height: 1.05; }
h5{ font-size: clamp(35px, 5vw, 45px); line-height: 1.05; }

.lead{
  font-size: clamp(16px, 2.4vw, 18px);
  color: var(--muted);
  margin: 6px 0 16px;
}

.accent{ color: var(--accent); }

.badges{
  display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 16px 0 0; list-style: none;
}
.badges li{
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 100px;
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.book{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: clamp(16px, 2.6vw, 24px);
}

.book-cover{
  width: 100%; aspect-ratio: 2/3;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  background-image: url('../imagenes/libro.jpg'); /* tu imagen */
  background-size: cover;  /* recorta para cubrir */
  background-position: center; /* centra la imagen */
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.book-info p{
	color: var(--muted); 

}
.meta{ display: flex; gap: 16px; opacity: .8; font-size: 14px; margin: 10px 0 16px; }

.autor{
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: clamp(16px, 2.6vw, 24px);
}

.autor-foto{
  
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  width: 220px;
  height: 220px;
  background-image: url('../imagenes/autor.jpg'); /* tu imagen */
  background-size: cover;  /* recorta para cubrir */
  background-position: center; /* centra la imagen */
  border: 3px solid white; /* opcional: borde alrededor */
  box-shadow: 0 4px 8px rgba(0,0,0,0.3); /* opcional: sombra */
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.autor-info p{ color: var(--muted); }

.cta-row{ display: flex; flex-wrap: wrap; gap: 10px; }
.btn{
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 16px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.14);
  text-decoration: none; color: var(--text); font-weight: 600;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
  will-change: transform;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }
.btn.primary{ background: rgba(122,162,255,.18); }
.btn.ghost{ background: rgba(255,255,255,.06); }

.downloads{ display: grid; gap: 12px; margin-top: 10px; }
.dl{
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: var(--surface);
  border: 1px solid rgba(255,255,255,.08); border-radius: 12px;
  color: var(--text); text-decoration: none;
  transition: background .25s ease, transform .25s ease;
}
.dl:hover{ background: var(--surface-strong); transform: translateY(-1px); }

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
input, textarea, button {
  padding: 10px;
  border-radius: 6px;
  border: none;
  font-size: 1rem;
}
button {
  background: var(--accent);
  color: #000;
  cursor: pointer;
  transition: background 0.3s ease;
}
button:hover {
  background: #e6b84d;
}

footer {
  text-align: center;
  padding: 20px;
  background: rgba(10,12,18,0.8);
  font-size: 0.7rem;
  /*font-family: 'Caveat';*/
}

/* ==== Responsivo ==== */
@media (max-width: 860px){
  .book{ grid-template-columns: 1fr; }
}

@media (max-width: 720px){
  .menu-toggle{ display: flex; }
  .nav{
    position: fixed;
    top: 56px; right: 12px; left: 12px;
    background: rgba(10,12,18,.8);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    box-shadow: var(--shadow);
    transform-origin: top right;
    transform: scale(.98) translateY(-6px);
    opacity: 0; pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
  }
  .nav.open{ transform: scale(1) translateY(0); opacity: 1; pointer-events: auto; }
  .nav ul{ flex-direction: column; padding: 10px; gap: 6px; }
  .nav li{ margin: 0; }
  .nav a{ display: block; padding: 10px 12px; }
}

/* ==== Accesibilidad ==== */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; animation: none !important; }
}





