/* =========================================================================
   Casamento Archer & Garcia — estilos
   Mobile-first. Paleta quente a partir da secção 2:
   açafrão #f9be3c · tangelo #eb772c · feijão-preto #3b0400
   ========================================================================= */

:root {
  /* Oceano (hero) */
  --ocean-950: #04142a;
  --ocean-900: #061a33;
  --ocean-800: #0b2447;

  /* Paleta quente */
  --saffron: #f9be3c;
  --tangelo: #eb772c;
  --tangelo-deep: #d4611a;      /* hover de botões */
  --tangelo-ink: #a8470c;       /* tangelo escurecido para TEXTO sobre claro (contraste ≥ 4.5:1) */
  --bean: #3b0400;
  --bean-soft: #5c2410;         /* texto secundário */
  --cream: #fff6e3;
  --cream-2: #fdecc4;
  --saffron-soft: #fde2a0;
  --paper: #fffaf0;
  --white: #ffffff;

  /* Tipografia (com fallbacks) */
  --f-sans: "Montserrat", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --f-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --f-script: "Mrs Saint Delafield", "Snell Roundhand", "Apple Chancery", cursive;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(59, 4, 0, .08);
  --shadow: 0 12px 32px -8px rgba(59, 4, 0, .22);
  --shadow-lg: 0 24px 60px -12px rgba(59, 4, 0, .35);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --container: 1120px;
  --gutter: 20px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--bean);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--tangelo-ink); text-underline-offset: 3px; }
a:hover { color: var(--bean); }
button { font: inherit; color: inherit; }
p { margin: 0 0 1em; }

/* Foco visível e consistente */
:focus-visible {
  outline: 3px solid var(--tangelo);
  outline-offset: 3px;
  border-radius: 6px;
}
.section--dark :focus-visible,
.hero :focus-visible { outline-color: var(--saffron); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--saffron); color: var(--bean);
  padding: 10px 16px; border-radius: 999px; font-weight: 600; text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container--narrow { width: min(100% - 2 * var(--gutter), 760px); }

/* ---------- Secções ---------- */
.section { position: relative; padding: 80px 0; }
.section--cream { background: var(--cream); }
.section--saffron { background: var(--saffron); }
.section--saffron-soft { background: var(--cream-2); }
.section--dark { background: var(--bean); color: var(--cream); }

.section__head { text-align: center; margin-bottom: 40px; }
.section__title {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  line-height: 1.05;
  margin: 0 0 .35em;
  letter-spacing: -.01em;
}
.section__lead { max-width: 560px; margin: 0 auto; color: var(--bean-soft); }
.section--dark .section__lead { color: #f4dcc0; }

.eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--tangelo-ink);
  margin-bottom: .6em;
}
.eyebrow--light { color: var(--saffron); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  border: 0; border-radius: 999px;
  font-weight: 600; font-size: .95rem; letter-spacing: .02em;
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s, color .25s;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--tangelo); color: var(--bean); box-shadow: 0 6px 18px -6px rgba(235, 119, 44, .7); }
.btn--primary:hover { background: var(--saffron); color: var(--bean); transform: translateY(-2px); }
.btn--lg { min-height: 56px; padding: 14px 34px; font-size: 1.02rem; }
.btn--ghost { background: transparent; color: var(--saffron); border: 1.5px dashed rgba(249, 190, 60, .7); }
.btn--ghost:hover { background: rgba(249, 190, 60, .12); border-style: solid; }
.btn--ghost-dark { background: var(--white); color: var(--bean); border: 1.5px solid rgba(59, 4, 0, .18); }
.btn--ghost-dark:hover { border-color: var(--tangelo); color: var(--bean); }

/* =========================================================================
   1. HERO
   ========================================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  color: var(--white);
  background: var(--ocean-900);
  overflow: hidden;
  isolation: isolate;
}
.hero__ocean {
  position: absolute; inset: -40px;
  z-index: -2;
  /* ✏️ Textura do oceano (recortada da imagem de referência) */
  background:
    linear-gradient(180deg, rgba(4, 20, 42, .35) 0%, rgba(4, 20, 42, 0) 35%, rgba(4, 20, 42, .25) 75%),
    url("img/oceano.webp") center / 740px auto repeat;
  animation: drift 40s linear infinite alternate;
}
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-30px, -20px, 0); } }

