/* ================================================
   LUZ DEL ALBA EDICIONES — Design System & Styles
   ================================================ */

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

:root {
  /* Brand Colors */
  --color-cream: #F5E9D6;
  --color-cream-light: #FBF5EC;
  --color-cream-dark: #EDE0CE;
  --color-gold: #F0C889;
  --color-gold-light: #F5D9A8;
  --color-gold-dark: #D4A85C;
  --color-terracota: #D6884C;
  --color-terracota-dark: #B86E38;
  --color-dark-teal: #2F4A4E;
  --color-dark-teal-light: #3D5E63;
  --color-sage: #59765B;
  --color-sage-light: #6B8A6D;
  --color-deep-blue: #1A2F3A;
  --color-deep-blue-light: #243D4A;
  --color-ocean: #162733;
  --color-white: #FFFDF9;
  --color-text: #3A3A3A;
  --color-text-light: #6B6B6B;

  /* Typography */
  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Lora', Georgia, serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-smooth: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(47, 74, 78, 0.08);
  --shadow-md: 0 4px 16px rgba(47, 74, 78, 0.12);
  --shadow-lg: 0 8px 32px rgba(47, 74, 78, 0.16);
  --shadow-book: 0 10px 40px rgba(47, 74, 78, 0.2);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-arch: 50% 50% 0 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-dark-teal);
  background-color: var(--color-cream-light);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-dark-teal);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }

p {
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  color: var(--color-text);
  line-height: 1.8;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background-color: var(--color-terracota);
  color: var(--color-white);
  border-color: var(--color-terracota);
}

.btn-primary:hover {
  background-color: var(--color-terracota-dark);
  border-color: var(--color-terracota-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(214, 136, 76, 0.35);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-dark-teal);
  border-color: var(--color-dark-teal);
}

.btn-secondary:hover {
  background-color: var(--color-dark-teal);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(47, 74, 78, 0.25);
}

/* ================================================
   HEADER / NAVIGATION
   ================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition-base);
  background: linear-gradient(to bottom, rgba(26, 47, 58, 0.65) 0%, rgba(26, 47, 58, 0.35) 50%, transparent 100%);
}

.site-header.scrolled {
  background: rgba(251, 245, 236, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.6rem 0;
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1001;
}

.header-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.site-header.scrolled .header-logo-img {
  width: 40px;
  height: 40px;
}

.header-logo:hover .header-logo-img {
  transform: rotate(5deg) scale(1.05);
}

.header-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-cream);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.logo-sub {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-gold-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.main-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav .nav-links a {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-cream);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  padding: 0.3rem 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.main-nav .nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-gold);
  transition: all var(--transition-base);
  transform: translateX(-50%);
}

.main-nav .nav-links a:hover::after,
.main-nav .nav-links a.active::after {
  width: 100%;
}

.main-nav .nav-links a:hover {
  color: var(--color-gold-light);
}

/* Scrolled state: switch to dark text */
.site-header.scrolled .logo-name {
  color: var(--color-dark-teal);
  text-shadow: none;
}

.site-header.scrolled .logo-sub {
  color: var(--color-gold-dark);
  text-shadow: none;
}

.site-header.scrolled .main-nav .nav-links a {
  color: var(--color-dark-teal);
  text-shadow: none;
}

.site-header.scrolled .main-nav .nav-links a:hover {
  color: var(--color-terracota);
}

.site-header.scrolled .nav-toggle span {
  background-color: var(--color-dark-teal);
}

/* Hamburger Menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background-color: var(--color-cream);
  transition: all var(--transition-base);
  border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ================================================
   HERO SECTION
   ================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(26, 47, 58, 0.55) 0%,
    rgba(47, 74, 78, 0.35) 40%,
    rgba(89, 118, 91, 0.2) 70%,
    rgba(240, 200, 137, 0.1) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--space-3xl) var(--space-lg);
  max-width: 650px;
  margin-left: 8%;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  color: var(--color-white);
  line-height: 1.05;
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeUp 1s ease 0.3s forwards;
}

.hero-divider {
  font-size: 1.4rem;
  color: var(--color-gold);
  margin: var(--space-md) 0;
  opacity: 0;
  animation: heroFadeUp 1s ease 0.6s forwards;
  text-shadow: 0 0 20px rgba(240, 200, 137, 0.5);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: rgba(255, 253, 249, 0.9);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeUp 1s ease 0.8s forwards;
}

.hero .btn {
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeUp 1s ease 1s forwards;
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: heroFadeUp 1s ease 1.4s forwards;
}

.hero-scroll span {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: rgba(255, 253, 249, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(240, 200, 137, 0.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.8); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ================================================
   SECTIONS — Shared Styles
   ================================================ */
