[hidden] { display: none !important; }

.logo-window { display: block; position: relative; overflow: hidden; background: #2d2b2b; }
.logo-window img { position: absolute; width: 180%; max-width: none; height: auto; left: -40%; top: -46%; }
.seal-logo { width: 76%; height: 76%; border-radius: 50%; }
.closing-logo { width: 112px; height: 112px; margin: 1.8rem auto 0; border-radius: 50%; border: 1px solid #c7a46a; }
.full-names { font-size: 1rem; line-height: 1.9; margin: 1.4rem 0; }
.full-names span { color: #8c6b3d; }
.countdown-note { font-size: 0.875rem; margin: -1rem 0 2rem; }

:root {
  --wine: #4b0f20;
  --wine-deep: #24050e;
  --wine-soft: #7a263e;
  --gold: #c7a46a;
  --gold-bright: #e8cf9b;
  --ivory: #f7f0e4;
  --paper: #fffaf2;
  --ink: #311921;
  --muted: #8c737a;
  --serif-ar: "Aref Ruqaa", "Traditional Arabic", Georgia, serif;
  --sans-ar: "Noto Kufi Arabic", Arial, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans-ar);
  overflow-x: hidden;
}

body.locked {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 4px;
}

.film-grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.065;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.invitation-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-rows: minmax(120px, 0.8fr) minmax(290px, 1.2fr) minmax(90px, 0.55fr);
  place-items: center;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(171, 72, 98, 0.36), transparent 30rem),
    linear-gradient(145deg, #5f1329 0%, var(--wine) 45%, var(--wine-deep) 100%);
  color: var(--ivory);
  transition: opacity 0.75s ease, visibility 0.75s ease;
}

.invitation-gate::before,
.invitation-gate::after {
  content: "";
  position: absolute;
  width: min(36vw, 340px);
  aspect-ratio: 1;
  border: 1px solid rgba(232, 207, 155, 0.18);
  transform: rotate(45deg);
}

.invitation-gate::before {
  top: -23vw;
  right: -13vw;
}

.invitation-gate::after {
  bottom: -25vw;
  left: -13vw;
}

.gate-glow {
  position: absolute;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.2;
  background: var(--gold);
}

.gate-glow-one {
  top: -8rem;
  left: -5rem;
}

.gate-glow-two {
  right: -8rem;
  bottom: 5%;
}

.gate-heading {
  z-index: 3;
  align-self: end;
  text-align: center;
  animation: gateFade 1s both 0.15s;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.7rem;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.gate-heading h1 {
  margin: 0;
  font-family: var(--serif-ar);
  font-size: clamp(2.3rem, 8vw, 4.5rem);
  font-weight: 400;
  line-height: 1;
}

.gate-heading h1 span {
  display: inline-block;
  margin-inline: 0.25em;
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: 0.55em;
  font-style: italic;
}

.envelope-scene {
  position: relative;
  z-index: 4;
  width: min(86vw, 390px);
  perspective: 1400px;
  animation: gateFade 1.1s both 0.35s;
}

.envelope {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.42;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  transform-style: preserve-3d;
  filter: drop-shadow(0 28px 25px rgba(0, 0, 0, 0.28));
}

.envelope-shadow {
  position: absolute;
  right: 6%;
  bottom: -10%;
  left: 6%;
  height: 18%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  filter: blur(15px);
  transition: transform 0.8s ease, opacity 0.8s ease;
}

.envelope-back,
.envelope-front,
.envelope-flap,
.letter-preview {
  position: absolute;
  inset: 0;
  border-radius: 5px;
}

.envelope-back {
  z-index: 1;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.45), transparent 32%),
    var(--paper);
  box-shadow: inset 0 0 0 1px rgba(84, 46, 28, 0.08);
}

.letter-preview {
  z-index: 2;
  inset: 6% 7%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(199, 164, 106, 0.42);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.9), transparent 40%),
    #f9f3e9;
  color: var(--wine);
  transition: transform 1s cubic-bezier(0.2, 0.75, 0.2, 1) 0.48s;
}

.letter-preview::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(199, 164, 106, 0.25);
}

.letter-ornament {
  color: var(--gold);
  font-size: 0.8rem;
}

.letter-names {
  margin: 0.25rem 0;
  font-family: var(--serif-ar);
  font-size: clamp(1.35rem, 5.2vw, 2.1rem);
  line-height: 0.72;
}