.hero__inner {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
  padding: 56px 0 150px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}

.hero__title {
  margin: 0;
  display: flex; flex-direction: column; align-items: center;
  font-weight: 400;
  line-height: 1;
}
.hero__kicker {
  font-family: var(--f-sans);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2rem, 10vw, 4.1rem);
  letter-spacing: .015em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .25);
}
.hero__names {
  font-family: var(--f-script);
  font-size: clamp(3.6rem, 16vw, 8.6rem);
  line-height: .9;
  margin-top: -.08em;
  padding: 0 .2em .1em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .3);
}

.polaroid {
  position: relative;
  margin: 0;
  background: #fbfaf5;
  padding: 12px 12px 0;
  box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .6), 0 4px 10px rgba(0, 0, 0, .25);
}
.polaroid img { width: 100%; height: auto; aspect-ratio: 632 / 576; object-fit: cover; background: #cfe0f2; }
.polaroid__date {
  font-family: var(--f-sans);
  font-weight: 800;
  color: #1c1b1a;
  letter-spacing: .05em;
  font-size: clamp(1.3rem, 5.4vw, 2rem);
  text-align: center;
  padding: .5em 0 .55em;
}
.hero__polaroid {
  width: min(78vw, 360px);
  margin-top: 26px;
  transform: rotate(5deg);
  animation: polaroid-in 1.2s var(--ease) .2s both;
}
@keyframes polaroid-in {
  from { opacity: 0; transform: translateY(30px) rotate(-2deg) scale(.95); }
  to   { opacity: 1; transform: rotate(5deg); }
}
.tape {
  position: absolute; left: 50%; top: -16px;
  width: 46%; height: 38px;
  transform: translateX(-50%) rotate(-3deg);
  background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, .0) 0 6px, rgba(255, 255, 255, .25) 6px 7px),
    rgba(236, 236, 230, .78);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  clip-path: polygon(2% 8%, 6% 0, 12% 10%, 18% 2%, 26% 9%, 35% 1%, 44% 8%, 55% 0, 64% 9%, 73% 1%, 82% 8%, 90% 0, 97% 9%, 100% 50%, 97% 92%, 90% 100%, 82% 91%, 73% 100%, 64% 92%, 55% 100%, 44% 91%, 35% 100%, 26% 92%, 18% 100%, 11% 91%, 5% 100%, 0 50%);
  z-index: 2;
}

.hero__date {
  margin: 34px 0 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  animation: fade-up 1s var(--ease) .6s both;
}
.hero__date time {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: clamp(1rem, 4vw, 1.35rem);
}
.hero__countdown { font-family: var(--f-hand); font-size: 1.45rem; color: var(--saffron); }

.hero__scroll {
  margin-top: 26px;
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  color: rgba(255, 255, 255, .85); text-decoration: none;
  font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  padding: 8px 12px;
}
.hero__scroll:hover { color: var(--saffron); }
.hero__scroll svg { animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.hero__sunset {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(4, 20, 42, 0) 0%,
    rgba(4, 20, 42, .35) 55%,
    rgba(59, 4, 0, .35) 85%,
    rgba(235, 119, 44, .35) 100%);
  pointer-events: none;
}
.hero__wave {
  position: absolute; left: 0; bottom: -1px;
  width: 100%; height: 80px;
  display: block;
}

@media (min-width: 900px) {
  .hero__inner { padding: 64px 0 170px; }
  .hero__title { flex-direction: row; align-items: baseline; justify-content: center; gap: .35em; }
  .hero__names { margin-top: 0; }
  .hero__polaroid { width: 380px; margin-top: 12px; }
  .hero__wave { height: 140px; }
}

/* =========================================================================
   2. FOTOGRAFIAS — carrossel + linha cronológica
   ========================================================================= */
.together {
  font-family: var(--f-hand);
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  color: var(--tangelo-ink);
  margin: 0;
}
.together strong { color: var(--bean); font-weight: 600; }

.carousel { outline: none; }
.carousel:focus-visible { outline: 3px solid var(--tangelo); outline-offset: 8px; border-radius: var(--radius); }

