:root {
  --violet: #7B4DFF;
  --violet-soft: #A77CFF;
  --violet-dark: #14102b;
  --violet-deeper: #0D0A1E;
  --green: #50D29C;
  --celeste: #8BB7FF;
  --cream: #F5F0E8;
  --pink: #F06AAE;
  --ink: #F5F0E8;
  --muted: #B9B1C9;
  --white: #ffffff;
  --radius: 20px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font-display: "Bebas Neue", "Anton", sans-serif;
  --font-body: "DM Sans", "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--violet-deeper);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 14px 24px;
  background: #0D0A1E;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.brand-logo { width: 254px; height: auto; display: block; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.site-nav a {
  text-decoration: none;
  color: #B9B1C9;
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
}
.site-nav a:hover { color: #fff; }
.site-nav a.active { color: #fff; }
.site-nav .underline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  width: 100%;
  height: 10px;
  display: block;
  transform: rotate(-2deg);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.site-nav a:hover .underline,
.site-nav a.active .underline { opacity: 1; }

/* ── Hero ──────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  background: url('hero-first-frame.jpg') center/cover no-repeat;
  background-color: #1d1038;
  color: var(--white);
  overflow: hidden;
}
.hero .container { width: 100%; position: relative; z-index: 2; }
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(13,10,30,.15), rgba(13,10,30,.28));
  z-index: 1;
}
.hero-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
}
.label {
  display: inline-block;
  padding: 6px 16px 5px;
  font-size: clamp(1.8rem, 4.5vw, 3.1rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #151B3D;
  -webkit-text-fill-color: #151B3D;
}
.label-pink { background: #F06AAE; transform: rotate(-2deg); }
.label-light { background: #F7F2E8; transform: rotate(-2deg); }
.label-purple { background: #A78BEF; transform: rotate(-2deg); }
.hero-subtitle {
  margin: 22px 0 0 10px;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.5;
  font-weight: 600;
  max-width: 430px;
}
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 999px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary {
  display: inline-block;
  margin: 26px 0 0 10px;
  padding: 13px 26px;
  background: #F06AAE;
  color: #151B3D;
  border: 2px solid #151B3D;
  border-radius: 14px;
  box-shadow: 4px 4px 0 #151B3D;
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-primary:hover { transform: translateY(-2px) rotate(-1deg); }

/* ── Sections ──────────────────────────────────────── */
.section { position: relative; padding: 35px 24px 70px; color: #F5F0E8; }
.container { max-width: 980px; margin: 0 auto; }

/* Fondos por sección (inspirados en la referencia) */
#sobre-ainara { background: #111229; --tear-color: #111229; }
#musica { background: #A78BEF; --tear-color: #A78BEF; }
#series { background: #F06AAE; --tear-color: #F06AAE; }
#libros { background: #A78BEF; --tear-color: #A78BEF; }
#viajes { background: #F06AAE; --tear-color: #F06AAE; }

/* Borde superior rasgado (papel roto) entre secciones y pie */
.section::before,
.section::after,
.site-footer::before,
.site-footer::after {
  content: "";
  position: absolute;
  top: -30px;
  left: 0;
  right: 0;
  height: 30px;
  -webkit-mask: url("tear-mask.svg") top center / 100% 100% no-repeat;
          mask: url("tear-mask.svg") top center / 100% 100% no-repeat;
  pointer-events: none;
}
.section::before,
.site-footer::before {
  background: var(--tear-color, #111229);
  z-index: 1;
}
.section::after,
.site-footer::after {
  background: rgba(0, 0, 0, 0.20);
  filter: blur(3px);
  z-index: 0;
}
#musica, #series, #libros, #viajes { color: #10132A; }

.section-title {
  display: inline-block;
  padding: 5px 16px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  transform: rotate(-2deg);
}
#sobre-ainara .section-title { background: transparent; color: #fff; padding: 0; position: relative; }
.title-underline { position: absolute; left: 0; right: 0; bottom: -8px; width: 100%; height: 10px; }
#musica .section-title, #libros .section-title { background: #7B55C7; color: #fff; }
#series .section-title, #viajes .section-title { background: #F7F2E8; color: #10132A; }

.section-lead { font-size: 1.05rem; max-width: 640px; margin-bottom: 36px; color: #B9B1C9; }
#musica .section-lead, #series .section-lead, #libros .section-lead, #viajes .section-lead { color: rgba(16, 19, 42, 0.78); }
#about-text { margin-bottom: 0; }
#about-text a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ── Chips ─────────────────────────────────────────── */
.chip-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  color: #F5F0E8;
  border: 1.5px solid rgba(240, 106, 174, 0.45);
}
.chip:hover { background: #F06AAE; color: #151B3D; }
#musica .chip, #series .chip, #libros .chip, #viajes .chip {
  background: rgba(255, 255, 255, 0.32);
  color: #10132A;
  border-color: rgba(16, 19, 42, 0.3);
}
#musica .chip:hover, #series .chip:hover, #libros .chip:hover, #viajes .chip:hover { background: #10132A; color: #fff; }
.chips-more { font-weight: 700; font-size: 0.9rem; align-self: center; color: #B9B1C9; }
#musica .chips-more, #series .chips-more, #libros .chips-more, #viajes .chips-more { color: rgba(16, 19, 42, 0.6); }

/* ── Libros agrupados por autora ──────────────────── */
.authors { display: grid; gap: 24px; }
.author-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  color: #F06AAE;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
#libros .author-name { color: #5A2E8F; }
.author-books { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Playlists (Spotify embed) ──────────────────────── */
.playlists { margin-top: 30px; display: grid; gap: 18px; }
.playlist-embed {
  border-radius: 16px;
  overflow: hidden;
  padding: 6px;
  background: rgba(123, 77, 255, 0.10);
  border: 1px solid rgba(123, 77, 255, 0.3);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}
.playlist-embed iframe {
  display: block;
  border: 0;
  border-radius: 10px;
  filter: invert(1) hue-rotate(180deg);
}

/* ── Banner rasgado en Viajes ──────────────────────────────── */
#viajes { padding-bottom: 12px; }
.viajes-banner {
  position: relative;
  margin-top: 42px;
  container-type: inline-size;
}
.viajes-banner-img {
  display: block;
  width: 100%;
  height: auto;
}
.viajes-banner-text,
.viajes-banner-note {
  position: absolute;
  margin: 0;
  font-family: "Indie Flower", "Comic Sans MS", cursive;
  color: #1e1e2c;
  line-height: 1.2;
  pointer-events: none;
}
.viajes-banner-text {
  left: 23.5%;
  top: 29%;
  width: 28%;
  text-align: left;
  font-size: 3cqw;
  transform: rotate(-6deg);
}
.viajes-banner-note {
  left: 67%;
  top: 47%;
  width: 17%;
  text-align: center;
  font-size: 3.6cqw;
  transform: rotate(-16deg);
}

/* ── Footer ────────────────────────────────────────── */
.site-footer {
  position: relative;
  --tear-color: #101126;
  background: #101126;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 38px 24px 60px;
}
.footer-paddington {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.bear {
  width: 120px;
  height: 120px;
  animation: soar 5s ease-in-out infinite;
}
@keyframes soar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ── Reveal on scroll ──────────────────────────────── */
.reveal { opacity: 0; transition: opacity 1.0s ease; }
.reveal.visible { opacity: 1; }

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 640px) {
  .site-header { padding: 12px 16px; }
  .header-inner { flex-direction: column; gap: 10px; }
  .site-nav { gap: 12px; justify-content: center; }
  .site-nav a { font-size: 0.82rem; }
  .section { padding: 24px 18px 54px; }
  .hero { justify-content: flex-start; padding-top: 170px; }
  .hero-subtitle { margin-top: 220px; }
}
