/* ===================== Reset & Tokens ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root{
  --bg: #08080f;
  --bg-elevated: #0f0f1c;
  --ink: #f3f2fb;
  --ink-dim: #a8a6c4;
  --ink-faint: #6d6b8f;
  --line: rgba(255,255,255,0.08);
  --card: rgba(255,255,255,0.04);
  --card-hover: rgba(255,255,255,0.07);

  --violet: #8b5cf6;
  --magenta: #ec4899;
  --amber: #f59e0b;
  --cyan: #22d3ee;

  --grad-1: linear-gradient(120deg, var(--violet), var(--magenta) 55%, var(--amber));
  --grad-2: linear-gradient(135deg, var(--cyan), var(--violet));

  --font-display: 'Sora', 'Space Grotesk', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;

  --ease: cubic-bezier(.16,.84,.44,1);
  --ease-soft: cubic-bezier(.22,1,.36,1);
}

html{ scroll-behavior: smooth; }

body{
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
button{ font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
section{ position: relative; }

::selection{ background: var(--magenta); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar{ width: 10px; }
::-webkit-scrollbar-track{ background: var(--bg); }
::-webkit-scrollbar-thumb{ background: linear-gradient(var(--violet), var(--magenta)); border-radius: 10px; }

/* ===================== Grain overlay ===================== */
.grain{
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===================== Loader ===================== */
#loader{
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .7s var(--ease), visibility .7s;
}
#loader.hidden{ opacity: 0; visibility: hidden; }
.loader-inner{ display: flex; flex-direction: column; align-items: center; gap: 18px; }
.loader-ring{ width: 56px; height: 56px; animation: spin 1.1s linear infinite; }
.loader-ring circle{
  fill: none; stroke: url(#none);
  stroke: var(--violet);
  stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 210; stroke-dashoffset: 160;
  filter: drop-shadow(0 0 6px var(--magenta));
}
.loader-text{
  font-family: var(--font-display); font-weight: 700; letter-spacing: .35em;
  font-size: 12px; color: var(--ink-dim);
}
@keyframes spin{ to{ transform: rotate(360deg); } }

/* ===================== Canvases & cursor ===================== */
#confetti-canvas{ position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }
#particle-canvas{ position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .55; }

.cursor-glow{
  position: fixed; top: 0; left: 0; width: 420px; height: 420px; z-index: 1;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(139,92,246,.14), transparent 70%);
  transform: translate(-50%,-50%);
  transition: opacity .3s ease;
  will-change: transform;
}
@media (hover: none){ .cursor-glow{ display: none; } }

main{ position: relative; z-index: 1; }

/* ===================== Reveal animation ===================== */
[data-reveal]{
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity .9s var(--ease-soft), transform .9s var(--ease-soft), filter .9s var(--ease-soft);
}
[data-reveal].in{
  opacity: 1; transform: translateY(0); filter: blur(0);
}