.carousel__stage { position: relative; }
.carousel__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cream-2);
  box-shadow: var(--shadow-lg);
  touch-action: pan-y;
  user-select: none;
}
.carousel__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity .7s var(--ease), transform 1.4s var(--ease);
  -webkit-user-drag: none;
}
.carousel__img.is-active { opacity: 1; transform: scale(1); }
.carousel__loading {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%) var(--cream-2);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  transition: opacity .4s;
}
.carousel__frame.is-loaded .carousel__loading { opacity: 0; pointer-events: none; }
@keyframes shimmer { to { background-position: -200% 0; } }

.carousel__arrow {
  position: absolute; top: 50%;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(255, 246, 227, .92);
  color: var(--bean);
  box-shadow: var(--shadow);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color .2s, transform .25s var(--ease);
}
.carousel__arrow:hover { background: var(--saffron); transform: translateY(-50%) scale(1.06); }
.carousel__arrow--prev { left: 10px; }
.carousel__arrow--next { right: 10px; }

.carousel__info { text-align: center; padding: 26px 0 8px; min-height: 176px; }
.carousel__count { font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; color: var(--bean-soft); margin: 0 0 4px; }
.carousel__date {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 6.5vw, 2.9rem);
  line-height: 1.1;
  margin: 0 0 6px;
}
.carousel__place {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--tangelo-ink);
  margin: 0 0 6px;
}
.carousel__caption {
  font-family: var(--f-hand);
  font-size: 1.6rem;
  line-height: 1.25;
  color: var(--bean);
  max-width: 520px;
  margin: 0 auto;
}
.carousel__info.is-changing > * { animation: info-in .5s var(--ease) both; }
.carousel__info.is-changing > :nth-child(2) { animation-delay: .04s; }
.carousel__info.is-changing > :nth-child(3) { animation-delay: .08s; }
.carousel__info.is-changing > :nth-child(4) { animation-delay: .12s; }
@keyframes info-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.carousel__hint { text-align: center; font-size: .8rem; color: var(--bean-soft); margin: 18px 0 0; }

/* Linha cronológica */
.timeline { position: relative; padding: 28px 14px 30px; margin-top: 8px; }
.timeline__track {
  position: relative; height: 4px;
  background: rgba(59, 4, 0, .12);
  border-radius: 4px;
}
.timeline__progress {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0;
  background: linear-gradient(90deg, var(--saffron), var(--tangelo));
  border-radius: 4px;
  transition: width .7s var(--ease);
}
.timeline__markers, .timeline__ticks {
  position: absolute; left: 14px; right: 14px; top: 28px; height: 4px;
}
.timeline__tick {
  position: absolute; top: 12px;
  transform: translateX(-50%);
  font-size: .68rem; font-weight: 600; letter-spacing: .08em;
  color: rgba(59, 4, 0, .55);
}
.timeline__tick::before {
  content: ""; position: absolute; left: 50%; top: -12px;
  width: 1px; height: 8px; background: rgba(59, 4, 0, .25);
}
.timeline__marker {
  position: absolute; top: 50%;
  width: 34px; height: 34px;            /* área de toque confortável */
  margin: 0; padding: 0;
  transform: translate(-50%, -50%);
  border: 0; background: transparent;
  cursor: pointer;
  display: grid; place-items: center;
}
.timeline__marker::before {
  content: "";
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--cream);
  border: 2.5px solid var(--tangelo);
  transition: transform .3s var(--ease), background-color .3s, box-shadow .3s;
}
.timeline__marker.is-past::before { background: var(--saffron); }
.timeline__marker:hover::before { transform: scale(1.25); }
.timeline__marker[aria-current="true"]::before {
  background: var(--tangelo);
  border-color: var(--bean);
  transform: scale(1.45);
  box-shadow: 0 0 0 6px rgba(235, 119, 44, .22);
}
.timeline__marker .timeline__tip {
  position: absolute; bottom: calc(100% + 4px); left: 50%;
  transform: translate(-50%, 4px);
  background: var(--bean); color: var(--cream);
  font-size: .72rem; font-weight: 600; white-space: nowrap;
  padding: 4px 9px; border-radius: 6px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s var(--ease);
}
.timeline__marker:hover .timeline__tip,
.timeline__marker:focus-visible .timeline__tip { opacity: 1; transform: translate(-50%, 0); }
.timeline__ends {
  display: flex; justify-content: space-between;
  margin-top: 30px;
  font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bean-soft);
}
/* Em ecrãs pequenos escondemos os anos intermédios para não sobrecarregar */
.timeline__tick--mid { display: none; }

