:root {
  --ink: #332c0f;
  --ink-soft: #474329;
  --moss: #6a6c3f;
  --moss-soft: #7a7c51;
  --moss-deep: #474329;
  --moss-final: #474329;
  --paper: #efe6d8;
  --paper-deep: #ddd1bf;
  --white: #f4eddf;
  --gold: #ab884f;
  --gold-deep: #896b3c;
  --line-light: rgba(244, 237, 223, 0.32);
  --line-dark: rgba(51, 44, 15, 0.25);
  --display: "Instrument Serif", Georgia, serif;
  --sans: "Manrope", Arial, sans-serif;
  --film-scale: 1.065;
  --film-shift: 0%;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  height: 100svh;
  overflow: hidden;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  padding: 0.75rem 1rem;
  transform: translateY(-160%);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Entrada — uma cortina de filme, não um carregador. */
.entry-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  height: 100svh;
  overflow: hidden;
  background: var(--ink);
  transition: opacity 380ms ease 760ms, visibility 0s linear 1.2s;
}

.entry-gate[hidden] {
  display: none;
}

.entry-gate__media,
.entry-gate__media img,
.entry-gate__shade,
.entry-gate__curtain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.entry-gate__media img {
  object-fit: cover;
  object-position: 50% 36%;
  filter: saturate(0.58) sepia(0.16) brightness(0.52) contrast(1.04);
  transform: scale(1.025);
  transition: transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.entry-gate__shade {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 12, 7, 0.72) 0%, transparent 34%, transparent 55%, rgba(8, 12, 7, 0.86) 100%),
    linear-gradient(90deg, rgba(10, 14, 9, 0.35), transparent 40%, rgba(10, 14, 9, 0.25));
}

.entry-gate__curtain {
  z-index: 2;
  width: 50%;
  background:
    linear-gradient(90deg, rgba(11, 16, 10, 0.56), rgba(17, 23, 15, 0.18)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 7px);
  transition: transform 1s cubic-bezier(0.76, 0, 0.24, 1);
}

.entry-gate__curtain--right {
  right: 0;
  left: auto;
  transform-origin: right;
  background:
    linear-gradient(270deg, rgba(11, 16, 10, 0.56), rgba(17, 23, 15, 0.18)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 7px);
}

.entry-gate__content {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  height: 100%;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.25rem max(1.25rem, env(safe-area-inset-bottom));
  transition: opacity 340ms ease, transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.entry-gate__topline,
.entry-gate__footline {
  display: flex;
  justify-content: space-between;
  color: rgba(244, 237, 223, 0.82);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.entry-gate__title {
  align-self: center;
  justify-self: center;
  text-align: center;
  transform: translateY(1.5rem);
}

.entry-gate__monogram {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: baseline;
  justify-content: center;
  column-gap: 0;
  font-family: var(--display);
  font-size: clamp(6.8rem, 32vw, 10.5rem);
  font-weight: 400;
  line-height: 0.72;
  letter-spacing: 0;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.26);
}

.entry-gate__letter {
  display: block;
  letter-spacing: -0.025em;
}

.entry-gate__monogram .entry-gate__amp {
  display: inline-block;
  margin-inline: clamp(0.42rem, 1.8vw, 0.72rem);
  color: var(--gold);
  font-size: 0.31em;
  font-style: italic;
  letter-spacing: 0;
  transform: translate(-0.08em, -0.15em);
}

.entry-gate__title p {
  margin: 1.35rem 0 0;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.27em;
  text-transform: uppercase;
}

.enter-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 0 1.5rem;
  padding: 0.72rem 0.72rem 0.72rem 1rem;
  border-top: 1px solid rgba(244, 237, 223, 0.46);
  border-bottom: 1px solid rgba(244, 237, 223, 0.46);
  background: rgba(16, 21, 14, 0.16);
  cursor: pointer;
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.19em;
  text-align: left;
  text-transform: uppercase;
  transition: background-color 260ms ease, border-color 260ms ease;
}

