/* ==========================================================================
   pages.css — páginas interiores (convite.html, e mais tarde rsvp.html)
   Depende de base.css.
   ========================================================================== */

:root {
  --paper-warm:   #F7F4EE;            /* fundo alternado das secções */
  --header-h:     64px;
  --content-w:    68rem;              /* largura máxima do conteúdo */
  --section-pad:  clamp(4.5rem, 11vw, 8.5rem);
  --gutter:       clamp(1.25rem, 6vw, 4rem);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Página bloqueada pelo guard.js enquanto redireciona */
html.is-blocked body { visibility: hidden; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--card-paper);
  color: var(--olive-900);
  font-family: var(--font-caps);
  letter-spacing: .12em;
}
.skip-link:focus { top: 1rem; }

/* Secções com âncora: compensam a altura do cabeçalho fixo */
section[id], .moment[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }


/* --------------------------------------------------------------------------
   1. Botões e ligações
   -------------------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .55rem 1.4rem;
  border: 1px solid var(--olive-600);
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: .8rem;
  letter-spacing: .22em;
  text-indent: .22em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.button--outline { color: var(--olive-900); background: transparent; }
.button--outline:hover,
.button--outline:focus-visible { background: var(--olive-600); color: var(--card-paper); outline: none; }

.button--solid { color: var(--card-paper); background: var(--olive-600); }
.button--solid:hover,
.button--solid:focus-visible { background: var(--olive-900); border-color: var(--olive-900); outline: none; }

.button.is-soon { letter-spacing: .12em; text-indent: .12em; }

.text-link {
  display: inline-block;
  margin-top: 1.25rem;
  padding-bottom: .2rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: .85rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--olive-900);
  transition: border-color .3s ease;
}
.text-link::after { content: " →"; letter-spacing: 0; }
.text-link:hover,
.text-link:focus-visible { border-bottom-color: var(--olive-900); outline: none; }

/* Ligação dentro de um parágrafo (ex.: FAQ) */
.text-link--inline {
  display: inline;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
  text-transform: none;
  font-style: italic;
}
.text-link--inline::after { content: none; }


/* --------------------------------------------------------------------------
   2. Cabeçalho
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
  padding: 0 var(--gutter);
  transition: background-color .4s ease, box-shadow .4s ease;
}
.site-header.is-scrolled,
.menu-open .site-header {
  background-color: rgba(239, 234, 224, .94);
  box-shadow: 0 1px 0 var(--rule);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.site-header__mark {
  justify-self: start;
  display: inline-flex;
  align-items: baseline;
  gap: .15rem;
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: .06em;
  color: var(--olive-900);
  text-decoration: none;
}
.site-header__and {
  font-family: var(--font-script);
  font-size: 1.3em;                    /* altura-x da Corinthia ≈ 0,24 em: fica abaixo das maiúsculas */
  line-height: 0;
  margin: 0 .08em;
  color: var(--olive-800);
}

.site-nav__list {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav__link {
  position: relative;
  padding: .4rem 0;
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: .82rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--neutral-600);
  transition: color .3s ease;
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--olive-900);
  transform: translateX(-50%);
  transition: width .35s ease;
}
.site-nav__link:hover,
.site-nav__link[aria-current="true"] { color: var(--olive-900); }
.site-nav__link[aria-current="true"]::after { width: 1.5rem; }

.site-header__rsvp { justify-self: end; }

.site-header__toggle { display: none; }


/* --------------------------------------------------------------------------
   4. Secções
   -------------------------------------------------------------------------- */
.section {
  padding: var(--section-pad) var(--gutter);
}
.section--paper { background-color: var(--paper-warm); }

/* Primeira secção: começa abaixo do cabeçalho fixo */
.section--first { padding-top: calc(var(--header-h) + clamp(3.5rem, 8vw, 6rem)); }

.section__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto clamp(3rem, 7vw, 5rem);
  text-align: center;
}
.section__kicker {
  margin: 0 0 1rem;
  font-family: var(--font-caps);
  font-size: .85rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--khaki);
}
.section__title {
  margin: 0;
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--olive-900);
}

/* Filete com losango, como no cartão */
.ornament {
  position: relative;
  width: 5.5rem;
  height: 1px;
  margin-top: 1.75rem;
  background: var(--rule);
}
.ornament::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: .45rem;
  height: .45rem;
  border: 1px solid var(--rule);
  background: var(--ivory);
  transform: translate(-50%, -50%) rotate(45deg);
}
.section--paper .ornament::after { background: var(--paper-warm); }


