/* ==========================================================================
   CARTA ABERTA OFICIAL - TÍTULOS CALIGRÁFICOS & CORPO EM SERIFA ITALIZADA LEGÍVEL
   ========================================================================== */

.letter-page-wrapper {
  min-height: 100vh;
  width: 100%;
  background-color: #273418;
  background-image: radial-gradient(circle at 50% 30%, rgba(68, 88, 43, 0.4) 0%, rgba(20, 26, 12, 0.98) 100%);
  padding: 20px 12px 60px 12px;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* QUADRO E PERGAMINHO UNIFICADOS NUM ÚNICO CONTAINER (ZERO EMENDA ENTRE BLOCOS) */
.letter-grand-frame {
  position: relative;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto 40px auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
  border-radius: 4px;
  overflow: hidden;
  background-color: #273418;
  background-image:
    url('/assets/carta-aberta-topo.jpg'),
    url('/assets/carta-aberta-rodape.jpg'),
    url('/assets/carta-aberta-meio-tile.jpg');
  background-position:
    top center,
    bottom center,
    top center;
  background-repeat:
    no-repeat,
    no-repeat,
    repeat-y;
  background-size:
    100% auto,
    100% auto,
    100% auto;
  padding-top: 17.5%; /* logo abaixo do medalhão VM (arte do topo limpa) */
  padding-bottom: 10.5%;
  display: flex;
  justify-content: center;
}

/* Área útil interna do pergaminho */
.letter-parchment-sheet {
  position: relative;
  width: 53%;
  max-width: 540px;
  box-sizing: border-box;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0 10px;
  text-align: center;
  color: #273418;
  font-family: var(--font-serif-body);
  z-index: 3;
}

@media (max-width: 768px) {
  .letter-grand-frame {
    padding-top: 22%;
    padding-bottom: 12%;
  }
  .letter-parchment-sheet {
    width: 60%;
    padding: 0 6px;
  }
}

@media (max-width: 520px) {
  .letter-parchment-sheet {
    width: 64%;
    padding: 0 4px;
  }
}

/* 0. TOPO DA CARTA - NOMES DOS NOIVOS & DIVISOR CLÁSSICO */
.letter-couple-heading {
  font-family: var(--font-script);
  font-size: clamp(38px, 4.8vw, 54px);
  font-weight: 400;
  color: #344222;
  text-align: center;
  margin: 0 auto 4px auto;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.letter-header-divider {
  display: block;
  margin: 6px auto 18px auto;
  width: 250px;
  max-width: 80%;
  height: 18px;
  background: url('/assets/ornamento-divisor.png') no-repeat center center;
  background-size: contain;
  opacity: 0.85;
}

/* 1. SAUDAÇÃO NOMINAL DA FAMÍLIA (FONTE CALIGRÁFICA DE TÍTULO) */
.hero-dynamic-salutation {
  font-family: var(--font-script);
  font-size: clamp(34px, 4.5vw, 52px);
  line-height: 1.18;
  color: #273418;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 4px auto 20px auto;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* 2. BLOCO DE MENSAGEM DO CONVITE (CORPO EM SERIFA CLÁSSICA ITALIZADA DE ALTA LEITURA) */
.invitation-message-section {
  margin: 0 auto 26px auto;
}

.invitation-verse {
  font-family: var(--font-serif-body);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(17px, 2.1vw, 21px);
  color: #354520;
  line-height: 1.55;
  max-width: 470px;
  margin: 0 auto 22px auto;
}

.invitation-verse-ref {
  display: block;
  font-family: var(--font-script);
  font-style: normal;
  font-size: clamp(22px, 2.6vw, 28px);
  color: #46572b;
  margin-top: 4px;
}

.invitation-body-text {
  font-family: var(--font-serif-body);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(19px, 2.3vw, 23px);
  line-height: 1.62;
  color: #273418;
  margin: 0 auto 16px auto;
}

.invitation-signoff {
  margin-top: 24px;
  font-family: var(--font-serif-body);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(19px, 2.2vw, 22px);
  color: #384826;
  line-height: 1.4;
}

.invitation-signoff-names {
  display: inline-block;
  font-family: var(--font-script);
  font-style: normal;
  font-size: clamp(36px, 4.4vw, 48px);
  font-weight: 400;
  color: #273418;
  line-height: 1.22;
  margin-top: 4px;
  letter-spacing: 0.02em;
  padding: 0 6px;
  overflow: visible;
}

/* Divisor ornamental delicado */
.ornament-flourish-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 26px auto;
  color: #706038;
  font-size: 15px;
  gap: 12px;
  opacity: 0.85;
}

.ornament-flourish-divider::before,
.ornament-flourish-divider::after {
  content: '';
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #8b7645, transparent);
}

/* TÍTULOS E SUBTÍTULOS MANTÊM A FONTE CALIGRÁFICA (--font-script) */
.chapter-heading-script {
  font-family: var(--font-script);
  font-size: clamp(34px, 4.2vw, 46px);
  font-weight: 400;
  color: #273418;
  line-height: 1.2;
  margin-bottom: 6px;
}

.chapter-subtitle-serif {
  font-family: var(--font-script);
  font-size: clamp(24px, 2.9vw, 31px);
  color: #384826;
  line-height: 1.32;
  margin-bottom: 18px;
}

/*Texto auxiliar abaixo de subtítulo em fonte de leitura */
.section-helper-text {
  font-family: var(--font-serif-body);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(18px, 2.2vw, 22px);
  color: #273418;
  line-height: 1.58;
  margin: 0 auto 14px auto;
}

/* 3. EVENTOS INTEGRADOS AO PERGAMINHO */
.events-grid-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 18px 0 24px 0;
}

.event-box-card {
  background: rgba(226, 206, 165, 0.42);
  border: 1px solid rgba(143, 119, 72, 0.55);
  border-radius: 4px;
  padding: 22px 22px;
  text-align: center;
  box-shadow: inset 0 0 18px rgba(194, 167, 122, 0.2);
}

/* Subtítulo do card de evento mantém a fonte caligráfica */
.event-box-title {
  font-family: var(--font-script);
  font-size: clamp(31px, 3.7vw, 40px);
  font-weight: 400;
  color: #273418;
  margin-bottom: 10px;
  line-height: 1.2;
}

/* Textos descritivos do evento em serifa italizada nítida */
.event-time-badge {
  display: inline-block;
  color: #273418;
  font-family: var(--font-serif-body);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(19px, 2.3vw, 23px);
  margin: 10px 0 8px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(143, 119, 72, 0.45);
}

.event-detail-item {
  font-family: var(--font-serif-body);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.58;
  margin-bottom: 6px;
  color: #273418;
}

.event-notes {
  font-family: var(--font-serif-body);
  font-style: italic;
  font-size: clamp(17px, 2vw, 20px);
  color: #354520;
  line-height: 1.5;
  margin-top: 8px;
}

/* 4. CONFIRMAÇÃO DE PRESENÇA (RSVP) */
.rsvp-flow-section {
  margin-top: 12px;
  padding-top: 8px;
}

.rsvp-deadline-badge {
  display: inline-block;
  font-family: var(--font-serif-body);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(17px, 2.1vw, 21px);
  color: #273418;
  background: rgba(212, 190, 141, 0.65);
  border: 1px solid #8f7748;
  border-radius: 4px;
  padding: 6px 20px;
  margin: 6px auto 20px auto;
}

.members-rsvp-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 auto 24px auto;
}

