:root {
  --ink: #281d28;
  --muted: #786876;
  --cream: #fff7ef;
  --paper: #fffdf9;
  --rose: #d95f85;
  --violet: #7952b3;
  --gold: #c79a45;
  --mint: #68baa7;
  --line: rgba(40, 29, 40, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "DM Sans", Arial, sans-serif;
}

body.loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }

@media (pointer: fine) {
  body, a, button, input, textarea { cursor: none; }

  .custom-cursor,
  .custom-cursor-dot {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-50%, -50%, 0);
    transition: opacity 0.2s ease, width 0.25s ease, height 0.25s ease, background 0.25s ease;
  }

  .custom-cursor {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(217, 95, 133, 0.5);
    border-radius: 50%;
    background: rgba(255, 247, 239, 0.24);
    backdrop-filter: blur(6px);
  }

  .custom-cursor-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--rose);
  }

  body.cursor-ready .custom-cursor,
  body.cursor-ready .custom-cursor-dot { opacity: 1; }
  body.cursor-hover .custom-cursor { width: 58px; height: 58px; background: rgba(217, 95, 133, 0.16); }
}

.wish-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 28px;
  background:
    radial-gradient(circle at 24% 18%, rgba(217, 95, 133, 0.24), transparent 30%),
    radial-gradient(circle at 78% 16%, rgba(121, 82, 179, 0.22), transparent 32%),
    var(--cream);
  transition: opacity 0.75s ease, visibility 0.75s ease, transform 0.75s ease;
}

body.loader-done .wish-loader {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
}

.loader-envelope {
  position: relative;
  width: min(76vw, 360px);
  height: 250px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background: linear-gradient(145deg, #f6c2cf, #d95f85);
  box-shadow: 0 30px 80px rgba(217, 95, 133, 0.3);
  overflow: hidden;
}

.loader-envelope::before,
.loader-envelope::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 100%, 50% 48%, 100% 100%);
  background: rgba(255, 255, 255, 0.28);
}

.loader-flap {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform-origin: 50% 0;
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  background: linear-gradient(145deg, #f8d7df, #e984a1);
  animation: flapOpen 2.35s ease forwards;
}

.loader-note {
  position: relative;
  z-index: 1;
  width: 62%;
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 18px 44px rgba(40, 29, 40, 0.18);
  transform: translateY(76px);
  animation: noteRise 2.35s 0.2s ease forwards;
}

.loader-note strong,
.loader-note em {
  font-family: "Playfair Display", serif;
  font-size: 42px;
  line-height: 0.9;
}

.loader-note em {
  color: var(--rose);
  font-style: italic;
}

.wish-loader p,
.eyebrow {
  margin: 0;
  color: var(--rose);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@keyframes flapOpen {
  0%, 32% { transform: rotateX(0deg); }
  68%, 100% { transform: rotateX(154deg); }
}

@keyframes noteRise {
  0%, 28% { transform: translateY(76px); opacity: 0.82; }
  80%, 100% { transform: translateY(-42px); opacity: 1; }
}

.wish-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(18px, 5vw, 64px);
  background: rgba(255, 247, 239, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
  font-weight: 900;
}

.wish-nav nav {
  display: flex;
  gap: 24px;
  color: var(--muted);
}

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

.sample-logo-icon,
footer strong img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  padding: 4px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(217, 95, 133, 0.14);
}

.sample-logo-wordmark {
  width: clamp(108px, 14vw, 164px);
  height: auto;
  display: block;
  mix-blend-mode: multiply;
}

.sample-logo span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wish-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: clamp(30px, 6vw, 86px);
  align-items: center;
  overflow: hidden;
  padding: 118px clamp(20px, 6vw, 76px) 70px;
  background:
    radial-gradient(circle at 12% 24%, rgba(217, 95, 133, 0.18), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(104, 186, 167, 0.2), transparent 32%),
    linear-gradient(135deg, #fff7ef, #fff1f6 54%, #f7f3ff);
}

.wish-confetti {
  position: absolute;
  inset: 0;
  opacity: 0.48;
  background-image:
    radial-gradient(circle, rgba(217, 95, 133, 0.42) 0 4px, transparent 4px),
    radial-gradient(circle, rgba(121, 82, 179, 0.36) 0 3px, transparent 3px),
    radial-gradient(circle, rgba(199, 154, 69, 0.36) 0 3px, transparent 3px);
  background-size: 88px 88px, 126px 126px, 160px 160px;
  animation: drift 20s linear infinite;
}

@keyframes drift {
  to { transform: translateY(140px); }
}

.wish-copy {
  position: relative;
  z-index: 1;
}

h1,
h2 {
  margin: 0;
  font-family: "Playfair Display", serif;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(58px, 10vw, 126px);
  line-height: 0.88;
}

h2 {
  font-size: clamp(34px, 5.6vw, 74px);
  line-height: 0.98;
}

.wish-copy p:not(.eyebrow),
section p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.wish-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.wish-actions a,
.message-form button {
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--violet));
  box-shadow: 0 16px 36px rgba(217, 95, 133, 0.25);
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wish-actions a + a {
  color: var(--ink);
  background: #fff;
}

