/* ============================================================
   MAFALDA & FRANCISCO — Paleta: Verde Sálvia + Bege/Linho
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Libre+Caslon+Display&family=Cormorant+Infant:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=EB+Garamond:ital,wght@0,400;0,500;1,400;1,500&display=swap');

:root {
  --linho:       #f5f2ec;
  --linho-2:     #ede8df;
  --linho-3:     #e2dbd1;
  --branco:      #ffffff;
  --sage:        #7a9174;
  --sage-medio:  #5e7359;
  --sage-escuro: #3d5239;
  --texto:       #2e3a2c;
  --texto-suave: #6b7a65;
  --linha:       rgba(122, 145, 116, 0.22);
  --sombra:      0 24px 64px rgba(61, 82, 57, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--linho);
  color: var(--texto);
  font-family: "Cormorant Infant", serif;
}

.page { width: 100%; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--sage-escuro);
  border-bottom: 2px solid rgba(245, 242, 236, 0.35);
}

.site-nav {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.nav-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.nav-logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  /* O logo tem fundo branco — invertemos para ficar linho sobre verde */
  opacity: 0.75;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
  flex: 1;
}

.nav-left { justify-content: flex-end; padding-right: 60px; }
.nav-right { justify-content: flex-start; padding-left: 60px; }

.site-nav a,
.site-nav button {
  background: transparent;
  border: none;
  color: rgba(245, 242, 236, 1);
  font-family: "EB Garamond", serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav button:hover { color: var(--linho); }

.site-nav a::after,
.site-nav button::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(245, 242, 236, 0.50);
  margin-top: 4px;
}

/* ============================================================
   HERO — centrado, logótipo compacto
   ============================================================ */
.hero {
  padding: 40px 20px 90px;
  background: var(--linho);
  text-align: center;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-monogram {
  width: 120px;
  height: auto;
  margin: 0 auto 20px;
  object-fit: contain;
}

.main-title {
  margin: 0 0 12px;
  color: var(--sage-escuro);
  font-family: "Libre Caslon Display", serif;
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.05;
}

.and {
  font-style: italic;
  color: var(--sage-escuro);
}

.date {
  margin: 0 0 24px;
  font-family: "EB Garamond", serif;
  font-style: italic;
  color: var(--sage-medio);
  font-size: 1.55rem;
  letter-spacing: 0.12em;
}

.hero-text {
  max-width: 500px;
  margin: 0 auto 44px;
  font-family: "EB Garamond", serif;
  font-style: italic;
  color: var(--texto-suave);
  font-size: 1.05rem;
  line-height: 1.7;
}

.rsvp-wrap {
  margin-bottom: 56px;
}

.photo-frame {
  width: 100%;
  max-width: 680px;
}

.hero-photo {
  display: block;
  width: 100%;
  height: auto;
}

/* ============================================================
   LOGÓTIPO ANTES DOS TÍTULOS DE SECÇÃO
   ============================================================ */
.section-header-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
}

/* Logo verde (sobre fundo claro) */
.section-logo {
  width: 80px;
  height: auto;
  object-fit: contain;
  margin-bottom: 16px;
}

/* Logo linho (sobre fundo verde escuro — invertido) */
.section-logo--linho {
  opacity: 0.80;
}

/* ============================================================
   TÍTULOS GERAIS
   ============================================================ */
.section-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.section-title {
  margin: 0;
  font-family: "Libre Caslon Display", serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
  font-weight: 400;
  font-style: italic;
}

/* ============================================================
   BOTÃO
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  padding: 13px 28px;
  font-size: 0.76rem;
  font-family: "EB Garamond", serif;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--branco);
  background: var(--sage);
  border: 1px solid var(--sage);
  cursor: pointer;
  transition: all 0.26s ease;
}

.btn:hover {
  background: var(--sage-escuro);
  border-color: var(--sage-escuro);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(61, 82, 57, 0.22);
}

/* ============================================================
   O DIA — verde escuro
   ============================================================ */
.day-section {
  padding: 80px 20px 100px;
  background: var(--sage-escuro);
}

.day-title { color: var(--linho); }

.day-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  position: relative;
}

.day-grid::after {
  content: "";
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 50%;
  width: 1px;
  background: rgba(245, 242, 236, 0.12);
  transform: translateX(-50%);
}