/* ===================== Hero ===================== */
.hero{
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.blob{
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .55; z-index: -1;
  animation: float 16s ease-in-out infinite;
}
.blob-a{ width: 520px; height: 520px; background: var(--violet); top: -180px; left: -140px; }
.blob-b{ width: 460px; height: 460px; background: var(--magenta); bottom: -200px; right: -120px; animation-delay: -5s; }
.blob-c{ width: 340px; height: 340px; background: var(--amber); top: 40%; left: 60%; opacity: .3; animation-delay: -10s; }

@keyframes float{
  0%, 100%{ transform: translate(0,0) scale(1); }
  33%{ transform: translate(40px,-30px) scale(1.08); }
  66%{ transform: translate(-30px,20px) scale(0.94); }
}

.brand-bar{
  position: absolute; top: 32px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
}
.brand-logo{ width: 30px; height: 30px; border-radius: 8px; }
.brand-name{ font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: .04em; color: #fff; }

.hero-content{ max-width: 780px; display: flex; flex-direction: column; align-items: center; }

.eyebrow{
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 28px;
}
.eyebrow-icon{ width: 14px; height: 14px; color: var(--amber); animation: twinkle 2.4s ease-in-out infinite; }
.eyebrow-icon:last-child{ animation-delay: 1.1s; }
@keyframes twinkle{ 0%,100%{ opacity: .4; transform: scale(.8) rotate(0deg);} 50%{ opacity: 1; transform: scale(1.15) rotate(20deg);} }

.hero-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 6.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.hero-title .line{ display: block; }
.hero-name{ margin-top: 4px; }

.gradient-text{
  background-image: var(--grad-1);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradientShift 7s ease-in-out infinite;
}
@keyframes gradientShift{
  0%,100%{ background-position: 0% 50%; }
  50%{ background-position: 100% 50%; }
}

.role-chip{
  margin-top: 28px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px 9px 14px;
  border: 1px solid var(--line); border-radius: 100px;
  background: var(--card);
  backdrop-filter: blur(12px);
  font-size: 13.5px; color: var(--ink-dim);
}
.role-chip em{ color: var(--violet); font-style: normal; }
.role-icon{ width: 16px; height: 16px; color: var(--violet); }

.hero-sub{
  margin-top: 26px; max-width: 540px;
  color: var(--ink-dim); font-size: 16.5px; line-height: 1.65;
}

.hero-actions{ margin-top: 40px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

.btn-primary{
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: 100px;
  background: var(--grad-1); background-size: 200% 100%;
  color: #0c0714; font-weight: 600; font-size: 15px;
  box-shadow: 0 12px 32px -8px rgba(236,72,153,.55);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-position .6s ease;
}
.btn-primary svg{ width: 18px; height: 18px; }
.btn-primary:hover{ transform: translateY(-3px); background-position: 100% 0; box-shadow: 0 18px 40px -8px rgba(236,72,153,.7); }
.btn-primary:active{ transform: translateY(-1px) scale(.98); }

.btn-ghost{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 8px; font-weight: 500; font-size: 15px; color: var(--ink-dim);
  transition: color .3s ease, gap .3s ease;
}
.btn-ghost svg{ width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn-ghost:hover{ color: var(--ink); gap: 12px; }
.btn-ghost:hover svg{ transform: translateX(3px); }

.scroll-cue{
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--ink-faint); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
}
.scroll-cue-line{ width: 1px; height: 42px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue-line i{
  position: absolute; top: -100%; left: 0; width: 100%; height: 100%;
  background: linear-gradient(var(--violet), var(--magenta));
  animation: scrollDrip 2s ease-in-out infinite;
}
@keyframes scrollDrip{ 0%{ top: -100%; } 60%,100%{ top: 100%; } }

/* ===================== Section head ===================== */
.section-head{ text-align: center; max-width: 640px; margin: 0 auto 64px; padding: 0 24px; }
.section-tag{
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--violet); margin-bottom: 18px;
}
.section-tag svg{ width: 15px; height: 15px; }
.section-head h2{
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.9rem, 4.4vw, 2.8rem); line-height: 1.15; letter-spacing: -0.01em;
}

/* ===================== Wishes ===================== */
.wishes{ padding: 120px 24px; max-width: 1400px; margin: 0 auto; }

.wishes-grid{
  columns: 3 380px; column-gap: 28px;
}
@media (max-width: 1000px){ .wishes-grid{ columns: 2 320px; } }
@media (max-width: 640px){ .wishes-grid{ columns: 1; } }

.wish-card{
  break-inside: avoid; margin-bottom: 28px;
  padding: 36px 32px 32px;
  border: 1px solid var(--line); border-radius: 26px;
  background: var(--card);
  backdrop-filter: blur(14px);
  position: relative; overflow: hidden;
  opacity: 0; transform: translateY(34px) scale(.97);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft),
              border-color .35s ease, background .35s ease, box-shadow .35s ease;
}
.wish-card.in{ opacity: 1; transform: translateY(0) scale(1); }
.wish-card::before{
  content: ""; position: absolute; inset: 0; border-radius: 26px; padding: 1px;
  background: var(--grad-1);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s ease;
  pointer-events: none;
}
.wish-card:hover{
  background: var(--card-hover); border-color: transparent;
  box-shadow: 0 20px 50px -20px rgba(139,92,246,.4);
}
.wish-card:hover::before{ opacity: 1; }

.wish-head{ display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }

.wish-avatar{
  width: 72px; height: 72px; border-radius: 50%; flex: none;
  object-fit: cover; border: 1px solid var(--line);
}
.wish-avatar-fallback{
  width: 72px; height: 72px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 22px; color: #fff;
  border: 1px solid rgba(255,255,255,.15);
}

.wish-name{ font-weight: 600; font-size: 18px; }

.wish-msg{ font-size: 16px; color: var(--ink-dim); line-height: 1.7; white-space: pre-line; }
.wish-msg em{ font-style: normal; color: var(--ink); }

.wish-quote{
  position: absolute; top: 10px; right: 22px; font-family: var(--font-display);
  font-size: 72px; font-weight: 700; color: var(--line); line-height: 1; user-select: none;
}

/* ===================== Closing ===================== */
.closing{
  padding: 140px 24px 160px; text-align: center; overflow: hidden;
}
.closing-blob{
  position: absolute; width: 700px; height: 700px; border-radius: 50%;
  background: var(--grad-2); opacity: .18; filter: blur(120px);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  animation: pulseBlob 8s ease-in-out infinite;
}
@keyframes pulseBlob{ 0%,100%{ opacity:.14; } 50%{ opacity:.24; } }

.closing-content{ position: relative; max-width: 620px; margin: 0 auto; }
.closing-icon{ width: 44px; height: 44px; color: var(--magenta); margin: 0 auto 26px; filter: drop-shadow(0 0 16px rgba(236,72,153,.5)); }
.closing h2{
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.9rem, 4.6vw, 3rem); margin-bottom: 20px; letter-spacing: -0.01em;
}
.closing p{ color: var(--ink-dim); font-size: 16px; line-height: 1.7; }
.signature{
  margin-top: 34px; font-family: var(--font-display); font-weight: 600;
  letter-spacing: .06em; color: var(--ink-faint);
}

/* ===================== Footer ===================== */
.site-footer{
  border-top: 1px solid var(--line);
  padding: 30px 24px; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 13px; color: var(--ink-faint);
}
.site-footer img{ width: 20px; height: 20px; border-radius: 5px; opacity: .8; }

/* ===================== Misc ===================== */
@media (max-width: 480px){
  .hero{ padding-top: 100px; }
  .wishes{ padding: 90px 20px; }
  .closing{ padding: 100px 20px 120px; }
}
