/* VARIABLES */
:root {
  --color-primary: #B6BA8A;

  --color-gold: #C5B58A;
  --color-gold-dark: #C7B06F;
  --color-champagne: #E4D6C3;
  --color-champagne-dark: #9B8460;

  --color-text-dark: #2F2F2D;
  --color-text-gray: #8A8A86;

  --color-bg-white: #F6F2ED;
  --color-bg-dark: #E1DFD5;

  --font-primary: 'Inter', sans-serif;
  --font-heading: 'Libre Baskerville', serif;
  --font-display: 'Italianno', cursive;
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg-dark);
  color: var(--color-text-dark);
  padding: 30px 20px;
  display: flex;
  justify-content: center;
}

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

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  text-align: center;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-text-dark);
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

/* BROCHURE CONTAINER — A4 page stack */
.brochure-container {
  width: 794px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* PAGE BASE */
.page {
  width: 100%;
  min-height: 1123px;
  background-color: var(--color-bg-white);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(47, 47, 45, 0.10);
  break-after: page;
}

/* SHARED UTILITIES */

/* Divisor decorativo */
.divider {
  width: 120px;
  height: 36px;
  background-image: url('assets/images/branch-2.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin: 16px auto 0;
  border: none;
}

.divider--branch3 {
  background-image: url('assets/images/branch-3.webp');
}

/* Título de acento en fuente display */
.accent-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-gold-dark);
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: 2px;
  text-transform: none;
}

/* Texto de cuerpo editorial */
.text-body {
  font-size: 0.88rem;
  line-height: 1.9;
  text-align: center;
  color: var(--color-text-gray);
}

/* Tagline en versalitas */
.tagline {
  font-family: var(--font-primary);
  font-size: 0.65rem;
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* Encabezado de sección (título + divisor) */
.section__header {
  margin-bottom: 40px;
}

/* Nota al pie de sección */
.section__note {
  margin-top: 60px;
  padding: 30px 40px;
  border-top: 1px solid var(--color-champagne);
  text-align: center;
  width: 100%;
}

/* Logo */
.logo {
  margin: 0 auto;
  display: block;
}

.logo__sub {
  font-family: var(--font-primary);
  font-size: 0.6rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Footer compartido entre páginas */
.page__footer {
  width: 100%;
  padding: 36px 40px;
  text-align: center;
  border-top: 1px solid var(--color-champagne-dark);
}

/* Imagen de item con fondo tenue */
.item__image {
  position: relative;
  background-color: #3a3830;
  height: 160px;
  width: 100%;
  overflow: hidden;
}

.item__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.3;
}

.item__image--03::after { background-image: url('assets/images/03.webp'); }
.item__image--04::after { background-image: url('assets/images/04.webp'); }
.item__image--05::after { background-image: url('assets/images/05.webp'); }

/* PORTADA  (.page--cover) */
.page--cover {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background-color: #3a3830;
}

/* Fondo de imagen */
.page__bg {
  position: absolute;
  inset: 0;
  background-color: #3a3830;
  background-image: url('assets/images/01.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.3;
  z-index: 0;
}

/* Overlay degradado */
.page__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(30, 28, 25, 0.2) 0%,
    rgba(30, 28, 25, 0.05) 45%,
    rgba(30, 28, 25, 0.55) 100%
  );
  z-index: 1;
}

/* Elemento decorativo pequeño antes del tagline */
.page__decor {
  width: 72px;
  height: auto;
  opacity: 0.55;
  margin-bottom: 20px;
  pointer-events: none;
}

/* Cuerpo central de la portada */
.cover__body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
}

.page--cover .tagline {
  color: var(--color-champagne);
  margin-bottom: 40px;
  opacity: 0.8;
}

/* Nombres de la pareja */
.cover__names {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cover__name {
  display: flex;
  align-items: baseline;
  line-height: 1;
  margin-top: -28px;
}

.cover__name:first-child {
  margin-top: 0;
}

.cover__initial {
  font-family: var(--font-display);
  font-size: 8rem;
  color: var(--color-bg-white);
  line-height: 1;
}

.cover__rest {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 400;
  color: var(--color-bg-white);
  letter-spacing: 2px;
  line-height: 1;
  margin-left: 4px;
}

.cover__amp {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--color-champagne);
  line-height: 1;
  margin-top: -20px;
}

