/* ═══════════════════════════════════════════════════════════════
   CASSA RICCI — Maison Littéraire
   Design System & Styles
   "Donde la literatura se convierte en arte."
   ═══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ──────────────────────────────────────────── */
:root {
  /* Palette */
  --noir: #0B0B0D;
  --ivoire: #F4F1EA;
  --charbon: #2B2B2E;
  --bourgogne: #4A1E24;
  --bourgogne-glow: rgba(74, 30, 36, 0.4);

  --ivoire-dim: #d4d0c7;
  --noir-soft: #131316;
  --charbon-light: #3d3d42;

  /* Typography */
  --ff-serif: 'Cormorant Garamond', 'Georgia', serif;
  --ff-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --fs-hero: clamp(3rem, 8vw, 7rem);
  --fs-h2: clamp(2rem, 4vw, 3.5rem);
  --fs-h3: clamp(1.2rem, 2vw, 1.6rem);
  --fs-body: clamp(0.95rem, 1.1vw, 1.05rem);
  --fs-small: clamp(0.75rem, 0.9vw, 0.85rem);
  --fs-label: clamp(0.65rem, 0.8vw, 0.75rem);

  --ls-wide: 0.25em;
  --ls-medium: 0.15em;
  --ls-body: 0.02em;

  --lh-body: 1.75;
  --lh-heading: 1.1;

  /* Spacing — increased for breathing room */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --space-xxl: 12rem;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.5s;
  --duration-slow: 1.2s;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 70px;
}

/* ─── Reset & Base ───────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--ivoire);
  background-color: var(--noir);
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

::selection {
  background: var(--bourgogne);
  color: var(--ivoire);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--noir);
}

::-webkit-scrollbar-thumb {
  background: var(--charbon);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bourgogne);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Typography ─────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--ff-serif);
  font-weight: 400;
  line-height: var(--lh-heading);
}

blockquote {
  font-family: var(--ff-serif);
  font-style: italic;
  font-weight: 300;
}

/* ─── Reveal animation ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity var(--duration-slow) var(--ease),
    transform var(--duration-slow) var(--ease);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0) translateX(0);
}

.reveal--left {
  transform: translateX(-60px);
}

.reveal--right {
  transform: translateX(60px);
}

.reveal-delay-1 {
  transition-delay: 0.15s;
}

.reveal-delay-2 {
  transition-delay: 0.3s;
}

.reveal-delay-3 {
  transition-delay: 0.45s;
}

.reveal-delay-4 {
  transition-delay: 0.6s;
}

/* ═══════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background-color var(--duration) var(--ease),
    backdrop-filter var(--duration) var(--ease),
    transform 0.35s var(--ease);
}

.nav--hidden {
  transform: translateY(-100%);
}

.nav--scrolled {
  background-color: rgba(11, 11, 13, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(244, 241, 234, 0.05);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.nav__logo {
  font-family: var(--ff-serif);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ivoire);
  transition: color var(--duration) var(--ease);
}

.nav__logo:hover {
  color: var(--bourgogne);
}

.nav__links {
  display: flex;
  list-style: none;
  gap: var(--space-md);
}

.nav__links a {
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ivoire-dim);
  position: relative;
  transition: color var(--duration) var(--ease);
}

.nav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--bourgogne);
  transition: width var(--duration) var(--ease);
}

.nav__links a:hover {
  color: var(--ivoire);
}

.nav__links a:hover::after {
  width: 100%;
}

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background-color: var(--ivoire);
  transition: all 0.3s var(--ease);
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(11, 11, 13, 0.6) 0%,
      rgba(11, 11, 13, 0.75) 50%,
      rgba(11, 11, 13, 0.97) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-xxl) var(--space-md) var(--space-xl);
  max-width: var(--max-width);
}

.hero__maison {
  font-family: var(--ff-sans);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ivoire-dim);
  margin-bottom: var(--space-sm);
}

.hero__title {
  font-size: var(--fs-hero);
  letter-spacing: 0.12em;
  font-weight: 300;
  color: var(--ivoire);
  margin-bottom: var(--space-md);
}

.hero__divider {
  width: 60px;
  height: 1px;
  background: var(--bourgogne);
  margin: 0 auto var(--space-xl);
}

.hero__book {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}

.hero__book-cover {
  flex-shrink: 0;
  width: 280px;
  position: relative;
}

.hero__book-cover img {
  width: 100%;
  border-radius: 2px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(74, 30, 36, 0.15);
  transition: transform var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.hero__book-cover:hover img {
  transform: translateY(-4px);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.7),
    0 0 100px rgba(74, 30, 36, 0.2);
}

.hero__book-info {
  text-align: left;
  max-width: 440px;
}

.hero__book-label {
  font-family: var(--ff-sans);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--bourgogne);
  margin-bottom: var(--space-xs);
}

.hero__book-title {
  font-size: var(--fs-h2);
  font-weight: 300;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.hero__quote {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--ivoire-dim);
  line-height: 1.7;
  border-left: 2px solid var(--bourgogne);
  padding-left: var(--space-md);
  margin-bottom: var(--space-lg);
}

.hero__actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero__urgency {
  font-family: var(--ff-sans);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--bourgogne);
  margin-top: var(--space-sm);
  opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-sans);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  padding: 14px 32px;
  min-height: 48px;
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease),
    transform var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--ivoire);
  color: var(--noir);
}

.btn--primary:hover {
  background: var(--bourgogne);
  color: var(--ivoire);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--bourgogne-glow),
    0 0 60px rgba(74, 30, 36, 0.15);
}

.btn--outline {
  background: transparent;
  color: var(--ivoire);
  border: 1px solid rgba(244, 241, 234, 0.4);
}

.btn--outline:hover {
  border-color: var(--bourgogne);
  color: var(--ivoire);
  background: rgba(74, 30, 36, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--bourgogne-glow);
}

.btn--ghost {
  background: transparent;
  color: var(--ivoire-dim);
  padding: 14px 16px;
  position: relative;
}

.btn--ghost::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 10px;
  height: 1px;
  background: var(--bourgogne);
  transform: scaleX(0);
  transition: transform var(--duration) var(--ease);
}

.btn--ghost:hover {
  color: var(--ivoire);
}

.btn--ghost:hover::after {
  transform: scaleX(1);
}

.btn--large {
  padding: 18px 48px;
  font-size: var(--fs-small);
  min-height: 52px;
}

.btn--success {
  background: var(--bourgogne) !important;
  color: var(--ivoire) !important;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION COMMON
   ═══════════════════════════════════════════════════════════════ */
