:root {
  --ink: #fff7ef;
  --muted: #dbc7bd;
  --paper: #1a050b;
  --panel: #2b0812;
  --panel-soft: #3b101d;
  --rose: #b91f45;
  --rose-deep: #8f1734;
  --gold: #f5cf7a;
  --teal: #176b6f;
  --line: rgba(255, 226, 177, 0.18);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 12%, rgba(245, 207, 122, 0.36) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 22%, rgba(255, 232, 176, 0.28) 0 1px, transparent 2px),
    radial-gradient(circle at 38% 76%, rgba(245, 207, 122, 0.3) 0 1px, transparent 2px),
    linear-gradient(120deg, rgba(185, 31, 69, 0.32), transparent 38%),
    linear-gradient(300deg, rgba(245, 207, 122, 0.24), transparent 46%),
    linear-gradient(135deg, #160408 0%, #5a1023 45%, #24070f 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 242, 211, 0.88) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(245, 207, 122, 0.66) 0 1px, transparent 1.8px),
    linear-gradient(115deg, transparent 0 34%, rgba(245, 207, 122, 0.18) 35%, transparent 38% 100%);
  background-position:
    18px 24px,
    72px 96px,
    center;
  background-size:
    138px 138px,
    190px 190px,
    100% 100%;
  opacity: 0.55;
}

body.intro-open {
  overflow: hidden;
}

.welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  min-height: 100svh;
  overflow: hidden;
  color: #fffaf6;
  opacity: 1;
  visibility: visible;
  transition: opacity 650ms ease, visibility 650ms ease;
}

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

.welcome-screen__media,
.welcome-screen__shade {
  position: absolute;
  inset: -24px;
}

.welcome-screen__media {
  background: url("assets/hero-mariana.jpg") 58% center / cover no-repeat;
  transform: scale(1.06);
}

.welcome-screen__shade {
  background:
    linear-gradient(180deg, rgba(35, 5, 14, 0.35), rgba(35, 5, 14, 0.82)),
    radial-gradient(circle at center, rgba(185, 31, 69, 0.24), rgba(22, 4, 8, 0.72));
  backdrop-filter: blur(5px);
}

.welcome-screen__content {
  position: relative;
  width: min(620px, calc(100% - 36px));
  padding: clamp(42px, 8vw, 74px) clamp(24px, 7vw, 58px);
  border: 1px solid rgba(255, 231, 202, 0.32);
  border-radius: 12px;
  background: rgba(53, 8, 21, 0.66);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
  text-align: center;
  backdrop-filter: blur(14px);
  animation: welcome-rise 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.welcome-screen__eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.3em;
}

.welcome-screen h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3rem, 10vw, 5.6rem);
  font-weight: 600;
  line-height: 0.92;
  text-wrap: balance;
}

.welcome-screen__message {
  margin: 24px 0 30px;
  color: #f1d9ce;
  font-size: clamp(0.88rem, 2.6vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.welcome-screen__button {
  min-width: 164px;
  min-height: 52px;
  border: 1px solid rgba(255, 239, 218, 0.3);
  border-radius: 4px;
  padding: 0 28px;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: #fff;
  box-shadow: 0 14px 34px rgba(101, 7, 32, 0.42);
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 180ms ease, filter 180ms ease;
}

.welcome-screen__button:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.welcome-screen__button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

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

button,
input,
textarea,
a {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  padding: 28px clamp(18px, 5vw, 72px) 72px;
  color: #fffaf6;
}

.hero__media,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
  transform: scale(1.02);
}

.hero__shade {
  background:
    linear-gradient(90deg, rgba(48, 5, 16, 0.82), rgba(116, 18, 43, 0.34) 55%, rgba(31, 7, 13, 0.56)),
    linear-gradient(0deg, rgba(36, 6, 14, 0.76), rgba(245, 207, 122, 0.16) 46%),
    radial-gradient(circle at 24% 18%, rgba(245, 207, 122, 0.34), transparent 24%);
}

.topbar {
  position: absolute;
  z-index: 2;
  top: 24px;
  left: clamp(18px, 5vw, 72px);
  right: clamp(18px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 250, 246, 0.58);
  border-radius: 50%;
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  font-weight: 700;
}

.icon-button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 250, 246, 0.5);
  border-radius: 50%;
  background: rgba(255, 250, 246, 0.15);
  color: #fffaf6;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.music-icon,
.music-icon::before,
.music-icon::after {
  display: block;
  background: currentColor;
}