.member-rsvp-card {
  background: rgba(226, 206, 165, 0.45);
  border: 1px solid rgba(143, 119, 72, 0.55);
  border-radius: 5px;
  padding: 14px 18px;
  text-align: left;
}

.member-name-heading {
  font-family: var(--font-serif-title);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 700;
  color: #273418;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.member-age-badge {
  font-size: clamp(15px, 1.8vw, 17px);
  font-family: var(--font-serif-body);
  font-style: italic;
  font-weight: 600;
  background: rgba(194, 167, 122, 0.45);
  padding: 2px 12px;
  border-radius: 12px;
  color: #273418;
}

.event-checkbox-row {
  display: flex;
  align-items: center;
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(244, 232, 204, 0.55);
  border: 1px solid rgba(168, 144, 96, 0.5);
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.event-checkbox-row:hover {
  background: rgba(244, 232, 204, 0.85);
}

.event-checkbox-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  accent-color: #384826;
  cursor: pointer;
}

.event-checkbox-label {
  font-family: var(--font-serif-body);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(17px, 2vw, 20px);
  color: #273418;
  cursor: pointer;
}

/* 5. CARTINHA DE SUGESTÃO DE PRESENTES (PIX) */
.gift-suggestion-section {
  margin-top: 8px;
}

.gift-letter-card {
  position: relative;
  background: rgba(226, 206, 165, 0.48);
  border: 1px solid rgba(143, 119, 72, 0.65);
  outline: 1px solid rgba(143, 119, 72, 0.28);
  outline-offset: -6px;
  border-radius: 5px;
  padding: 26px 22px 24px 22px;
  text-align: center;
  box-shadow: inset 0 0 22px rgba(194, 167, 122, 0.25), 0 4px 14px rgba(39, 52, 24, 0.08);
}