.section {
  padding: var(--space-3xl) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  display: inline-block;
  position: relative;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.section-ornament {
  display: block;
  font-size: 1rem;
  color: var(--color-gold);
  margin: 0.5rem auto;
  text-shadow: 0 0 10px rgba(240, 200, 137, 0.3);
}

.section-header-left {
  text-align: left;
}

.section-header-left .section-ornament {
  margin: 0.5rem 0;
}

/* Decorative leaf divider */
.leaf-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: var(--space-md) auto;
  max-width: 200px;
}

.leaf-divider::before,
.leaf-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-gold), transparent);
}

/* ================================================
   LIBROS SECTION
   ================================================ */
.libros-section {
  background-color: var(--color-cream-light);
}

.libro-destacado {
  display: flex;
  align-items: stretch;
  gap: var(--space-xl);
  max-width: 950px;
  margin: 0 auto;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.libro-destacado:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-book);
}

.libro-portada {
  flex: 0 0 340px;
  position: relative;
  overflow: hidden;
}

.libro-portada img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.libro-destacado:hover .libro-portada img {
  transform: scale(1.03);
}

.libro-portada::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(to top, rgba(245, 233, 214, 0.3), transparent);
  pointer-events: none;
}

.libro-info {
  flex: 1;
  padding: var(--space-xl) var(--space-xl) var(--space-xl) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.libro-etiqueta {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-xs);
}

.libro-titulo {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  color: var(--color-dark-teal);
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

.libro-autor {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-terracota);
  font-style: italic;
  margin-bottom: var(--space-md);
}

.libro-sinopsis {
  font-size: 0.98rem;
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
}

.libro-botones {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.libro-botones .btn {
  font-size: 0.82rem;
  padding: 0.75rem 1.6rem;
}

/* ================================================
   CONTACT POPOVER
   ================================================ */
.contacto-wrapper {
  position: relative;
  display: inline-block;
}

.contacto-popover {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 290px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 100;
  border: 1px solid rgba(240, 200, 137, 0.25);
}

.contacto-popover.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.popover-arrow {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: var(--color-white);
  border-right: 1px solid rgba(240, 200, 137, 0.25);
  border-bottom: 1px solid rgba(240, 200, 137, 0.25);
}

.popover-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-dark-teal);
  margin-bottom: var(--space-sm);
  text-align: center;
  letter-spacing: 0.02em;
}

.popover-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
  color: var(--color-text) !important;
  font-size: 0.88rem;
  line-height: 1.3;
}

.popover-link:hover {
  background: rgba(240, 200, 137, 0.15);
}

.popover-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-terracota);
}

.popover-link + .popover-link {
  border-top: 1px solid rgba(240, 200, 137, 0.15);
}

/* Grid of books (for future expansion) */
.libros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.libro-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-slow);
}

.libro-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-book);
}

.libro-card .libro-card-portada {
  position: relative;
  padding-top: 130%;
  overflow: hidden;
  border-radius: 50% 50% 0 0 / 25% 25% 0 0;
}

.libro-card .libro-card-portada img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.libro-card:hover .libro-card-portada img {
  transform: scale(1.05);
}

.libro-card .libro-card-info {
  padding: var(--space-md);
  text-align: center;
}

.libro-card .libro-card-info h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.libro-card .libro-card-info .autor {
  font-size: 0.85rem;
  color: var(--color-text-light);
  font-style: italic;
}

/* ================================================
   SOBRE NOSOTROS SECTION
   ================================================ */
.sobre-section {
  background-color: var(--color-cream);
  overflow: hidden;
}

