:root {
  --gold: #d99d26;
  --gold-light: #ffe6a3;
  --gold-deep: #8d5e09;
  --paper: #fff7e7;
  --black: #020202;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--black);
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 33%, rgba(180, 105, 8, 0.22), transparent 25rem),
    radial-gradient(circle at 50% 68%, rgba(212, 155, 43, 0.1), transparent 21rem),
    linear-gradient(180deg, #050505 0%, #000 46%, #030302 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 5px 5px, 7px 7px;
  opacity: 0.12;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 80% 45%, rgba(255, 183, 53, 0.3), transparent 0.22rem),
    radial-gradient(circle at 22% 59%, rgba(255, 190, 60, 0.24), transparent 0.2rem),
    radial-gradient(ellipse at bottom, rgba(176, 111, 14, 0.18), transparent 26rem);
}

.invitation {
  width: min(100%, 66rem);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(2.1rem, 6vw, 5.3rem) clamp(1.15rem, 4vw, 3rem) 2.2rem;
  overflow: hidden;
  text-align: center;
}

.hero {
  display: grid;
  justify-items: center;
}

.kicker,
.city,
.details h2,
.visit-button,
.email-link {
  color: var(--gold-light);
  font-weight: 400;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  text-shadow: 0 0 0.65rem rgba(218, 154, 32, 0.55);
}

.kicker {
  margin: 0;
  font-size: clamp(0.9rem, 1.8vw, 1.3rem);
}

.rule {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  width: min(17rem, 56vw);
  margin: 1.45rem 0 1.35rem;
  color: var(--gold);
}

.rule::before,
.rule::after,
.small-rule {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  content: "";
}

.rule::before,
.rule::after {
  flex: 1;
}

.rule span {
  width: 0.72rem;
  height: 0.72rem;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 1rem rgba(255, 186, 57, 0.9);
}

h1 {
  margin: 0;
  max-width: 100%;
  color: transparent;
  font-size: clamp(3.65rem, 11.8vw, 7.8rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background:
    linear-gradient(105deg, #fff1b8 0%, #b87d16 17%, #fff2be 28%, #623a05 46%, #f5cc74 56%, #fff6ce 67%, #5c3505 78%, #f4c664 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 0.5rem rgba(205, 137, 26, 0.45));
}

.city {
  margin: 1.05rem 0 0;
  font-size: clamp(0.94rem, 2.4vw, 1.62rem);
}

.star {
  margin: 0.85rem 0 0;
  color: var(--gold-light);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1;
}

.tagline {
  margin: 0.4rem 0 0;
  color: #fff8ed;
  font-size: clamp(1.16rem, 3.1vw, 1.9rem);
  font-style: italic;
  line-height: 1.35;
  text-shadow: 0 0 0.8rem rgba(255, 255, 255, 0.28);
}

.card-stage {
  width: min(57.8vw, 29.62rem);
  margin: clamp(2.1rem, 5vw, 3rem) auto clamp(1.4rem, 3vw, 2.2rem);
  perspective: 1200px;
}

.card-link {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.72 / 1;
  cursor: grab;
  touch-action: pan-y;
  text-decoration: none;
}

.card-link:active {
  cursor: grabbing;
}

.orbit {
  position: absolute;
  inset: 12% -22%;
  z-index: 0;
  pointer-events: none;
  border: 2px solid rgba(238, 157, 25, 0.82);
  border-color: transparent rgba(238, 157, 25, 0.78) rgba(238, 157, 25, 0.9) transparent;
  border-radius: 50%;
  filter: blur(0.2px) drop-shadow(0 0 0.75rem rgba(232, 159, 36, 0.8));
  transform: rotate(-13deg);
}

.orbit::before {
  position: absolute;
  left: 8%;
  bottom: 13%;
  width: 0;
  height: 0;
  content: "";
  border-top: 0.42rem solid transparent;
  border-bottom: 0.42rem solid transparent;
  border-left: 1.15rem solid #fff0b0;
  filter: drop-shadow(0 0 0.45rem #e59d22);
  transform: rotate(-16deg);
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x, -7deg)) rotateY(var(--rotation, -11deg));
  transition: filter 180ms ease;
}

.card.is-dragging {
  filter: brightness(1.09);
}

.card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  border: 1px solid rgba(255, 234, 156, 0.82);
  border-radius: clamp(0.7rem, 2vw, 1.2rem);
  background-color: #c89121;
  background-position: center;
  background-size: cover;
  box-shadow:
    inset 0 0 0 0.16rem rgba(125, 75, 4, 0.32),
    inset 0 0 2rem rgba(255, 255, 225, 0.24),
    0 1.4rem 2.2rem rgba(0, 0, 0, 0.64),
    0 0 1.1rem rgba(244, 173, 48, 0.7);
}