.section {
  padding: var(--space-xxl) var(--space-md);
}

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section__inner--narrow {
  max-width: 700px;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section__label {
  font-family: var(--ff-serif);
  font-size: var(--fs-small);
  letter-spacing: var(--ls-wide);
  color: var(--bourgogne);
  margin-bottom: var(--space-xs);
}

.section__title {
  font-size: var(--fs-h2);
  letter-spacing: var(--ls-medium);
  text-transform: uppercase;
  font-weight: 300;
}

.section__line {
  width: 0;
  height: 1px;
  background: var(--bourgogne);
  margin: var(--space-md) auto 0;
  transition: width 1s var(--ease-out) 0.3s;
}

.revealed .section__line,
.reveal.revealed .section__line {
  width: 40px;
}

/* ═══════════════════════════════════════════════════════════════
   LA MAISON
   ═══════════════════════════════════════════════════════════════ */
.section--maison {
  background: var(--noir);
  border-top: 1px solid rgba(244, 241, 234, 0.04);
}

.maison__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.maison__split-text {
  display: flex;
  flex-direction: column;
}

.maison__col {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--charbon);
}

.maison__col:first-child {
  padding-top: 0;
}

.maison__col:last-child {
  border-bottom: none;
}

.maison__subtitle {
  font-size: var(--fs-small);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ivoire-dim);
  font-family: var(--ff-sans);
  font-weight: 400;
  margin-bottom: var(--space-md);
}

.maison__col p {
  color: var(--ivoire-dim);
  margin-bottom: var(--space-sm);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.maison__split-image {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-lg));
  height: calc(100vh - var(--nav-height) - calc(var(--space-lg) * 2));
  overflow: hidden;
  border-radius: 2px;
}

.maison__image-sticky {
  height: 100%;
}

.maison__image-sticky img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.1);
  transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1), filter 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.maison__split:hover .maison__image-sticky img {
  transform: scale(1.05);
  filter: grayscale(60%) contrast(1.05);
}