.letter-names small {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 0.52em;
  font-style: italic;
}

.letter-date {
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 0.62rem;
  letter-spacing: 0.25em;
}

.envelope-flap {
  z-index: 5;
  height: 55%;
  border-radius: 5px 5px 0 0;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.68), transparent 40%),
    #f2eadc;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.9s cubic-bezier(0.45, 0.05, 0.15, 1);
  backface-visibility: hidden;
}

.envelope-front {
  z-index: 4;
  overflow: hidden;
  background:
    linear-gradient(32deg, transparent 49.4%, rgba(183, 161, 126, 0.22) 50%, transparent 50.6%),
    linear-gradient(-32deg, transparent 49.4%, rgba(183, 161, 126, 0.22) 50%, transparent 50.6%),
    linear-gradient(150deg, transparent 49.7%, #f7f0e4 50%),
    linear-gradient(210deg, transparent 49.7%, #f3eadb 50%);
  clip-path: polygon(0 0, 50% 50%, 100% 0, 100% 100%, 0 100%);
}

.envelope-front::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(199, 164, 106, 0.28);
  clip-path: polygon(0 0, 50% 50%, 100% 0, 100% 100%, 0 100%);
}

.silk-ribbon {
  position: absolute;
  z-index: 6;
  display: block;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent 22%, rgba(0, 0, 0, 0.08) 52%, rgba(255, 255, 255, 0.12) 78%, transparent),
    #7b1732;
  box-shadow: 0 3px 8px rgba(52, 5, 20, 0.2);
  transition: opacity 0.5s ease 0.1s, transform 0.75s ease 0.1s;
}

.ribbon-horizontal {
  top: 43%;
  right: -2%;
  left: -2%;
  height: 14%;
}

.ribbon-vertical {
  top: -3%;
  bottom: -3%;
  left: 44%;
  width: 12%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.15), transparent 28%, rgba(0, 0, 0, 0.08) 62%, rgba(255, 255, 255, 0.12)),
    #70142d;
}

.wax-seal {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  display: grid;
  width: clamp(68px, 20vw, 88px);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50% 46% 52% 48%;
  background:
    radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.23), transparent 24%),
    radial-gradient(circle, #9b3b54 0 43%, #7a1e39 45% 68%, #5b1028 73% 100%);
  box-shadow:
    0 12px 18px rgba(64, 5, 21, 0.35),
    inset 0 0 0 3px rgba(255, 218, 171, 0.16),
    inset 0 -8px 10px rgba(48, 3, 16, 0.24);
  color: var(--gold-bright);
  transform: translate(-50%, -50%) rotate(-4deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
}

.seal-ring {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(242, 212, 164, 0.55);
  border-radius: 50%;
}

.seal-monogram {
  font-family: var(--serif-ar);
  font-size: 1.15rem;
  line-height: 0.52;
  text-shadow: 0 1px 0 #531025;
}

.seal-monogram i {
  color: rgba(232, 207, 155, 0.82);
  font-family: Georgia, serif;
  font-size: 0.62em;
}

.envelope:hover .wax-seal,
.envelope:focus-visible .wax-seal {
  transform: translate(-50%, -50%) rotate(0deg) scale(1.07);
}

.open-hint {
  z-index: 5;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  border: 0;
  background: transparent;
  color: rgba(255, 250, 242, 0.76);
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  animation: gateFade 1s both 0.75s;
}

.hint-line {
  display: block;
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--gold), transparent);
  animation: hintPulse 1.6s ease-in-out infinite;
}

.invitation-gate.is-opening .envelope-flap {
  z-index: 2;
  transform: rotateX(180deg);
}

.invitation-gate.is-opening .letter-preview {
  z-index: 6;
  transform: translateY(-47%) scale(1.03);
}

.invitation-gate.is-opening .ribbon-horizontal {
  opacity: 0;
  transform: scaleX(1.16);
}

.invitation-gate.is-opening .ribbon-vertical {
  opacity: 0;
  transform: scaleY(1.12);
}

.invitation-gate.is-opening .wax-seal {
  opacity: 0;
  transform: translate(-50%, -30%) rotate(16deg) scale(0.72);
}

.invitation-gate.is-opening .envelope-shadow {
  opacity: 0.55;
  transform: scaleX(0.82);
}

