:root {
  --wine: #61172d;
  --wine-deep: #270912;
  --wine-soft: #8d3550;
  --cream: #f7f0e6;
  --paper: #fffaf3;
  --gold: #c8a45c;
  --gold-soft: #e4cf99;
  --ink: #271b1e;
  --muted: #74666a;
  --line: rgba(97, 23, 45, 0.18);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: Manrope, Arial, sans-serif;
  --shadow: 0 24px 80px rgba(53, 10, 23, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

body.welcome-open {
  overflow: hidden;
}

button,
a {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.welcome {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100vw;
  width: 100dvw;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 18px;
  color: #fff;
  opacity: 1;
  visibility: visible;
  transition: opacity 700ms ease, visibility 700ms ease;
}

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

.welcome__photo,
.welcome__veil {
  position: absolute;
  inset: 0;
}

.welcome__photo {
  background: url("assets/maia-egresada.jpg") 52% center / cover no-repeat;
  transform: scale(1.025);
}

.welcome__veil {
  background:
    linear-gradient(180deg, rgba(39, 9, 18, 0.38), rgba(39, 9, 18, 0.88)),
    radial-gradient(circle at 50% 34%, rgba(200, 164, 92, 0.12), transparent 42%);
  backdrop-filter: blur(4px);
}

.welcome__card {
  position: relative;
  width: min(520px, 100%);
  padding: clamp(34px, 7vw, 62px) clamp(22px, 7vw, 52px);
  border: 1px solid rgba(228, 207, 153, 0.64);
  background: rgba(39, 9, 18, 0.72);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.46);
  text-align: center;
  backdrop-filter: blur(12px);
  animation: welcome-in 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.welcome__card::before,
.welcome__card::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 42px;
  border-color: var(--gold-soft);
}

.welcome__card::before {
  top: 10px;
  left: 10px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.welcome__card::after {
  right: 10px;
  bottom: 10px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.welcome__monogram {
  display: block;
  margin: 12px 0 -8px;
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: clamp(3rem, 9vw, 5rem);
  font-style: italic;
  line-height: 1;
}

.welcome h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 10vw, 5.4rem);
  font-weight: 600;
  line-height: 0.95;
}

.welcome__card > p:not(.kicker) {
  max-width: 330px;
  margin: 22px auto 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  line-height: 1.6;
}

.welcome button {
  min-height: 48px;
  border: 1px solid var(--gold);
  padding: 0 26px;
  background: var(--gold);
  color: var(--wine-deep);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.music-toggle {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  z-index: 100;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(228, 207, 153, 0.7);
  border-radius: 50%;
  background: rgba(39, 9, 18, 0.82);
  box-shadow: 0 10px 30px rgba(39, 9, 18, 0.25);
  color: var(--gold-soft);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 180ms ease, background 180ms ease;
}

.music-toggle:hover {
  transform: scale(1.06);
  background: rgba(97, 23, 45, 0.94);
}

.music-toggle span {
  font-family: Georgia, serif;
  font-size: 1.35rem;
  line-height: 1;
}

.music-toggle.is-playing span {
  animation: music-pulse 1.8s ease-in-out infinite;
}

.kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 100px clamp(20px, 7vw, 96px) 72px;
  color: #fff;
}

.hero__image,
.hero__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  object-fit: cover;
  object-position: 50% center;
  transform: scale(1.02);
}

.hero__overlay {
  background:
    linear-gradient(90deg, rgba(39, 9, 18, 0.88), rgba(39, 9, 18, 0.16) 70%),
    linear-gradient(0deg, rgba(39, 9, 18, 0.84), transparent 58%);
}

.hero__ornament {
  position: absolute;
  top: 34px;
  right: clamp(20px, 7vw, 96px);
  width: 88px;
  height: 88px;
  border-top: 1px solid rgba(228, 207, 153, 0.66);
  border-right: 1px solid rgba(228, 207, 153, 0.66);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(5rem, 15vw, 11rem);
  font-weight: 600;
  line-height: 0.74;
  letter-spacing: -0.035em;
}

.hero h1 em {
  display: block;
  margin-left: 0.45em;
  color: var(--gold-soft);
  font-weight: 500;
}

.hero__promo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 0;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.hero__promo strong {
  color: var(--gold-soft);
  font-size: 3rem;
  font-weight: 500;
  line-height: 1;
}

.hero__intro {
  max-width: 520px;
  margin: 16px 0 28px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  padding: 0 25px;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--light {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.button--gold {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--wine-deep);
}

.section {
  padding: clamp(76px, 10vw, 130px) clamp(20px, 7vw, 96px);
}

.section-heading {
  width: min(720px, 100%);
  margin: 0 auto clamp(42px, 6vw, 72px);
  text-align: center;
}

.section-heading h2,
.letter h2,
.detail-card h2,
.rsvp h2,
.date-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 600;
  line-height: 0.98;
}

.section-heading > p:last-child {
  max-width: 560px;
  margin: 20px auto 0;
  color: var(--muted);
  line-height: 1.7;
}

.story {
  background:
    linear-gradient(rgba(255, 250, 243, 0.94), rgba(255, 250, 243, 0.94)),
    radial-gradient(circle at 20% 10%, rgba(200, 164, 92, 0.28), transparent 30%);
}

.memory-grid {
  width: min(1160px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 34px);
  margin: 0 auto;
  align-items: end;
}

.memory {
  margin: 0;
}

.memory img {
  width: 100%;
  height: clamp(360px, 46vw, 610px);
  border: 1px solid rgba(200, 164, 92, 0.45);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.memory--first img {
  object-position: center 18%;
}

.memory--second {
  transform: translateY(-34px);
}

.memory--second img {
  object-position: center 20%;
}

.memory--third img {
  object-position: 50% center;
}

.memory figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 4px 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.25rem;
}

.memory figcaption span {
  color: var(--gold);
  font-family: var(--sans);
  font-size: 0.67rem;
  letter-spacing: 0.12em;
}

.letter {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--wine-deep);
  color: #fff;
}

