@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Great+Vibes&family=Montserrat:wght@400;500;600;700&display=swap");

:root {
  --pink: #e7b6b4;
  --pink-light: #f6dedd;
  --pink-mid: #f0d4d0;
  --pink-dark: #9c3e45;
  --wine: #7d3038;
  --paper: #f8e9e5;
  --cream: #faf0ec;
  --ink: #3a2a28;
  --line: rgba(125, 48, 56, 0.28);
  --bg-pattern: url("bg-pattern.png");
  /* --flores: url("pattern-flores.jpg"); */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Montserrat, Arial, sans-serif;
  background-color: #f4efe9;
  background-image:
    radial-gradient(ellipse at 50% 0%, #fff 0%, transparent 55%),
    linear-gradient(#f4efe9, #ebe4dc);
  line-height: 1.55;
}

.edge-svg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.page {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  background-color: #f0d4d0;
  background-image: var(--bg-pattern);
  background-repeat: repeat;
  background-size: 480px auto;
  min-height: 100vh;
}

.page::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 90px rgba(125, 48, 56, 0.1);
  z-index: 1;
}

button,
input,
a {
  font: inherit;
}
img {
  max-width: 100%;
  display: block;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--wine);
  margin: 0;
  font-weight: 600;
}

.brand-script {
  font-family: "Great Vibes", cursive;
  color: var(--wine);
  text-decoration: none;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
}

.libro-img {
  width: min(100%, 420px);
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.28));
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 10px 16px;
  background: rgba(250, 240, 236, 0.72);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .brand-script {
  justify-self: center;
  text-align: center;
}

.nav-toggle {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  display: grid;
  gap: 5px;
  align-content: center;
  justify-items: center;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--wine);
  border-radius: 2px;
}

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 12px 20px 18px;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.site-nav.is-open {
  display: flex;
}

.site-nav a {
  color: var(--wine);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 600;
  font-family: "Cormorant Garamond", Georgia, serif;
}

.site-nav a:hover {
  opacity: 0.7;
}

/* —— Sections —— */
.section {
  position: relative;
  padding: 48px 18px;
  background: transparent;
  overflow: hidden;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 32px;
}

.section-header h2,
.sobre-copy h2,
.libro-copy h2 {
  font-size: clamp(40px, 7vw, 64px);
  line-height: 0.95;
}

.heart-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--pink-dark);
  margin: 12px 0 18px;
  font-size: 14px;
}

.heart-rule span {
  width: 52px;
  height: 1px;
  background: var(--pink-dark);
  opacity: 0.55;
  position: relative;
}

.heart-rule span::before,
.heart-rule span::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  border: 1px solid var(--pink-dark);
  border-radius: 50% 0;
  opacity: 0.5;
}

.heart-rule span:first-child::before {
  right: 0;
  transform: rotate(-45deg);
}
.heart-rule span:last-child::after {
  left: 0;
  transform: rotate(135deg);
}

.intro {
  max-width: 520px;
  margin: 0 auto;
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding: 12px 22px;
  border: 1.5px solid var(--wine);
  background: var(--pink-dark);
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}

.btn:hover {
  background: var(--wine);
}

.btn-outline {
  background: rgba(255, 245, 242, 0.85);
  color: var(--wine);
}

.btn-outline:hover {
  background: var(--pink-light);
  color: var(--wine);
}

.btn-wide {
  width: min(100%, 420px);
}

/* —— Hero (mobile) —— */
.hero {
  position: relative;
  padding: 40px 18px 48px;
  text-align: center;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(40px, 9vw, 68px);
  line-height: 0.92;
  margin-bottom: 24px;
}

.hero-tagline {
  margin: 20px 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(17px, 3.5vw, 22px);
  font-style: italic;
  color: var(--wine);
}

.danila-tv {
  width: min(420px, 92vw);
  margin: 0 auto;
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(80, 30, 35, 0.22));
}

.danila-tv--sobre {
  display: none;
}

/* —— Sobre mí —— */
.sobre-grid {
  display: grid;
  gap: 32px;
  align-items: center;
  justify-items: center;
}

.sobre-copy {
  text-align: center;
  max-width: 520px;
}

.sobre-copy p {
  margin: 0 0 14px;
  font-size: 14px;
}

.stamps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}

.stamp {
  width: 96px;
  height: 96px;
  border: 2px solid var(--wine);
  border-radius: 50%;
  display: grid;
  place-content: center;
  gap: 4px;
  text-align: center;
  padding: 10px;
  color: var(--wine);
  background: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 0 4px rgba(125, 48, 56, 0.12);
}

