/* Convite: Gabi faz 28 */

:root {
  --ivory: #F8F4EE;
  --ivory-2: #ECE6DA;
  --ink: #272321;
  --ink-soft: #5E5550;
  --line: rgba(39, 35, 33, 0.16);
  --magenta: #B0187E;
  --magenta-deep: #8E0F65;
  --magenta-hi: #EE6BC4;
  --roxo: #6A2CC0;
  --roxo-hi: #B490F5;
  --coral: #FF6B4E;

  --on-dark: #F5F2EB;
  --on-dark-soft: rgba(245, 242, 235, 0.72);
  --line-dark: rgba(245, 242, 235, 0.16);

  --font-d: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-t: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --r-xl: clamp(28px, 4vw, 44px);
  --r-lg: 24px;
  --r-md: 16px;

  --gutter: clamp(16px, 4.4vw, 64px);
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 10px 30px -14px rgba(64, 30, 40, 0.28);
  --shadow-2: 0 24px 60px -28px rgba(40, 18, 30, 0.45);

  color-scheme: light;
}

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

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--ivory);
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-t);
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--magenta);
}

::selection { background: var(--magenta); color: var(--ivory); }

img, svg, video { display: block; max-width: 100%; }
p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }

:focus-visible {
  outline: 3px solid var(--roxo);
  outline-offset: 3px;
  border-radius: 12px;
}
.rsvp :focus-visible { outline-color: var(--roxo-hi); }

/* ============ Abertura ============ */

.intro {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--ivory);
  overflow: hidden;
  touch-action: none;
}
.intro-on .intro { display: block; }
.intro-on.app-ready { overflow: hidden; }

.intro__video {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  max-width: none;
  pointer-events: none;
  transform-origin: 0 0;
}
.intro__video::-webkit-media-controls { display: none !important; }
.intro__video::-webkit-media-controls-start-playback-button { display: none !important; }


.intro.is-leaving {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--ease-io);
}

/* Se o script principal não carregar, nada fica preso */
.js:not(.app-ready) .intro { animation: failsafe-hide 0s 12s forwards; }
.js:not(.app-ready) [data-enter] { animation: failsafe-show 0s 12s forwards; }
@keyframes failsafe-hide { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@keyframes failsafe-show { to { opacity: 1; transform: none; } }
@keyframes fade-in { to { opacity: 1; } }

/* ============ Entradas ============ */

.js [data-enter] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
}
.is-revealed [data-enter] {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.7s var(--ease) calc(var(--i, 0) * 80ms + 60ms),
    transform 1s var(--ease) calc(var(--i, 0) * 80ms + 60ms);
}
.is-revealed .gabi__in[data-enter] { transition-duration: 0.8s, 1.2s; }
@media (prefers-reduced-motion: reduce) {
  .js [data-enter] { transform: none; }
  .is-revealed [data-enter] { transition: opacity 0.5s linear; }
}

/* ============ Barra do topo ============ */

.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 0;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-family: var(--font-d);
  font-weight: 900;
  font-stretch: 85%;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  min-height: 44px;
}
.mark span { color: var(--magenta); font-size: 0.8em; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s, color 0.16s, transform 0.12s, border-color 0.16s;
}
.pill:active { transform: scale(0.97); }
.pill--nav {
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: var(--ivory);
}
@media (hover: hover) and (pointer: fine) {
  .pill--nav:hover { background: var(--ink); color: var(--ivory); }
}
.pill--nav.is-done { border-color: var(--magenta); color: var(--magenta); }

/* ============ Hero ============ */

.hero {
  --mx: 0;
  --my: 0;
  --rise: 0;
  position: relative;
  padding: 84px var(--gutter) 0;
  overflow-x: clip;
}

.hero__stage {
  position: relative;
  isolation: isolate;
}

.plane {
  will-change: transform;
  transform: translate3d(
    calc(var(--mx) * var(--dx, 0px)),
    calc(var(--my) * var(--dy, 0px) + var(--rise) * var(--dr, 0px)),
    0
  );
}

