:root {
  --cream: #f7ebd4;
  --ivory: #fff8e8;
  --maroon: #8c1220;
  --deep-red: #5f0711;
  --gold: #b77a22;
  --ink: #2e1711;
  --shadow: 0 20px 60px rgba(48, 18, 8, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "Libre Baskerville", Georgia, serif;
}

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

.invitation-page {
  min-height: 100vh;
  background: #6f0712;
}

.invitation-frame {
  position: relative;
  width: min(100vw, 1024px);
  margin: 0 auto;
  background: #7b0815;
  box-shadow: 0 0 42px rgba(36, 2, 6, 0.28);
}

.invitation-image {
  display: block;
  width: 100%;
  height: auto;
}

.diya-flame {
  position: absolute;
  left: 50.3%;
  top: 39.05%;
  z-index: 1;
  width: 3.1%;
  aspect-ratio: 0.55;
  pointer-events: none;
  transform: translate(-50%, -72%);
  transform-origin: 50% 100%;
  animation: flame-sway 1.9s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}

.diya-flame-core,
.diya-flame-glow {
  position: absolute;
  inset: 0;
  display: block;
}

.diya-flame-core {
  left: 21%;
  top: 7%;
  width: 58%;
  height: 84%;
  border-radius: 52% 48% 50% 50% / 78% 78% 22% 22%;
  background:
    radial-gradient(ellipse at 51% 68%, rgba(255, 255, 229, 0.92) 0 11%, transparent 30%),
    radial-gradient(ellipse at 51% 48%, rgba(255, 219, 91, 0.7) 0 28%, transparent 58%),
    linear-gradient(180deg, rgba(255, 244, 169, 0.84), rgba(255, 141, 28, 0.54) 52%, rgba(171, 48, 2, 0));
  filter: blur(0.65px);
  opacity: 0.7;
  transform-origin: 50% 100%;
  animation: flame-flicker 1.08s ease-in-out infinite;
}

.diya-flame-glow {
  left: -185%;
  top: -58%;
  width: 470%;
  height: 360%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 49%, rgba(255, 246, 178, 0.48) 0 7%, rgba(255, 186, 72, 0.25) 19%, rgba(255, 136, 35, 0.11) 34%, transparent 58%);
  filter: blur(9px);
  opacity: 0.66;
  animation: glow-pulse 1.55s ease-in-out infinite alternate;
}

.diya-flame::before,
.diya-flame::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.diya-flame::before {
  left: -70%;
  top: -34%;
  width: 240%;
  height: 170%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 58%, rgba(255, 226, 139, 0.2), transparent 62%);
  filter: blur(5px);
  animation: lamp-bloom 2.15s ease-in-out infinite alternate;
}

.diya-flame::after {
  left: 37%;
  top: -20%;
  width: 24%;
  height: 82%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 250, 211, 0.44), rgba(255, 199, 93, 0.18), transparent);
  filter: blur(1.2px);
  transform-origin: 50% 100%;
  animation: heat-waver 1.35s ease-in-out infinite alternate;
}

.invitation-rsvp-link {
  position: absolute;
  z-index: 2;
  left: 27%;
  top: 91.25%;
  width: 46%;
  height: 4.8%;
  border-radius: 9px;
}

.invitation-rsvp-link:focus-visible {
  outline: 4px solid #ffe0a3;
  outline-offset: 4px;
}

@keyframes flame-flicker {
  0% {
    opacity: 0.46;
    transform: scaleX(0.82) scaleY(0.9) rotate(-1.4deg);
  }

  28% {
    opacity: 0.78;
    transform: scaleX(1.04) scaleY(1.08) rotate(1.5deg);
  }

  62% {
    opacity: 0.56;
    transform: scaleX(0.92) scaleY(1.13) rotate(-2.1deg);
  }

  100% {
    opacity: 0.7;
    transform: scaleX(1) scaleY(0.96) rotate(1.8deg);
  }
}

@keyframes flame-sway {
  from {
    transform: translate(-50%, -72%) rotate(-1.1deg);
  }

  to {
    transform: translate(-50%, -72%) rotate(1.4deg);
  }
}

@keyframes glow-pulse {
  from {
    opacity: 0.36;
    transform: scale(0.94);
  }

  to {
    opacity: 0.72;
    transform: scale(1.08);
  }
}