.gift-letter-text {
  font-family: var(--font-serif-body);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.6;
  color: #273418;
  margin: 10px auto 16px auto;
  max-width: 480px;
}

.pix-key-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(244, 232, 204, 0.68);
  border: 1px dashed #8f7748;
  border-radius: 4px;
  padding: 14px 24px;
  margin-top: 8px;
}

.pix-key-label {
  font-family: var(--font-script);
  font-size: clamp(23px, 2.7vw, 28px);
  color: #384826;
}

.pix-key-value {
  font-family: var(--font-serif-title);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 27px);
  color: #273418;
  user-select: all;
}

/* Modal de Conferência */
.conference-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 26, 12, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.conference-modal {
  background: #decca8;
  background-image:
    radial-gradient(ellipse at 50% 0%, #ebdcb8 0%, #decca8 50%, #d6c29a 100%),
    url('/assets/textura-papel.png');
  border: 2px double #8f7748;
  border-radius: 6px;
  max-width: 480px;
  width: 100%;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

.conference-title {
  font-family: var(--font-script);
  font-size: 36px;
  font-weight: 400;
  color: #273418;
  margin-bottom: 14px;
}

.conference-summary-box {
  background: rgba(194, 167, 122, 0.45);
  border: 1px solid #8f7748;
  border-radius: 4px;
  padding: 14px;
  margin: 16px 0;
  font-family: var(--font-serif-body);
  font-style: italic;
  font-weight: 600;
  font-size: 20px;
  color: #273418;
}

.conference-details-list {
  text-align: left;
  font-family: var(--font-serif-body);
  font-style: italic;
  font-size: 18px;
  margin-bottom: 20px;
  max-height: 200px;
  overflow-y: auto;
  border-bottom: 1px solid #c2a77a;
  padding-bottom: 10px;
}

.conference-buttons-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Botão flutuante Confirmar Presença */
.floating-rsvp-shortcut {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #384826;
  color: #fff8e8;
  padding: 8px 24px;
  border-radius: 30px;
  font-family: var(--font-script);
  font-size: 25px;
  font-weight: 400;
  border: 1px solid #c29b38;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  text-decoration: none;
  z-index: 90;
  transition: transform 0.2s, background 0.2s;
}

.floating-rsvp-shortcut:hover {
  background: #2a371c;
  transform: translateY(-2px);
}

/* Confirmação de presença é a última seção da carta: afasta o botão do rodapé ornamental */
.letter-parchment-sheet > .rsvp-flow-section:last-child {
  padding-bottom: 36px;
}

/* ==========================================================================
   CELULAR: o papel ocupa a tela e o texto ganha largura de leitura
   A arte é ampliada (175%) e centralizada, cortando as laterais verdes.
   ========================================================================== */
@media (max-width: 640px) {
  .letter-page-wrapper {
    padding: 0 0 48px 0;
  }
  .letter-grand-frame {
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: none;
    background-size: 175% auto, 175% auto, 175% auto;
    background-position: top center, bottom center, top center;
    padding-top: 30%;     /* logo abaixo do medalhão VM na arte ampliada */
    padding-bottom: 19%;  /* espaço do rodapé ornamental ampliado */
  }
  .letter-parchment-sheet {
    width: 82%;
    max-width: none;
    padding: 0 4px;
  }
  .letter-couple-heading {
    font-size: 40px;
  }
  .hero-dynamic-salutation {
    font-size: 34px;
    line-height: 1.15;
  }
  .invitation-body-text,
  .gift-letter-text {
    font-size: 18px;
    line-height: 1.6;
  }
  .floating-rsvp-shortcut {
    right: 12px;
    bottom: 14px;
  }
}

/* Data do casamento em destaque na seção "O dia em que seremos nós" */
.wedding-date-line {
  font-family: var(--font-serif-title);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #344222;
  margin: 4px auto 22px auto;
}
