/* ============================================================
   O Batizado da Ariel — tema "Aguarela Rosa" (das placas da festa)
   papel #fdf3f4 · rosa #c9527c · rosa-tinta #a63d63 · alga #a9d3c4
   concha/salmão #f2b9a4 · ouro #c9a25f · pérola #fff
   ============================================================ */

:root {
  --paper: #fdf3f4;
  --paper-deep: #f8e4e8;
  --rose: #c9527c;
  --rose-ink: #a63d63;
  --ink: #5d4450;
  --seaweed: #a9d3c4;
  --seaweed-soft: #d9ece4;
  --salmon: #f2b9a4;
  --blush: #f6d3da;
  --gold: #c9a25f;
  --gold-soft: #ddc394;

  --font-script: "Imperial Script", cursive;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-body: "Karla", -apple-system, sans-serif;

  --gap: clamp(4px, 0.8vw, 10px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

svg use { pointer-events: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -10%, #fffdfd 0%, var(--paper) 45%, var(--paper-deep) 100%);
  padding: 8vh 24px 20vh;
}

/* moldura dupla fina, como nas placas da festa */
.hero-frame {
  position: absolute;
  inset: clamp(10px, 2.2vw, 24px);
  border: 1px solid rgba(201, 82, 124, .30);
  outline: 1px solid rgba(201, 82, 124, .15);
  outline-offset: 5px;
  border-radius: 2px;
  pointer-events: none;
}

/* conchas nos cantos da moldura */
.corner {
  position: absolute;
  width: clamp(44px, 7vw, 82px);
  aspect-ratio: 1;
  top: calc(clamp(10px, 2.2vw, 24px) + 8px);
  filter: drop-shadow(0 2px 4px rgba(166, 61, 99, .18));
}
.corner-tl { left: calc(clamp(10px, 2.2vw, 24px) + 8px); transform: rotate(-16deg); }
.corner-tr { right: calc(clamp(10px, 2.2vw, 24px) + 8px); transform: scaleX(-1) rotate(-16deg); }

/* brilhos dourados a cintilar */
.hero-sparks .spark {
  position: absolute;
  width: 16px;
  aspect-ratio: 1;
  animation: twinkle 3.6s ease-in-out infinite;
}
.hero-sparks .s1 { left: 24%; top: 24%; }
.hero-sparks .s2 { right: 22%; top: 20%; width: 12px; animation-delay: -1.2s; }
.hero-sparks .s3 { right: 30%; top: 46%; width: 20px; animation-delay: -2.2s; }
.hero-sparks .s4 { left: 30%; top: 52%; width: 11px; animation-delay: -2.9s; }

@keyframes twinkle {
  0%, 100% { opacity: .18; transform: scale(.65) rotate(0deg); }
  50% { opacity: .95; transform: scale(1) rotate(18deg); }
}

/* pérolas em flutuação suave */
.hero-pearls .pearl {
  position: absolute;
  width: 13px;
  aspect-ratio: 1;
  opacity: .75;
  filter: drop-shadow(0 1px 2px rgba(166, 61, 99, .2));
  animation: pearl-float 11s ease-in-out infinite;
}
.hero-pearls .p1 { left: 13%; top: 30%; }
.hero-pearls .p2 { left: 20%; top: 66%; width: 9px; animation-delay: -3s; animation-duration: 13s; }
.hero-pearls .p3 { right: 13%; top: 28%; width: 10px; animation-delay: -6s; }
.hero-pearls .p4 { right: 21%; top: 62%; animation-delay: -8s; animation-duration: 15s; }
.hero-pearls .p5 { left: 47%; top: 13%; width: 8px; animation-delay: -5s; animation-duration: 12s; }

@keyframes pearl-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero-waves {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  pointer-events: none;
}
.wave {
  position: absolute;
  bottom: -2px;
  left: -10%;
  width: 120%;
  height: 100%;
}
.wave path { fill: currentColor; }
.wave-a { color: var(--blush); opacity: .5; animation: drift 26s ease-in-out infinite alternate; }
.wave-b { color: var(--seaweed-soft); opacity: .5; animation: drift 34s ease-in-out infinite alternate-reverse; }
.wave-c { color: var(--salmon); opacity: .30; animation: drift 44s ease-in-out infinite alternate; }

@keyframes drift {
  from { transform: translateX(0) translateY(0); }
  to   { transform: translateX(-4%) translateY(6px); }
}

/* recifes aguarela a emoldurar as ondas */
.reef {
  position: absolute;
  bottom: -4px;
  width: clamp(190px, 26vw, 350px);
  height: clamp(120px, 16vw, 215px);
  pointer-events: none;
}
.reef-left { left: 1.5%; }
.reef-right { right: 1.5%; transform: scaleX(-1); }

.reef svg { position: absolute; bottom: 0; }
.rf-weed  { left: 2%;  width: 26%; aspect-ratio: 64 / 150; }
.rf-coral { left: 25%; width: 31%; aspect-ratio: 100 / 130; bottom: 1% !important; }
.rf-shell { left: 55%; width: 25%; aspect-ratio: 1; transform: rotate(-7deg); }
.rf-star  { left: 80%; width: 17%; aspect-ratio: 1; transform: rotate(14deg); bottom: 2% !important; }
.rf-pearl { width: 5.5%; aspect-ratio: 1; }
.rf-pearl.a { left: 51%; bottom: 42% !important; }
.rf-pearl.b { left: 89%; bottom: 34% !important; width: 4.5%; }

.sway {
  transform-origin: 50% 100%;
  animation: sway 7s ease-in-out infinite alternate;
}
@keyframes sway {
  from { rotate: -2.5deg; }
  to   { rotate: 2.5deg; }
}

.hero-inner { position: relative; max-width: 900px; }

.hero-eyebrow {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  letter-spacing: .06em;
  color: var(--rose-ink);
}

.hero-sub {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  letter-spacing: .04em;
  color: var(--rose-ink);
  margin-top: 2px;
}

.hero-name {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(6.5rem, 24vw, 16rem);
  line-height: 1;
  color: var(--rose);
  -webkit-text-stroke: 1.2px var(--rose); /* engrossa os traços finos do script */
  paint-order: stroke fill;
  margin-top: -0.04em;
  text-shadow: 0 2px 18px rgba(201, 82, 124, .16);
}

.hero-flourish {
  position: relative;
  width: clamp(190px, 30vw, 250px);
  margin: 10px auto 20px;
  transform-origin: center;
}
.flourish {
  display: block;
  width: 100%;
  aspect-ratio: 240 / 26;
  opacity: .7;
}
.hero-heart {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -54%);
  color: var(--rose);
  font-size: .95rem;
  line-height: 1;
}

.hero-meta {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero-note {
  margin-top: 14px;
  font-size: .92rem;
  color: #8a6a76;
  max-width: 42ch;
  margin-inline: auto;
}
.icon-inline {
  display: inline-grid;
  place-items: center;
  width: 1.35em; height: 1.35em;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
  font-size: .8em;
  color: var(--gold);
  vertical-align: -0.2em;
}

.dot { color: var(--gold); }

.hero-scroll {
  position: absolute;
  bottom: 4.5vh;
  left: calc(50% - 22px); /* sem transform: a animação reveal-4 substituí-lo-ia */
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: var(--rose-ink);
  border: 1px solid rgba(201, 82, 124, .30);
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(4px);
  transition: transform .25s ease, background .25s ease;
  z-index: 1;
}
.hero-scroll:hover { transform: translateY(3px); background: #fff; }

/* entrada orquestrada */
.reveal-1, .reveal-2, .reveal-3, .reveal-4 {
  opacity: 0;
  transform: translateY(14px);
  animation: rise .9s cubic-bezier(.2, .65, .25, 1) forwards;
}
.reveal-2 { animation-delay: .15s; }
.reveal-3 { animation-delay: .45s; transform: scaleX(0); animation-name: rule; }
.reveal-4 { animation-delay: .6s; }

@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@keyframes rule { to { opacity: 1; transform: scaleX(1); } }

/* ---------- Álbum ---------- */

.album {
  position: relative;
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) clamp(8px, 2vw, 32px) 40px;
}

/* manchas de aguarela suaves atrás da grelha */
.album::before, .album::after {
  content: "";
  position: absolute;
  width: min(46vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}
.album::before {
  top: 4%;
  left: min(-8vw, -60px);
  background: radial-gradient(circle, rgba(246, 211, 217, .45), transparent 68%);
}
.album::after {
  top: 46%;
  right: min(-8vw, -60px);
  background: radial-gradient(circle, rgba(217, 236, 228, .5), transparent 68%);
}

/* motivos nas margens do álbum (só em ecrãs largos, fora das fotos) */
.album-decor { position: absolute; inset: 0; pointer-events: none; }
.album-decor .ad { position: absolute; }
.ad-1 { left: -54px; top: 9%;  width: 15px; aspect-ratio: 1; animation: pearl-float 12s ease-in-out infinite; }
.ad-2 { right: -58px; top: 16%; width: 18px; aspect-ratio: 1; animation: twinkle 4.2s ease-in-out infinite; }
.ad-3 { left: -76px; top: 34%; width: 48px; aspect-ratio: 1; transform: rotate(-14deg); opacity: .85; }
.ad-4 { right: -52px; top: 44%; width: 11px; aspect-ratio: 1; animation: pearl-float 14s ease-in-out infinite; animation-delay: -4s; }
.ad-5 { right: -80px; top: 66%; width: 44px; aspect-ratio: 1; transform: rotate(12deg); opacity: .85; }
.ad-6 { left: -60px; top: 58%; width: 14px; aspect-ratio: 1; animation: twinkle 3.8s ease-in-out infinite; animation-delay: -1.5s; }
.ad-7 { left: -84px; top: 82%; width: 54px; aspect-ratio: 100 / 130; opacity: .8; }
.ad-8 { right: -50px; top: 90%; width: 13px; aspect-ratio: 1; animation: pearl-float 13s ease-in-out infinite; animation-delay: -7s; }
@media (max-width: 1680px) { .album-decor { display: none; } } /* só quando há margem real fora da grelha */

.loading {
  text-align: center;
  padding: 60px 0;
  color: #b48a99;
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: clamp(28px, 5vw, 56px) 6px 18px;
}
.section-head:first-child { margin-top: 6px; }
.sec-shell {
  width: 22px;
  aspect-ratio: 1;
  flex: none;
  opacity: .9;
  filter: drop-shadow(0 1px 2px rgba(166, 61, 99, .15));
}
.section-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  color: var(--rose-ink);
  white-space: nowrap;
}
.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(201, 82, 124, .35), transparent);
}
.section-count {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

.grid-row {
  display: flex;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 5px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease, box-shadow .35s ease;
}
.tile.in { opacity: 1; transform: none; }
.tile:hover { box-shadow: 0 8px 22px rgba(166, 61, 99, .20); }

.tile-link {
  display: block;
  width: 100%;
  height: 100%;
}

.tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .65, .25, 1), opacity .5s ease;
  opacity: 0;
}
.tile img.ready { opacity: 1; }
.tile:hover img { transform: scale(1.03); }

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(94, 38, 58, .38), transparent 42%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.tile:hover::after { opacity: 1; }