@keyframes lamp-bloom {
  from {
    opacity: 0.22;
    transform: scale(0.92);
  }

  to {
    opacity: 0.5;
    transform: scale(1.12);
  }
}

@keyframes heat-waver {
  from {
    opacity: 0.18;
    transform: translateX(-10%) scaleY(0.88) skewX(-8deg);
  }

  to {
    opacity: 0.42;
    transform: translateX(11%) scaleY(1.08) skewX(7deg);
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 16px clamp(18px, 4vw, 56px);
  color: var(--ivory);
  background: rgba(95, 7, 17, 0.94);
  box-shadow: 0 8px 26px rgba(50, 9, 10, 0.18);
}

.brand {
  font-family: "Italiana", Georgia, serif;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1;
}

nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9rem;
}

.nav-button {
  border: 1px solid rgba(255, 248, 232, 0.62);
  border-radius: 999px;
  padding: 10px 16px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(28px, 6vw, 72px);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(65, 18, 11, 0.52), rgba(255, 246, 226, 0.15)),
    linear-gradient(0deg, rgba(95, 7, 17, 0.1), rgba(255, 255, 255, 0.08));
}

.hero-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin-right: auto;
  color: var(--ivory);
  text-shadow: 0 2px 18px rgba(41, 7, 5, 0.4);
}

.eyebrow {
  margin: 0 0 12px;
  color: #f6c879;
  font-style: italic;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-family: "Italiana", Georgia, serif;
  font-size: clamp(3.6rem, 10vw, 7rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0;
}

.subtitle {
  margin: 22px 0 0;
  color: #ffe5b4;
  font-size: clamp(1.35rem, 3vw, 2.35rem);
  font-style: italic;
  font-weight: 700;
}

.intro {
  max-width: 690px;
  margin: 22px 0 34px;
  color: #fff4dd;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.85;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border: 2px solid #e4a548;
  border-radius: 8px;
  padding: 14px 28px;
  color: var(--ivory);
  background: linear-gradient(180deg, #a4121e, #650811);
  box-shadow: 0 12px 24px rgba(62, 8, 8, 0.28);
  font-weight: 700;
}

.details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(183, 122, 34, 0.4);
}

.detail {
  min-height: 150px;
  padding: 30px clamp(20px, 3vw, 42px);
  background: var(--ivory);
}

.detail span {
  display: block;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.detail strong {
  display: block;
  color: var(--maroon);
  font-size: clamp(1rem, 1.7vw, 1.28rem);
  line-height: 1.55;
}

.rsvp-strip {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: clamp(48px, 8vw, 92px) 24px;
  color: var(--ivory);
  text-align: center;
  background:
    linear-gradient(rgba(95, 7, 17, 0.94), rgba(95, 7, 17, 0.94)),
    url("/assets/wedding.jpg") center bottom / cover;
}

.rsvp-strip p {
  margin: 0;
  font-size: clamp(1.1rem, 3vw, 2rem);
  font-style: italic;
  font-weight: 700;
}

.rsvp-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 248, 232, 0.9), rgba(255, 248, 232, 0.9)),
    url("/assets/wedding.jpg") center / cover fixed;
}

.rsvp-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 560px);
  gap: clamp(28px, 6vw, 72px);
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(48px, 9vw, 96px) 0;
}

.rsvp-intro {
  align-self: start;
  padding-top: 10px;
}

.rsvp-intro h1 {
  color: var(--maroon);
}

.rsvp-intro p:last-child {
  max-width: 560px;
  font-size: 1.05rem;
  line-height: 1.8;
}

.rsvp-form {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(183, 122, 34, 0.5);
  border-radius: 8px;
  background: rgba(255, 248, 232, 0.96);
  box-shadow: var(--shadow);
}

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

.field {
  display: grid;
  gap: 8px;
}

label {
  color: var(--deep-red);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(95, 7, 17, 0.24);
  border-radius: 6px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fffdf6;
  font: inherit;
}

textarea {
  resize: vertical;
}

.form-action {
  width: 100%;
  margin-top: 8px;
  cursor: pointer;
  font: inherit;
}

.form-action:disabled {
  cursor: wait;
  opacity: 0.7;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--maroon);
  line-height: 1.5;
}

@media (max-width: 860px) {
  .details,
  .rsvp-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: end;
    min-height: 720px;
  }
}

@media (max-width: 620px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    min-height: 620px;
    padding: 28px 18px;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 4.8rem);
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }
}