.letter::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(228, 207, 153, 0.25);
  pointer-events: none;
}

.letter__mark {
  position: absolute;
  left: 50%;
  top: 50%;
  color: rgba(228, 207, 153, 0.05);
  font-family: var(--serif);
  font-size: min(72vw, 780px);
  font-style: italic;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.letter__content {
  position: relative;
  width: min(790px, 100%);
  text-align: center;
}

.letter__content > p:not(.kicker):not(.letter__signature) {
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.02rem;
  line-height: 1.85;
}

.letter__signature {
  margin: 36px 0 0;
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-style: italic;
}

.date-section {
  position: relative;
  min-height: 760px;
  display: grid;
  place-items: center;
  padding: 70px 20px;
  background:
    linear-gradient(rgba(39, 9, 18, 0.68), rgba(39, 9, 18, 0.84)),
    url("assets/maia-egresada.jpg") center 56% / cover no-repeat;
  background-attachment: fixed;
}

.date-card {
  width: min(560px, 100%);
  padding: clamp(38px, 7vw, 68px) 24px;
  border: 1px solid rgba(228, 207, 153, 0.62);
  background: rgba(39, 9, 18, 0.82);
  color: #fff;
  text-align: center;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
}

.date-card__date {
  display: grid;
  gap: 2px;
  color: var(--gold-soft);
  font-family: var(--serif);
}

.date-card__date span:first-child {
  font-size: 1.6rem;
  font-style: italic;
}

.date-card__date strong {
  font-size: clamp(6rem, 18vw, 9rem);
  font-weight: 500;
  line-height: 0.8;
}

.date-card__date span:last-child {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.date-card__rule {
  width: 72px;
  height: 1px;
  margin: 28px auto;
  background: var(--gold);
}

.date-card h2 {
  font-size: clamp(2.4rem, 6vw, 4rem);
}

.date-card__time {
  margin: 12px 0 28px;
  color: rgba(255, 255, 255, 0.76);
  letter-spacing: 0.15em;
}

.countdown-section {
  background: var(--cream);
}

.countdown {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.countdown div {
  min-width: 0;
  padding: 30px 10px;
  text-align: center;
}

.countdown div + div {
  border-left: 1px solid var(--line);
}

.countdown strong {
  display: block;
  color: var(--wine);
  font-family: var(--serif);
  font-size: clamp(2.7rem, 7vw, 5rem);
  font-weight: 500;
  line-height: 1;
}

.countdown span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--gold-soft);
  padding: 1px;
}

.detail-card {
  position: relative;
  min-width: 0;
  padding: clamp(58px, 8vw, 110px) clamp(24px, 7vw, 90px);
  background: var(--paper);
  overflow: hidden;
}

.detail-card--gift {
  background: var(--wine);
  color: #fff;
}

.detail-card__number {
  position: absolute;
  right: 24px;
  top: 22px;
  color: rgba(200, 164, 92, 0.45);
  font-family: var(--serif);
  font-size: 2.2rem;
}

.detail-card h2 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

.detail-card > p:not(.kicker):not(.copy-status) {
  max-width: 520px;
  margin: 20px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.detail-card--gift > p:not(.kicker):not(.copy-status) {
  color: rgba(255, 255, 255, 0.72);
}

.color-swatch {
  width: 52px;
  height: 52px;
  margin-top: 28px;
  border: 8px solid var(--paper);
  border-radius: 50%;
  background: #6f1634;
  box-shadow: 0 0 0 1px var(--line);
}

.bank-data {
  display: grid;
  gap: 10px;
  margin: 28px 0 20px;
}

.bank-data div {
  min-width: 0;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.bank-data dt {
  color: var(--gold-soft);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bank-data dd {
  min-width: 0;
  margin: 0;
  color: #fff;
  overflow-wrap: anywhere;
}

.text-button {
  border: 0;
  border-bottom: 1px solid var(--gold-soft);
  padding: 6px 0;
  background: transparent;
  color: var(--gold-soft);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.copy-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.78rem;
}

.rsvp {
  min-height: 650px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(255, 250, 243, 0.91), rgba(255, 250, 243, 0.94)),
    url("assets/maia-infancia.jpg") center 24% / cover no-repeat;
  text-align: center;
}

.rsvp__content {
  width: min(700px, 100%);
}

.rsvp h2 {
  color: var(--wine);
}

.rsvp__content > p:not(.kicker) {
  max-width: 520px;
  margin: 22px auto 30px;
  color: var(--muted);
  line-height: 1.75;
}

.rsvp-form {
  width: min(520px, 100%);
  display: grid;
  gap: 18px;
  margin: 34px auto 0;
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid rgba(97, 23, 45, 0.16);
  background: rgba(255, 250, 243, 0.9);
  box-shadow: var(--shadow);
  text-align: left;
  backdrop-filter: blur(10px);
}

.rsvp-field {
  display: grid;
  gap: 9px;
  color: var(--wine);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.rsvp-field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(97, 23, 45, 0.24);
  border-radius: 0;
  padding: 0 15px;
  outline: none;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.rsvp-field input:focus {
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgba(97, 23, 45, 0.1);
}

.rsvp-field small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.rsvp-summary {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding: 18px;
  background: var(--cream);
}

.rsvp-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

.rsvp-summary strong {
  color: var(--wine);
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  white-space: nowrap;
}

.rsvp-summary__total {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.rsvp-summary__total strong {
  color: var(--gold);
  font-size: 1.8rem;
}

.rsvp-error {
  min-height: 1.2em;
  margin: -4px 0 0;
  color: #a4263e;
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

.rsvp-form .button {
  width: 100%;
  border: 0;
  cursor: pointer;
}

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 30px clamp(20px, 7vw, 96px) 34px;
  background: var(--wine-deep);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

footer strong {
  color: var(--gold-soft);
  font-weight: 600;
}

.footer__event {
  width: min(560px, 100%);
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.footer__credit {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(228, 207, 153, 0.2);
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
}

.footer__credit img {
  width: min(260px, 78vw);
  height: auto;
  mix-blend-mode: screen;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes welcome-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes music-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.22);
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 92svh;
    padding: 84px 20px 48px;
  }

  .hero__image {
    object-position: 56% center;
  }

  .hero__overlay {
    background:
      linear-gradient(0deg, rgba(39, 9, 18, 0.92), rgba(39, 9, 18, 0.12) 68%),
      linear-gradient(90deg, rgba(39, 9, 18, 0.4), transparent);
  }

  .hero h1 {
    font-size: clamp(4.4rem, 22vw, 7rem);
  }

  .memory-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .memory,
  .memory--second {
    width: min(430px, 100%);
    margin: 0 auto;
    transform: none;
  }

  .memory img {
    height: min(132vw, 580px);
  }

  .date-section {
    min-height: 680px;
    background-attachment: scroll;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .countdown div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .countdown div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .details {
    grid-template-columns: 1fr;
  }

  footer {
    gap: 24px;
  }

  .footer__event {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

@media (max-width: 420px) {
  .music-toggle {
    top: max(14px, env(safe-area-inset-top));
    right: 14px;
    width: 44px;
    height: 44px;
  }

  .rsvp-form {
    padding: 22px 18px;
  }

  .rsvp-summary > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .welcome {
    padding: 12px;
  }

  .welcome__card {
    width: 100%;
    padding: 30px 18px 34px;
  }

  .welcome__monogram {
    font-size: 3.4rem;
  }

  .welcome h1 {
    font-size: clamp(2.8rem, 14vw, 3.7rem);
  }

  .welcome__card > p:not(.kicker) {
    margin: 16px auto 22px;
    font-size: 0.8rem;
  }

  .welcome button {
    min-height: 44px;
    padding: 0 20px;
    font-size: 0.68rem;
  }

  .hero h1 {
    font-size: clamp(4rem, 21vw, 5.4rem);
  }

  .section {
    padding: 72px 18px;
  }

  .letter::before {
    inset: 12px;
  }

  .date-card {
    padding: 42px 18px;
  }

  .bank-data div {
    grid-template-columns: 66px 1fr;
    gap: 8px;
  }
}

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

  .welcome,
  .welcome__card,
  .reveal {
    animation: none;
    transition: none;
  }
}