.music-icon {
  position: relative;
  width: 3px;
  height: 22px;
  margin: 11px auto 0;
  border-radius: 999px;
}

.music-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  width: 16px;
  height: 3px;
  border-radius: 999px;
}

.music-icon::after {
  content: "";
  position: absolute;
  left: -9px;
  bottom: -4px;
  width: 12px;
  height: 9px;
  border-radius: 50%;
}

.icon-button.is-playing {
  background: var(--rose);
  border-color: transparent;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding-top: 80px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(5.2rem, 16vw, 12rem);
  line-height: 0.82;
  letter-spacing: 0;
}

.hero__date,
.hero__place,
.hero__message {
  max-width: 640px;
  margin: 22px 0 0;
  font-size: clamp(1.05rem, 2.5vw, 1.42rem);
  font-weight: 600;
  text-wrap: balance;
}

.hero__place {
  margin-top: 8px;
  color: rgba(255, 250, 246, 0.83);
  font-weight: 500;
}

.hero__message {
  max-width: 560px;
  margin-top: 22px;
  color: rgba(255, 250, 246, 0.88);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.6;
  font-weight: 500;
}

.countdown-section,
.presentation-section,
.rsvp-section,
.site-footer {
  padding: clamp(42px, 7vw, 82px) clamp(18px, 5vw, 72px);
}

.presentation-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1fr);
  gap: clamp(26px, 6vw, 72px);
  align-items: center;
  background:
    linear-gradient(135deg, rgba(245, 207, 122, 0.24), rgba(185, 31, 69, 0.2)),
    linear-gradient(180deg, rgba(255, 247, 239, 0.06), rgba(255, 247, 239, 0.02)),
    var(--panel);
  border-block: 1px solid var(--line);
}

.monogram-frame {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
  justify-self: end;
  width: min(480px, 100%);
  border: 1px solid rgba(245, 207, 122, 0.52);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 38%, rgba(245, 207, 122, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(245, 207, 122, 0.16), rgba(185, 31, 69, 0.3)),
    #250711;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.monogram-frame::before,
.monogram-frame::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(245, 207, 122, 0.4);
  border-radius: 6px;
}

.monogram-frame::after {
  inset: 34px;
  border-color: rgba(255, 247, 239, 0.16);
}

.monogram-frame span {
  position: relative;
  z-index: 1;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(6rem, 16vw, 11rem);
  line-height: 0.8;
  color: var(--gold);
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.34);
}

.portrait-frame {
  position: relative;
  max-width: 480px;
  justify-self: end;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201, 149, 63, 0.45);
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 248, 243, 0.8);
  border-radius: 6px;
  pointer-events: none;
}

.portrait-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
}

.slideshow {
  position: relative;
  width: min(520px, 100%);
  aspect-ratio: 3 / 4;
  justify-self: end;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(245, 207, 122, 0.55);
  background: #250711;
  box-shadow: var(--shadow);
}

.slideshow::before,
.slideshow::after {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.slideshow::before {
  inset: 12px;
  border: 1px solid rgba(255, 247, 239, 0.62);
  border-radius: 6px;
}

.slideshow::after {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(245, 207, 122, 0.12), transparent 34%),
    linear-gradient(0deg, rgba(26, 5, 11, 0.24), transparent 45%);
}

.slideshow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition:
    opacity 900ms ease,
    transform 4200ms ease;
}

.slideshow img.is-active {
  opacity: 1;
  transform: scale(1);
}

.presentation-copy {
  max-width: 560px;
}

.presentation-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.section-heading {
  max-width: 860px;
  margin: 0 auto 24px;
  text-align: center;
}

h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 0.95;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 980px;
  margin: 0 auto;
}

.time-box {
  min-height: 136px;
  display: grid;
  place-items: center;
  padding: 18px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 212, 122, 0.28), rgba(216, 93, 141, 0.08)),
    linear-gradient(180deg, rgba(255, 247, 239, 0.08), rgba(255, 247, 239, 0.03)),
    var(--panel-soft);
  box-shadow: var(--shadow);
}

.time-box strong {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.8rem, 8vw, 5.8rem);
  line-height: 0.8;
  color: #ffd2e0;
}

.time-box span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.details-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background:
    linear-gradient(90deg, rgba(245, 207, 122, 0.72), rgba(255, 231, 176, 0.5), rgba(185, 31, 69, 0.56));
  border-block: 1px solid var(--line);
}