.tile-dl {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(253, 243, 244, .94);
  color: var(--rose-ink);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s ease, transform .3s ease, background .2s ease;
  border: none;
  cursor: pointer;
}
.tile:hover .tile-dl, .tile:focus-within .tile-dl { opacity: 1; transform: none; }
.tile-dl:hover { background: #fff; color: var(--rose); }
@media (hover: none) { .tile-dl { display: none; } } /* em mobile o download vive no lightbox */

/* foco visível */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

/* botão voltar ao topo */
.to-top[hidden] { display: none; } /* o display:grid abaixo anularia o atributo hidden */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(201, 82, 124, .35);
  background: rgba(255, 255, 255, .92);
  color: var(--rose-ink);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(166, 61, 99, .18);
  animation: rise .35s ease;
  transition: transform .2s ease, background .2s ease;
}
.to-top:hover { transform: translateY(-3px); background: #fff; }

/* ---------- Lightbox (PhotoSwipe) ---------- */

.pswp { --pswp-bg: #2b141d; }
.pswp__counter {
  font-family: var(--font-body);
  font-size: .8rem;
  letter-spacing: .12em;
  text-shadow: none;
  opacity: .85;
}
.pswp__button--dl-original {
  display: flex !important;
  align-items: center;
  gap: 8px;
  width: auto !important;
  padding: 0 14px;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
}
.pswp__button--dl-original .dl-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px;
  transition: background .2s ease, border-color .2s ease;
}
.pswp__button--dl-original:hover .dl-pill {
  background: rgba(201, 82, 124, .45);
  border-color: var(--blush);
}
.pswp__button--dl-original svg { flex: none; }
@media (max-width: 560px) {
  .pswp__button--dl-original .dl-label { display: none; }
  .pswp__button--dl-original .dl-pill { padding: 8px 10px; }
}

/* ---------- Footer ---------- */

.footer {
  position: relative;
  text-align: center;
  padding: 0 24px 56px;
  background: linear-gradient(to bottom, var(--paper), var(--paper-deep));
  color: var(--rose-ink);
  overflow: hidden;
}

/* ondas a fechar o álbum, espelho das do hero */
.footer-waves {
  position: relative;
  height: clamp(70px, 10vw, 130px);
  margin: 0 -24px 26px;
}
.footer-waves .wave {
  bottom: auto;
  top: -2px;
  transform: scaleY(-1);
}

/* conchas nos cantos inferiores, como nas placas */
.corner-b {
  position: absolute;
  bottom: 12px;
  width: clamp(36px, 5vw, 58px);
  aspect-ratio: 1;
  opacity: .9;
  filter: drop-shadow(0 2px 4px rgba(166, 61, 99, .18));
}
.corner-bl { left: 14px; transform: rotate(196deg); }
.corner-br { right: 14px; transform: scaleX(-1) rotate(196deg); }

.credit {
  margin-top: 30px;
  font-size: .68rem;
  letter-spacing: .16em;
  color: #c39aa9;
}
.footer-motifs {
  position: relative;
  height: 74px;
  margin-bottom: 16px;
  pointer-events: none;
}
.footer-motifs .fm { position: absolute; bottom: 0; }
.fm-shell { left: calc(50% - 27px); width: 54px; aspect-ratio: 1; filter: drop-shadow(0 2px 4px rgba(166, 61, 99, .18)); }
.fm-weed { left: calc(50% - 84px); width: 30px; aspect-ratio: 64 / 150; height: auto; }
.fm-coral { left: calc(50% + 40px); width: 44px; aspect-ratio: 100 / 130; }
.fm-spark1 { left: calc(50% - 108px); bottom: 40px; width: 13px; aspect-ratio: 1; animation: twinkle 4s ease-in-out infinite; }
.fm-spark2 { left: calc(50% + 96px); bottom: 48px; width: 11px; aspect-ratio: 1; animation: twinkle 4s ease-in-out infinite; animation-delay: -1.6s; }

.footer-line {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.8vw, 1.6rem);
}
.footer-sub {
  margin-top: 8px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Ecrãs pequenos: recifes mais discretos ---------- */

@media (max-width: 640px) {
  .reef { opacity: .85; width: 38vw; height: 25vw; }
  .reef-right { display: none; } /* em ecrã estreito, um recife chega — o outro colidia com o botão de scroll */
  .hero-sparks .s3, .hero-sparks .s4 { display: none; }
}

/* ---------- Movimento reduzido ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wave-a, .wave-b, .wave-c, .hero-pearls .pearl, .hero-sparks .spark,
  .sway, .fm-spark1, .fm-spark2, .album-decor .ad { animation: none; }
  .reveal-1, .reveal-2, .reveal-3, .reveal-4 { animation-duration: .01s; animation-delay: 0s; }
  .tile { transition: none; opacity: 1; transform: none; }
  .tile img { transition: opacity .2s ease; }
  .tile:hover img { transform: none; }
}