@media (min-width: 700px) {
  .carousel__frame { aspect-ratio: 16 / 10; }
  .carousel__arrow { width: 54px; height: 54px; }
  .carousel__arrow--prev { left: -27px; }
  .carousel__arrow--next { right: -27px; }
  .timeline__tick--mid { display: block; }
}
@media (min-width: 1000px) {
  .carousel { display: grid; grid-template-columns: 1.65fr 1fr; gap: 0 48px; align-items: center; }
  .carousel__stage { grid-column: 1; grid-row: 1; }
  .carousel__info { grid-column: 2; grid-row: 1; text-align: left; padding: 0; min-height: 0; }
  .carousel__caption { margin: 0; }
  .timeline, .carousel__hint { grid-column: 1 / -1; }
  .timeline { margin-top: 32px; }
  .carousel__arrow--next { right: -27px; }
}

/* =========================================================================
   3. CARTA
   ========================================================================= */
.section--saffron {
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .25), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(235, 119, 44, .25), transparent 45%),
    var(--saffron);
}
.letter {
  position: relative;
  padding: 44px 26px 40px;
  font-family: var(--f-hand);
  font-size: 1.42rem;
  line-height: 2.05rem;
  color: #2b1208;
  background-color: var(--paper);
  /* Papel: textura com ruído + linhas suaves */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .15 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(214, 170, 110, .22), transparent 55%),
    repeating-linear-gradient(180deg, transparent 0 calc(2.05rem - 1px), rgba(59, 4, 0, .09) calc(2.05rem - 1px) 2.05rem);
  background-position: 0 0, 0 0, 0 0, 0 .25rem;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(59, 4, 0, .08), 0 28px 50px -20px rgba(59, 4, 0, .45);
  transform: rotate(-1.2deg);
}
.letter::before { /* margem vermelha de caderno, subtil */
  content: ""; position: absolute; top: 0; bottom: 0; left: 18px;
  width: 1px; background: rgba(235, 119, 44, .35);
}
.letter p { margin: 0 0 2.05rem; }
.letter__date { text-align: right; color: var(--tangelo-ink); font-size: 1.3rem; }
.letter__greeting { font-weight: 600; font-size: 1.6rem; }
.letter__closing { margin-bottom: 0 !important; text-align: right; }
.letter__signature {
  font-family: var(--f-script);
  font-size: clamp(3rem, 12vw, 4.2rem);
  line-height: 1.1;
  text-align: right;
  color: var(--bean);
  margin: 4px 0 0 !important;
  transform: rotate(-4deg);
  transform-origin: right;
}
@media (min-width: 700px) {
  .letter { padding: 64px 72px 56px; font-size: 1.6rem; line-height: 2.3rem; }
  .letter { background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .15 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(214, 170, 110, .22), transparent 55%),
    repeating-linear-gradient(180deg, transparent 0 calc(2.3rem - 1px), rgba(59, 4, 0, .09) calc(2.3rem - 1px) 2.3rem); }
  .letter p { margin-bottom: 2.3rem; }
  .letter { background-position: 0 0, 0 0, 0 0, 0 1.18rem; }
  .letter::before { left: 44px; }
}

/* =========================================================================
   4. RSVP
   ========================================================================= */
.section--dark {
  background:
    radial-gradient(circle at 90% 0%, rgba(235, 119, 44, .22), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(249, 190, 60, .12), transparent 45%),
    var(--bean);
}
.rsvp {
  background: rgba(255, 246, 227, .05);
  border: 1px solid rgba(249, 190, 60, .22);
  border-radius: var(--radius);
  padding: 28px 20px;
}
.field { margin-bottom: 18px; }
.field label, .guests legend {
  display: block;
  font-weight: 600; font-size: .9rem;
  margin-bottom: 6px;
  color: var(--cream);
}
.req { color: var(--saffron); }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"] {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  font: inherit; font-size: 1rem;
  color: var(--bean);
  background: var(--cream);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: #9a7560; }