@media (max-width: 900px) {
  .maison__split {
    grid-template-columns: 1fr;
  }

  .maison__split-image {
    position: relative;
    top: 0;
    height: 60vh;
    margin-top: var(--space-lg);
  }
}

/* ═══════════════════════════════════════════════════════════════
   EL LIBRO
   ═══════════════════════════════════════════════════════════════ */
.section--libro {
  background: var(--noir-soft);
}

.libro__layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.libro__cover {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-md));
}

.libro__cover img {
  width: 100%;
  border-radius: 2px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.libro__title {
  font-size: var(--fs-h2);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.libro__author {
  font-family: var(--ff-sans);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--bourgogne);
  margin-bottom: var(--space-lg);
}

.libro__synopsis {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(244, 241, 234, 0.06);
}

.libro__synopsis h4 {
  font-family: var(--ff-sans);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ivoire-dim);
  font-weight: 400;
  margin-bottom: var(--space-md);
}

.libro__synopsis p {
  color: var(--ivoire-dim);
  margin-bottom: var(--space-sm);
}

.libro__quote {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  color: var(--ivoire);
  border-left: 2px solid var(--bourgogne);
  padding: var(--space-md) var(--space-md);
  margin-bottom: var(--space-lg);
  background: rgba(74, 30, 36, 0.06);
}

.libro__fragment {
  margin-bottom: var(--space-lg);
}

.libro__fragment h4 {
  font-family: var(--ff-sans);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ivoire-dim);
  font-weight: 400;
  margin-bottom: var(--space-md);
}

.libro__fragment-text {
  padding-left: var(--space-md);
  border-left: 1px solid var(--charbon);
}

.libro__fragment-text p {
  color: var(--ivoire-dim);
  margin-bottom: var(--space-sm);
  font-family: var(--ff-serif);
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.8;
}

.libro__cta {
  padding-top: var(--space-md);
}

/* ═══════════════════════════════════════════════════════════════
   UNIVERSO
   ═══════════════════════════════════════════════════════════════ */
.section--universo {
  position: relative;
  background: var(--noir);
  border-top: 1px solid rgba(244, 241, 234, 0.04);
  overflow: hidden;
}

.universo__bg-gallery {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.universo__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--noir) 0%, rgba(11, 11, 13, 0.85) 50%, var(--noir) 100%);
  z-index: 1;
}

.universo__bg-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out, transform 10s linear;
  filter: grayscale(60%) sepia(10%) contrast(1.05);
  transform: scale(1.05);
}

.universo__bg-item.active {
  opacity: 1;
  transform: scale(1);
}

.universo__content {
  position: relative;
  z-index: 2;
}

.universo__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.universo__card {
  padding: var(--space-xl) var(--space-lg);
  border: 1px solid rgba(244, 241, 234, 0.06);
  background: rgba(11, 11, 13, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease), background var(--duration) var(--ease);
  cursor: default;
}

.universo__card:hover {
  border-color: rgba(74, 30, 36, 0.5);
  background: rgba(11, 11, 13, 0.8);
  transform: translateY(-5px);
}

.universo__numeral {
  font-family: var(--ff-serif);
  font-size: var(--fs-small);
  color: var(--bourgogne);
  letter-spacing: var(--ls-wide);
  display: block;
  margin-bottom: var(--space-sm);
}

.universo__card h3 {
  font-size: var(--fs-h3);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-md);
  font-weight: 400;
}

.universo__card p {
  color: var(--ivoire-dim);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

/* ═══════════════════════════════════════════════════════════════
   PRÓXIMOS LANZAMIENTOS
   ═══════════════════════════════════════════════════════════════ */
.section--proximos {
  background: var(--noir-soft);
}

.proximos__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.proximos__card {
  border: 1px solid rgba(244, 241, 234, 0.06);
  overflow: hidden;
  transition: border-color var(--duration) var(--ease);
}

.proximos__card:hover {
  border-color: rgba(74, 30, 36, 0.3);
}

.proximos__card-inner {
  padding: var(--space-lg);
  position: relative;
}

.proximos__card-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--bourgogne), transparent);
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.proximos__card:hover .proximos__card-inner::before {
  opacity: 1;
}

.proximos__year {
  font-family: var(--ff-serif);
  font-size: var(--fs-small);
  color: var(--bourgogne);
  letter-spacing: var(--ls-wide);
  display: block;
  margin-bottom: var(--space-md);
}