.cover__detail {
  margin-top: 36px;
  font-family: var(--font-primary);
  font-size: 0.65rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--color-champagne);
  opacity: 0.75;
}

/* Footer de portada */
.page--cover .page__footer {
  position: relative;
  z-index: 2;
  padding: 28px 40px;
  border-top: 1px solid rgba(228, 214, 195, 0.25);
}

.page--cover .logo {
  width: 64px;
  height: 64px;
}

.page--cover .logo__sub {
  color: var(--color-champagne);
  opacity: 0.6;
}

/* ABOUT  (.page--about) */
.page--about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.split__image {
  position: relative;
  background-color: #3a3830;
  height: 100%;
  min-height: 1123px;
  overflow: hidden;
}

.split__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('assets/images/02.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.3;
}

.split__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 56px;
}

/* COBERTURA  (.page--cobertura) */
.page--cobertura {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 60px;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 50px;
  width: 100%;
}

.item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* PRECIOS  (.page--precios) */
.page--precios {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 36px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
  width: 100%;
}

.card {
  border: 1px solid var(--color-champagne);
  background-color: var(--color-bg-white);
  display: flex;
  flex-direction: column;
}

.card--featured {
  border-color: var(--color-gold-dark);
  background-color: #faf8f4;
  box-shadow: 0 8px 32px rgba(199, 176, 111, 0.12);
}

.card__header {
  text-align: center;
  padding: 28px 16px 20px;
  border-bottom: 1px solid var(--color-champagne);
}

.card--featured .card__header {
  border-bottom-color: var(--color-gold-dark);
}

.card__header .accent-title {
  margin-bottom: 6px;
}

.card__price {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-champagne-dark);
}

.card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card__row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--color-bg-dark);
  font-size: 0.78rem;
}

.card__row:last-child {
  border-bottom: none;
}

.card__row--muted .card__value {
  color: var(--color-champagne);
}

.card__label {
  font-weight: 500;
  color: var(--color-text-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.65rem;
}

.card__value {
  color: var(--color-text-dark);
  line-height: 1.5;
}

/* FINAL  (.page--final) */
.page--final {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background-color: var(--color-bg-dark);
}

.final__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 80px;
  gap: 24px;
}

.page--final .tagline {
  color: var(--color-text-gray);
}

/* Lista de contacto */
.contact__list {
  display: flex;
  gap: 50px;
  margin-top: 16px;
  justify-content: center;
}

.contact__item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.contact__label {
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-gray);
  font-weight: 500;
}

.contact__value {
  font-size: 0.85rem;
  color: var(--color-text-dark);
  letter-spacing: 0.3px;
  text-decoration: none;
}

.contact__value:hover {
  color: var(--color-gold-dark);
}

/* Footer de la página final */
.page--final .page__footer {
  border-top-color: var(--color-champagne-dark);
}

.page--final .logo {
  width: 72px;
  height: 72px;
}

.page--final .logo__sub {
  color: var(--color-text-gray);
}

/* BOTÓN FLOTANTE PDF */
.btn-pdf {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 40px;
  background: var(--color-primary);
  color: #551a8b;
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(156, 207, 181, 0.15);
}

.btn-pdf:hover {
  background: var(--color-gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(197, 181, 138, 0.25);
}

.btn-pdf:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Estado durante la exportación */
.brochure-container.pdf-export {
  gap: 0;
}

.brochure-container.pdf-export .page {
  box-shadow: none;
}

/* PRINT / PDF EXPORT */
@page {
  size: A4 portrait;
  margin: 0;
}

@media print {
  body {
    padding: 0;
    background: none;
  }

  .btn-pdf {
    display: none !important;
  }

  .brochure-container {
    width: 100%;
    gap: 0;
    box-shadow: none;
  }

  .page {
    box-shadow: none;
    width: 100%;
    min-height: 0;
    height: 100vh;
    page-break-after: always;
    break-after: page;
    overflow: visible;
  }

  .page--cover,
  .page--final {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