.card-face::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(112deg, rgba(255, 255, 220, 0.45), transparent 17%, rgba(70, 36, 2, 0.25) 42%, transparent 68%, rgba(255, 242, 160, 0.52)),
    radial-gradient(circle at 92% 2%, rgba(255, 255, 235, 0.94), transparent 3.8rem);
  mix-blend-mode: screen;
  opacity: 0.48;
}

.card-front {
  background-image: url("assets/card-front.png");
}

.card-back {
  background-image: url("assets/card-back.png");
  transform: rotateY(180deg);
}

.card-stage::after {
  display: block;
  width: 78%;
  height: 1.15rem;
  margin: -0.25rem auto 0;
  content: "";
  background: radial-gradient(ellipse, rgba(235, 169, 39, 0.25), transparent 70%);
  filter: blur(0.2rem);
}

.details {
  display: grid;
  justify-items: center;
  padding-bottom: 2rem;
}

.details h2 {
  margin: 0.45rem 0 0;
  font-size: clamp(0.92rem, 2.5vw, 1.4rem);
}

.small-rule {
  width: 5rem;
  margin: 1rem 0 1.55rem;
}

.details p {
  margin: 0;
  max-width: 43rem;
  color: #fff8ec;
  font-size: clamp(1.03rem, 2.45vw, 1.55rem);
  line-height: 1.35;
  text-shadow: 0 0 0.65rem rgba(255, 255, 255, 0.2);
}

.gold-dash {
  width: 3.2rem;
  height: 1px;
  margin: 1.45rem 0;
  background: var(--gold);
  box-shadow: 0 0 0.8rem rgba(229, 158, 33, 0.8);
}

.visit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.3rem, 5vw, 2.6rem);
  width: min(34rem, 100%);
  min-height: 4.15rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--gold);
  border-radius: 0.28rem;
  color: var(--gold-light);
  font-size: clamp(0.94rem, 2.6vw, 1.28rem);
  line-height: 1.15;
  text-decoration: none;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.visit-button:hover,
.visit-button:focus-visible {
  background: rgba(196, 127, 18, 0.12);
  box-shadow: 0 0 1.2rem rgba(225, 154, 31, 0.38);
  transform: translateY(-1px);
}

.email-link {
  margin-top: 1.2rem;
  border-bottom: 1px solid var(--gold);
  color: var(--gold-light);
  font-size: clamp(0.9rem, 2.45vw, 1.22rem);
  letter-spacing: 0.28em;
  line-height: 1.8;
  text-decoration: none;
  text-transform: lowercase;
}

@media (max-width: 560px) {
  .invitation {
    padding-top: 2.4rem;
  }

  h1 {
    font-size: clamp(2.85rem, 14.8vw, 4.25rem);
    letter-spacing: 0.08em;
  }

  .kicker,
  .city,
  .details h2,
  .visit-button,
  .email-link {
    letter-spacing: 0.28em;
  }

  .tagline {
    max-width: none;
    font-size: 0.98rem;
    white-space: nowrap;
  }

  .card-stage {
    width: min(66.3vw, 17.34rem);
  }

  .orbit {
    inset: 14% 0;
  }

  .details p {
    max-width: 23rem;
  }

  .visit-button {
    min-height: 3.75rem;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    font-size: clamp(0.68rem, 3vw, 0.86rem);
    letter-spacing: 0.2em;
    white-space: nowrap;
  }

  .visit-button span:first-child {
    min-width: 0;
  }
}

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

  .visit-button {
    transition: none;
  }
}
