:root {
  color-scheme: light dark;
  --bg: #fff6df;
  --ink: #241629;
  --muted: #654e68;
  --accent: #772583;
  --accent-ink: #ffffff;
  --panel: rgba(255, 255, 255, 0.66);
  --ring: rgba(119, 37, 131, 0.18);
  --cancelled-rgb: 176, 23, 46;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(135deg, rgba(255, 230, 173, 0.92), rgba(252, 187, 169, 0.88)),
    var(--bg);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image: url("public/bg-pattern.webp");
  background-size: 420px auto;
  opacity: 0.09;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.page {
  display: grid;
  min-height: 100dvh;
  padding: clamp(24px, 6vw, 72px);
  place-items: center;
}

.invite {
  position: relative;
  width: min(100%, 620px);
  padding: clamp(24px, 6vw, 56px);
  overflow: hidden;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--ring);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(75, 31, 36, 0.14);
  backdrop-filter: blur(4px);
}

.invite--cancelled {
  padding-top: clamp(36px, 8vw, 66px);
}

.stamp {
  position: absolute;
  top: clamp(68px, 11vw, 98px);
  left: 50%;
  z-index: 10;
  display: inline-flex;
  max-width: 92%;
  padding: 0.1em 0.24em 0.08em;
  color: rgb(var(--cancelled-rgb));
  font-size: clamp(1.86rem, 8.5vw, 4.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(255, 246, 223, 0.5);
  border: 0.12em solid currentColor;
  border-radius: 8px;
  transform: translateX(-50%) rotate(-9deg);
  box-shadow:
    0 0 0 0.045em rgba(var(--cancelled-rgb), 0.2) inset,
    0 16px 24px rgba(75, 31, 36, 0.08);
  pointer-events: none;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 28px;
  padding: 8px 14px;
  color: var(--accent-ink);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  background: var(--accent);
  border-radius: 999px;
}

.logo {
  display: block;
  width: min(100%, 486px);
  height: auto;
  margin: 0 auto;
}

.date {
  margin: 24px 0 0;
  color: var(--accent);
  font-size: clamp(1.12rem, 3vw, 1.35rem);
  font-weight: 800;
}

.copy {
  width: min(100%, 430px);
  margin: 30px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.08rem);
}

.copy p {
  margin: 0;
  text-wrap: pretty;
}

.copy p + p {
  margin-top: 18px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip: rect(0, 0, 0, 0);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11101c;
    --ink: #fffaf2;
    --muted: #e5d7e8;
    --accent: #61d6d8;
    --accent-ink: #101225;
    --panel: rgba(19, 18, 32, 0.72);
    --ring: rgba(97, 214, 216, 0.2);
  }

  body::before {
    background:
      linear-gradient(135deg, rgba(21, 17, 35, 0.94), rgba(42, 24, 54, 0.9)),
      var(--bg);
  }

  body::after {
    opacity: 0.16;
    mix-blend-mode: screen;
  }

  .logo {
    filter: invert(1);
  }

  .stamp {
    color: rgb(255, 95, 118);
    background: rgba(17, 16, 28, 0.52);
    box-shadow:
      0 0 0 0.045em rgba(255, 95, 118, 0.2) inset,
      0 16px 24px rgba(0, 0, 0, 0.14);
  }
}

@media (max-width: 480px) {
  .page {
    align-items: start;
  }

  .invite {
    padding-top: 32px;
  }

  .invite--cancelled {
    padding-top: 42px;
  }

  .stamp {
    top: 68px;
    max-width: 94%;
    font-size: clamp(1.64rem, 8.4vw, 2.5rem);
    letter-spacing: 0.02em;
  }
}