.field input:focus { outline: none; border-color: var(--saffron); box-shadow: 0 0 0 4px rgba(249, 190, 60, .3); }
.field input[aria-invalid="true"] { border-color: #ff9a6b; }
.field__error { min-height: 0; margin: 6px 0 0; font-size: .85rem; color: #ffb48f; }
.field__error:empty { display: none; }
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 640px) {
  .rsvp { padding: 40px 44px; }
  .field-row { grid-template-columns: 1fr 1fr; }
}

.guests { border: 0; padding: 0; margin: 10px 0 24px; }
.guests legend { font-family: var(--f-serif); font-size: 1.5rem; margin-bottom: 2px; }
.guests__hint { font-size: .9rem; color: #f4dcc0; margin-bottom: 14px; }
.guests__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.guests__list:not(:empty) { margin-bottom: 16px; }
.guest {
  background: rgba(255, 246, 227, .07);
  border: 1px solid rgba(249, 190, 60, .25);
  border-radius: var(--radius-sm);
  padding: 14px 16px 16px;
  animation: guest-in .35s var(--ease);
}
.guest.is-leaving { animation: guest-out .25s var(--ease) forwards; }
@keyframes guest-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
@keyframes guest-out { to { opacity: 0; transform: scale(.96); } }
.guest__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.guest__num { font-family: var(--f-hand); font-size: 1.35rem; color: var(--saffron); }
.guest__remove {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 40px; padding: 6px 12px;
  background: transparent; border: 0; border-radius: 999px;
  color: #f4dcc0; font-size: .85rem; cursor: pointer;
}
.guest__remove:hover { background: rgba(255, 255, 255, .08); color: var(--white); }
.guest .field { margin-bottom: 12px; }

.segmented {
  display: inline-flex; padding: 4px; gap: 4px;
  background: rgba(0, 0, 0, .25); border-radius: 999px;
}
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: inline-block; min-height: 40px; padding: 8px 18px;
  border-radius: 999px; font-size: .9rem; font-weight: 600; color: #f4dcc0;
  transition: background-color .2s, color .2s;
}
.segmented input:checked + span { background: var(--saffron); color: var(--bean); }
.segmented input:focus-visible + span { outline: 3px solid var(--saffron); outline-offset: 2px; }

.rsvp__actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; }
.rsvp__actions .btn { width: 100%; }
@media (min-width: 640px) { .rsvp__actions .btn { width: auto; } }
.rsvp__status { margin: 0; min-height: 1.4em; text-align: center; font-size: .92rem; }
.rsvp__status.is-error { color: #ffb48f; }

.btn__spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(59, 4, 0, .25); border-top-color: var(--bean);
  display: none;
  animation: spin .8s linear infinite;
}
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.rsvp__thanks { text-align: center; padding: 16px 0; animation: fade-up .7s var(--ease); outline: none; }
.rsvp__thanks svg { margin: 0 auto 10px; animation: beat 1.6s ease-in-out infinite; }
.rsvp__thanks h3 { font-family: var(--f-serif); font-size: clamp(1.9rem, 6vw, 2.5rem); line-height: 1.15; margin: 0 0 12px; }
.rsvp__thanks p { color: #f4dcc0; max-width: 460px; margin-inline: auto; }
.rsvp__thanks-script { font-family: var(--f-script); font-size: 3rem; line-height: 1; color: var(--saffron) !important; margin-top: 10px; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.08); } }

/* =========================================================================
   5. CONTRIBUIÇÕES
   ========================================================================= */
.gifts { display: grid; gap: 18px; }
@media (min-width: 820px) { .gifts { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.gift {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  width: 100%;
  padding: 28px 24px 24px;
  text-align: left;
  background: var(--white);
  border: 1.5px solid rgba(59, 4, 0, .08);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), opacity .35s, filter .35s, background-color .35s, border-color .35s;
}
.gift__icon {
  display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--cream-2); color: var(--tangelo-ink);
  transition: background-color .35s, color .35s, transform .45s var(--ease);
}
.gift__title { font-family: var(--f-serif); font-weight: 600; font-size: 2rem; line-height: 1.1; }
.gift__text { color: var(--bean-soft); font-size: .95rem; line-height: 1.55; }
.gift__bar {
  display: block; width: 100%; height: 8px; margin-top: 6px;
  background: rgba(59, 4, 0, .08); border-radius: 8px; overflow: hidden;
}
.gift__bar--lg { height: 12px; }
.gift__fill {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--saffron), var(--tangelo));
  border-radius: inherit;
  transition: width 1.2s var(--ease);
}
.gift__fill.is-bump { animation: bump 1s var(--ease); }
@keyframes bump { 30% { filter: brightness(1.15) saturate(1.3); box-shadow: 0 0 12px rgba(235, 119, 44, .8); } }
.gift__more { font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--tangelo-ink); margin-top: 4px; }

