@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Space+Grotesk:wght@400;600&display=swap");

:root {
  --bg-1: #f6efe6;
  --bg-2: #d7e6f2;
  --ink: #1b1a1a;
  --accent: #ff7a59;
  --accent-2: #2d7a7c;
  --panel: #fff7ed;
  --shadow: rgba(20, 22, 30, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Serif Display", "Georgia", serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 10% 0%, var(--bg-2), transparent 60%),
    radial-gradient(900px 700px at 90% 10%, #ffe1d2, transparent 60%),
    linear-gradient(180deg, var(--bg-1), #ffffff);
}

#app {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.hud {
  position: absolute;
  top: 16px;
  left: 16px;
  right: auto;
  width: fit-content;
  max-width: 360px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 16px;
  border-radius: 24px;
  background: rgba(255, 247, 237, 0.75);
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 60px var(--shadow);
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 122, 89, 0.12);
  font-family: "Space Grotesk", "Avenir", sans-serif;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.hud h1 {
  margin: 8px 0 4px;
  font-size: clamp(22px, 3vw, 30px);
}

.hud p {
  margin: 0;
  font-family: "Space Grotesk", "Avenir", sans-serif;
  font-size: 12px;
  max-width: 260px;
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: column;
  align-items: flex-end;
}

.pill {
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-family: "Space Grotesk", "Avenir", sans-serif;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(255, 122, 89, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(255, 122, 89, 0.35);
}

.pill-secondary {
  background: rgba(45, 122, 124, 0.12);
  color: var(--accent-2);
  box-shadow: none;
  text-decoration: none;
}

.pill-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(45, 122, 124, 0.25);
}

#canvas-wrap {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
  width: 100%;
  height: 100vh;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", "Avenir", sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #2d4647;
  background: rgba(255, 255, 255, 0.75);
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 12px 30px var(--shadow);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #38b000;
  box-shadow: 0 0 0 0 rgba(56, 176, 0, 0.6);
  animation: ping 1.6s infinite;
}

@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 176, 0, 0.6);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(56, 176, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(56, 176, 0, 0);
  }
}

@media (max-width: 640px) {
  .hud {
    top: 16px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .hint {
    bottom: 12px;
    font-size: 10px;
  }
}

.modal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(21, 21, 26, 0.45);
  backdrop-filter: blur(4px);
  z-index: 10;
  transition: opacity 0.2s ease;
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-card {
  max-width: min(720px, 92vw);
  width: min(92vw, 640px);
  padding: 28px 26px;
  border-radius: 22px;
  background: #fffaf4;
  box-shadow: 0 30px 90px rgba(15, 18, 28, 0.35);
  text-align: center;
}

.modal-title {
  font-size: 26px;
  margin-bottom: 10px;
}

.modal-preview {
  width: min(70vw, 340px);
  aspect-ratio: 1 / 1;
  margin: 8px auto 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(236, 230, 220, 0.9));
  box-shadow: inset 0 0 0 1px rgba(134, 120, 106, 0.2);
  display: grid;
  place-items: center;
  overflow: hidden;
}

@media (min-width: 1200px) {
  .modal-card {
    width: min(70vw, 760px);
    padding: 32px 30px;
  }

  .modal-preview {
    width: min(40vw, 420px);
  }
}

.modal-preview canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.wedding-page {
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
}

.wedding-page #app {
  min-height: 100vh;
}

.wedding-section {
  min-height: 100vh;
  scroll-snap-align: start;
  position: relative;
  display: grid;
  place-items: center;
  padding: 120px 8vw;
}

.wedding-hero {
  padding: 0;
}

.wedding-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.wedding-hud {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  width: min(360px, 80vw);
  display: grid;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 20px;
  background: rgba(255, 247, 237, 0.88);
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 60px var(--shadow);
}

.wedding-hud .pill {
  text-decoration: none;
  justify-self: start;
}

.wedding-title {
  font-size: clamp(20px, 2.6vw, 30px);
  margin: 0;
}

.wedding-subtitle {
  margin: 6px 0 0;
  font-family: "Space Grotesk", "Avenir", sans-serif;
  font-size: 12px;
}

.wedding-card {
  max-width: 720px;
  width: min(90vw, 720px);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 28px 30px;
  box-shadow: 0 18px 50px rgba(20, 22, 30, 0.18);
  backdrop-filter: blur(6px);
}

.wedding-card h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 22px;
}

.wedding-card p,
.wedding-card li {
  font-family: "Space Grotesk", "Avenir", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.modal-body {
  font-family: "Space Grotesk", "Avenir", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.close {
  border: none;
  background: rgba(45, 122, 124, 0.12);
  color: var(--accent-2);
  font-family: "Space Grotesk", "Avenir", sans-serif;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  float: right;
  cursor: pointer;
}