.invitation-gate.is-complete {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

main {
  position: relative;
  overflow: hidden;
  background: var(--ivory);
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.9), transparent 40%),
    linear-gradient(180deg, #fffaf1 0%, #f3e8d9 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: clamp(16px, 3vw, 32px);
  z-index: -1;
  border: 1px solid rgba(139, 93, 45, 0.25);
}

.hero::after {
  content: "";
  position: absolute;
  inset: clamp(23px, 4vw, 42px);
  z-index: -1;
  border: 1px solid rgba(139, 93, 45, 0.1);
}

.botanical-frame {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  pointer-events: none;
}

.hero-halo {
  position: absolute;
  z-index: -1;
  width: min(70vw, 650px);
  aspect-ratio: 1;
  border: 1px solid rgba(199, 164, 106, 0.3);
  border-radius: 50%;
  box-shadow:
    0 0 0 22px rgba(199, 164, 106, 0.05),
    0 0 0 50px rgba(199, 164, 106, 0.025);
}

.hero-content {
  width: min(88%, 660px);
  padding: 5rem 1rem 3.5rem;
  text-align: center;
}

.basmala {
  margin: 0 0 1.1rem;
  color: #6b4b53;
  font-family: var(--serif-ar);
  font-size: clamp(1.15rem, 3vw, 1.55rem);
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 0 auto 1.4rem;
  color: var(--gold);
  font-size: 0.65rem;
}

.ornament span {
  display: block;
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.ornament span:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.invitation-line {
  margin: 0;
  color: var(--wine-soft);
  font-family: var(--serif-ar);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
}

.invitation-copy {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: clamp(0.78rem, 2vw, 0.94rem);
  line-height: 2;
}

.couple-names {
  display: grid;
  margin: clamp(1.6rem, 4vw, 2.8rem) 0 1.1rem;
  font-family: var(--serif-ar);
  font-size: clamp(2.5rem, 11vw, 6rem);
  font-weight: 400;
  line-height: 1.35;
  text-shadow: 0 12px 28px rgba(76, 15, 32, 0.08);
}

.couple-names b {
  margin: 0.1em 0 0.2em;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 0.32em;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
}

.occasion {
  margin: 0 0 1.8rem;
  color: var(--wine-soft);
  font-family: var(--serif-ar);
  font-size: 1.15rem;
}

.hero-date {
  display: inline-grid;
  grid-template-columns: minmax(74px, 1fr) auto minmax(74px, 1fr);
  align-items: center;
  border-top: 1px solid rgba(128, 92, 57, 0.3);
  border-bottom: 1px solid rgba(128, 92, 57, 0.3);
  color: #6c5057;
  font-size: 0.72rem;
}

.hero-date strong {
  min-width: 70px;
  padding: 0.4rem 1rem 0.6rem;
  border-right: 1px solid rgba(128, 92, 57, 0.3);
  border-left: 1px solid rgba(128, 92, 57, 0.3);
  color: var(--wine);
  font-family: Georgia, serif;
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1;
}

.hero-date span {
  padding: 0.7rem;
}

.scroll-cue {
  margin: clamp(2.4rem, 7vh, 4.2rem) 0 0;
  color: #9a8388;
  font-size: 0.65rem;
}

.scroll-cue span {
  display: block;
  margin-top: 0.45rem;
  color: var(--gold);
  font-size: 1.1rem;
  animation: bob 1.8s ease-in-out infinite;
}

.section-pad {
  padding: clamp(5rem, 11vw, 8.5rem) max(1.25rem, env(safe-area-inset-left));
}

.countdown-section {
  position: relative;
  color: var(--ivory);
  background:
    radial-gradient(circle at 10% 0, rgba(200, 145, 161, 0.15), transparent 34%),
    radial-gradient(circle at 90% 100%, rgba(199, 164, 106, 0.12), transparent 33%),
    var(--wine);
}

.countdown-section::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image:
    linear-gradient(45deg, transparent 49.8%, rgba(255, 255, 255, 0.55) 50%, transparent 50.2%),
    linear-gradient(-45deg, transparent 49.8%, rgba(255, 255, 255, 0.35) 50%, transparent 50.2%);
  background-size: 80px 80px;
}

.section-shell {
  position: relative;
  width: min(100%, 880px);
  margin: auto;
  text-align: center;
}

.section-shell h2,
.details-card h2,
.rsvp-dialog h2 {
  margin: 0 0 2.4rem;
  font-family: var(--serif-ar);
  font-size: clamp(2.1rem, 6vw, 3.8rem);
  font-weight: 400;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.45rem, 2vw, 1.25rem);
}