.title {
  position: relative;
  z-index: 3;
  margin: 0;
  font-family: var(--font-d);
  font-weight: 900;
  font-stretch: 78%;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 0.82;
  pointer-events: none;
}
.title__l1 {
  display: block;
  font-size: clamp(4.1rem, 21vw, 13rem);
  color: var(--ink);
}
.title__l2 {
  display: block;
  position: relative;
  z-index: 1;
  font-size: clamp(9rem, 56vw, 27rem);
  line-height: 0.8;
  margin-top: 0.02em;
  white-space: nowrap;
}
.title__num {
  color: var(--magenta);
  -webkit-text-stroke: 0;
}
.title__emoji {
  display: inline-block;
  font-size: 0.2em;
  vertical-align: top;
  margin-left: -0.15em;
  transform: translateY(0.35em) rotate(14deg);
  letter-spacing: 0;
}

/* Anéis finos atrás da Gabi */
.plane--rings {
  --dx: -6px;
  --dy: -4px;
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 46%;
  width: 0;
  height: 0;
  pointer-events: none;
}
.ring {
  position: absolute;
  left: 0;
  top: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.ring--1 { width: 72vw; height: 72vw; }
.ring--2 { width: 104vw; height: 104vw; border-style: dashed; border-color: rgba(176, 24, 126, 0.22); }
.ring--3 { width: 140vw; height: 140vw; }

/* Formas infladas */
.plane--puff {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 10px 14px rgba(70, 20, 60, 0.22));
}
.plane--puff svg { width: 100%; height: 100%; overflow: visible; animation: puff-spin 14s linear infinite; }
.puff--flor { --dx: 10px; --dy: 8px; width: 52px; height: 52px; right: 22px; top: -40px; z-index: 2; }
.puff--estrela { --dx: -22px; --dy: -16px; --dr: -40px; width: 9vw; height: 9vw; left: 1%; top: 74%; }
.puff--estrela svg { animation-duration: 9s; animation-direction: reverse; }
.puff--coracao { --dx: 26px; --dy: -20px; --dr: -180px; width: 12vw; height: 12vw; right: 2%; top: 84%; }
.puff--coracao svg { animation: puff-beat 2.6s var(--ease-io) infinite; }
@keyframes puff-spin { to { transform: rotate(360deg); } }
@keyframes puff-beat {
  0%, 100% { transform: scale(1) rotate(-8deg); }
  14% { transform: scale(1.08) rotate(-8deg); }
  28% { transform: scale(0.98) rotate(-8deg); }
  42% { transform: scale(1.05) rotate(-8deg); }
}

/* Cabeções-balão */
.plane--balloon {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}
.balloon__bob {
  position: relative;
  animation: bob 5.6s var(--ease-io) infinite alternate;
  transform-origin: 50% 100%;
}
.balloon--barba .balloon__bob { animation-duration: 4.8s; animation-delay: -2s; }
.balloon__img {
  position: relative;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 22px rgba(60, 30, 20, 0.18));
}
.balloon__string {
  position: absolute;
  left: 50%;
  top: 92%;
  width: 18%;
  height: 120%;
  transform: translateX(-50%);
  transform-origin: 50% 0;
  overflow: visible;
  animation: sway 3.4s var(--ease-io) infinite alternate;
}
.balloon__string path {
  fill: none;
  stroke: rgba(39, 35, 33, 0.42);
  stroke-width: 1.3;
  vector-effect: non-scaling-stroke;
}
.balloon--chapeu { --dx: 22px; --dy: 16px; --dr: -260px; }
.balloon--barba { --dx: 30px; --dy: 22px; --dr: -340px; }

@keyframes bob {
  from { transform: translate3d(0, 0, 0) rotate(-3deg); }
  to { transform: translate3d(0, -14px, 0) rotate(3deg); }
}
@keyframes sway {
  from { transform: translateX(-50%) rotate(4deg); }
  to { transform: translateX(-50%) rotate(-4deg); }
}

/* Gabi */
.gabi {
  --dx: -8px;
  --dy: -6px;
  --dr: 40px;
  position: relative;
  z-index: 3;
  margin: 0;
}
.gabi__in img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(80, 20, 60, 0.16));
}