.enter-button::after {
  position: absolute;
  top: 30%;
  bottom: 30%;
  left: 0;
  width: 2px;
  background: var(--gold);
  box-shadow: 0 0 0.9rem rgba(200, 163, 109, 0.48);
  content: "";
}

.enter-button__copy {
  display: grid;
  gap: 0.32rem;
}

.enter-button__copy small {
  color: rgba(225, 191, 139, 0.9);
  font-size: 0.46rem;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.enter-button__icon {
  position: relative;
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border: 1px solid rgba(225, 191, 139, 0.78);
  border-radius: 50%;
  background: rgba(200, 163, 109, 0.12);
  transition: background-color 240ms ease, color 240ms ease, transform 240ms ease;
}

.enter-button__icon::before {
  position: absolute;
  inset: -0.38rem;
  border: 1px solid rgba(225, 191, 139, 0.36);
  border-radius: inherit;
  content: "";
  animation: invitation-halo 2.8s ease-in-out infinite;
}

.enter-button svg,
.whatsapp-button svg,
.replay-film svg {
  width: 1.05rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.enter-button:hover .enter-button__icon,
.enter-button:focus-visible .enter-button__icon {
  background: var(--white);
  color: var(--ink);
  transform: translateX(0.18rem);
}

.enter-button:hover,
.enter-button:focus-visible {
  border-color: rgba(225, 191, 139, 0.8);
  background: rgba(200, 163, 109, 0.12);
}

.enter-button svg {
  animation: invitation-arrow 2.8s ease-in-out infinite;
}

@keyframes invitation-halo {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.92);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

@keyframes invitation-arrow {
  0%,
  35%,
  100% {
    transform: translateX(0);
  }

  48%,
  58% {
    transform: translateX(0.2rem);
  }
}

.entry-gate.is-leaving {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.entry-gate.is-leaving .entry-gate__media img {
  transform: scale(1.1);
}

.entry-gate.is-leaving .entry-gate__curtain--left {
  transform: translateX(-103%);
}

.entry-gate.is-leaving .entry-gate__curtain--right {
  transform: translateX(103%);
}

.entry-gate.is-leaving .entry-gate__content {
  opacity: 0;
  transform: scale(0.98);
}

/* Palco fixo, inspirado no padrão Full Screen Scroll FX da 21st.dev. */
.cinema-scroll {
  position: relative;
  height: 340svh;
  background: var(--ink);
}

.cinema-stage {
  --scene-darkness: 0.2;
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  background: #d9d0be;
  isolation: isolate;
}

.cinema-film {
  position: absolute;
  inset: 0;
  z-index: -4;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
  filter: saturate(0.86) contrast(1.02) sepia(0.04);
  transform: scale(var(--film-scale)) translate3d(0, var(--film-shift), 0);
  transform-origin: center;
  will-change: transform;
}

.cinema-stage__wash,
.cinema-stage__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cinema-stage__wash {
  z-index: -3;
  background:
    linear-gradient(180deg, rgba(7, 11, 6, 0.7) 0%, rgba(7, 11, 6, 0.08) 29%, rgba(7, 11, 6, 0.02) 47%, rgba(7, 11, 6, 0.82) 100%),
    linear-gradient(90deg, rgba(8, 12, 7, calc(var(--scene-darkness) + 0.12)), transparent 55%, rgba(8, 12, 7, var(--scene-darkness)));
  transition: background 600ms ease;
}

.cinema-stage[data-scene="2"] .cinema-stage__wash {
  background:
    linear-gradient(180deg, rgba(51, 44, 15, 0.46) 0%, rgba(106, 108, 63, 0.4) 38%, rgba(71, 67, 41, 0.68) 64%, rgba(51, 44, 15, 0.94) 100%),
    linear-gradient(90deg, rgba(71, 67, 41, 0.7), rgba(106, 108, 63, 0.34) 55%, rgba(51, 44, 15, 0.52));
}

.cinema-stage__grain {
  z-index: 10;
  opacity: 0.22;
  mix-blend-mode: soft-light;
  background-image:
    repeating-radial-gradient(circle at 18% 37%, transparent 0 1px, rgba(255, 255, 255, 0.14) 1px 2px),
    repeating-linear-gradient(97deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 5px);
  background-size: 5px 5px, 11px 11px;
}

.film-header {
  position: absolute;
  top: max(1.4rem, env(safe-area-inset-top));
  right: 1.25rem;
  left: 1.25rem;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(-0.75rem);
  transition: opacity 600ms ease 540ms, transform 600ms ease 540ms;
}

body.has-entered .film-header {
  opacity: 1;
  transform: translateY(0);
}

.film-header__mark {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.film-header__edition {
  font-size: 0.57rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.story-beats,
.story-beat {
  position: absolute;
  inset: 0;
}

.story-beat {
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 1.25rem max(8.5rem, calc(env(safe-area-inset-bottom) + 7.2rem));
  opacity: 0;
  pointer-events: none;
  transition: opacity 650ms ease;
}

.story-beat.is-active {
  opacity: 1;
}

.story-beat__eyebrow,
.section-kicker {
  margin: 0 0 0.85rem;
  font-size: 0.61rem;
  font-weight: 600;
  letter-spacing: 0.21em;
  text-transform: uppercase;
}

.story-beat__eyebrow {
  opacity: 0;
  transform: translateY(0.6rem);
  transition: opacity 420ms ease 300ms, transform 420ms ease 300ms;
}

body.has-entered .story-beat.is-active .story-beat__eyebrow {
  opacity: 0.82;
  transform: translateY(0);
}

.word-mask {
  display: block;
  overflow: hidden;
  line-height: 0.82;
}

.word-mask > span {
  display: block;
  transform: translateY(112%);
  transition: transform 900ms cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}

.story-beat.is-before .word-mask > span {
  transform: translateY(-112%);
}

body.has-entered .story-beat.is-active .word-mask > span {
  transform: translateY(0);
}

.story-beat.is-active .word-mask:nth-child(2) > span {
  transition-delay: 80ms;
}

.story-beat.is-active .word-mask:nth-child(3) > span {
  transition-delay: 150ms;
}

.names-title,
.place-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.065em;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.26);
}

.names-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: max-content;
  max-width: 100%;
  font-size: clamp(5.3rem, 25vw, 8.2rem);
  line-height: 0.7;
}

.names-title > .word-mask:last-child {
  margin-bottom: -0.22em;
  padding-bottom: 0.22em;
}

.names-title__amp {
  justify-self: center;
  width: max-content;
  margin: 0.04em 0 -0.04em;
  padding-inline: 0.12em;
  color: var(--gold);
  font-size: 0.64em;
  font-style: italic;
  text-align: center;
}

.story-beat--date {
  justify-content: center;
  padding-top: 12svh;
  padding-bottom: max(3rem, env(safe-area-inset-bottom));
}

.story-beat--date .story-beat__eyebrow {
  color: #d7bd94;
}

.date-title {
  display: flex;
  align-items: center;
  width: 100%;
  font-family: var(--display);
}

.date-title__number {
  flex: 0 0 auto;
  margin: -0.12em -0.02em -0.1em;
  padding: 0.12em 0.04em 0.1em;
  color: var(--white);
  font-size: clamp(10.5rem, 46vw, 15rem);
  letter-spacing: -0.07em;
  line-height: 0.76;
  text-shadow: 0 12px 34px rgba(35, 41, 23, 0.36);
}

.date-title__copy {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 0 0.55rem;
  padding-left: 0.72rem;
  border-left: 1px solid rgba(171, 136, 79, 0.9);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  line-height: 1.6;
  text-transform: uppercase;
}

.date-title__copy .word-mask {
  line-height: 1.35;
}

.place-title {
  font-size: clamp(4.2rem, 19.3vw, 7rem);
  line-height: 0.76;
}

.place-title__palace {
  padding-left: 14%;
  color: var(--gold);
  font-style: italic;
}

.place-caption {
  margin: 1.05rem 0 0 15%;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.21em;
  text-transform: uppercase;
}

.film-progress {
  position: absolute;
  right: 1.25rem;
  bottom: max(1.6rem, env(safe-area-inset-bottom));
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.53rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.film-progress__track {
  position: relative;
  display: block;
  width: 3.5rem;
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.32);
}

.film-progress__track span {
  position: absolute;
  inset: 0;
  display: block;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
}

.chapter-index {
  display: none;
}

.scroll-cue {
  position: absolute;
  bottom: max(1.55rem, env(safe-area-inset-bottom));
  left: 1.25rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: opacity 350ms ease;
}

body.has-entered .scroll-cue.is-visible {
  opacity: 0.78;
}

.scroll-cue i {
  position: relative;
  display: block;
  width: 1px;
  height: 1.5rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.3);
}

.scroll-cue i::after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 55%;
  background: var(--white);
  content: "";
  animation: cue-line 1.8s ease-in-out infinite;
}

