:root {
  --page-background: #120305;
  --card-background: #6f0712;
  --red-deep: #3e0208;
  --red-rich: #8d0b19;
  --ivory: #fff8ed;
  --champagne: #e8c68e;
  --gold: #c99a50;
  --ink: #3b0a0d;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --content-width: min(356px, 88vw, 42vh);
  --content-width: min(356px, 88vw, 42svh);
  --names-background: var(--champagne);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-background);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  color: var(--ivory);
  background:
    radial-gradient(circle at 50% 0%, rgba(154, 18, 30, 0.24), transparent 36rem),
    linear-gradient(145deg, #080203 0%, var(--page-background) 52%, #260509 100%);
}

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

.page-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 18px 12px;
}

.invitation {
  width: min(100%, 412px);
  min-height: min(821px, calc(100vh - 36px));
  min-height: min(821px, calc(100svh - 36px));
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(68, 3, 10, 0.1), rgba(30, 1, 5, 0.45)),
    var(--card-bg-image, url("assets/bg-img.jpg")) center / cover no-repeat,
    var(--card-background);
  box-shadow: var(--shadow);
}

.invitation::before,
.invitation::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.invitation::before {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 231, 185, 0.2), transparent 7.5rem),
    linear-gradient(180deg, rgba(33, 0, 5, 0.1), rgba(45, 0, 6, 0.52));
  mix-blend-mode: screen;
  opacity: 0.62;
}

.invitation::after {
  inset: 12px;
  box-shadow: inset 0 0 42px rgba(40, 0, 6, 0.42);
}

.invitation__glow {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  top: -26%;
  left: 11%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 204, 140, 0.22), transparent 64%);
  filter: blur(10px);
  pointer-events: none;
}

.invitation__content {
  width: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(30px, 8vw, 52px) 28px 34px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 28px;
  color: var(--ivory);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.36);
}

.couple-card {
  width: var(--content-width);
  padding: 3px;
  background: var(--names-background);
  border-radius: 999px 999px 18px 18px;
  box-shadow:
    0 20px 38px rgba(42, 0, 5, 0.36),
    0 0 22px rgba(201, 154, 80, 0.14);
}

.photo-frame {
  width: 100%;
  aspect-ratio: 0.78;
  overflow: hidden;
  border-radius: 999px 999px 10px 10px;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 52% 44%;
  border-radius: 999px 999px 10px 10px;
  filter: saturate(0.95) contrast(1.04);
}

.couple-name {
  width: 100%;
  margin: 0;
  padding: 14px 12px 12px;
  color: var(--red-deep);
  background: var(--names-background);
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.45rem, 10.5vw, 3.45rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55),
    0 10px 22px rgba(80, 6, 14, 0.12);
}

.message {
  width: var(--content-width);
  margin-top: 20px;
  color: rgba(255, 248, 237, 0.94);
  font-size: 1.02rem;
  line-height: 1.65;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}

.message p {
  margin: 0;
}

.actions {
  width: var(--content-width);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 20px 0 0;
}

.btn {
  min-height: 36px;
  border: 1px solid transparent;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

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

.btn:focus-visible {
  outline: 3px solid rgba(255, 248, 237, 0.7);
  outline-offset: 3px;
}

.btn--primary {
  background: linear-gradient(180deg, #fff6dc 0%, var(--champagne) 100%);
  box-shadow: 0 12px 26px rgba(31, 0, 5, 0.28);
}

.btn--secondary {
  color: var(--ivory);
  background: rgba(70, 2, 10, 0.38);
  border-color: rgba(232, 198, 142, 0.56);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.event-details {
  width: var(--content-width);
  margin-top: 20px;
  color: var(--ivory);
}

.event-card {
  padding: 14px 16px 15px;
  background: rgba(42, 0, 6, 0.2);
  border-top: 1px solid rgba(232, 198, 142, 0.55);
  border-bottom: 1px solid rgba(232, 198, 142, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 237, 0.08),
    0 16px 30px rgba(35, 0, 5, 0.18);
}

.event-date,
.event-time {
  margin: 0;
  color: var(--ivory);
  letter-spacing: 0;
  line-height: 1.35;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.32);
}

.event-date {
  font-size: clamp(1.22rem, 5.5vw, 1.5rem);
  font-weight: 700;
}

.event-time {
  margin-top: 3px;
  font-size: 0.78rem;
  font-weight: 400;
}

.event-divider {
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0 7px;
}

.event-divider::before,
.event-divider::after {
  content: "";
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 198, 142, 0.78));
}

.event-divider::after {
  background: linear-gradient(90deg, rgba(232, 198, 142, 0.78), transparent);
}

.event-divider span {
  width: 6px;
  height: 6px;
  margin: 0 9px;
  border: 1px solid rgba(232, 198, 142, 0.88);
  background: rgba(255, 248, 237, 0.16);
  transform: rotate(45deg);
}

.venue {
  margin-top: -8px;
  line-height: 1.35;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.32);
}

.venue p {
  margin: 0;
}

.venue p:first-child {
  font-size: clamp(1.16rem, 5vw, 1.42rem);
  font-weight: 700;
}

.venue p:last-child {
  margin-top: 3px;
  font-size: 0.84rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 700ms ease,
    transform 700ms cubic-bezier(0.2, 0.72, 0.16, 1);
  transition-delay: var(--delay, 0ms);
}

@media (max-width: 360px) {
  .page-shell {
    padding: 10px;
  }

  .invitation::after {
    inset: 9px;
  }

  .invitation__content {
    padding-inline: 20px;
  }

  .actions {
    gap: 6px;
  }

  .btn {
    padding-inline: 7px;
    font-size: 0.68rem;
  }
}

@media (max-height: 720px) {
  .invitation__content {
    padding-block: 24px 28px;
  }

  .eyebrow {
    margin-bottom: 18px;
  }

  .actions {
    margin-block: 16px 0;
  }
}

@media (min-width: 720px) {
  .page-shell {
    padding: 34px 18px;
  }

  .invitation {
    min-height: 821px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