/* Ingresso com as informações */
.ticket {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: -64px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--ivory);
  box-shadow: var(--shadow-1);
}
.ticket__cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 16px 14px;
}
.ticket__cell + .ticket__cell { border-left: 1px dashed var(--line); }
.ticket__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.ticket__value {
  font-family: var(--font-d);
  font-weight: 800;
  font-stretch: 85%;
  font-size: clamp(1.125rem, 4.6vw, 1.75rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.ticket__warn {
  grid-column: 1 / -1;
  padding: 14px 16px 16px;
  border-top: 1px dashed var(--line);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--magenta-deep);
  text-wrap: pretty;
}

.chip {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  min-height: 28px;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ivory);
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chip--link {
  min-height: 36px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  text-decoration: none;
}
.chip--link:hover { background: var(--ink); color: var(--ivory); }

/* ============ Confirmação ============ */

.rsvp {
  position: relative;
  z-index: 8;
  padding: 28px clamp(10px, 2vw, 28px) 0;
}
.rsvp__card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  border-radius: var(--r-xl);
  background: var(--ink);
  color: var(--on-dark);
  padding: clamp(32px, 7vw, 96px) clamp(20px, 5.5vw, 88px) clamp(36px, 6vw, 88px);
  box-shadow: var(--shadow-2);
}
.rsvp__card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(120% 80% at 100% 0%, rgba(106, 44, 192, 0.28), transparent 60%);
  pointer-events: none;
}
.rsvp__text { position: relative; z-index: 2; min-width: 0; }
.rsvp__title { position: relative; z-index: 2; }

.rsvp__title {
  margin: 0;
  font-family: var(--font-d);
  font-weight: 900;
  font-stretch: 78%;
  text-transform: uppercase;
  font-size: clamp(3rem, 15vw, 8.25rem);
  line-height: 0.86;
  letter-spacing: -0.02em;
}
.rsvp__title span { display: block; }
.rsvp__title .outline {
  color: transparent;
  -webkit-text-stroke: 1.6px var(--on-dark);
  paint-order: stroke fill;
}
.rsvp__lead {
  margin-top: 22px;
  max-width: 34ch;
  color: var(--on-dark-soft);
  font-size: clamp(1.0625rem, 2.4vw, 1.25rem);
  line-height: 1.55;
  letter-spacing: 0.005em;
  text-wrap: pretty;
}