/* Destaque: o cartão ativo sobe, os outros atenuam */
@media (hover: hover) {
  .gift:hover { transform: translateY(-6px) scale(1.03); box-shadow: var(--shadow-lg); border-color: var(--saffron); }
  .gift:hover .gift__icon { background: var(--saffron); color: var(--bean); transform: rotate(-8deg) scale(1.06); }
  .gifts:has(.gift:hover) .gift:not(:hover) { opacity: .55; filter: saturate(.6); transform: scale(.98); }
}
.gift.is-active { transform: translateY(-6px) scale(1.03); box-shadow: var(--shadow-lg); border-color: var(--tangelo); }
.gift.is-active .gift__icon { background: var(--saffron); color: var(--bean); }
.gifts.has-active .gift:not(.is-active) { opacity: .55; filter: saturate(.6); }

/* Modal */
.gift-modal {
  width: min(100% - 24px, 560px);
  max-height: calc(100dvh - 24px);
  padding: 0; border: 0; background: transparent;
  color: var(--bean);
  overflow: visible;
}
.gift-modal::backdrop { background: rgba(28, 4, 0, .55); backdrop-filter: blur(4px); }
.gift-modal[open] { animation: modal-in .45s var(--ease); }
.gift-modal[open]::backdrop { animation: fade .3s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(24px) scale(.96); } }
@keyframes fade { from { opacity: 0; } }
.gift-modal__card {
  position: relative;
  max-height: calc(100dvh - 24px); overflow-y: auto;
  background: var(--cream);
  border-radius: 24px;
  padding: 36px 24px 28px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.gift-modal__icon { margin: 0 auto 12px; background: var(--saffron); color: var(--bean); width: 76px; height: 76px; }
.gift-modal__title { font-family: var(--f-serif); font-size: clamp(2.2rem, 7vw, 2.8rem); line-height: 1.05; margin: 0 0 12px; }
.gift-modal__text { font-family: var(--f-hand); font-size: 1.45rem; line-height: 1.35; color: var(--bean); }
.gift-modal__progress { display: grid; gap: 8px; margin: 8px 0 24px; }
.gift-modal__note { font-size: .8rem; color: var(--bean-soft); }
.gift-modal__close {
  position: absolute; top: 12px; right: 12px;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; background: transparent; cursor: pointer; color: var(--bean);
}
.gift-modal__close:hover { background: rgba(59, 4, 0, .08); }
@media (min-width: 640px) { .gift-modal__card { padding: 44px 44px 36px; } }

.pay {
  margin-top: 22px; text-align: left;
  display: grid; gap: 10px;
  animation: fade-up .45s var(--ease);
}
.pay__row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px;
  background: var(--white);
  border: 1px solid rgba(59, 4, 0, .1);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.pay__label { grid-column: 1; font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--tangelo-ink); }
.pay__value { grid-column: 1; font-weight: 600; word-break: break-all; }
.pay__value--mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .85rem; word-break: normal; }
.pay__copy {
  grid-column: 2; grid-row: 1 / span 2;
  min-height: 40px; padding: 8px 14px;
  border: 1.5px solid var(--tangelo); border-radius: 999px;
  background: transparent; color: var(--bean);
  font-size: .82rem; font-weight: 600; cursor: pointer;
  transition: background-color .2s;
}
.pay__copy:hover, .pay__copy.is-copied { background: var(--tangelo); }
.pay__row--links { grid-template-columns: 1fr 1fr; background: transparent; border: 0; padding: 0; }
.pay__row--links .btn { width: 100%; }
.pay__ref { font-size: .85rem; color: var(--bean-soft); text-align: center; margin: 6px 0 0; }

/* =========================================================================
   6. FAQ
   ========================================================================= */