/* --------------------------------------------------------------------------
   5. Programa
   Blocos alternados (fotografia | texto) em computador, empilhados no
   telemóvel. Todas as fotografias têm a mesma proporção (4:5).
   -------------------------------------------------------------------------- */
.programme {
  display: flex;
  flex-direction: column;
  gap: clamp(4rem, 10vw, 7.5rem);
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.moment {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
}
.moment:nth-child(even) .moment__photo { order: 2; }

.moment__photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.moment__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;            /* o branco da aguarela funde-se no marfim */
}

.moment__text { max-width: 26rem; }

.moment__time {
  margin: 0 0 .75rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--khaki);
}
.moment__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--olive-900);
}
.moment__description {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--olive-800);
}

/* Espaço reservado para fotografias ainda por escolher */
.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #E6E0D3;
  background-image: var(--grain);
  border: 1px solid rgba(70, 72, 42, .12);
}
.photo-placeholder span {
  font-family: var(--font-caps);
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--neutral-600);
}


/* A Nossa Próxima Aventura: fecho do programa, a toda a largura */
.adventure {
  max-width: 72rem;
  margin: clamp(5rem, 12vw, 8.5rem) auto 0;
  text-align: center;
}
.adventure__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.adventure__title {
  margin: 0;
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: clamp(1.8rem, 4.2vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--olive-900);
}

.adventure__map {
  position: relative;
  margin: 0;
}
.adventure__map img {
  display: block;
  width: 100%;
  height: auto;
}
.adventure__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.map-route {
  fill: none;
  stroke: var(--olive-900);
  stroke-width: 2.2;
  stroke-dasharray: 9 9;
  stroke-linecap: round;
}
.map-plane { fill: var(--olive-900); transform: scale(2); }
.map-city__halo { fill: var(--ivory); opacity: .9; }
.map-city__dot  { fill: var(--olive-900); }
.map-city__mark { transform-box: fill-box; }
.map-city__name {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 34px;
  fill: var(--olive-900);
  paint-order: stroke;
  stroke: var(--ivory);
  stroke-width: 6px;
  stroke-linejoin: round;
}
.map-city__country {
  font-family: var(--font-caps);
  font-size: 17px;
  letter-spacing: .16em;
  text-transform: uppercase;
  fill: var(--khaki);
  paint-order: stroke;
  stroke: var(--ivory);
  stroke-width: 5px;
  stroke-linejoin: round;
}
.map-label--mob { display: none; }

.adventure__text {
  max-width: 36rem;
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.3vw, 1.45rem);
  line-height: 1.55;
  text-wrap: balance;
  color: var(--olive-900);
}
.adventure__text p { margin: 0; }
.adventure__text p + p { margin-top: .9rem; }

/* Fecho do programa: confirmação de presença */
.rsvp-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 34rem;
  margin: clamp(4.5rem, 10vw, 7rem) auto 0;
  text-align: center;
}
.rsvp-cta .ornament { margin: 0 0 2.25rem; }
.rsvp-cta__text {
  margin: 0 0 2rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  line-height: 1.45;
  text-wrap: balance;
  color: var(--olive-900);
}
.rsvp-cta .button { min-width: 15rem; }


/* --------------------------------------------------------------------------
   6. Localização: dois locais lado a lado + informações práticas
   -------------------------------------------------------------------------- */
.places {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 6vw, 5rem);
  max-width: var(--content-w);
  margin: 0 auto;
}
.place { text-align: center; }
.place__when {
  margin: 0 0 .75rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--khaki);
}
.place__name {
  margin: 0 0 1.75rem;
  min-height: 2.3em;                   /* alinha os mapas quando um nome ocupa duas linhas */
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  line-height: 1.15;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--olive-900);
}
.place__map {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--card-paper);
}
.place__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  filter: saturate(.7) sepia(.08);     /* cores do Google suavizadas para a paleta */
}
.place__address {
  margin: 1.5rem 0 0;
  font-size: 1.1rem;
  color: var(--olive-800);
}
.place .text-link { margin-top: 1rem; }

.practical {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  max-width: var(--content-w);
  margin: clamp(4rem, 9vw, 6rem) auto 0;
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--rule);
  text-align: center;
}
.practical dt {
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--olive-900);
}
.practical dd {
  margin: .6rem 0 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--olive-800);
}


/* --------------------------------------------------------------------------
   7. Perguntas frequentes
   -------------------------------------------------------------------------- */
.faq {
  max-width: 44rem;
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
}
.faq__item { border-top: 1px solid var(--rule); }