.proximos__title {
  font-size: var(--fs-h3);
  letter-spacing: 0.04em;
  font-weight: 400;
  margin-bottom: var(--space-sm);
  font-style: italic;
}

.proximos__hint {
  color: var(--ivoire-dim);
  margin-bottom: var(--space-md);
}

.proximos__status {
  font-family: var(--ff-sans);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--charbon-light);
  border: 1px solid var(--charbon);
  padding: 6px 16px;
  display: inline-block;
}

/* ═══════════════════════════════════════════════════════════════
   NEWSLETTER — Estilo Invitación / Carta
   ═══════════════════════════════════════════════════════════════ */
.section--newsletter {
  background: var(--noir);
  border-top: 1px solid rgba(244, 241, 234, 0.04);
}

.newsletter__content {
  text-align: center;
}

.newsletter__invitation {
  position: relative;
  border: 1px solid rgba(244, 241, 234, 0.1);
  padding: var(--space-xl) var(--space-lg);
  margin-top: var(--space-md);
  background: linear-gradient(180deg, rgba(19, 19, 22, 0.6) 0%, rgba(11, 11, 13, 0.9) 100%);
}

.newsletter__invitation::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(244, 241, 234, 0.05);
  pointer-events: none;
}

.newsletter__seal {
  display: block;
  font-family: var(--ff-serif);
  font-size: 2rem;
  color: var(--bourgogne);
  margin-bottom: var(--space-md);
  letter-spacing: 0.3em;
  opacity: 0.7;
}

.newsletter__text {
  font-family: var(--ff-serif);
  font-size: clamp(1.1rem, 1.4vw, 1.3rem);
  color: var(--ivoire-dim);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.newsletter__divider {
  width: 30px;
  height: 1px;
  background: var(--bourgogne);
  margin: 0 auto var(--space-lg);
  opacity: 0.6;
}

.newsletter__form {
  max-width: 500px;
  margin: 0 auto;
}

.newsletter__field {
  display: flex;
  gap: 0;
  border: 1px solid rgba(244, 241, 234, 0.12);
  transition: border-color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}

.newsletter__field:focus-within {
  border-color: var(--bourgogne);
  box-shadow: 0 0 30px rgba(74, 30, 36, 0.1);
}

.newsletter__field input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 16px 20px;
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  color: var(--ivoire);
  outline: none;
  letter-spacing: var(--ls-body);
}

.newsletter__field input::placeholder {
  color: var(--charbon-light);
  font-weight: 300;
}

.newsletter__field .btn {
  border: none;
  border-left: 1px solid rgba(244, 241, 234, 0.12);
  flex-shrink: 0;
}

