:root {
  --bg-deep: #0d1b3d;
  --bg-dusk: #14295c;
  --panel: #10203f;
  --panel-light: #182d5c;
  --purple: #2f6fd0;
  --purple-dim: #1c3560;
  --cyan: #5ec8f0;
  --cyan-bright: #9be3ff;
  --gold: #f4c430;
  --red: #e0333f;
  --cream: #f2efe6;
  --shadow-hard: 6px 6px 0 rgba(0, 0, 0, .55);
  --shadow-hard-sm: 4px 4px 0 rgba(0, 0, 0, .55);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "VT323", monospace;
  font-size: 1.3rem;
  background: linear-gradient(180deg,
      var(--bg-deep) 0%,
      #0e1a3a 55%,
      var(--bg-dusk) 100%);
  background-attachment: fixed;
  color: var(--cream);
  overflow-x: hidden;
  position: relative;
}

/* starfield */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 15%, rgba(255, 255, 255, .8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 22% 70%, rgba(255, 255, 255, .6) 50%, transparent 51%),
    radial-gradient(2px 2px at 40% 30%, rgba(159, 242, 255, .8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 62% 82%, rgba(255, 255, 255, .5) 50%, transparent 51%),
    radial-gradient(2px 2px at 78% 20%, rgba(255, 255, 255, .7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 60%, rgba(159, 242, 255, .6) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 15% 92%, rgba(255, 255, 255, .5) 50%, transparent 51%),
    radial-gradient(2px 2px at 55% 55%, rgba(255, 255, 255, .4) 50%, transparent 51%);
  background-repeat: repeat;
  background-size: 340px 340px;
  animation: twinkle 5s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from {
    opacity: .5;
  }

  to {
    opacity: 1;
  }
}

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

button {
  font-family: inherit;
}

#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

/* -------- pixel panel system (signature element) -------- */
.pixel-panel {
  position: relative;
  background: var(--panel);
  border: 3px solid var(--cyan);
  border-radius: 0;
  box-shadow:
    0 0 0 3px var(--bg-deep),
    0 0 0 6px var(--purple),
    var(--shadow-hard);
  image-rendering: pixelated;
}

/* -------- typography -------- */
/* Press Start 2P: reserved for big, short headlines only —
   it's crisp at large sizes but turns to mush below ~14px. */
h1,
.time-value {
  font-family: "Press Start 2P", monospace;
  text-transform: uppercase;
}

/* VT323: everything smaller or longer (names, buttons, pills, tags,
   section titles) — legible much smaller while still reading retro. */
.section-title,
.section-title-tag,
.pixel-pill,
.rsvp-option,
.rsvp-title,
.btn,
.hero-names,
.footer-panel {
  font-family: "VT323", monospace;
  text-transform: uppercase;
  letter-spacing: .06em;
}

h1 {
  font-size: 2.6rem;
  line-height: 1.3;
  color: var(--cyan-bright);
  text-align: center;
  text-shadow:
    3px 0 0 var(--purple),
    0 3px 0 var(--purple),
    3px 3px 0 var(--purple),
    5px 5px 0 rgba(0, 0, 0, .4);
  letter-spacing: .05em;
}

.year {
  margin-top: 14px;
  text-align: center;

  font-family: "VT323", monospace;
  text-transform: uppercase;
  font-size: 1.3rem;
  letter-spacing: .12em;
  color: var(--gold);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .4);
}

.invite {
  font-family: "VT323", monospace;
  font-size: 1.25rem;
  letter-spacing: .12em;
  text-align: center;
  color: var(--gold);

  margin-bottom: 6px;
}

.hero-names {
  margin-top: 16px;
  text-align: center;

  font-size: 1.3rem;
  line-height: 2.1;
  color: var(--cream);
  letter-spacing: .04em;
}

.tagline {
  margin-top: 22px;

  font-size: 1.3rem;
  line-height: 1.6;
  text-align: center;
  color: var(--cream);
  opacity: .9;
}

/* -------- layout -------- */
section {
  padding: 70px 22px;
  position: relative;
}

.container {
  max-width: 900px;
  margin: auto;
}