.sobre-content {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
  max-width: 1050px;
  margin: 0 auto;
}

.sobre-imagen {
  flex: 0 0 380px;
  position: relative;
}

.sobre-imagen-frame {
  position: relative;
  border-radius: 200px 200px 16px 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.sobre-imagen-frame img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.sobre-imagen-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 3px rgba(240, 200, 137, 0.25);
  pointer-events: none;
}

/* Decorative dot beside image */
.sobre-imagen::before {
  content: '✦';
  position: absolute;
  top: -15px;
  right: -15px;
  font-size: 1.2rem;
  color: var(--color-gold);
  text-shadow: 0 0 15px rgba(240, 200, 137, 0.4);
}

.sobre-texto {
  flex: 1;
}

.sobre-texto h2 {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sobre-texto .sobre-ornament {
  font-size: 1rem;
  color: var(--color-gold);
  margin: 0.5rem 0 var(--space-md);
  display: block;
}

.sobre-texto p {
  margin-bottom: var(--space-md);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-text);
}

.sobre-texto .btn {
  margin-top: var(--space-sm);
}

/* ================================================
   AUTORES SECTION
   ================================================ */
.autores-section {
  background-color: var(--color-cream-light);
}

.autor-destacado {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  max-width: 900px;
  margin: 0 auto;
}

.autor-avatar {
  flex: 0 0 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-cream-dark));
  display: flex;
  align-items: center;
  justify-content: center;
}

.autor-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.autor-avatar-placeholder svg {
  width: 80px;
  height: 80px;
  opacity: 0.5;
  color: var(--color-dark-teal);
}

.autor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.autor-avatar::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--color-gold);
  opacity: 0.4;
}

.autor-info {
  flex: 1;
}

.autor-nombre {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  color: var(--color-dark-teal);
  margin-bottom: 0.3rem;
}

.autor-rol {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-terracota);
  font-style: italic;
  letter-spacing: 0.03em;
  margin-bottom: var(--space-md);
}

.autor-bio {
  font-size: 0.98rem;
  color: var(--color-text);
  line-height: 1.8;
}

.autor-libros-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--space-md);
  padding: 0.4rem 1rem;
  background: rgba(240, 200, 137, 0.2);
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-dark-teal);
}

.autor-libros-tag svg {
  width: 16px;
  height: 16px;
  color: var(--color-gold-dark);
}

/* ================================================
   FOOTER — Ocean Theme
   ================================================ */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, var(--color-deep-blue) 0%, var(--color-ocean) 100%);
  color: rgba(255, 253, 249, 0.8);
  padding-top: 0;
  overflow: hidden;
}

/* Animated Waves */
.footer-waves {
  position: relative;
  width: 100%;
  height: 150px;
  overflow: hidden;
  margin-bottom: -1px;
}

.footer-waves svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
}

.wave-1 {
  animation: waveMove 8s ease-in-out infinite;
  opacity: 0.6;
}

.wave-2 {
  animation: waveMove 10s ease-in-out infinite reverse;
  opacity: 0.4;
}

.wave-3 {
  animation: waveMove 12s ease-in-out infinite;
  opacity: 0.8;
}

@keyframes waveMove {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-25%); }
}

.footer-content {
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  position: relative;
  z-index: 1;
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.footer-brand {
  max-width: 280px;
}

.footer-brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--space-sm);
}

.footer-brand-logo img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.footer-brand-logo .footer-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.footer-brand-logo .footer-logo-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-cream);
  letter-spacing: 0.04em;
}

.footer-brand-logo .footer-logo-sub {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  color: var(--color-gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-brand-tagline {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-style: italic;
  color: rgba(240, 200, 137, 0.7);
  margin-top: 0.25rem;
}

.footer-nav-section h4 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-cream);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.footer-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-nav-links a {
  font-size: 0.9rem;
  color: rgba(255, 253, 249, 0.65);
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.footer-nav-links a:hover {
  color: var(--color-gold);
}

.footer-contact-section h4 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-cream);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.footer-contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-contact-links a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: rgba(255, 253, 249, 0.65);
  transition: color var(--transition-fast);
}

.footer-contact-links a:hover {
  color: var(--color-gold);
}