.newsletter__note {
  font-size: var(--fs-label);
  color: var(--charbon-light);
  margin-top: var(--space-md);
  letter-spacing: var(--ls-medium);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.footer {
  padding: var(--space-xl) var(--space-md) var(--space-lg);
  text-align: center;
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer__line {
  width: 40px;
  height: 1px;
  background: var(--charbon);
  margin: 0 auto var(--space-lg);
}

.footer__logo {
  font-family: var(--ff-serif);
  font-size: 1.3rem;
  letter-spacing: var(--ls-wide);
  margin-bottom: var(--space-xs);
}

.footer__tagline {
  font-family: var(--ff-serif);
  font-size: var(--fs-small);
  font-style: italic;
  color: var(--ivoire-dim);
  margin-bottom: var(--space-md);
}

.footer__copy {
  font-size: var(--fs-label);
  color: var(--charbon-light);
  letter-spacing: var(--ls-medium);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 1024px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .libro__layout {
    grid-template-columns: 280px 1fr;
    gap: var(--space-lg);
  }

  .maison__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 768px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
    --space-xl: 4rem;
    --space-xxl: 5rem;
  }

  html,
  body {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Mobile Nav */
  .nav__toggle {
    display: flex;
    position: relative;
    z-index: 1002;
  }

  .nav--hidden {
    transform: none;
  }

  .nav__links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    background: rgba(11, 11, 13, 0.98);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
  }

  .nav__links.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
  }

  .nav__links li {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  }

  .nav__links.active li {
    opacity: 1;
    transform: translateY(0);
  }

  .nav__links.active li:nth-child(1) {
    transition-delay: 0.1s;
  }

  .nav__links.active li:nth-child(2) {
    transition-delay: 0.15s;
  }

  .nav__links.active li:nth-child(3) {
    transition-delay: 0.2s;
  }

  .nav__links.active li:nth-child(4) {
    transition-delay: 0.25s;
  }

  .nav__links.active li:nth-child(5) {
    transition-delay: 0.3s;
  }

  .nav__links a {
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    padding: var(--space-xs) 0;
  }

  .newsletter__invitation {
    padding: var(--space-lg) var(--space-md);
  }

  /* Hero */
  .hero__content {
    padding: calc(var(--nav-height) + var(--space-lg)) var(--space-sm) var(--space-lg);
  }

  .hero__title {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }

  .hero__book {
    flex-direction: column;
    gap: var(--space-md);
  }

  .hero__book-cover {
    width: 200px;
  }

  .hero__book-info {
    text-align: center;
    max-width: 100%;
  }

  .hero__book-title {
    font-size: clamp(1.4rem, 5vw, 2rem);
  }

  .hero__quote {
    text-align: left;
    font-size: 0.95rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-xs);
  }

  .hero__actions .btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  /* Sections */
  .section {
    padding: var(--space-xl) var(--space-sm);
  }

  .section__title {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }

  /* El Libro */
  .libro__layout {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .libro__cover {
    position: static;
    max-width: 240px;
    margin: 0 auto;
  }

  .libro__title {
    font-size: clamp(1.4rem, 5vw, 2rem);
  }

  .libro__cta .btn {
    width: 100%;
    box-sizing: border-box;
  }

  /* Universo */
  .universo__grid {
    grid-template-columns: 1fr;
  }

  .universo__card {
    padding: var(--space-md);
  }

  /* Proximos */
  .proximos__grid {
    grid-template-columns: 1fr;
  }

  .proximos__card-inner {
    padding: var(--space-md);
  }

  /* Newsletter */
  .newsletter__form {
    max-width: 100%;
  }

  .newsletter__field {
    flex-direction: column;
    border: none;
    gap: var(--space-sm);
  }

  .newsletter__field input {
    border: 1px solid rgba(244, 241, 234, 0.12);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
  }

  .newsletter__field .btn {
    border-left: none;
    border: 1px solid rgba(244, 241, 234, 0.12);
    width: 100%;
    box-sizing: border-box;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  :root {
    --space-xl: 3rem;
    --space-xxl: 4rem;
  }

  p {
    letter-spacing: 0.05em;
    line-height: 1.8;
  }

  .hero__book-cover {
    width: 180px;
  }

  .hero__urgency {
    text-align: center;
  }

  .hero__divider {
    margin-bottom: var(--space-md);
  }

  .hero__book {
    margin-top: var(--space-sm);
  }

  .cartas-hero__title {
    font-size: clamp(2.5rem, 6vw, 4rem);
  }

  .cartas-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .cartas-grid--reverse .cartas-grid__text {
    order: 2;
  }
}

/* ═══════════════════════════════════════════════════════════════
   CARTAS QUE NUNCA TE LEÍ (cartas.html)
   ═══════════════════════════════════════════════════════════════ */

/* Cartas Hero */
.cartas-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.cartas-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cartas-hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(40%) contrast(1.1);
}

.cartas-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--noir) 0%, rgba(11, 11, 13, 0.7) 40%, rgba(11, 11, 13, 0.3) 100%);
}

.cartas-hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: var(--space-xl) var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cartas-hero__label {
  font-family: var(--ff-sans);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-wide);
  color: var(--bourgogne);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.cartas-hero__title {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 300;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
  line-height: 1.1;
}

.cartas-hero__divider {
  width: 40px;
  height: 1px;
  background: var(--bourgogne);
  margin: 0 auto var(--space-lg);
}

.cartas-hero__quote {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  color: var(--ivoire-dim);
  font-style: italic;
  margin-bottom: var(--space-xl);
}

/* Cartas Grid Sections */
.cartas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.cartas-grid__subtitle {
  font-family: var(--ff-serif);
  font-weight: 300;
  font-size: var(--fs-h2);
  margin-bottom: var(--space-md);
  color: var(--ivoire);
}

.cartas-grid__text p {
  margin-bottom: var(--space-md);
  color: var(--ivoire-dim);
}

.cartas-grid__text .libro__fragment-text p {
  color: var(--ivoire);
  font-size: clamp(1.1rem, 1.3vw, 1.25rem);
}