.hero {
  min-height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 50px 20px;

  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";

  position: absolute;

  width: 900px;
  height: 900px;

  border-radius: 50%;

  background: radial-gradient(circle,
      rgba(94, 200, 240, .16),
      transparent 70%);

  bottom: -500px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-card {
  position: relative;
  z-index: 2;

  padding: 36px 30px 42px;

  width: min(92vw, 700px);

  text-align: center;
}

.hero-subinfo {
  margin-top: 8px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.hero-date {
  font-family: "VT323", monospace;
  font-size: 1.2rem;
  letter-spacing: .04em;
  color: var(--cream);
}

.hero-course {
  font-family: "VT323", monospace;
  font-size: 1rem;
  letter-spacing: .04em;
  color: var(--cyan-bright);
  opacity: .85;
}

.hud-row {
  display: flex;
  justify-content: space-between;
  align-items: center;

  font-size: 1.1rem;

  margin-bottom: 18px;
}

.hud-coin {
  animation: coinSpin 2.4s ease-in-out infinite;
  display: inline-block;
}

@keyframes coinSpin {

  0%,
  100% {
    transform: scaleX(1);
  }

  50% {
    transform: scaleX(.4);
  }
}

.pixel-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  margin: 20px auto 18px;
  max-width: 340px;
}

.pixel-divider span:not(.pixel-divider-icon) {
  flex: 1;
  height: 3px;
  background: var(--purple);
}

.pixel-divider-icon {
  font-size: 1.3rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;

  margin-top: 22px;
}

.pixel-pill {
  padding: 12px 18px;

  background: var(--panel-light);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 0 2px var(--bg-deep);

  font-family: "VT323", monospace;
  text-transform: uppercase;
  font-size: 1.3rem;
  letter-spacing: .04em;
  color: var(--cream);
}

.pixel-pill--tag {
  color: var(--cyan-bright);
  border-color: var(--purple);
}

.scroll-indicator {
  margin-top: 36px;

  border: none;
  background: none;

  font-family: "VT323", monospace;
  font-size: 1.1rem;
  letter-spacing: .1em;
  color: var(--cyan-bright);

  opacity: .8;

  cursor: pointer;

  animation: bounce 2s infinite;

  transition: opacity .2s ease;
}

.scroll-indicator:hover {
  opacity: 1;
}

/* -------- skyline strip -------- */
.skyline {
  height: 70px;

  background-color: var(--bg-dusk);
  background-image:
    linear-gradient(90deg,
      var(--bg-dusk) 0 6%, transparent 6% 8%,
      var(--bg-dusk) 8% 18%, transparent 18% 20%,
      var(--bg-dusk) 20% 34%, transparent 34% 37%,
      var(--bg-dusk) 37% 50%, transparent 50% 52%,
      var(--bg-dusk) 52% 66%, transparent 66% 69%,
      var(--bg-dusk) 69% 82%, transparent 82% 84%,
      var(--bg-dusk) 84% 94%, transparent 94% 96%,
      var(--bg-dusk) 96% 100%);
  background-size: 100% 40px, 100% 60px, 100% 30px, 100% 50px, 100% 45px, 100% 35px, 100% 55px, 100% 40px;
  background-repeat: no-repeat;
  background-position: bottom;

  border-top: 3px solid var(--purple-dim);
  box-shadow: 0 -2px 30px rgba(94, 200, 240, .15);
}

/* -------- section titles -------- */
.section-title {
  font-size: 1.7rem;
  text-align: center;

  color: var(--cyan-bright);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .4);

  margin-bottom: 34px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.section-title-tag {
  font-size: .95rem;
  padding: 5px 8px;
  background: var(--purple);
  color: var(--cream);
  box-shadow: 0 0 0 2px var(--bg-deep);
}

/* -------- countdown -------- */
.countdown {
  gap: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);

  margin-top: 20px;
}

.time-box {
  padding: 20px 8px;
  text-align: center;
}

.time-value {
  font-size: 1.6rem;
  color: var(--cyan-bright);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .5);
}

.time-label {
  margin-top: 10px;

  font-family: "VT323", monospace;
  font-size: .95rem;
  letter-spacing: .12em;
  text-transform: uppercase;

  color: var(--gold);
}

/* -------- slider -------- */
.slider-frame {
  padding: 10px;
}

.slider {
  position: relative;

  overflow: hidden;

  aspect-ratio: 4/5;

  background: #0e1030;
}

.slide {
  position: absolute;

  inset: 0;

  opacity: 0;

  transition: opacity .6s ease;

  background-size: cover;
  background-position: center;
}

.slide.active {
  opacity: 1;
}

.dots {
  gap: 10px;
  display: flex;
  justify-content: center;

  margin-top: 18px;
}