.detail-card {
  min-height: 260px;
  padding: clamp(24px, 4vw, 44px);
  background:
    linear-gradient(160deg, rgba(245, 207, 122, 0.22), rgba(185, 31, 69, 0.16)),
    linear-gradient(180deg, rgba(255, 247, 239, 0.06), rgba(255, 247, 239, 0.025)),
    #1a1117;
}

.detail-icon {
  color: var(--teal);
  font-weight: 800;
}

.detail-card h3 {
  margin: 18px 0 10px;
  font-size: 2.2rem;
}

.detail-card p {
  color: var(--muted);
  line-height: 1.65;
}

.text-link {
  color: #ffd2e0;
  font-weight: 800;
  text-decoration: none;
}

.rsvp-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
  background:
    linear-gradient(135deg, rgba(245, 207, 122, 0.24), rgba(185, 31, 69, 0.2)),
    linear-gradient(180deg, rgba(255, 242, 211, 0.08), transparent),
    #1c060d;
  border-top: 1px solid var(--line);
}

.rsvp-copy {
  max-width: 560px;
}

.rsvp-copy p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.rsvp-form {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(245, 207, 122, 0.22), rgba(185, 31, 69, 0.16)),
    linear-gradient(180deg, rgba(255, 247, 239, 0.09), rgba(255, 247, 239, 0.04)),
    var(--panel);
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 231, 202, 0.2);
  border-radius: 8px;
  background: rgba(255, 247, 239, 0.08);
  color: #fff7ef;
  padding: 13px 14px;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 247, 239, 0.52);
}

input:focus,
textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(200, 79, 120, 0.12);
}

fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  width: 100%;
  margin-bottom: 4px;
  font-weight: 800;
}

.radio-pill {
  display: inline-flex;
  min-width: 132px;
  cursor: pointer;
}

.radio-pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.radio-pill span {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 247, 239, 0.06);
}

.radio-pill input:checked + span {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.secondary-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 0;
  padding: 0 18px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.secondary-button {
  color: #dbf4f2;
  background: rgba(23, 107, 111, 0.36);
}

.whatsapp-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.whatsapp-button {
  margin-top: 4px;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: #dbb565;
  font-weight: 800;
}

.site-footer {
  display: grid;
  justify-items: center;
  gap: 16px;
  background: #070607;
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.site-footer img {
  width: min(440px, 88vw);
  height: auto;
  display: block;
  border-radius: 8px;
}

@media (max-width: 760px) {
  .hero {
    min-height: 88vh;
    align-items: end;
  }

  .hero__shade {
    background:
      linear-gradient(0deg, rgba(36, 6, 14, 0.86), rgba(36, 6, 14, 0.2)),
      linear-gradient(90deg, rgba(36, 6, 14, 0.62), rgba(36, 6, 14, 0.18));
  }

  .hero__media {
    object-position: 58% center;
  }

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

  .details-section,
  .presentation-section,
  .rsvp-section {
    grid-template-columns: 1fr;
  }

  .portrait-frame {
    justify-self: stretch;
    max-width: none;
  }

  .slideshow {
    justify-self: stretch;
    width: 100%;
    max-height: 82vh;
  }

  .detail-card {
    min-height: auto;
  }

}

@media (max-width: 420px) {
  .welcome-screen__content {
    width: calc(100% - 24px);
    max-width: 350px;
    padding: 32px 16px 34px;
    overflow: hidden;
  }

  .welcome-screen h1 {
    max-width: 100%;
    font-size: clamp(2.45rem, 11.5vw, 3rem);
    line-height: 0.98;
    overflow-wrap: anywhere;
  }

  .welcome-screen__eyebrow {
    margin-bottom: 10px;
    font-size: 0.7rem;
    letter-spacing: 0.24em;
  }

  .welcome-screen__message {
    max-width: 260px;
    margin: 18px auto 24px;
    font-size: 0.72rem;
    line-height: 1.55;
    letter-spacing: 0.08em;
  }

  .welcome-screen__button {
    min-width: 142px;
    min-height: 46px;
    padding: 0 22px;
    font-size: 0.82rem;
  }

  .hero h1 {
    font-size: clamp(4.1rem, 24vw, 5.6rem);
  }

  .time-box {
    min-height: 112px;
  }

  .rsvp-form {
    padding: 18px;
  }

  .whatsapp-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-screen,
  .welcome-screen__content,
  .welcome-screen__button {
    animation: none;
    transition: none;
  }
}