.cartas-grid__image img {
  border-radius: 2px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  width: 100%;
}

/* Full Bleed Image / Parallax Quote */
.cartas-fullbleed {
  width: 100%;
  height: 80vh;
  position: relative;
  margin: var(--space-xl) 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cartas-fullbleed__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cartas-fullbleed__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 11, 13, 0.6);
}

.cartas-fullbleed__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(80%) contrast(1.1);
}

.cartas-fullbleed__content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 0 var(--space-lg);
  text-align: center;
}

.cartas-fullbleed__quote {
  font-family: var(--ff-serif);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--ivoire);
  line-height: 1.2;
  font-style: italic;
}

/* Fragmento Layout (Asymmetrical) */
.cartas-fragmento-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.cartas-fragmento__col p {
  font-family: var(--ff-serif);
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  color: var(--ivoire-dim);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.cartas-fragmento__img {
  width: 100%;
}

.cartas-fragmento__img img {
  width: 100%;
  border-radius: 2px;
  filter: grayscale(80%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

@media (max-width: 900px) {
  .cartas-fragmento-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Moodboard Masonry */
.cartas-masonry {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto auto auto;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.cartas-masonry__item {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.cartas-masonry__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.1);
  transition: filter var(--duration) var(--ease), transform var(--duration-slow) var(--ease);
}

.cartas-masonry__item:hover img {
  filter: grayscale(30%) contrast(1.05);
  transform: scale(1.03);
}

.item-1 {
  grid-column: 1 / 6;
  grid-row: 1 / 3;
  aspect-ratio: 4/5;
}

.item-2 {
  grid-column: 6 / 13;
  grid-row: 1 / 2;
  aspect-ratio: 16/9;
}

.item-3 {
  grid-column: 6 / 9;
  grid-row: 2 / 4;
  aspect-ratio: 3/4;
}

.item-4 {
  grid-column: 9 / 13;
  grid-row: 2 / 4;
  aspect-ratio: 1/1;
}

@media (max-width: 768px) {
  .cartas-masonry {
    display: flex;
    flex-direction: column;
  }

  .cartas-masonry__item {
    aspect-ratio: auto;
    height: 300px;
  }
}

/* Proximos Lanzamientos Images */
.proximos__card-image {
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  border-bottom: 1px solid rgba(244, 241, 234, 0.06);
}

.proximos__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--duration-slow) var(--ease);
}

.proximos__card:hover .proximos__card-image img {
  transform: scale(1.05);
}
/* 
   STORYTELLING / CONFESIONARIO (cartas.html redesign)
    */

/* Reusing some global variables */

.page-cartas-story {
    background-color: var(--noir);
}

.story-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--nav-height);
}

.story-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.story-hero__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(80%) sepia(20%) contrast(1.2) brightness(0.6);
    transform: scale(1.05); /* organic scale */
}

.story-hero__overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--noir) 80%),
                linear-gradient(0deg, var(--noir) 0%, rgba(11, 11, 13, 0.4) 40%, rgba(11, 11, 13, 0.7) 100%);
}

.story-hero__dust {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox=\"0 0 200 200\" xmlns=\"http://www.w3.org/2000/svg\"%3E%3Cfilter id=\"noiseFilter\"%3E%3CfeTurbulence type=\"fractalNoise\" baseFrequency=\"0.85\" numOctaves=\"3\" stitchTiles=\"stitch\"/%3E%3C/filter%3E%3Crect width=\"100%25\" height=\"100%25\" filter=\"url(%23noiseFilter)\" opacity=\"0.05\"/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

.story-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: var(--space-xl) var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.story-hero__label {
    font-family: var(--ff-sans);
    font-size: clamp(0.7rem, 1vw, 0.8rem);
    letter-spacing: 0.4em;
    color: var(--bourgogne);
    text-transform: uppercase;
    margin-bottom: var(--space-md);
    opacity: 0.8;
}

.story-hero__title {
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 300;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-md);
    line-height: 1.05;
    text-shadow: 0 5px 20px rgba(0,0,0,0.8);
}

.story-hero__divider {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, var(--bourgogne), transparent);
    margin: var(--space-md) auto var(--space-lg);
}

.story-hero__quote {
    font-family: var(--ff-serif);
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--ivoire-dim);
    font-style: italic;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.story-hero__scroll-hint {
    font-family: var(--ff-sans);
    font-size: var(--fs-label);
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    color: var(--charbon-light);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-xs);
}