.wish-actions a:hover,
.message-form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px rgba(217, 95, 133, 0.34);
}

.wish-card {
  position: relative;
  z-index: 1;
  min-height: 430px;
  border: 0;
  background: transparent;
  perspective: 1300px;
}

.wish-cover,
.wish-inside {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  text-align: center;
  border-radius: 30px;
  box-shadow: 0 28px 78px rgba(40, 29, 40, 0.16);
  backface-visibility: hidden;
  transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.wish-cover {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent),
    linear-gradient(145deg, var(--rose), var(--violet));
}

.wish-cover small {
  font-weight: 900;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.wish-cover strong {
  font-family: "Playfair Display", serif;
  font-size: 130px;
}

.wish-inside {
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 253, 249, 0.92), rgba(255, 253, 249, 0.96)),
    repeating-linear-gradient(45deg, transparent 0 10px, rgba(217, 95, 133, 0.12) 10px 11px);
  border: 1px solid rgba(217, 95, 133, 0.24);
  transform: rotateY(180deg);
}

.wish-inside strong {
  font-family: "Playfair Display", serif;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

.wish-card.is-open .wish-cover { transform: rotateY(180deg); }
.wish-card.is-open .wish-inside { transform: rotateY(360deg); }

section {
  padding: clamp(70px, 9vw, 116px) clamp(18px, 5vw, 72px);
}

.wish-letter {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(28px, 6vw, 78px);
  align-items: start;
}

.wish-letter article,
.wish-strip article,
.message-form {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 22px 62px rgba(40, 29, 40, 0.08);
  backdrop-filter: blur(16px);
}

.wish-letter article {
  padding: clamp(28px, 5vw, 54px);
}

.wish-letter strong {
  display: block;
  margin-top: 20px;
  font-family: "Playfair Display", serif;
  font-size: 34px;
}

.memory-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1fr;
  gap: 18px;
  margin-top: 28px;
}

.memory-grid figure {
  margin: 0;
}

.memory-grid img {
  width: 100%;
  height: clamp(260px, 35vw, 520px);
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(40, 29, 40, 0.12);
}

.memory-grid figure:nth-child(2) { margin-top: 48px; }

.memory-grid figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-weight: 800;
}

.wish-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 0;
}

.wish-strip article {
  padding: 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wish-strip article:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 72px rgba(40, 29, 40, 0.14);
}

.wish-strip span {
  color: var(--rose);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.wish-strip strong {
  display: block;
  margin-top: 12px;
  font-family: "Playfair Display", serif;
  font-size: 30px;
}

.message-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
}

.message-form {
  display: grid;
  gap: 14px;
  padding: clamp(22px, 4vw, 38px);
}

.message-form input,
.message-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
}

.message-form textarea {
  min-height: 140px;
  resize: vertical;
}

.wish-burst {
  position: fixed;
  left: 50%;
  top: 58%;
  z-index: 80;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  background: var(--rose);
  animation: burst 1.4s ease forwards;
}

@keyframes burst {
  to {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(0.2);
  }
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 72px);
  color: #fff;
  background: #1b1119;
}

footer strong {
  font-family: "Playfair Display", serif;
  font-size: 26px;
}

@media (max-width: 820px) {
  .wish-nav { align-items: flex-start; flex-direction: column; }
  .wish-nav nav { width: 100%; justify-content: space-between; gap: 12px; font-size: 13px; }
  .wish-hero,
  .wish-letter,
  .message-section { grid-template-columns: 1fr; }
  .wish-card { min-height: 380px; }
  .memory-grid,
  .wish-strip { grid-template-columns: 1fr; }
  .memory-grid figure:nth-child(2) { margin-top: 0; }
  footer { flex-direction: column; }
}

.sample-footer {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(220px, 1fr) auto;
  gap: clamp(20px, 4vw, 52px);
  align-items: center;
  padding: 36px clamp(18px, 5vw, 72px);
  color: rgba(255, 255, 255, 0.74);
  background: radial-gradient(circle at 8% 0%, rgba(217, 95, 133, 0.24), transparent 34%), linear-gradient(145deg, #27141f, #120c11 72%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sample-footer-brand,
.sample-footer nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sample-footer-brand span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 5px;
  background: #fff;
  border-radius: 50%;
}

.sample-footer-brand span img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sample-footer-wordmark {
  width: min(164px, 42vw);
  height: auto;
}

.sample-footer-copy {
  display: grid;
  gap: 5px;
}

.sample-footer-copy strong {
  color: #fff;
  font-family: "Playfair Display", serif;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
}

.sample-footer-copy span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sample-footer nav {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.sample-footer nav a {
  padding: 10px 14px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  transition: background 0.24s ease, transform 0.24s ease;
}

.sample-footer nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

@media (max-width: 820px) {
  .sample-footer {
    grid-template-columns: 1fr;
  }

  .sample-footer nav {
    justify-content: flex-start;
  }
}