.day-item {
  text-align: center;
  padding: 0 40px;
}

.day-kicker {
  margin: 0 0 8px;
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0.20em;
  color: var(--linho);
  text-transform: uppercase;
  font-weight: 500;
}

.day-location {
  margin: 0 0 18px;
  font-family: "Cormorant Infant", serif;
  font-size: 1.15rem;
  color: rgba(245, 242, 236, 0.78);
  letter-spacing: 0.04em;
  font-style: italic;
}

.day-image {
  width: 100%;
  height: 220px;
  object-fit: contain;
  display: block;
  margin-bottom: 0;
}

.day-time {
  display: block;
  margin: 18px 0 14px;
  color: var(--linho);
  font-family: "Cormorant Infant", serif;
  font-size: 2.2rem;
  font-weight: 300;
  font-style: italic;
}

.day-link {
  display: inline-block;
  color: rgba(245, 242, 236, 0.80);
  text-decoration: none;
  font-family: "EB Garamond", serif;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(245, 242, 236, 0.40);
  padding-bottom: 2px;
  transition: all 0.2s ease;
}

.day-link:hover {
  color: var(--linho);
  border-bottom-color: rgba(245, 242, 236, 0.6);
}

/* ============================================================
   PRESENTES — fundo linho 2
   ============================================================ */
.gifts-section {
  padding: 80px 20px 100px;
  background: var(--linho-2);
}

.gifts-title { color: var(--sage-escuro); }

.gifts-text {
  max-width: 620px;
  margin: 0 auto 36px;
  font-family: "EB Garamond", serif;
  font-style: italic;
  color: var(--texto-suave);
  font-size: 1.06rem;
  line-height: 1.78;
}

.gift-payment-info {
  max-width: 500px;
  margin: 0 auto 56px;
  background: var(--branco);
  border: 1px solid rgba(122, 145, 116, 0.14);
  padding: 28px 36px;
  text-align: center;
}

.gift-payment-info p {
  margin: 0 0 8px;
  font-size: 0.98rem;
  color: var(--texto-suave);
  font-family: "EB Garamond", serif;
  line-height: 1.6;
}

.gift-payment-info p:last-child { margin-bottom: 0; }

.gift-payment-info strong {
  display: block;
  color: var(--sage-escuro);
  font-family: "EB Garamond", serif;
  font-size: clamp(0.72rem, 3.2vw, 0.95rem);
  font-weight: 600;
  margin-bottom: 10px;
  white-space: nowrap;
}

.gift-payment-info a {
  color: var(--sage-escuro);
  text-decoration: none;
  border-bottom: 1px solid rgba(61, 82, 57, 0.3);
}