.story-hero__scroll-indicator {
    width: 1px;
    height: 40px;
    background: var(--charbon);
    position: relative;
    overflow: hidden;
}

.story-hero__scroll-indicator::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: var(--ivoire);
    animation: scrollDrop 2s ease-in-out infinite;
}

@keyframes scrollDrop {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(200%); opacity: 0; }
}

/* Prologue */
.story-prologue__inner {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-xl);
    align-items: center;
    max-width: 1000px;
}

.story-prologue__text {
    font-family: var(--ff-serif);
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    line-height: 1.8;
    color: var(--ivoire);
}

.story-prologue__text p {
    margin-bottom: var(--space-sm);
}

.story-prologue__signature {
    font-style: italic;
    color: var(--bourgogne);
    text-align: right;
    margin-top: var(--space-md);
    font-size: 1.5rem;
}

.story-prologue__aside {
    border-left: 1px solid var(--charbon);
    padding-left: var(--space-md);
}

.story-aside-text {
    font-family: var(--ff-sans);
    font-size: var(--fs-small);
    line-height: 1.6;
    color: var(--ivoire-dim);
    text-transform: uppercase;
    letter-spacing: var(--ls-medium);
}

/* Memories / Artifacts */
.story-memory {
    padding: var(--space-xl) 0;
    position: relative;
    overflow: hidden;
}

.story-memory__container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.story-memory__artifact {
    position: relative;
}

.story-memory__artifact--img {
    background: #e2dfd8; /* old paper color */
    padding: 12px 12px 40px 12px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8), inset 0 0 40px rgba(0,0,0,0.1);
    transform: rotate(-2deg);
    transition: transform 0.6s var(--ease-out);
}

.story-memory--right .story-memory__artifact--img {
    transform: rotate(3deg);
}

.story-memory__artifact--img:hover {
    transform: rotate(0) scale(1.02);
    z-index: 10;
}

.story-memory__artifact--img img {
    width: 100%;
    filter: sepia(30%) grayscale(40%) contrast(1.1);
}

.story-memory__caption {
    position: absolute;
    bottom: 12px;
    left: 20px;
    font-family: "Courier New", Courier, monospace; /* typewriter feel */
    font-size: 0.8rem;
    color: #333;
    opacity: 0.8;
}

/* The Tape / Pin */
.story-memory__pin {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 20px;
    background: rgba(255,255,255,0.4);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transform: translateX(-50%) rotate(-3deg);
}

.story-memory__artifact--text {
    padding: var(--space-md);
    background: transparent;
    border-left: 2px solid var(--charbon);
}

.story-memory__title {
    font-family: var(--ff-sans);
    font-size: var(--fs-small);
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    color: var(--bourgogne);
    margin-bottom: var(--space-md);
}

.story-memory__artifact--text p {
    font-family: var(--ff-serif);
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    line-height: 1.6;
    color: var(--ivoire);
    margin-bottom: var(--space-sm);
    font-style: italic;
}

.story-memory__note {
    margin-top: var(--space-lg);
    font-family: var(--ff-sans) !important;
    font-size: var(--fs-label) !important;
    color: var(--charbon-light) !important;
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    font-style: normal !important;
}

/* Witness Section */
.story-witness {
    position: relative;
    padding: var(--space-xxl) var(--space-md);
    text-align: center;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-witness__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.story-witness__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.4);
}

.story-witness__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--noir) 0%, transparent 50%, var(--noir) 100%);
}

.story-witness__content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.story-witness__title {
    font-family: var(--ff-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--ivoire);
    margin-bottom: var(--space-md);
}

.story-witness__text {
    font-family: var(--ff-serif);
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--ivoire-dim);
    line-height: 1.6;
    font-style: italic;
}

/* Utility */
.mt-xl {
    margin-top: var(--space-xl);
}

@media (max-width: 900px) {
    .story-prologue__inner {
        grid-template-columns: 1fr;
    }
    
    .story-prologue__aside {
        border-left: none;
        border-top: 1px solid var(--charbon);
        padding-left: 0;
        padding-top: var(--space-md);
    }
    
    .story-memory__container {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .story-memory--right .story-memory__artifact--img {
        order: -1; /* Always show image first on mobile */
    }
}