.time-card {
  position: relative;
  padding: clamp(1rem, 4vw, 1.8rem) 0.35rem;
  border: 1px solid rgba(232, 207, 155, 0.26);
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(10px);
}

.time-card::before,
.time-card::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border: 1px solid var(--gold);
}

.time-card::before {
  top: 5px;
  right: 5px;
  border-width: 1px 1px 0 0;
}

.time-card::after {
  bottom: 5px;
  left: 5px;
  border-width: 0 0 1px 1px;
}

.time-card strong {
  display: block;
  color: var(--gold-bright);
  font-family: Georgia, serif;
  font-size: clamp(1.7rem, 6vw, 3.2rem);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.time-card span {
  display: block;
  margin-top: 0.65rem;
  color: rgba(255, 250, 242, 0.62);
  font-size: clamp(0.58rem, 1.8vw, 0.72rem);
}

.story-panel {
  position: relative;
  background:
    radial-gradient(circle at 10% 30%, rgba(127, 31, 57, 0.08), transparent 30%),
    linear-gradient(180deg, #eee0d2, #f8f0e5);
}

.details-card {
  position: relative;
  width: min(100%, 920px);
  margin: auto;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.1rem, 6vw, 4rem);
  border: 1px solid rgba(122, 79, 44, 0.22);
  background:
    linear-gradient(rgba(255, 250, 242, 0.94), rgba(255, 250, 242, 0.94)),
    repeating-linear-gradient(0deg, transparent, transparent 4px, rgba(70, 30, 20, 0.025) 5px);
  box-shadow: 0 30px 70px rgba(65, 25, 35, 0.12);
  text-align: center;
}

.details-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(199, 164, 106, 0.22);
  pointer-events: none;
}

.card-corner {
  pointer-events: none;
  position: absolute;
  z-index: 1;
  width: 48px;
  height: 48px;
  border-color: var(--gold);
  opacity: 0.6;
}

.corner-one {
  top: 20px;
  right: 20px;
  border-top: 2px solid;
  border-right: 2px solid;
}

.corner-two {
  bottom: 20px;
  left: 20px;
  border-bottom: 2px solid;
  border-left: 2px solid;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto 2.8rem;
}

.detail-item {
  padding: 1.3rem 0.5rem;
  border-left: 1px solid rgba(199, 164, 106, 0.26);
}

.detail-item:last-child {
  border-left: 0;
}

.detail-item.featured {
  color: var(--ivory);
  background: var(--wine);
  transform: translateY(-0.45rem);
  box-shadow: 0 16px 30px rgba(75, 15, 32, 0.16);
}

.detail-number {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
}

.detail-item h3 {
  margin: 0.65rem 0 0.25rem;
  font-family: var(--serif-ar);
  font-size: clamp(1.25rem, 3.5vw, 1.7rem);
  font-weight: 400;
}

.detail-item p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.66rem, 2vw, 0.78rem);
}

.detail-item.featured p {
  color: rgba(255, 250, 242, 0.68);
}

.venue-block {
  margin: 0 0 2rem;
}

.venue-block p {
  margin: 0;
  color: var(--wine);
  font-family: var(--serif-ar);
  font-size: clamp(1.8rem, 5vw, 2.5rem);
}

.venue-block span {
  color: var(--muted);
  font-size: 0.75rem;
}

.action-row {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.7rem 1.35rem;
  border: 1px solid var(--wine);
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.76rem;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

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

.button-solid {
  background: var(--wine);
  color: var(--ivory);
  box-shadow: 0 10px 24px rgba(75, 15, 32, 0.14);
}

.button-solid:hover {
  background: #63162e;
}

.button-outline {
  background: transparent;
  color: var(--wine);
}

.button-outline:hover {
  background: rgba(75, 15, 32, 0.06);
}

.closing-section {
  position: relative;
  display: grid;
  min-height: 74svh;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 250, 242, 0.08), transparent 22rem),
    var(--wine-deep);
  color: var(--ivory);
  text-align: center;
}