.dot {
  width: 12px;
  height: 12px;

  border-radius: 0;
  background: var(--purple-dim);
  border: 2px solid var(--bg-deep);

  cursor: pointer;

  transition: .2s;
}

.dot.active {
  background: var(--gold);
  transform: scale(1.15);
}

/* -------- details -------- */
.details {
  gap: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));

  margin-top: 30px;
}

.detail {
  padding: 22px;

  display: flex;
  flex-direction: column;
}

.detail h3 {
  font-family: "VT323", monospace;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 1.3rem;
  color: var(--gold);

  margin-bottom: 12px;
}

/* collapsible gift cards */
.gift-card summary {
  cursor: pointer;
  list-style: none;

  display: flex;
  align-items: center;
  justify-content: space-between;

  font-family: "VT323", monospace;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 1.3rem;
  color: var(--gold);
}

.gift-card summary::-webkit-details-marker {
  display: none;
}

.gift-card summary::after {
  content: "+";
  font-family: "Press Start 2P", monospace;
  font-size: .85rem;
  color: var(--cyan-bright);
  margin-left: 10px;
}

.gift-card[open] summary::after {
  content: "\2013";
}

.gift-card[open] summary {
  margin-bottom: 12px;
}

.gift-card p {
  animation: fadeUp .2s ease;
}

.pix-key {
  display: inline-block;
  margin-top: 12px;

  padding: 8px 14px;

  background: var(--panel-light);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 0 2px var(--bg-deep);

  font-family: "VT323", monospace;
  letter-spacing: .04em;
  font-size: 1.05rem;
  color: var(--cream);
}

.gift-ideas {
  list-style: none;

  margin-top: 10px;

  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gift-ideas li {
  font-size: 1.15rem;
  color: var(--cream);
}

.detail p {
  font-size: 1.15rem;
  color: var(--cream);
}

.detail-address {
  margin-top: 4px;
  opacity: .8;
}

.detail-btn {
  margin-top: 18px;
  width: 100%;
}

/* -------- before/after photo reveal -------- */
@property --reveal-size {
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}

.reveal-frame {
  position: relative;
  overflow: hidden;
  touch-action: none;

  max-width: 420px;
  aspect-ratio: 4/5;

  margin: 0 auto;
  padding: 10px;

  cursor: none;

  --reveal-x: 50%;
  --reveal-y: 50%;
  --reveal-size: 0px;
}

.reveal-img {
  position: absolute;
  inset: 10px;

  width: calc(100% - 20px);
  height: calc(100% - 20px);

  object-fit: cover;
}

.reveal-img--pixel {
  image-rendering: pixelated;
}

.reveal-bg {
  z-index: 1;
}

.reveal-fg {
  z-index: 2;

  -webkit-mask-image: radial-gradient(circle var(--reveal-size) at var(--reveal-x) var(--reveal-y),
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 1) 100%,
      rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(circle var(--reveal-size) at var(--reveal-x) var(--reveal-y),
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 1) 100%,
      rgba(0, 0, 0, 0) 100%);

  transition: --reveal-size .35s ease;
}

.reveal-frame.reveal-active .reveal-fg {
  --reveal-size: 100px;
}

.reveal-cursor-dot {
  position: absolute;
  z-index: 3;

  width: 10px;
  height: 10px;

  left: var(--reveal-x);
  top: var(--reveal-y);
  transform: translate(-50%, -50%);

  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 2px var(--bg-deep);

  opacity: 0;
  pointer-events: none;

  transition: opacity .2s ease;
}

.reveal-frame.reveal-active .reveal-cursor-dot {
  opacity: .9;
}

.reveal-hint {
  margin-top: 16px;
  text-align: center;

  font-size: 1.05rem;
  color: var(--cyan-bright);
  opacity: .7;
}

/* -------- actions / buttons -------- */
.actions {
  gap: 18px;
  display: flex;
  flex-direction: column;

  margin-top: 34px;
}

.btn {
  flex: 1;

  min-height: 60px;

  width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  padding: 10px 14px;

  font-size: 1.25rem;
  letter-spacing: .04em;

  border: 3px solid var(--cyan);
  box-shadow:
    0 0 0 3px var(--bg-deep),
    var(--shadow-hard-sm);

  cursor: pointer;

  transition: transform .08s ease, box-shadow .08s ease;
}

.btn-primary {
  background: var(--purple);
  color: var(--cream);
}