.footer-contact-links svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--color-gold);
  opacity: 0.7;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(240, 200, 137, 0.2), transparent);
  margin-bottom: var(--space-md);
}

.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.footer-copyright {
  font-size: 0.8rem;
  color: rgba(255, 253, 249, 0.4);
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
}

/* Floating particles in footer */
.footer-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--color-gold);
  border-radius: 50%;
  opacity: 0;
  animation: floatParticle 6s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 25%; animation-delay: 1.5s; }
.particle:nth-child(3) { left: 45%; animation-delay: 3s; }
.particle:nth-child(4) { left: 65%; animation-delay: 0.8s; }
.particle:nth-child(5) { left: 80%; animation-delay: 2.5s; }
.particle:nth-child(6) { left: 92%; animation-delay: 4s; }

@keyframes floatParticle {
  0% { bottom: -10px; opacity: 0; }
  20% { opacity: 0.6; }
  80% { opacity: 0.3; }
  100% { bottom: 100%; opacity: 0; transform: translateX(20px); }
}

/* ================================================
   SCROLL REVEAL ANIMATIONS
   ================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */
@media (max-width: 1024px) {
  .hero-content {
    margin-left: 5%;
  }

  .libro-portada {
    flex: 0 0 280px;
  }

  .sobre-imagen {
    flex: 0 0 320px;
  }

  .sobre-imagen-frame img {
    height: 420px;
  }
}

@media (max-width: 768px) {
  /* Nav Mobile */
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: rgba(251, 245, 236, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 5rem var(--space-lg) var(--space-lg);
    transition: right var(--transition-smooth);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .main-nav.active {
    right: 0;
  }

  .main-nav .nav-links {
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
  }

  .main-nav .nav-links a {
    font-size: 1.15rem;
    color: var(--color-dark-teal);
    text-shadow: none;
  }

  /* Hero Mobile */
  .hero-content {
    margin-left: 0;
    padding: var(--space-3xl) var(--space-md);
    text-align: center;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-title {
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }

  /* Libro Mobile */
  .libro-destacado {
    flex-direction: column;
  }

  .libro-portada {
    flex: none;
    max-height: 400px;
  }

  .libro-info {
    padding: var(--space-lg);
  }

  .libro-botones {
    flex-direction: column;
  }

  .libro-botones .btn {
    justify-content: center;
    width: 100%;
  }

  .contacto-wrapper {
    width: 100%;
  }

  .contacto-popover {
    width: 100%;
    left: 0;
    transform: translateX(0) translateY(8px);
  }

  .contacto-popover.active {
    transform: translateX(0) translateY(0);
  }

  .popover-arrow {
    left: 50%;
  }

  /* Sobre Nosotros Mobile */
  .sobre-content {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .sobre-imagen {
    flex: none;
    width: 260px;
    margin: 0 auto;
  }

  .sobre-imagen-frame img {
    height: 350px;
  }

  .sobre-texto {
    text-align: center;
  }

  .section-header-left {
    text-align: center;
  }

  .section-header-left .section-ornament {
    margin: 0.5rem auto;
  }

  .sobre-texto .btn {
    margin: var(--space-sm) auto 0;
  }

  /* Autor Mobile */
  .autor-destacado {
    flex-direction: column;
    text-align: center;
  }

  .autor-avatar {
    flex: none;
  }

  .autor-info {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Footer Mobile */
  .footer-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-lg);
  }

  .footer-brand {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-nav-links,
  .footer-contact-links {
    align-items: center;
  }

  .footer-waves {
    height: 100px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  .autor-avatar {
    width: 150px;
    height: 150px;
    flex: none;
  }

  .header-logo-text {
    display: none;
  }
}

/* --- Overlay for mobile nav --- */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 47, 58, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 999;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-terracota);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: 900;
  box-shadow: var(--shadow-md);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-terracota-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.back-to-top svg {
  width: 22px;
  height: 22px;
}

/* --- Selection Color --- */
::selection {
  background-color: rgba(240, 200, 137, 0.4);
  color: var(--color-dark-teal);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-cream);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gold);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold-dark);
}

/* --- Focus Styles (Accessibility) --- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 4px;
}
