/* Libros Negros — Shared Stylesheet (mobile-first) */

/* === Font Faces === */
@font-face { font-family: 'Playfair Display'; src: url('assets/fonts/PlayfairDisplay-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('assets/fonts/PlayfairDisplay-Italic.ttf') format('truetype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('assets/fonts/PlayfairDisplay-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('assets/fonts/PlayfairDisplay-MediumItalic.ttf') format('truetype'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('assets/fonts/PlayfairDisplay-SemiBold.ttf') format('truetype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('assets/fonts/PlayfairDisplay-SemiBoldItalic.ttf') format('truetype'); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('assets/fonts/PlayfairDisplay-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('assets/fonts/PlayfairDisplay-BoldItalic.ttf') format('truetype'); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('assets/fonts/PlayfairDisplay-ExtraBold.ttf') format('truetype'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('assets/fonts/PlayfairDisplay-ExtraBoldItalic.ttf') format('truetype'); font-weight: 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('assets/fonts/PlayfairDisplay-Black.ttf') format('truetype'); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('assets/fonts/PlayfairDisplay-BlackItalic.ttf') format('truetype'); font-weight: 900; font-style: italic; font-display: swap; }

/* === Variables === */
:root {
  --color-bg-modal: #1a1a1a;
  --color-text: #000000;
  --color-text-light: #fff;
  --font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --carousel-transition: 0.4s ease;
}

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

html { overflow-y: scroll; }

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: url('assets/bg.png') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; font: inherit; }

/* =============================================
   HOME
   ============================================= */

/* Mobile: no scroll-snap, just stack */
.section {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.section--logo { flex-direction: column; gap: 2rem; }

/* Scroll indicator */
.scroll-indicator { display: flex; flex-direction: column; align-items: center; margin-top: 3rem; cursor: pointer; }
.scroll-indicator__arrow {
  width: 30px; height: 30px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(45deg);
  opacity: 0.8;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
.section--editorial { flex-direction: column; padding: 1.5rem; }

.logo { max-width: 120px; width: 100%; }

.editorial-text { max-width: 100%; width: 100%; margin-top: -8vh; }
.editorial-text p { margin-bottom: 1em; font-size: clamp(0.85rem, 2.5vw, 1.1rem); }
.editorial-text p strong { font-weight: 700; }
.editorial-text p:last-child { text-align: center; margin-top: 1.5em; }

/* =============================================
   HAMBURGER MENU
   ============================================= */
.menu-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-toggle__icon {
  position: absolute;
  width: 36px;
  transition: opacity 0.2s ease;
}
.menu-toggle__icon--open { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon--closed { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon--open { opacity: 1; }

.menu-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
  background: url('assets/bg.png') no-repeat center center;
  background-size: cover;
}
.menu-overlay[aria-hidden="false"] { opacity: 1; pointer-events: auto; }

.menu-modal {
  background-color: var(--color-bg-modal);
  width: 240px; height: 240px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
}
.menu-modal a {
  color: var(--color-text-light);
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}
.menu-modal a:hover { opacity: 0.7; }

/* =============================================
   BOOKS PAGE
   ============================================= */
.book-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.25rem 2rem;
  gap: 2rem;
}
.book-page__carousel { flex: 0 0 auto; width: 100%; max-width: 360px; }
.book-page__info {
  max-width: 360px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.book-page__title { font-size: clamp(0.9rem, 3vw, 1.2rem); font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0; line-height: 1.2; }
.book-page__subtitle { font-size: clamp(0.8rem, 2vw, 1rem); font-style: italic; margin-bottom: 0; margin-top: 0.1em; }
.book-page__author { font-size: clamp(0.85rem, 2.5vw, 1.05rem); margin-top: 2em; margin-bottom: 0; }
.book-page__type, .book-page__year { font-size: 0.9rem; margin-top: auto; }
.book-page__year { margin-top: 0; }

/* =============================================
   CAROUSEL
   ============================================= */
.carousel {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 360px;
  z-index: 2;
}
.carousel__track-wrapper { overflow: hidden; flex: 1; border-radius: 2px; }
.carousel__track { display: flex; transition: transform var(--carousel-transition); }
.carousel__slide { flex: 0 0 100%; width: 100%; object-fit: cover; aspect-ratio: 4/3; }
.carousel__arrow {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-size: 22px;
  color: #000;
  cursor: pointer;
}

/* =============================================
   CONTACT PAGE
   ============================================= */
.contact-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.25rem 2rem;
  gap: 2rem;
  position: relative;
  z-index: 2;
}
.contact-page__cards { display: flex; flex-direction: column; align-items: center; gap: 3rem; }

.card { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.card--reverse { flex-direction: column; }
.card__image { width: 70px; height: 70px; object-fit: contain; }
.card__info { text-align: center; }
.card--reverse .card__info { text-align: center; }
.card__name { font-size: clamp(0.95rem, 3vw, 1.25rem); font-weight: 700; margin-bottom: 0.1em; }
.card__role { font-size: 0.85rem; margin-bottom: 0.3em; }
.card__email { font-size: 0.85rem; font-style: italic; }

.contact-footer { margin-top: 1.5rem; text-align: center; }
.contact-footer__address { font-size: 0.9rem; margin-bottom: 1rem; display: block; text-decoration: none; }
.contact-footer__instagram { display: inline-block; margin-top: 1rem; }
.contact-footer__instagram img { width: 28px; height: 28px; }

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.9);
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.lightbox[aria-hidden="false"] { opacity: 1; pointer-events: auto; }
.lightbox__img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 2px; }
.lightbox__close {
  position: absolute; top: 1rem; right: 1.5rem;
  font-size: 2.5rem; color: #fff; z-index: 201;
  line-height: 1; cursor: pointer;
}
.lightbox__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 2rem; color: #fff; cursor: pointer;
  background: none; border: none; padding: 1rem;
}
.lightbox__arrow--left { left: 1rem; }
.lightbox__arrow--right { right: 1rem; }

/* =============================================
   DECORATIVE BIRDS
   ============================================= */
.bird {
  position: fixed;
  z-index: 1;
  pointer-events: none;
}
.bird--right {
  right: 0;
  bottom: 0;
  width: 60vw;
  max-width: 500px;
  height: auto;
  object-fit: contain;
  object-position: right bottom;
}
.bird--left {
  left: 0;
  bottom: 0;
  width: 60vw;
  max-width: 500px;
  height: auto;
  object-fit: contain;
  object-position: left bottom;
}

/* =============================================
   RESPONSIVE: Tablet (768px+)
   ============================================= */
@media (min-width: 768px) {
  .section--editorial { padding: 2rem; }
  .editorial-text { max-width: 550px; }
  .logo { max-width: 150px; }

  .menu-toggle { top: 1.5rem; right: 1.5rem; width: 48px; height: 48px; }
  .menu-toggle__icon { width: 40px; }
  .menu-modal { width: 280px; height: 280px; }
  .menu-modal a { font-size: 1.05rem; }

  .book-page { padding: 5rem 2rem 2rem; gap: 2.5rem; }
  .book-page__carousel { max-width: 420px; }
  .book-page__info { text-align: left; }

  .carousel { max-width: 420px; }

  .contact-page { padding: 5rem 2rem 2rem; }
  .card { flex-direction: row; gap: 1.5rem; text-align: left; }
  .card--reverse { flex-direction: row-reverse; }
  .card__info { text-align: right; }
  .card--reverse .card__info { text-align: left; }
  .card__image { width: 80px; height: 80px; }
}

/* =============================================
   RESPONSIVE: Desktop (1200px+)
   ============================================= */
@media (min-width: 1200px) {
  /* Enable scroll-snap on desktop only */
  html {
    scroll-snap-type: y mandatory;
  }
  .section { scroll-snap-align: start; }

  .editorial-text { max-width: 820px; }
  .logo { max-width: 170px; }

  .menu-modal { width: 300px; height: 300px; gap: 2rem; }
  .menu-modal a { font-size: 1.1rem; }

  .book-page {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto;
    align-items: stretch;
    justify-content: center;
    align-content: center;
    padding: 2rem 4rem;
    gap: 2rem;
    min-height: 100vh;
  }
  .book-page__carousel { max-width: 500px; }
  .book-page__info {
    max-width: 400px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
  }

  .carousel { max-width: 500px; }

  .contact-page { padding: 2rem 4rem; }

  .bird--right { max-width: 1400px; width: 75vw; top: auto; bottom: -18%; transform: none; }
  .bird--left { max-width: 1400px; width: 75vw; top: auto; bottom: -18%; transform: none; }
}

/* =============================================
   RESPONSIVE: Large Desktop (1600px+)
   ============================================= */
@media (min-width: 1600px) {
  .editorial-text { max-width: 900px; }
  .logo { max-width: 190px; }

  .menu-modal { width: 320px; height: 320px; }

  .book-page { padding: 2rem 6rem; gap: 6rem; }
  .book-page__carousel { max-width: 560px; }
  .book-page__info { max-width: 440px; justify-content: space-between; }

  .carousel { max-width: 560px; }

  .contact-page { padding: 2rem 6rem; }

  .bird--right { max-width: 1600px; width: 70vw; }
  .bird--left { max-width: 1600px; width: 70vw; }
}