/* Grid de presentes */
.house-grid {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.gift-house-card {
  background: var(--branco);
  padding: 8px 8px 14px;
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(122, 145, 116, 0.10);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.gift-house-card:hover {
  box-shadow: 0 6px 24px rgba(61, 82, 57, 0.09);
  transform: translateY(-2px);
}

.gift-house-image-wrap {
  overflow: hidden;
  background: var(--linho-2);
}

.gift-house-image {
  width: 100%;
  height: 130px;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.gift-house-card:hover .gift-house-image { transform: scale(1.04); }

.gift-house-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
}

.gift-item-kicker {
  margin: 0 0 3px;
  font-family: "EB Garamond", serif;
  font-style: italic;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--sage-medio);
  text-transform: uppercase;
}

.gift-house-card h3 {
  margin: 0;
  color: var(--sage-escuro);
  font-family: "Cormorant Infant", serif;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 500;
}

/* ============================================================
   CONTACTOS — verde médio
   ============================================================ */
.contact-section {
  padding: 80px 20px 100px;
  background: var(--sage-escuro);
  text-align: center;
}

.contact-title { 
  color: var(--linho);
  font-family: "Libre Caslon Display", serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.05;
  margin: 0;

 }
.contact-section .section-header-block {
  margin-bottom: 42px;
}
.contact-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 80px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.contact-list::before {
  content: "";
  position: absolute;
  top: 10%;
  bottom: 10%;
  left: 50%;
  width: 1px;
  background: rgba(245, 242, 236, 0.20);
  transform: translateX(-50%);
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-name {
  font-family: "Cormorant Infant", serif;
  font-size: 2.3rem;
  font-weight: 400;
  font-style: italic;
  color: var(--linho);
  margin-bottom: 8px;
}

.contact-details {
  color: rgba(245, 242, 236, 0.72);
  font-family: "EB Garamond", serif;
  font-size: 0.95rem;
  line-height: 1.75;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  padding: 16px;
  background: rgba(61, 82, 57, 0.50);
  backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

/* FORM MICROSOFT */
.modal iframe {
  border-radius: 0;
  background: white;
}

.modal-card {
  position: relative;
  width: min(100%, 740px);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--sage-escuro);
  box-shadow: var(--sombra);
}

.modal-shell {
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.close {
  position: absolute;
  top: 14px;
  right: 18px;
  border: none;
  background: transparent;
  color: rgba(245, 242, 236, 0.80);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 20;
  line-height: 1;
  transition: opacity 0.2s;
}

.close:hover { opacity: 0.5; }

.modal-monogram {
  position: absolute;
  bottom: 16px;
  right: 18px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 1;
}

.modal-logo-img {
  width: 100px;
  height: auto;
  object-fit: contain;
}

.form-frame {
  width: 100%;
  max-width: 480px;
  background: var(--linho);
  padding: 40px 40px 34px;
  position: relative;
  z-index: 5;
}

.modal-title {
  margin: 0 0 10px;
  color: var(--sage-escuro);
  font-family: "Libre Caslon Display", serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
  font-style: italic;
  text-align: left;
}

.modal-description {
  max-width: 400px;
  margin: 0 0 24px;
  text-align: left;
  color: var(--texto-suave);
  font-family: "EB Garamond", serif;
  font-style: italic;
  line-height: 1.6;
  font-size: 0.98rem;
}

.rsvp-form {
  width: 100%;
  display: grid;
  gap: 12px;
}

.rsvp-form input,
.rsvp-form textarea {
  width: 100%;
  display: block;
  padding: 14px 16px;
  border: 1px solid rgba(122, 145, 116, 0.26);
  background: var(--branco);
  color: var(--texto);
  font-size: 0.95rem;
  font-family: "EB Garamond", serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rsvp-form input:focus,
.rsvp-form textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(122, 145, 116, 0.10);
}

.submit-btn {
  min-width: 140px;
  max-width: 180px;
  margin: 14px auto 0;
  padding: 11px 20px;
  font-size: 0.72rem;
  display: flex;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 900px) {
  .house-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .site-nav { height: 56px; }
  .nav-left { gap: 14px; padding-right: 44px; }
  .nav-right { gap: 14px; padding-left: 44px; }
  .nav-logo-img { width: 40px; height: 40px; }
  .site-nav a, .site-nav button { font-size: 0.54rem; letter-spacing: 0.12em; }

  .hero { padding: 16px 20px 40px; }
  .hero-monogram { width: 64px; margin-bottom: 6px; }
  .main-title { font-size: 2.0rem; margin-bottom: 4px; }
  .date { font-size: 1.35rem; margin-bottom: 14px; }
  .hero-text { margin-bottom: 28px; font-size: 0.95rem; }
  .rsvp-wrap { margin-bottom: 32px; }

  .day-section, .gifts-section, .contact-section { padding: 60px 16px 70px; }

  .day-grid { grid-template-columns: 1fr; }
  .day-grid::after { display: none; }
  .day-item { padding: 0 16px 40px; }
  .day-item:last-child { padding-bottom: 0; }
  .day-item:first-child {
    border-bottom: 1px solid rgba(245,242,236,0.12);
    margin-bottom: 44px;
    padding-bottom: 44px;
  }

  .house-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 16px; }
  .gift-house-image { height: 100px; }
  .gift-house-card h3 { font-size: 0.80rem; }

  .section-logo { width: 60px; }

  .contact-list { gap: 30px; flex-direction: column; }
  .contact-list::before { display: none; }
  .contact-name { font-size: 1.8rem; }

  .modal-card { width: 100%; max-height: 90vh; }
  .modal-shell { padding: 14px; }
  .form-frame { max-width: 100%; padding: 24px 18px 20px; }
}

@media (max-width: 480px) {
  .nav-left { gap: 10px; padding-right: 36px; }
  .nav-right { gap: 10px; padding-left: 36px; }
  .site-nav a, .site-nav button { font-size: 0.46rem; }
  .main-title { font-size: 1.9rem; }
}