@keyframes cue-line {
  0% { transform: translateY(-110%); }
  45%, 65% { transform: translateY(65%); }
  100% { transform: translateY(210%); }
}

.replay-film {
  position: absolute;
  right: 1.25rem;
  bottom: 4rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.replay-film svg {
  width: 0.9rem;
}

/* Revelação tipográfica, adaptada do padrão Text Reveal da 21st.dev. */
.manifesto {
  position: relative;
  height: 185svh;
  background: var(--paper);
  color: var(--ink);
}

.manifesto__sticky {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100svh;
  padding: 2rem 1.25rem;
  overflow: hidden;
}

.manifesto__sticky::after {
  position: absolute;
  right: -14vw;
  bottom: -7vw;
  color: rgba(16, 21, 14, 0.045);
  content: "A & H";
  font-family: var(--display);
  font-size: 49vw;
  letter-spacing: -0.04em;
  line-height: 0.7;
  pointer-events: none;
}

.manifesto .section-kicker {
  position: relative;
  z-index: 1;
  margin-bottom: 1.35rem;
  color: var(--moss-deep);
}

.manifesto__line {
  position: relative;
  z-index: 1;
  max-width: 8em;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(4rem, 18vw, 6.8rem);
  letter-spacing: -0.055em;
  line-height: 0.85;
}

.manifesto__word {
  opacity: 0.16;
  transition: opacity 160ms linear;
}

.manifesto__note {
  position: absolute;
  right: 1.25rem;
  bottom: max(1.7rem, env(safe-area-inset-bottom));
  left: 1.25rem;
  z-index: 1;
  margin: 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line-dark);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Confirmação: campo aberto e editorial, sem caixa de aplicativo. */
.rsvp {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: 5.5rem 1.25rem max(1.5rem, env(safe-area-inset-bottom));
  overflow: hidden;
  background: var(--moss-final);
  color: var(--white);
}

.rsvp::before {
  position: absolute;
  top: -8rem;
  right: -11rem;
  width: 24rem;
  height: 24rem;
  border: 1px solid rgba(171, 136, 79, 0.24);
  border-radius: 50%;
  box-shadow: 0 0 0 4.8rem rgba(171, 136, 79, 0.05), 0 0 0 9.6rem rgba(171, 136, 79, 0.028);
  content: "";
}

.rsvp__heading,
.rsvp-form,
.invitation-footer {
  position: relative;
  z-index: 1;
}

.rsvp__heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(4.8rem, 21vw, 7.6rem);
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 0.78;
}