.closing-section::before {
  content: "";
  position: absolute;
  width: min(70vw, 500px);
  aspect-ratio: 1;
  border: 1px solid rgba(232, 207, 155, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(232, 207, 155, 0.025), 0 0 0 62px rgba(232, 207, 155, 0.018);
}

.closing-copy {
  position: relative;
}

.large-quote {
  margin: 0;
  font-family: var(--serif-ar);
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 1.2;
}

.gold-rule {
  width: 58px;
  height: 1px;
  margin: 2rem auto;
  background: var(--gold);
}

.closing-copy > p:last-of-type {
  color: rgba(255, 250, 242, 0.65);
  font-size: 0.78rem;
}

.closing-monogram {
  display: inline-grid;
  width: 72px;
  aspect-ratio: 1;
  margin-top: 1.6rem;
  place-items: center;
  border: 1px solid rgba(232, 207, 155, 0.5);
  border-radius: 50%;
  color: var(--gold-bright);
  font-family: var(--serif-ar);
  font-size: 1.4rem;
}

.closing-monogram i {
  font-family: Georgia, serif;
  font-size: 0.65em;
}

footer {
  padding: 1.25rem;
  background: #1b0309;
  color: rgba(255, 250, 242, 0.42);
  text-align: center;
}

footer p {
  margin: 0;
  font-size: 0.63rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

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

.rsvp-dialog {
  width: min(calc(100% - 2rem), 520px);
  max-height: min(760px, calc(100svh - 2rem));
  padding: clamp(2rem, 7vw, 3.5rem);
  border: 1px solid rgba(199, 164, 106, 0.55);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(25, 2, 8, 0.42);
}

.rsvp-dialog[open] {
  animation: dialogIn 0.4s ease both;
}

.rsvp-dialog::backdrop {
  background: rgba(28, 3, 11, 0.75);
  backdrop-filter: blur(7px);
}

.dialog-close {
  position: absolute;
  top: 0.7rem;
  left: 0.8rem;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--wine);
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 1.75rem;
}

.rsvp-dialog h2 {
  margin-bottom: 0.3rem;
}

.dialog-intro {
  margin: 0 0 1.8rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.8;
}

.rsvp-dialog form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.rsvp-dialog label,
.rsvp-dialog legend {
  font-size: 0.72rem;
}

.rsvp-dialog input[type="text"] {
  width: 100%;
  min-height: 50px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(91, 48, 61, 0.25);
  border-radius: 0;
  background: #fffdf8;
  color: var(--ink);
  font-size: 0.82rem;
}

.rsvp-dialog input[type="text"]:focus {
  border-color: var(--gold);
}

.rsvp-dialog fieldset {
  margin: 0.55rem 0;
  padding: 0;
  border: 0;
}

.rsvp-dialog legend {
  margin-bottom: 0.7rem;
}

.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.choice {
  position: relative;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
}

.choice span {
  display: grid;
  min-height: 47px;
  place-items: center;
  border: 1px solid rgba(91, 48, 61, 0.24);
  background: transparent;
  transition: 0.2s ease;
}

.choice input:checked + span {
  border-color: var(--wine);
  background: var(--wine);
  color: var(--ivory);
}

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

.submit-rsvp {
  width: 100%;
  margin-top: 0.5rem;
}

.rsvp-success {
  padding: 1.8rem 0 0.5rem;
  text-align: center;
}

.success-mark {
  display: grid;
  width: 64px;
  aspect-ratio: 1;
  margin: 0 auto 1.4rem;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--wine);
  font-family: Georgia, serif;
  font-size: 1.6rem;
}

.rsvp-success p {
  margin: 0 0 1.6rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.8;
}

@keyframes gateFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.35; transform: scaleY(0.7); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@keyframes dialogIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 600px) {
  .invitation-gate {
    grid-template-rows: minmax(130px, 0.8fr) minmax(250px, 1.05fr) minmax(110px, 0.5fr);
  }

  .envelope-scene {
    width: min(86vw, 350px);
  }

  .hero-content {
    padding-top: 4.5rem;
  }

  .botanical-frame {
    width: 135%;
    max-width: none;
    right: -18%;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .detail-item,
  .detail-item:last-child {
    border: 0;
  }

  .detail-item.featured {
    transform: none;
  }

  .action-row {
    flex-direction: column;
  }

  .action-row .button {
    width: 100%;
  }
}

@media (max-height: 680px) and (orientation: portrait) {
  .invitation-gate {
    grid-template-rows: minmax(98px, 0.7fr) minmax(230px, 1.1fr) minmax(70px, 0.35fr);
  }

  .gate-heading h1 {
    font-size: 2.2rem;
  }

  .envelope-scene {
    width: min(74vw, 315px);
  }
}

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

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