.ask { margin-top: clamp(32px, 6vw, 56px); }
.ask__q {
  font-family: var(--font-d);
  font-weight: 800;
  font-stretch: 88%;
  font-size: clamp(1.875rem, 7vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.arena {
  position: relative;
  margin-top: 18px;
  height: 272px;
  max-width: 620px;
  border: 1px dashed var(--line-dark);
  border-radius: var(--r-lg);
  overflow: clip;
  touch-action: manipulation;
}

.btn-sim {
  position: absolute;
  left: 16px;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  min-height: 72px;
  padding: 0 36px;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(var(--magenta), var(--magenta)) padding-box,
    linear-gradient(110deg, var(--roxo-hi), var(--magenta-hi) 50%, var(--coral)) border-box;
  border: 3px solid transparent;
  color: #fff;
  font-family: var(--font-d);
  font-weight: 900;
  font-stretch: 85%;
  font-size: 1.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: 0 14px 30px -12px rgba(176, 24, 126, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.14s var(--ease), box-shadow 0.18s var(--ease), background-color 0.16s;
}
@media (hover: hover) and (pointer: fine) {
  .btn-sim:hover {
    transform: translateY(calc(-50% - 2px));
    box-shadow: 0 20px 36px -12px rgba(176, 24, 126, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }
}
.btn-sim:active { transform: translateY(-50%) scale(0.97); }
.btn-sim:focus-visible { outline-offset: 4px; }

.btn-nao {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  min-width: 96px;
  min-height: 52px;
  padding: 0 26px;
  border: 1.5px solid rgba(245, 242, 235, 0.55);
  border-radius: 999px;
  background: rgba(245, 242, 235, 0.04);
  color: var(--on-dark);
  font-weight: 600;
  font-size: 1.0625rem;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transform: translate3d(var(--nx, 9999px), var(--ny, 0px), 0);
  transition: transform 0.32s var(--ease);
}
.no-js .btn-nao,
.js:not(.app-ready) .btn-nao { left: auto; right: 16px; top: calc(50% - 26px); transform: none; }
.btn-nao.is-instant { transition: none; }

/* Balão de fala do cabeção (celular: ao lado da cabeça; computador: em cima) */
.fala {
  position: absolute;
  z-index: 3;
  right: calc(6% + 122px);
  bottom: 34px;
  max-width: min(230px, calc(100% - 6% - 150px));
  margin: 0;
  padding: 12px 16px 13px;
  border-radius: 20px 20px 6px 20px;
  background: var(--ivory);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.32;
  text-wrap: balance;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 #fff;
  opacity: 0;
  transform: translate3d(10px, 8px, 0) scale(0.9);
  transform-origin: 100% 85%;
  transition: opacity 0.22s var(--ease), transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.fala:empty { display: none; }
.fala::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: 12px;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: inherit;
  transform: rotate(45deg);
}
.fala.is-on { opacity: 1; transform: none; }
.fala.is-pop { animation: fala-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes fala-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.07) rotate(-1.5deg); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .fala { transform: none; transition: opacity 0.2s linear; }
  .fala.is-pop { animation: none; }
}
.no-js .fala { opacity: 1; transform: none; }

/* Antes da primeira tentativa no "Não": balão de pensamento, com bolinhas até a cabeça */
.fala.is-pensando {
  border-radius: 22px;
  font-family: var(--font-d);
  font-weight: 800;
  font-stretch: 85%;
  font-size: 0.9375rem;
  line-height: 1.12;
  letter-spacing: 0.02em;
}
.fala.is-pensando::after,
.fala.is-pensando::before {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
  transform: none;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.55);
}
.fala.is-pensando::after { right: -17px; bottom: 6px; width: 13px; height: 13px; }
.fala.is-pensando::before { right: -29px; bottom: -3px; width: 8px; height: 8px; }

/* Lado direito: 28 fantasma e o cabeção espiando */
.rsvp__side {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.rsvp__ghost {
  position: absolute;
  right: -0.06em;
  bottom: -0.2em;
  font-family: var(--font-d);
  font-weight: 900;
  font-stretch: 78%;
  font-size: clamp(14rem, 60vw, 40rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(245, 242, 235, 0.09);
  display: none;
}
.rsvp__puff {
  position: absolute;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.35));
}
.rsvp__puff svg { width: 100%; height: 100%; overflow: visible; animation: puff-spin 12s linear infinite; }
.rsvp__puff--estrela { right: 18px; top: 20px; width: 40px; height: 40px; }
.rsvp__puff--coracao { display: none; right: 30%; top: 40%; width: 84px; height: 84px; }
.rsvp__puff--coracao svg { animation: puff-beat 2.6s var(--ease-io) infinite; }
@media (min-width: 900px) {
  .rsvp__puff--estrela { right: 9%; top: 46%; width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) { .rsvp__puff svg { animation: none; } }
.peek {
  position: absolute;
  right: 6%;
  bottom: 0;
  width: 108px;
  height: auto;
  transform: translateY(38%) rotate(-8deg);
  transition: transform 0.5s var(--ease);
  filter: drop-shadow(0 -6px 20px rgba(0, 0, 0, 0.25));
}
.peek.is-up { transform: translateY(26%) rotate(-4deg); }
.peek.is-talking { transform: translateY(14%) rotate(-3deg); }
.peek.is-no { animation: peek-no 0.6s var(--ease-io); }
@keyframes peek-no {
  0%, 100% { rotate: 0deg; }
  20% { rotate: -9deg; }
  45% { rotate: 8deg; }
  70% { rotate: -5deg; }
}
@media (prefers-reduced-motion: reduce) {
  .peek, .peek.is-up, .peek.is-talking { transition: none; }
  .peek.is-no { animation: none; }
}

/* Sucesso */
.done { margin-top: clamp(32px, 6vw, 56px); }
.done:focus { outline: none; }
.done__title {
  font-family: var(--font-d);
  font-weight: 900;
  font-stretch: 82%;
  text-transform: uppercase;
  font-size: clamp(2.25rem, 9vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  color: var(--magenta-hi);
}
.done__title:focus { outline: none; }
.done__title:focus-visible { outline: 3px solid var(--roxo-hi); outline-offset: 6px; }
.done__sub {
  margin-top: 12px;
  font-size: clamp(1.125rem, 2.6vw, 1.375rem);
  font-weight: 700;
}
.done__info {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 1.0625rem;
  font-weight: 500;
}
.done__warn {
  margin-top: 16px;
  max-width: 42ch;
  color: var(--on-dark-soft);
  font-size: 1rem;
}
.done__summary {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line-dark);
  display: grid;
  gap: 6px;
  max-width: 560px;
  color: var(--on-dark-soft);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.done__summary p { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.done__k {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 242, 235, 0.5);
  padding-top: 0.2em;
}
.done.is-entering > * { animation: rise-in 0.7s var(--ease) both; }
.done.is-entering > *:nth-child(2) { animation-delay: 60ms; }
.done.is-entering > *:nth-child(3) { animation-delay: 120ms; }
.done.is-entering > *:nth-child(4) { animation-delay: 180ms; }
.done.is-entering > *:nth-child(5) { animation-delay: 240ms; }
.done.is-entering > *:nth-child(6) { animation-delay: 300ms; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  @keyframes rise-in { from { opacity: 0; } }
}

.link-btn {
  margin-top: 18px;
  padding: 10px 0;
  min-height: 44px;
  border: 0;
  background: none;
  color: rgba(245, 242, 235, 0.6);
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.link-btn:hover { color: var(--on-dark); }

/* ============ Rodapé ============ */

.foot {
  position: relative;
  padding: clamp(48px, 8vw, 96px) var(--gutter) max(28px, env(safe-area-inset-bottom));
  display: grid;
  gap: 22px;
  overflow: hidden;
}
.foot__big {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.18em;
  font-family: var(--font-d);
  font-weight: 900;
  font-stretch: 78%;
  text-transform: uppercase;
  font-size: clamp(4rem, 20vw, 13rem);
  line-height: 0.82;
  letter-spacing: -0.03em;
}
.foot__big span:first-child { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.foot__big span:last-child { color: var(--magenta); }
.foot__shapes {
  display: flex;
  gap: clamp(6px, 1.4vw, 16px);
}
.foot__shapes svg {
  flex: 1 1 0;
  min-width: 0;
  max-width: 120px;
  aspect-ratio: 1;
  height: auto;
  transition: transform 0.4s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .foot__shapes svg:hover { transform: rotate(-12deg) scale(1.06); }
}
.foot__line {
  color: var(--ink-soft);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}

/* ============ Modal ============ */

.modal-open { overflow: hidden; }

.modal {
  width: min(560px, calc(100vw - 20px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
.modal::backdrop {
  background: rgba(30, 24, 22, 0.52);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal[open] { animation: modal-in 0.32s var(--ease); }
.modal[open]::backdrop { animation: fade-in-backdrop 0.3s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
@keyframes fade-in-backdrop { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  @keyframes modal-in { from { opacity: 0; } }
}

.modal__panel {
  position: relative;
  max-height: calc(var(--vvh, 100dvh) - 20px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 30px 22px 24px;
  border-radius: 30px;
  background: var(--ivory);
  box-shadow: 0 40px 80px -30px rgba(20, 10, 15, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.modal__panel:focus { outline: none; }

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--ivory);
  cursor: pointer;
  transition: background-color 0.15s, transform 0.12s;
}
.modal__close svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.modal__close:hover { background: var(--ivory-2); }
.modal__close:active { transform: scale(0.94); }

.modal__title {
  margin: 0 52px 0 0;
  font-family: var(--font-d);
  font-weight: 900;
  font-stretch: 82%;
  text-transform: uppercase;
  font-size: clamp(1.875rem, 7.4vw, 2.5rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.modal__q {
  margin-top: 16px;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.35;
}
.modal__help {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.form { display: block; }
.field { margin-top: 20px; }
.field__label,
.comp__label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
}
.field__input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1.5px solid rgba(39, 35, 33, 0.22);
  border-radius: var(--r-md);
  background: #FFFDF8;
  color: var(--ink);
  font: 500 1.0625rem/1.2 var(--font-t);
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.field__input::placeholder { color: rgba(39, 35, 33, 0.4); }
.field__input:focus { outline: none; border-color: var(--magenta); box-shadow: 0 0 0 4px rgba(176, 24, 126, 0.16); }
.field__input[aria-invalid="true"] { border-color: #C2301B; }
.field__err {
  margin-top: 6px;
  color: #B02A17;
  font-size: 0.875rem;
  font-weight: 600;
}

.comps { list-style: none; margin: 0; padding: 0; }
.comp { margin-top: 14px; }
.comp.is-new { animation: rise-in 0.36s var(--ease); }
.comp__row {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 8px;
}
.comp__remove {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1.5px solid rgba(39, 35, 33, 0.16);
  border-radius: var(--r-md);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.12s;
}
.comp__remove svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; }
.comp__remove:hover { background: var(--ivory-2); border-color: rgba(39, 35, 33, 0.3); }
.comp__remove:active { transform: scale(0.95); }

.add {
  margin-top: 16px;
  width: 100%;
  min-height: 50px;
  border: 1.5px dashed rgba(106, 44, 192, 0.5);
  border-radius: 999px;
  background: transparent;
  color: var(--roxo);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.12s;
}
.add:hover { background: rgba(106, 44, 192, 0.07); border-color: var(--roxo); }
.add:active { transform: scale(0.98); }
.add:disabled { opacity: 0.45; cursor: not-allowed; }
.add__limit { margin-top: 8px; color: var(--ink-soft); font-size: 0.875rem; text-align: center; }

.total {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.0625rem;
}
.total strong {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-d);
  font-weight: 900;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}
.total strong.is-bump { animation: bump 0.32s var(--ease); }
@keyframes bump { 40% { transform: scale(1.18); } }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form__err {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: rgba(194, 48, 27, 0.09);
  color: #9E2414;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.submit {
  margin-top: 18px;
  width: 100%;
  min-height: 60px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--magenta);
  color: #fff;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 14px 28px -14px rgba(176, 24, 126, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: background-color 0.16s, transform 0.12s, opacity 0.16s;
}
.submit:hover { background: var(--magenta-deep); }
.submit:active { transform: scale(0.98); }
.submit:disabled { opacity: 0.7; cursor: progress; transform: none; }

/* Confete */
.confetti {
  position: fixed;
  inset: 0;
  z-index: 90;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ============ Celular (base) → telas maiores ============ */

@media (max-width: 899px) {
  .gabi { width: min(74vw, 400px); margin: -19vw -2vw 0 auto; }
  .balloon--chapeu { left: -3vw; top: 64vw; width: 29vw; }
  .balloon--barba { right: -8vw; top: 60vw; width: 24vw; }
  .ring--1 { width: 86vw; height: 86vw; }
  .plane--rings { top: 66%; left: 62%; }
  .puff--estrela { left: 5vw; top: 116vw; width: 10vw; height: 10vw; }
  .puff--coracao { right: 1vw; top: 112vw; width: 11vw; height: 11vw; }
}

@media (max-width: 899px) {
  .rsvp__card { padding-bottom: 136px; }
  .btn-sim { min-width: 132px; padding: 0 30px; }
}

@media (min-width: 560px) and (max-width: 899px) {
  .ticket { max-width: 560px; margin-left: auto; margin-right: auto; }
}

@media (min-width: 900px) {
  .hero {
    --gabi-h: min(calc(100svh - 104px), 900px);
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    grid-template-rows: auto 1fr;
    min-height: max(100svh, 700px);
    padding-top: 100px;
    padding-bottom: 0;
    isolation: isolate;
  }
  .hero__stage { display: contents; }
  .title { grid-column: 1; grid-row: 1; }
  .title__l1 { font-size: clamp(6.5rem, 10.6vw, 12rem); }
  .title__l2 { font-size: clamp(13rem, 22vw, 25rem); }

  .gabi {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: end;
    justify-self: end;
    width: auto;
    height: var(--gabi-h);
    aspect-ratio: 712 / 910;
    margin: 0 -1vw -56px 0;
  }
  .gabi__in, .gabi__in img { height: 100%; width: auto; }

  .balloon--chapeu { width: 14vw; max-width: 250px; left: 47vw; top: 14vh; }
  .balloon--barba { width: 10.5vw; max-width: 190px; right: 1.5vw; top: 13vh; }

  .plane--rings { left: auto; right: calc(var(--gabi-h) * 0.38); top: auto; bottom: calc(var(--gabi-h) * 0.5); }
  .ring--1 { width: 44vw; height: 44vw; }
  .ring--2 { width: 62vw; height: 62vw; }
  .ring--3 { width: 84vw; height: 84vw; }

  .puff--estrela { width: 4.2vw; height: 4.2vw; left: 49vw; top: auto; bottom: 22%; }
  .puff--coracao { width: 5.5vw; height: 5.5vw; right: 3vw; top: auto; bottom: 14%; }

  .ticket {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    width: min(640px, 100%);
    margin: 28px 0 96px;
  }
  .ticket__cell { padding: 20px 22px 18px; }
  .ticket__warn { padding: 16px 22px 18px; font-size: 1rem; }

  .rsvp { margin-top: -56px; padding-top: 0; }
  .rsvp__card { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
  .rsvp__title { grid-column: 1 / -1; }
  .rsvp__text { grid-column: 1; }
  .rsvp__puff--coracao { display: block; }
  .puff--flor { width: 64px; height: 64px; right: 28px; top: -50px; }
  .rsvp__ghost { display: block; }
  .peek { width: 220px; right: 10%; transform: translateY(52%) rotate(-8deg); }
  .peek.is-up { transform: translateY(36%) rotate(-3deg); }
  .peek.is-talking { transform: translateY(14%) rotate(-3deg); }
  .fala {
    right: calc(10% + 26px);
    bottom: 244px;
    max-width: min(280px, 26vw);
    padding: 14px 18px 15px;
    border-radius: 22px 22px 22px 22px;
    font-size: 1rem;
    transform-origin: 75% 100%;
  }
  .fala::after { right: 64px; bottom: -6px; }
  /* Pensando: o cabeção está mais baixo, então o balão desce junto; ao falar, sobe com ele. */
  .fala { transition: opacity 0.22s var(--ease), transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), translate 0.5s var(--ease); }
  .fala.is-pensando { translate: 0 78px; font-size: 1rem; }
  .fala.is-pensando::after { right: 92px; bottom: -18px; width: 15px; height: 15px; }
  .fala.is-pensando::before { right: 104px; bottom: -34px; width: 9px; height: 9px; }
  .arena { height: 240px; }
  .btn-sim { left: 24px; min-width: 168px; min-height: 80px; font-size: 2rem; }

  .modal__panel { padding: 40px 40px 32px; }
  .modal__close { top: 20px; right: 20px; }

  .foot { grid-template-columns: 1fr auto; align-items: end; }
  .foot__shapes { grid-column: 1 / -1; grid-row: 2; }
  .foot__line { grid-column: 2; grid-row: 1; padding-bottom: 1em; text-align: right; }
}

@media (min-width: 900px) and (max-height: 820px) {
  .title__l1 { font-size: clamp(5.5rem, 9.4vw, 10rem); }
  .title__l2 { font-size: clamp(11rem, 19vw, 20rem); }
}

@media (max-width: 899px) and (max-height: 700px) {
  .modal { margin-top: 10px; }
}
@media (max-width: 559px) {
  .modal { margin: 10px auto auto; }
  .modal__panel { border-radius: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .balloon__bob, .balloon__string, .plane--puff svg { animation: none; }
  .plane { transform: none; }
}