.rsvp__heading h2 em {
  display: block;
  margin-top: 0.12em;
  padding-left: 14%;
  color: var(--gold);
  font-size: 0.62em;
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.9;
}

.rsvp__intro {
  max-width: 31rem;
  margin: 1.5rem 0 0;
  color: rgba(244, 237, 223, 0.72);
  font-size: 0.83rem;
  line-height: 1.65;
}

.age-note {
  max-width: 36rem;
  margin-top: 1.7rem;
  padding: 1.35rem 1.4rem 1.45rem;
  border: 1px solid rgba(171, 136, 79, 0.32);
  border-left: 3px solid var(--gold);
  background: linear-gradient(110deg, rgba(51, 44, 15, 0.26), rgba(71, 67, 41, 0.06));
}

.age-note strong {
  display: block;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.35;
  text-transform: uppercase;
}

.age-note p {
  margin: 0.68rem 0 0;
  color: rgba(244, 237, 223, 0.92);
  font-size: clamp(1rem, 3.4vw, 1.16rem);
  line-height: 1.5;
}

.age-note em {
  color: var(--gold);
  font-size: 1.04em;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

.rsvp-form {
  display: grid;
  align-self: center;
  gap: 1rem;
  margin-top: 4rem;
}

.form-section {
  display: grid;
  gap: 1.25rem;
  padding: 1.4rem 0;
  border-top: 1px solid rgba(244, 237, 223, 0.24);
}

.form-section__header {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
}

.form-section__number {
  color: var(--gold);
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 0.85;
}

.form-section__header h3 {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  line-height: 1.35;
  text-transform: uppercase;
}

.form-section__header p {
  margin: 0.42rem 0 0;
  color: rgba(244, 237, 223, 0.54);
  font-size: 0.67rem;
  line-height: 1.55;
}

.form-section__header--action {
  grid-template-columns: 2rem minmax(0, 1fr) auto;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.editorial-field {
  display: grid;
  align-content: end;
  gap: 0.55rem;
  min-width: 0;
  padding-bottom: 0.72rem;
  border-bottom: 1px solid rgba(244, 237, 223, 0.28);
  transition: border-color 180ms ease;
}

.editorial-field > span {
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.editorial-field small {
  color: rgba(244, 237, 223, 0.44);
  font-size: inherit;
}

.editorial-field input,
.editorial-field select,
.editorial-field textarea {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background-color: transparent;
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.2;
}

.editorial-field select {
  appearance: none;
  padding-right: 1.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 0.55rem) 55%, calc(100% - 0.25rem) 55%;
  background-repeat: no-repeat;
  background-size: 0.32rem 0.32rem, 0.32rem 0.32rem;
}

.editorial-field select option {
  color: var(--ink);
  background: var(--paper);
}

.editorial-field textarea {
  resize: vertical;
}

.editorial-field input::placeholder,
.editorial-field textarea::placeholder {
  color: rgba(244, 237, 223, 0.34);
}

.editorial-field:focus-within {
  border-color: var(--gold);
}

.editorial-field:has([aria-invalid="true"]) {
  border-color: #d9a38f;
}

.address-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(5.5rem, 0.58fr);
  grid-template-areas:
    "cep number"
    "street street"
    "complement complement"
    "district district"
    "city state";
  gap: 1rem;
}

.editorial-field--cep { grid-area: cep; }
.editorial-field--street { grid-area: street; }
.editorial-field--number { grid-area: number; }
.editorial-field--complement { grid-area: complement; }
.editorial-field--district { grid-area: district; }
.editorial-field--city { grid-area: city; }
.editorial-field--state { grid-area: state; }

.add-person-button {
  align-self: center;
  padding: 0.58rem 0.7rem;
  border: 1px solid rgba(244, 237, 223, 0.32);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.add-person-button span {
  margin-right: 0.3rem;
  color: var(--gold);
  font-family: var(--display);
  font-size: 1rem;
}

.add-person-button:hover,
.add-person-button:focus-visible {
  border-color: var(--gold);
  background: rgba(171, 136, 79, 0.08);
}

.add-person-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.household-list {
  display: grid;
  gap: 0.7rem;
}

.household-person {
  padding: 1rem;
  border-left: 2px solid var(--gold);
  background: rgba(244, 237, 223, 0.045);
}

.household-person > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.household-person > header > span {
  color: rgba(244, 237, 223, 0.52);
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.household-person > header strong {
  color: var(--gold);
  font-weight: 600;
}

.household-person > header button {
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(244, 237, 223, 0.24);
  background: transparent;
  color: rgba(244, 237, 223, 0.64);
  cursor: pointer;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.line-field {
  display: grid;
  gap: 0.7rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(244, 237, 223, 0.3);
}

.line-field > span,
.attendance-field legend {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-admin-link {
  color: inherit;
  text-decoration: none;
  transition: color 180ms ease;
}

.footer-admin-link:hover,
.footer-admin-link:focus-visible {
  color: var(--white);
}

.line-field small {
  color: rgba(244, 237, 223, 0.48);
  font-size: inherit;
}

.line-field input,
.line-field textarea {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--display);
  font-size: 1.65rem;
  line-height: 1.2;
  resize: vertical;
}

.line-field input::placeholder,
.line-field textarea::placeholder {
  color: rgba(244, 237, 223, 0.38);
}

.line-field:focus-within {
  border-color: var(--gold);
}

.attendance-field {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.attendance-field legend {
  grid-column: 1 / -1;
  margin-bottom: 0.3rem;
}

.attendance-field label {
  cursor: pointer;
}

.attendance-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.attendance-field label span {
  display: grid;
  min-height: 3.2rem;
  place-items: center;
  padding: 0.6rem;
  border: 1px solid rgba(244, 237, 223, 0.3);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.attendance-field input:checked + span {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.attendance-field input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.whatsapp-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.2rem;
  padding: 0 0 0 1.15rem;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background-color 220ms ease, color 220ms ease;
}

.whatsapp-button svg {
  width: 1.2rem;
  margin: 0 1.35rem;
  transition: transform 220ms ease;
}

.whatsapp-button:hover,
.whatsapp-button:focus-visible {
  background: var(--gold);
  color: var(--ink);
}

.whatsapp-button:hover svg,
.whatsapp-button:focus-visible svg {
  transform: translateX(0.25rem);
}

.whatsapp-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.form-status {
  min-height: 1em;
  margin: 0;
  color: #edb7a9;
  font-size: 0.71rem;
}

.rsvp-form__note {
  margin: -0.45rem 0 0;
  color: rgba(244, 237, 223, 0.5);
  font-size: 0.65rem;
  line-height: 1.55;
}

.invitation-footer {
  display: flex;
  align-self: end;
  justify-content: space-between;
  margin-top: 5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(244, 237, 223, 0.2);
  color: rgba(244, 237, 223, 0.6);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

@media (min-width: 769px) {
  .entry-gate__content,
  .film-header {
    right: 2.5rem;
    left: 2.5rem;
  }

  .entry-gate__content {
    padding: 2rem 2.5rem;
  }

  .entry-gate__media img {
    object-position: center 45%;
  }

  .entry-gate__monogram {
    font-size: clamp(8.5rem, 16vw, 13.5rem);
  }

  .enter-button {
    width: min(28rem, 42vw);
    justify-self: center;
  }

  .entry-gate__topline,
  .entry-gate__footline {
    font-size: 0.66rem;
  }

  .cinema-scroll {
    height: 360vh;
  }

  .cinema-film {
    object-position: center 48%;
  }

  .film-header {
    top: 2rem;
  }

  .story-beat {
    justify-content: flex-end;
    padding: 0 9vw 8vh;
  }

  .story-beat__eyebrow {
    margin-bottom: 1.1rem;
    font-size: 0.67rem;
  }

  .names-title {
    display: grid;
    grid-template-columns: auto auto auto;
    align-items: baseline;
    gap: 0.03em;
    font-size: clamp(8rem, 12.5vw, 13rem);
    line-height: 0.75;
  }

  .names-title__amp {
    width: auto;
    margin: 0;
    font-size: 0.68em;
  }

  .story-beat--date {
    justify-content: center;
    padding-top: 13vh;
    padding-bottom: 3vh;
    padding-left: 14vw;
  }

  .date-title__number {
    font-size: clamp(16rem, 26vw, 26rem);
  }

  .date-title__copy {
    margin-bottom: 1.35rem;
    font-size: 0.76rem;
  }

  .place-title {
    max-width: 9em;
    font-size: clamp(7rem, 10.6vw, 11rem);
  }

  .place-title__palace {
    padding-left: 18%;
  }

  .place-caption {
    margin-left: 19%;
  }

  .film-progress {
    right: 2.5rem;
    bottom: 2rem;
  }

  .film-progress__track {
    width: 5rem;
  }

  .scroll-cue {
    bottom: 2rem;
    left: 2.5rem;
  }

  .replay-film {
    right: 2.5rem;
    bottom: 4.7rem;
  }

  .chapter-index {
    position: absolute;
    top: 50%;
    right: 2.5rem;
    z-index: 5;
    display: grid;
    gap: 0.9rem;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    list-style: none;
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
  }

  .chapter-index li {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    opacity: 0.36;
    transition: opacity 300ms ease;
  }

  .chapter-index li span {
    width: 0.35rem;
    height: 0.35rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    transition: background-color 300ms ease;
  }

  .chapter-index li.is-active {
    opacity: 1;
  }

  .chapter-index li.is-active span {
    background: currentColor;
  }

  .manifesto__sticky {
    padding: 5vw 8vw;
  }

  .manifesto__sticky::after {
    right: -3vw;
    bottom: -6vw;
    font-size: 29vw;
  }

  .manifesto__line {
    max-width: 10.5em;
    font-size: clamp(5.8rem, 8.2vw, 9rem);
  }

  .manifesto__note {
    right: 8vw;
    bottom: 2.5rem;
    left: 8vw;
  }

  .rsvp {
    grid-template-columns: minmax(0, 0.78fr) minmax(34rem, 0.92fr);
    grid-template-rows: 1fr auto;
    gap: 4rem 9vw;
    align-items: center;
    min-height: 100vh;
    padding: 9vh 8vw 2rem;
  }

  .rsvp__heading h2 {
    font-size: clamp(6.5rem, 8.6vw, 9.5rem);
  }

  .rsvp__heading h2 em {
    padding-left: 12%;
    font-size: 0.54em;
  }

  .rsvp__intro {
    font-size: 0.9rem;
  }

  .rsvp-form {
    margin: 0;
  }

  .form-grid--primary {
    grid-template-columns: minmax(0, 1fr) minmax(9rem, 0.34fr);
  }

  .form-grid--additional {
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 0.42fr) minmax(9rem, 0.34fr);
  }

  .address-grid {
    grid-template-columns: minmax(7.5rem, 0.7fr) minmax(0, 1.55fr) minmax(5rem, 0.52fr);
    grid-template-areas:
      "cep street number"
      "complement district district"
      "city city state";
  }

  .invitation-footer {
    grid-column: 1 / -1;
    margin-top: 1rem;
  }
}

@media (max-width: 380px) {
  .names-title {
    font-size: 22.5vw;
  }

  .place-title {
    font-size: 17.7vw;
  }

  .story-beat {
    padding-right: 1rem;
    padding-left: 1rem;
  }
}

@media (max-width: 520px) {
  .form-section__header--action {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .form-section__header--action .add-person-button {
    grid-column: 2;
    justify-self: start;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .cinema-scroll {
    height: 260svh;
  }

  .cinema-film {
    transform: none;
  }
}