.faq__question {
  position: relative;
  display: block;
  padding: 1.4rem 2.5rem 1.4rem 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.35;
  color: var(--olive-900);
  cursor: pointer;
  list-style: none;
}
.faq__question::-webkit-details-marker { display: none; }

/* Sinal + / − desenhado com duas linhas finas */
.faq__question::before,
.faq__question::after {
  content: "";
  position: absolute;
  right: .25rem;
  top: 50%;
  width: .9rem;
  height: 1px;
  background: var(--olive-800);
  transition: transform .3s ease;
}
.faq__question::after { transform: rotate(90deg); }
.faq__item[open] .faq__question::after { transform: rotate(0deg); }

.faq__question:focus-visible { outline: 1px solid var(--olive-600); outline-offset: 4px; }

.faq__answer {
  padding: 0 2.5rem 1.6rem 0;
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--olive-800);
}
.faq__answer p { margin: 0; }
.faq__answer p + p { margin-top: .9rem; }


/* --------------------------------------------------------------------------
   8. Contactos
   -------------------------------------------------------------------------- */
.contacts {
  display: flex;
  justify-content: center;
  gap: clamp(3rem, 10vw, 8rem);
  text-align: center;
}
.contact__name {
  margin: 0 0 .6rem;
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--olive-900);
}
.contact__line {
  margin: 0;
  font-size: 1.1rem;
  color: var(--olive-800);
}


/* --------------------------------------------------------------------------
   9. Rodapé
   -------------------------------------------------------------------------- */
.site-footer {
  padding: 4rem var(--gutter) 5rem;
  text-align: center;
  border-top: 1px solid var(--rule);
}
.site-footer__mark {
  display: inline-flex;
  align-items: baseline;
  gap: .15rem;
  margin: 0;
  font-family: var(--font-caps);
  font-weight: 500;
  font-size: 1.6rem;
  color: var(--olive-900);
}
.site-footer__date {
  margin: .8rem 0 0;
  font-family: var(--font-caps);
  font-size: .85rem;
  letter-spacing: .3em;
  color: var(--khaki);
}

/* Barra de confirmação: só no telemóvel */
.rsvp-bar { display: none; }


/* --------------------------------------------------------------------------
   10. Telemóvel e tablet (até 860 px)
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  :root { --header-h: 58px; }

  .site-header { grid-template-columns: 1fr auto; }
  .site-header__rsvp { display: none; }

  .site-header__toggle {
    display: inline-flex;
    justify-self: end;
    align-items: center;
    min-height: 44px;
    padding: 0 .25rem;
    border: 0;
    background: none;
    font-family: var(--font-caps);
    font-weight: 500;
    font-size: .85rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--olive-900);
    cursor: pointer;
  }

  /* Menu em ecrã inteiro */
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--ivory);
    background-image: var(--grain);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility 0s linear .35s;
  }
  .menu-open .site-nav {
    opacity: 1;
    visibility: visible;
    transition: opacity .35s ease;
  }
  .menu-open { overflow: hidden; }

  /* O desfoque do cabeçalho prenderia o menu fixo dentro do cabeçalho:
     com o menu aberto, o cabeçalho usa fundo sólido. */
  .menu-open .site-header {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background-color: var(--ivory);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: center;
    gap: 2.25rem;
  }
  .site-nav__link {
    font-size: 1.15rem;
    letter-spacing: .24em;
  }

  .moment,
  .places,
  .practical {
    grid-template-columns: minmax(0, 1fr);
  }
  .place__name { min-height: 0; }
  .moment:nth-child(even) .moment__photo { order: 0; }
  .moment__text { max-width: none; text-align: center; }
  .moment__photo { aspect-ratio: 4 / 5; }

  .contacts { flex-direction: column; gap: 2.5rem; }

  /* Mapa da viagem: no telemóvel fica a ~25% → nomes maiores, sem países */
  .map-label--desk { display: none; }
  .map-label--mob  { display: inline; font-size: 68px; stroke-width: 12px; }
  .map-city__mark  { transform: scale(2.3); transform-origin: center; }
  .map-route       { stroke-width: 5; stroke-dasharray: 14 16; }
  .map-plane       { transform: scale(4.2); }

  /* Barra fixa de confirmação */
  .rsvp-bar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 40;
    display: block;
    padding: .75rem var(--gutter) calc(.75rem + env(safe-area-inset-bottom));
    background-color: rgba(239, 234, 224, .95);
    box-shadow: 0 -1px 0 var(--rule);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  .rsvp-bar .button { width: 100%; }
  .site-footer { padding-bottom: 8rem; }   /* espaço para a barra */
}