.btn-secondary {
  background: var(--panel-light);
  color: var(--cyan-bright);
}

.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 3px var(--bg-deep);
}

footer {
  padding: 80px 20px 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
}

.footer-panel {
  padding: 26px 22px;

  text-align: center;
  font-size: 1.3rem;
  line-height: 1.8;
  color: var(--cyan-bright);

  max-width: 500px;
}

.footer-actions {
  width: 100%;
  max-width: 420px;
  margin-top: 0;
}

.hero-rsvp {
  margin-top: 28px;
}

.rsvp-cta-hint {
  text-align: center;
  font-size: 1.1rem;
  letter-spacing: .04em;
  color: var(--gold);
  margin-bottom: 10px;
}

.rsvp-toggle {
  border-color: var(--gold);
}

.btn-cta {
  border-color: var(--gold);
  font-size: 1.4rem;
  min-height: 72px;

  animation: ctaPulse 2.2s ease-in-out infinite;
}

@keyframes ctaPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.03);
  }
}

.pix-key {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  margin: 4px 0;
  padding: 8px 12px;

  background: var(--panel-light);
  border: 2px dashed var(--gold);

  color: var(--cream);
  font-family: "VT323", monospace;
  font-size: 1.15rem;
  text-align: left;

  cursor: pointer;

  transition: transform .08s ease, border-color .15s ease;

  max-width: 100%;
}

.pix-key:hover,
.pix-key:focus-visible {
  border-color: var(--cyan-bright);
}

.pix-key:active {
  transform: translate(2px, 2px);
}

.pix-key-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.pix-copy-icon {
  font-size: 1rem;
  opacity: .8;
  flex-shrink: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1000;

  transform: translate(-50%, 20px);

  padding: 12px 20px;

  background: var(--panel);
  border: 3px solid var(--cyan);
  box-shadow:
    0 0 0 3px var(--bg-deep),
    var(--shadow-hard-sm);

  color: var(--cyan-bright);
  font-family: "VT323", monospace;
  font-size: 1.1rem;

  opacity: 0;
  pointer-events: none;

  transition: opacity .25s ease, transform .25s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.gift-divider {
  margin: 22px 0;
  border: none;
  border-top: 2px dashed var(--purple);
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(8px);
  }
}

@media(max-width:700px) {
  h1 {
    font-size: 1.9rem;
  }

  .hero-names {
    font-size: 1.1rem;
  }

  .countdown {
    grid-template-columns: repeat(2, 1fr);
  }

  .actions {
    flex-direction: column;
  }

  .hero-card {
    padding: 28px 18px 34px;
  }

  .pixel-pill {
    font-size: .9rem;
  }

  .section-title {
    font-size: 1.35rem;
  }
}

.rsvp-area {
  width: 100%;

  gap: 12px;
  display: flex;
  flex-direction: column;
}

.rsvp-title {
  display: none;
  text-align: center;

  font-size: 1.4rem;
  letter-spacing: .04em;
  color: var(--gold);

  text-shadow: 2px 2px 0 rgba(0, 0, 0, .4);
}

.rsvp-title.open {
  display: block;
  animation: fadeUp .25s ease;
}

.rsvp-options {
  gap: 12px;
  display: none;
  grid-template-columns: repeat(2, 1fr);

  width: 100%;
}

.rsvp-options.open {
  gap: 10px;
  display: grid;
  grid-template-columns: 1fr;

  animation: fadeUp .25s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rsvp-option {
  padding: 16px;

  border: 3px solid var(--purple);
  box-shadow:
    0 0 0 3px var(--bg-deep),
    var(--shadow-hard-sm);

  background: var(--panel-light);

  color: var(--cyan-bright);
  font-size: 1.15rem;

  cursor: pointer;

  transition: transform .08s ease, box-shadow .08s ease;
}

.rsvp-option:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.rsvp-option:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 3px var(--bg-deep);
}

#rsvpButton {
  width: 100%;
  min-height: 60px;
}

@media(max-width:700px) {
  .actions {
    display: flex;
    flex-direction: column;
  }

  .rsvp-options {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  .scroll-indicator,
  body::before,
  .hud-coin {
    animation: none;
  }

  .slide {
    transition: opacity .3s ease;
  }

  .reveal-fg {
    transition: none;
  }

  .btn-cta {
    animation: none;
  }

  .toast {
    transition: opacity .15s ease;
    transform: translate(-50%, 0);
  }
}