.faq { display: grid; gap: 14px; }
.faq__item {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
  transition: box-shadow .3s, border-color .3s;
}
.faq__item:has(.faq__btn[aria-expanded="true"]) { box-shadow: var(--shadow); border-color: rgba(235, 119, 44, .45); }
.faq__h { margin: 0; }
.faq__btn {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  min-height: 64px; padding: 14px 18px;
  background: transparent; border: 0; border-radius: var(--radius);
  text-align: left; cursor: pointer;
  font-family: var(--f-serif); font-weight: 600; font-size: 1.45rem; line-height: 1.2;
}
.faq__icon {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--cream-2); color: var(--tangelo-ink);
  transition: background-color .3s, color .3s;
}
.faq__btn[aria-expanded="true"] .faq__icon { background: var(--tangelo); color: var(--bean); }
.faq__q { flex: 1; }
.faq__chev { flex: none; display: grid; place-items: center; transition: transform .4s var(--ease); }
.faq__btn[aria-expanded="true"] .faq__chev { transform: rotate(180deg); }
.faq__btn:hover .faq__q { color: var(--tangelo-ink); }

/* Animação de altura suave com grid 0fr → 1fr */
.faq__panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease), visibility 0s linear .45s;
  visibility: hidden;
}
.faq__panel.is-open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .45s var(--ease), visibility 0s; }
.faq__content { overflow: hidden; padding: 0 20px 0 74px; }
.faq__panel.is-open .faq__content { padding-bottom: 20px; }
.faq__content p:last-child { margin-bottom: 0; }
.faq__content ul { padding-left: 1.1em; margin: 0 0 1em; }
@media (max-width: 520px) { .faq__content { padding-left: 20px; } .faq__btn { font-size: 1.3rem; } }

.schedule { list-style: none; padding: 0 !important; display: grid; gap: 6px; }
.schedule li { display: flex; gap: 12px; }
.schedule span { font-weight: 600; color: var(--tangelo-ink); min-width: 3.2em; }

/* =========================================================================
   Rodapé + CTA flutuante
   ========================================================================= */
.footer {
  background: var(--bean); color: var(--cream);
  text-align: center;
  padding: 56px 20px 110px;
}
.footer__names { font-family: var(--f-script); font-size: 3.4rem; line-height: 1; margin: 0 0 6px; color: var(--saffron); }
.footer__date { font-weight: 800; letter-spacing: .12em; margin-bottom: 18px; }
.footer__small { font-size: .85rem; color: #f4dcc0; margin: 0; }
.footer a { color: var(--saffron); }

.cta-float {
  position: fixed; z-index: 50;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 10px 18px;
  background: var(--tangelo); color: var(--bean);
  border-radius: 999px;
  font-weight: 700; font-size: .88rem; text-decoration: none;
  box-shadow: 0 10px 28px -6px rgba(59, 4, 0, .5), 0 0 0 3px rgba(255, 246, 227, .5);
  transition: transform .45s var(--ease), opacity .35s, background-color .25s;
}
.cta-float:hover { background: var(--saffron); color: var(--bean); transform: translateY(-3px); }
.cta-float.is-hidden { opacity: 0; transform: translateY(120%); pointer-events: none; visibility: hidden; transition: transform .45s var(--ease), opacity .35s, visibility 0s .45s; }
@media (min-width: 700px) {
  .cta-float { right: 28px; bottom: 28px; padding: 14px 26px; font-size: 1rem; min-height: 54px; }
}

/* =========================================================================
   Micro-animações de entrada (scroll)
   ========================================================================= */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .letter.reveal { transform: translateY(28px) rotate(-3deg); }
.js .letter.reveal.is-visible { transform: rotate(-1.2deg); }

/* =========================================================================
   Movimento reduzido
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero__ocean { animation: none; }
  .js .reveal, .js .letter.reveal { opacity: 1; transform: none; }
  .js .letter.reveal.is-visible, .js .letter.reveal { transform: rotate(-1.2deg); }
}

.pay__demo {
  margin: 0; justify-self: center;
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: var(--bean); color: var(--saffron);
  padding: 4px 12px; border-radius: 999px;
}
.pay__thanks { font-family: var(--f-hand); font-size: 1.3rem; color: var(--tangelo-ink); text-align: center; margin: 0; }