.stamp:nth-child(1) {
  transform: rotate(-4deg);
}
.stamp:nth-child(2) {
  transform: rotate(3deg);
}
.stamp:nth-child(3) {
  transform: rotate(-2deg);
}

.stamp-icon {
  font-size: 18px;
  line-height: 1;
}
.stamp-text {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* —— El libro —— */
.el-libro {
  background: rgba(231, 182, 180, 0.28);
}

.el-libro::before {
  left: -80px;
  bottom: -60px;
}
.el-libro::after {
  right: -90px;
  top: -50px;
}

.libro-grid {
  display: grid;
  gap: 28px;
  align-items: center;
}

.libro-copy {
  text-align: center;
}
.libro-copy p {
  margin: 0 0 12px;
  font-size: 14px;
  max-width: 480px;
  margin-inline: auto;
}

.libro-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 26px;
}

.libro-features li {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 110px;
  font-size: 11px;
  color: var(--wine);
  text-align: center;
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--pink-dark);
  display: grid;
  place-items: center;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.45);
}

.libro-visual {
  display: grid;
  place-items: center;
  order: -1;
}

/* —— Radio —— */
.radio-section {
  background: transparent;
}

.radio-browser {
  display: none;
}

.novela-list,
.episodes {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  overflow: hidden;
}

.novela-list {
  max-height: 720px;
  display: flex;
  flex-direction: column;
}

.list-title {
  padding: 17px 20px;
  background: rgba(156, 62, 69, 0.1);
  color: var(--wine);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.list-items {
  overflow-y: auto;
  padding: 8px;
}

.novela-button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 9px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  border-radius: 9px;
}

.novela-button:hover {
  background: rgba(221, 165, 164, 0.45);
}

.novela-button.active {
  background: #c47a78;
  color: #fff;
  font-weight: 700;
}

.novela-button.active .item-count {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.thumb-wrap {
  display: block;
  width: 42px;
  height: 42px;
}

.thumb {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #d69d9d;
  display: grid;
  place-items: center;
  color: var(--wine);
  font-family: Georgia, serif;
  font-size: 18px;
}

.cover {
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
  border-radius: 6px;
  object-fit: cover;
  background: #d69d9d;
  display: grid;
  place-items: center;
  color: var(--wine);
  font-family: Georgia, serif;
  font-size: 28px;
}

.placeholder-cover {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent 55%), #d69d9d;
}

.novela-name {
  min-width: 0;
  font-size: 13px;
}

.item-count {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(125, 48, 56, 0.12);
  color: var(--wine);
  font-size: 10px;
  font-weight: 700;
}

.episodes {
  padding: 28px;
}

.novela-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 20px;
}

.novela-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 0.95;
}

.novela-header p {
  line-height: 1.5;
  margin: 7px 0 0;
}

.meta {
  color: var(--pink-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.protagonists {
  font-size: 12px;
}
.description {
  font-size: 13px;
  max-width: 650px;
}

.player {
  margin: 0 0 16px;
  border-radius: 10px;
  overflow: hidden;
  background: #2a1818;
}

.player-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #1a1010;
}

.episode-list {
  margin-top: 8px;
}

.episode {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px 4px;
  border: 0;
  border-bottom: 1px dashed var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.episode:last-child {
  border-bottom: 0;
}
.episode:hover {
  background: rgba(255, 255, 255, 0.28);
}
.episode.active {
  background: rgba(196, 122, 120, 0.28);
}

.play-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--pink-dark);
  color: #fff;
  border: 0;
  font-size: 11px;
  flex-shrink: 0;
  pointer-events: none;
}

.episode-title {
  font-weight: 600;
  font-size: 13px;
}
.episode-duration {
  font-size: 12px;
  color: var(--wine);
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}

.mobile-accordion {
  display: block;
}

.mobile-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.4);
}

.mobile-card.open {
  background: rgba(221, 165, 164, 0.45);
}

.mobile-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 11px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.mobile-trigger strong {
  display: block;
  font-size: 13px;
}
.mobile-trigger small {
  display: block;
  margin-top: 3px;
  opacity: 0.62;
  font-size: 9px;
}

.mobile-trigger .arrow {
  color: var(--wine);
  transition: transform 0.2s;
  font-size: 18px;
}

.mobile-card.open .mobile-trigger .arrow {
  transform: rotate(180deg);
}

