:root {
  color-scheme: dark;

  --bg0: #07020e;
  --bg1: #16062b;
  --ink: #f6efff;
  --muted: rgba(246, 239, 255, 0.72);
  --muted2: rgba(246, 239, 255, 0.56);
  --line: rgba(246, 239, 255, 0.12);

  --p1: #b77bff; /* soft violet */
  --p2: #7c5cff; /* royal violet */
  --p3: #d9baff; /* lavender */

  --card: rgba(255, 255, 255, 0.05);
  --card2: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);

  --r: 22px;
  --max: 1040px;

  --serif: "Fraunces", ui-serif, Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --s0: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  --s1: clamp(1.15rem, 1.05rem + 0.7vw, 1.45rem);
  --s2: clamp(1.55rem, 1.2rem + 1.55vw, 2.3rem);
  --s3: clamp(2.05rem, 1.4rem + 2.8vw, 3.2rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--s0);
  line-height: 1.55;
  color: var(--ink);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(900px 600px at 16% 12%, rgba(183, 123, 255, 0.22), transparent 62%),
    radial-gradient(820px 540px at 84% 18%, rgba(124, 92, 255, 0.18), transparent 62%),
    radial-gradient(920px 740px at 44% 95%, rgba(217, 186, 255, 0.12), transparent 65%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.bg-video {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  opacity: 0.36;
  filter: blur(0.2px) saturate(1.05);
}

#bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.92;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 700px at 50% 20%, rgba(7, 2, 14, 0.12), rgba(7, 2, 14, 0.58)),
    linear-gradient(180deg, rgba(7, 2, 14, 0.18), rgba(7, 2, 14, 0.66));
  pointer-events: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(217, 186, 255, 0.55);
  outline-offset: 3px;
}

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

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

button {
  font: inherit;
}

.wrap {
  width: min(var(--max), calc(100% - 2 * 18px));
  margin-inline: auto;
}

/* FX layer */
#fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1000;
}

.spark {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  opacity: 0;
  font-weight: 900;
  text-shadow: 0 16px 60px rgba(0, 0, 0, 0.45);
  animation: spark-fly var(--dur, 950ms) cubic-bezier(0.1, 0.8, 0.2, 1) forwards;
}

@keyframes spark-fly {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(1);
    filter: blur(0px);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--dx), var(--dy))
      rotate(var(--rot)) scale(0.55);
    filter: blur(0.25px);
  }
}

/* Top bar */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(7, 2, 14, 0.62);
  border-bottom: 1px solid rgba(246, 239, 255, 0.08);
  padding-top: env(safe-area-inset-top);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.96), rgba(183, 123, 255, 0.92));
  color: #090012;
  font-weight: 900;
  box-shadow: 0 18px 50px rgba(183, 123, 255, 0.16);
}

.logo-text {
  display: grid;
  line-height: 1.05;
}

.logo-title {
  font-family: var(--serif);
  font-weight: 700;
}

.logo-sub {
  color: var(--muted2);
  font-size: 0.92rem;
}

.menu {
  display: none;
  border-radius: 999px;
  padding: 10px 12px;
  border: 1px solid rgba(246, 239, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(246, 239, 255, 0.12);
  text-decoration: none;
}

/* Sections */
.hero {
  padding: clamp(22px, 5vw, 56px) 0 10px;
  scroll-margin-top: 84px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(14px, 3vw, 26px);
  align-items: center;
}

.kicker {
  margin: 0 0 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(246, 239, 255, 0.68);
  font-size: 0.9rem;
}

h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: var(--s3);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: var(--s1);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.98), rgba(183, 123, 255, 0.92));
  color: #090012;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 60px rgba(183, 123, 255, 0.14);
  transition: transform 140ms ease, filter 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.btn:active {
  transform: translateY(0);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border: 1px solid rgba(246, 239, 255, 0.16);
  box-shadow: none;
}

.tiny {
  color: var(--muted2);
  font-size: 0.95rem;
}