.mobile-items {
  display: none;
  padding: 0 12px 12px;
}
.mobile-card.open .mobile-items {
  display: block;
}

.mobile-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 11px 0;
  border: 0;
  border-top: 1px dashed var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.mobile-item.active {
  background: rgba(196, 122, 120, 0.22);
}
.mobile-item-title {
  font-size: 12px;
  font-weight: 600;
}
.mobile-item-duration {
  font-size: 11px;
  opacity: 0.7;
  color: var(--wine);
}

.mobile-item .play-btn {
  width: 30px;
  height: 30px;
  font-size: 10px;
}

.radio-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.radio-cta-wrap[hidden] {
  display: none;
}

.csv-loader {
  display: none;
}

.error,
.empty {
  padding: 20px;
  color: var(--wine);
  background: rgba(156, 62, 69, 0.08);
  border-radius: 10px;
}

.empty a {
  color: var(--wine);
  font-weight: 600;
}

.loading {
  padding: 15px;
  opacity: 0.65;
  font-size: 13px;
}

/* —— Footer —— */
.site-footer {
  position: relative;
  width: 100%;
  min-height: 72px;
  padding: 0;
  overflow: hidden;
  border-top: 0;
  line-height: 0;
}

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

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

.footer-social-hit {
  position: absolute;
  top: 28%;
  right: 18%;
  bottom: 28%;
  width: min(32%, 280px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  z-index: 2;
}

.footer-social-hit a {
  display: block;
  border-radius: 50%;
}

/* —— Desktop —— */
@media (min-width: 761px) {
  .page {
    max-width: 1180px;
    margin: 32px auto 48px;
    min-height: calc(100vh - 80px);
    border: 1px solid rgba(125, 48, 56, 0.22);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.45),
      inset 0 0 0 1px rgba(255, 236, 230, 0.25),
      inset 0 0 80px rgba(125, 48, 56, 0.08),
      1px 1px 0 #e8cfc9,
      3px 4px 0 #d9b8b2,
      6px 8px 0 #c9a39d,
      10px 16px 28px rgba(80, 35, 40, 0.16),
      0 28px 56px rgba(80, 35, 40, 0.1);
  }

  .page::after {
    content: '';
    position: absolute;
    inset: -5px -4px -7px -5px;
    z-index: -1;
    background:
      linear-gradient(180deg, #ead3ce, #dcc0ba 40%, #c9a8a2);
    box-shadow: 0 18px 40px rgba(80, 35, 40, 0.14);
    filter: url(#cardboard-edge);
  }

  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 20px 32px;
    background: transparent;
    border-bottom: 0;
    position: relative;
  }

  .nav-toggle,
  .site-header > .brand-script {
    display: none;
  }

  .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 40px;
    background: transparent;
    border: 0;
    padding: 0;
  }

  .hero {
    display: none;
  }

  .section {
    padding: 64px 40px;
  }

  .sobre-mi {
    padding-top: 32px;
    background-image: url(danila.png);
    background-size: contain;
    background-position: right bottom;
    background-repeat: no-repeat;
    height: 590px;
  }

  .sobre-grid {
    grid-template-columns: 1fr minmax(280px, 46%);
    gap: 32px;
    align-items: center;
    justify-items: stretch;
  }

  .sobre-copy {
    text-align: left;
    max-width: none;
  }

  .sobre-copy .heart-rule {
    justify-content: flex-start;
  }
  .stamps {
    justify-content: flex-start;
  }

  .danila-tv--sobre {
    display: block;
    width: min(100%, 520px);
    justify-self: end;
  }

  .libro-grid {
    grid-template-columns: 1fr minmax(280px, 440px);
    gap: 48px;
  }

  .libro-visual {
    order: 2;
  }
  .libro-copy {
    order: 1;
    text-align: left;
  }
  .libro-copy .heart-rule {
    justify-content: flex-start;
  }
  .libro-copy p {
    margin-inline: 0;
  }
  .libro-features {
    justify-content: flex-start;
  }

  .radio-section .section-inner {
    max-width: 1180px;
    padding: 48px 40px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(248, 233, 229, 0.72);
    box-shadow: 0 18px 50px rgba(80, 40, 40, 0.1);
  }

  .radio-browser {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
  }

  .mobile-accordion {
    display: none;
  }

  .site-footer {
    display: block;
    padding: 0;
  }

  .footer-social-hit {
    right: 14%;
    width: min(26%, 300px);
  }
}

@media (min-width: 1000px) {
  .section {
    padding-inline: 56px;
  }
}