.hero-card {
  border-radius: var(--r);
  border: 1px solid rgba(246, 239, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-top {
  display: flex;
  gap: 8px;
  padding: 14px 14px 0;
  flex-wrap: wrap;
}

.pill {
  font-size: 0.9rem;
  padding: 8px 10px;
  border-radius: 999px;
  color: rgba(246, 239, 255, 0.78);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(246, 239, 255, 0.12);
}

.pill2 {
  background: rgba(124, 92, 255, 0.12);
  border-color: rgba(124, 92, 255, 0.18);
}

.card-main {
  padding: 18px 16px 18px;
  display: grid;
  gap: 12px;
}

.big-heart {
  font-size: 2.4rem;
  color: rgba(183, 123, 255, 0.92);
  text-shadow: 0 20px 70px rgba(183, 123, 255, 0.22);
}

.card-quote {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: rgba(246, 239, 255, 0.86);
  letter-spacing: -0.01em;
}

.chip {
  justify-self: start;
  border-radius: 999px;
  padding: 10px 12px;
  border: 1px solid rgba(246, 239, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.06);
}

.section {
  padding: clamp(34px, 5vw, 62px) 0;
  scroll-margin-top: 84px;
}

.alt {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(246, 239, 255, 0.06);
  border-bottom: 1px solid rgba(246, 239, 255, 0.06);
}

.head {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--s2);
  letter-spacing: -0.01em;
}

.head p {
  margin: 0;
  color: var(--muted);
}

/* Envelopes */
.envelopes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.env {
  border-radius: 18px;
}

.env summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  border-radius: 18px;
  border: 1px solid rgba(246, 239, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  padding: 14px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

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

.env summary::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(220px 140px at 20% 20%, rgba(124, 92, 255, 0.16), transparent 62%),
    radial-gradient(220px 140px at 80% 80%, rgba(183, 123, 255, 0.14), transparent 62%);
  opacity: 0.55;
  pointer-events: none;
}

.env summary::after {
  content: "\2661";
  margin-left: auto;
  font-weight: 900;
  color: rgba(217, 186, 255, 0.86);
}

.env[open] summary::after {
  content: "\2665";
  color: rgba(183, 123, 255, 0.92);
}

.env summary > * {
  position: relative;
  z-index: 1;
}

.env-no {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: rgba(246, 239, 255, 0.9);
  background: rgba(124, 92, 255, 0.14);
  border: 1px solid rgba(124, 92, 255, 0.2);
}

.env-title {
  font-weight: 800;
  color: rgba(246, 239, 255, 0.86);
}

.letter {
  margin-top: 10px;
  padding: 14px 14px;
  border-radius: 18px;
  border: 1px solid rgba(246, 239, 255, 0.12);
  background: linear-gradient(180deg, rgba(217, 186, 255, 0.2), rgba(255, 255, 255, 0.03));
  color: rgba(246, 239, 255, 0.86);
}

.letter p {
  margin: 0;
  color: rgba(246, 239, 255, 0.86);
}

/* Polaroids */
.polas {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.pola {
  border: 1px solid rgba(246, 239, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.22);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.pola:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(183, 123, 255, 0.22);
}

.pola-media {
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(246, 239, 255, 0.08);
}

.pola-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.03);
}

.pola-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(180px 140px at 30% 20%, rgba(124, 92, 255, 0.22), transparent 62%),
    radial-gradient(160px 140px at 70% 80%, rgba(183, 123, 255, 0.18), transparent 62%),
    linear-gradient(135deg, rgba(7, 2, 14, 0.16), rgba(7, 2, 14, 0.06));
  pointer-events: none;
}

.pola-cap {
  display: block;
  margin-top: 10px;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Tap area */
.tap {
  margin-top: 10px;
  min-height: 240px;
  border-radius: var(--r);
  border: 1px dashed rgba(183, 123, 255, 0.28);
  background:
    radial-gradient(360px 240px at 20% 20%, rgba(124, 92, 255, 0.14), transparent 62%),
    radial-gradient(320px 240px at 80% 70%, rgba(183, 123, 255, 0.14), transparent 62%),
    rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  touch-action: manipulation;
}

.tap-center {
  display: grid;
  place-items: center;
  gap: 10px;
}

.tap-ring {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 1px solid rgba(246, 239, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  position: relative;
}

.tap-ring::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  border: 1px solid rgba(183, 123, 255, 0.22);
  opacity: 0.65;
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.85;
  }
}

.tap-text {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(246, 239, 255, 0.7);
  font-size: 0.9rem;
}

.float {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(245, 236, 255, 0.92);
  color: #120624;
  border: 1px solid rgba(183, 123, 255, 0.22);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.35);
  font-weight: 800;
  white-space: nowrap;
  animation: float-up var(--dur, 2200ms) ease-out forwards;
}

.float::before {
  content: "\2665";
  margin-right: 8px;
  color: rgba(124, 92, 255, 0.92);
}

@keyframes float-up {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, 12px) scale(0.96);
  }
  14% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, -68px) scale(1.02);
  }
}

/* Final */
.final-inner {
  display: grid;
  gap: 14px;
}

.final-actions {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.btn.big {
  padding: 14px 18px;
  font-size: 1.05rem;
}

.small {
  margin: 0;
  color: var(--muted2);
  font-size: 0.95rem;
}

/* Toast */
.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 2000;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(246, 239, 255, 0.14);
  background: rgba(7, 2, 14, 0.78);
  box-shadow: var(--shadow);
  color: rgba(246, 239, 255, 0.92);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.on {
  opacity: 1;
  transform: translateY(0);
}

/* Sheet */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 2500;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(6px);
}

.sheet-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  border-radius: 24px;
  border: 1px solid rgba(246, 239, 255, 0.14);
  background: linear-gradient(180deg, rgba(22, 6, 43, 0.96), rgba(7, 2, 14, 0.92));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(246, 239, 255, 0.1);
}

.sheet-title {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sheet-x {
  border-radius: 999px;
  padding: 10px 12px;
  border: 1px solid rgba(246, 239, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
}

.sheet-body {
  padding: 16px 14px 18px;
  color: rgba(246, 239, 255, 0.9);
  font-size: 1.02rem;
}

/* Reveal */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.js [data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .menu {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    left: 18px;
    right: 18px;
    top: calc(100% + 10px);
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(246, 239, 255, 0.14);
    background: rgba(7, 2, 14, 0.92);
    box-shadow: var(--shadow);
    display: grid;
    gap: 8px;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .top[data-nav-open="true"] .nav {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
}

@media (max-width: 860px) {
  .envelopes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 430px) {
  .envelopes {
    grid-template-columns: 1fr;
  }

  .polas {
    grid-template-columns: 1fr;
  }
}

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

  * {
    transition: none !important;
    animation: none !important;
  }
}
