:root {
  --black: #0a0a0c;
  --black-soft: #121215;
  --off-white: #f5f2ea;
  --gold: #d4af37;
  --gold-soft: rgba(212, 175, 55, 0.4);
  --gold-faint: rgba(212, 175, 55, 0.12);
  --rose: #c98a9a;
  --violet: #9a86c8;
  --text-dim: rgba(245, 242, 234, 0.55);

  --font-display: "Playfair Display", "Fraunces", Georgia, serif;
  --font-label: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--black);
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 0%, var(--black-soft) 0%, var(--black) 55%, #060607 100%);
  color: var(--off-white);
  font-family: var(--font-label);
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
}

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

#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  pointer-events: none;
}

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

.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7rem 1.5rem 6rem;
  text-align: center;
  overflow: hidden;
}

.eyebrow {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.4rem;
  opacity: 0;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  color: var(--off-white);
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.section-subtitle, .section-instruction {
  font-size: clamp(0.9rem, 2.6vw, 1.05rem);
  color: var(--text-dim);
  margin-bottom: 2.6rem;
  max-width: 32rem;
  font-weight: 400;
  line-height: 1.6;
}

.intro-section {
  justify-content: center;
  padding-top: 2rem;
}

.glow-orb {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 16px 6px rgba(212, 175, 55, 0.35);
  top: 42%;
  left: 50%;
  margin-left: -3px;
  will-change: transform, opacity;
  animation: orb-pulse 2s ease-in-out infinite;
}

@keyframes orb-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.5); opacity: 1; }
}

.loading-wrap {
  position: relative;
  z-index: 2;
  min-height: 2.5rem;
}

.loading-text {
  font-family: var(--font-label);
  font-size: clamp(0.82rem, 2.6vw, 0.95rem);
  color: var(--text-dim);
  letter-spacing: 0.04em;
  min-height: 1.5em;
}

.headline-wrap {
  position: relative;
  z-index: 2;
  opacity: 0;
  max-width: 44rem;
}

.headline {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  font-size: clamp(2.4rem, 9vw, 5rem);
  font-weight: 500;
  font-style: normal;
  color: var(--off-white);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.headline-line {
  display: block;
  will-change: transform, opacity;
}

.subline {
  margin-top: 1.6rem;
  font-size: clamp(0.85rem, 2.4vw, 1rem);
  color: var(--text-dim);
  font-weight: 400;
  font-style: italic;
  font-family: var(--font-display);
}

.scroll-hint {
  position: absolute;
  bottom: 2.4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-dim);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0;
  z-index: 2;
}

.scroll-line {
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, var(--gold), transparent);
  animation: scroll-draw 2s ease-in-out infinite;
}

@keyframes scroll-draw {
  0% { opacity: 0.3; transform: scaleY(0.4); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  100% { opacity: 0.3; transform: scaleY(0.4); transform-origin: top; }
}

.facts-section {
  align-items: center;
}

.facts-list {
  width: 100%;
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fact-row {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid rgba(245, 242, 234, 0.08);
  text-align: left;
  opacity: 0;
  transform: translateY(28px);
  will-change: transform, opacity;
}

.fact-row:last-child {
  border-bottom: none;
}

.fact-num {
  font-family: var(--font-label);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.08em;
  flex-shrink: 0;
  min-width: 1.8rem;
}

.fact-text {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3.4vw, 1.5rem);
  font-weight: 400;
  color: var(--off-white);
  margin: 0;
  line-height: 1.4;
}

.review-card {
  position: relative;
  width: 100%;
  max-width: 34rem;
  opacity: 0;
  transform: translateY(40px);
  will-change: transform, opacity;
  border-radius: 26px;
  padding: 1.5px;
  background: linear-gradient(130deg,
    rgba(212, 175, 55, 0.85),
    rgba(201, 138, 154, 0.55),
    rgba(154, 134, 200, 0.55),
    rgba(212, 175, 55, 0.85));
  background-size: 260% 260%;
  animation: card-border-shift 9s ease-in-out infinite;
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.55),
    0 0 42px rgba(212, 175, 55, 0.08),
    0 0 90px rgba(154, 134, 200, 0.06);
}

@keyframes card-border-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.review-card-inner {
  border-radius: 24.5px;
  padding: 2.6rem 1.8rem 2.4rem;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(212, 175, 55, 0.07), transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(154, 134, 200, 0.07), transparent 55%),
    #101013;
}

.review-heading {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3.6vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--off-white);
  margin: 0 0 1rem;
}

.review-divider {
  width: 48px;
  height: 2px;
  border-radius: 2px;
  margin: 0 auto 1.8rem;
  background: linear-gradient(90deg, var(--gold), var(--rose), var(--violet));
  opacity: 0.85;
}

.review-fields {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem 1.4rem;
  margin: 0 0 1.8rem;
  text-align: left;
}

.review-label {
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0;
  align-self: baseline;
  padding-top: 0.15em;
}

.review-fields dt:nth-of-type(1) { color: rgba(212, 175, 55, 0.75); }
.review-fields dt:nth-of-type(2) { color: rgba(201, 138, 154, 0.8); }
.review-fields dt:nth-of-type(3) { color: rgba(154, 134, 200, 0.85); }
.review-fields dt:nth-of-type(4) { color: rgba(212, 175, 55, 0.75); }
.review-fields dt:nth-of-type(5) { color: rgba(201, 138, 154, 0.8); }

.review-value {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3vw, 1.15rem);
  color: var(--off-white);
  margin: 0;
  position: relative;
  display: inline-block;
  width: max-content;
}

.review-value-highlight {
  color: var(--gold);
}

.review-value-highlight::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
}

.review-value-highlight.underline-drawn::after {
  animation: underline-draw 0.9s ease-out forwards;
}

@keyframes underline-draw {
  to { transform: scaleX(1); }
}

.review-signature {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-style: italic;
  margin: 0;
  font-family: var(--font-display);
}

.review-signature span {
  color: var(--gold);
  font-weight: 600;
  font-style: normal;
}

.cake-stage {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.cake-glow {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(244, 185, 66, 0.14), transparent 65%);
  pointer-events: none;
  animation: cake-glow-breathe 3.4s ease-in-out infinite;
}

@keyframes cake-glow-breathe {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

#cake-svg {
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.55));
}

.candle {
  cursor: pointer;
}

.candle .halo {
  animation: halo-breathe 1.6s ease-in-out infinite;
  will-change: opacity;
}

@keyframes halo-breathe {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.candle .flame {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: flame-flicker 0.9s ease-in-out infinite;
  will-change: transform;
}

.candle:nth-child(2n) .flame { animation-duration: 1.15s; animation-delay: 0.2s; }
.candle:nth-child(3n) .flame { animation-duration: 1.05s; animation-delay: 0.35s; }

@keyframes flame-flicker {
  0%   { transform: scale(1, 1) rotate(0deg); }
  25%  { transform: scale(0.96, 1.06) rotate(-1.6deg); }
  50%  { transform: scale(1.03, 0.95) rotate(1.2deg); }
  75%  { transform: scale(0.97, 1.04) rotate(-0.8deg); }
  100% { transform: scale(1, 1) rotate(0deg); }
}

.candle .flame-inner {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: inner-flicker 0.7s ease-in-out infinite alternate;
}

@keyframes inner-flicker {
  from { opacity: 0.95; transform: scaleY(1); }
  to   { opacity: 0.75; transform: scaleY(0.88); }
}

.candle.out .flame {
  animation: flame-die 0.35s ease-out forwards;
}

@keyframes flame-die {
  0%   { transform: scale(1, 1); opacity: 1; }
  60%  { transform: scale(1.25, 0.5); opacity: 0.7; }
  100% { transform: scale(0.1, 0.05); opacity: 0; }
}

.candle.out .halo {
  animation: halo-die 0.6s ease-out forwards;
}

@keyframes halo-die {
  to { opacity: 0; }
}

.candle .smoke {
  opacity: 0;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
}

.candle.out .smoke {
  animation: smoke-rise 1.6s ease-out 0.25s forwards;
}

@keyframes smoke-rise {
  0%   { opacity: 0; stroke-dashoffset: 60; transform: translateY(0); }
  25%  { opacity: 0.55; }
  100% { opacity: 0; stroke-dashoffset: 0; transform: translateY(-14px); }
}

.wish-burst {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  padding: 0 2rem;
}

.wish-burst p {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 6vw, 2.4rem);
  font-weight: 500;
  color: var(--off-white);
  text-align: center;
  max-width: 30rem;
}

.wishbox-stage {
  position: relative;
  width: 100%;
  max-width: 30rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wishbox-form {
  position: relative;
  width: 100%;
  border: 1px solid rgba(245, 242, 234, 0.14);
  border-radius: 18px;
  padding: 1.8rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: rgba(245, 242, 234, 0.015);
}

.wishbox-input,
.wishbox-textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245, 242, 234, 0.2);
  border-radius: 0;
  padding: 0.6rem 0.1rem;
  color: var(--off-white);
  font-family: var(--font-label);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.25s ease;
}

.wishbox-input::placeholder,
.wishbox-textarea::placeholder {
  color: rgba(245, 242, 234, 0.35);
}

.wishbox-input:focus,
.wishbox-textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.wishbox-submit {
  align-self: center;
  margin-top: 0.4rem;
  padding: 0.7rem 2.2rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: transparent;
  color: var(--gold);
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.wishbox-submit:hover { background: var(--gold-faint); }
.wishbox-submit:active { background: var(--gold-soft); }
.wishbox-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.wishbox-thanks {
  text-align: center;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 500;
  min-height: 1.3em;
  margin: 0;
  opacity: 0;
}

.wishbox-list {
  position: relative;
  width: 100%;
  max-width: 56rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.6rem;
}

.wishbox-card {
  border: 1px solid rgba(245, 242, 234, 0.1);
  border-radius: 14px;
  padding: 1.2rem 1.3rem;
  max-width: 240px;
  text-align: left;
  background: rgba(245, 242, 234, 0.02);
  opacity: 0;
  transform: translateY(24px);
  will-change: transform, opacity;
}

.wishbox-card .wishbox-card-text {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: var(--off-white);
  margin: 0 0 0.7rem;
  line-height: 1.55;
  word-break: break-word;
}

.wishbox-card .wishbox-card-name {
  font-family: var(--font-label);
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 0;
}

.wishbox-empty {
  color: var(--text-dim);
  font-size: 0.9rem;
  opacity: 0.7;
  font-style: italic;
  font-family: var(--font-display);
}

.wish-flyer {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  border: 1px solid var(--gold-soft);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  font-family: var(--font-display);
  color: var(--off-white);
  max-width: 200px;
  background: rgba(10, 10, 12, 0.9);
}

.mini-player {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: min(78vw, 330px);
  padding: 0.55rem 1.05rem 0.55rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(12, 12, 15, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5), 0 0 24px rgba(212, 175, 55, 0.05);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

.mini-player.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mini-toggle {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mini-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #17151a 0%, #1f1c22 38%, #141216 62%, #201d24 100%);
  border: 1px solid rgba(212, 175, 55, 0.5);
  display: block;
}

.mini-disc-ring {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px solid rgba(245, 242, 234, 0.16);
  display: block;
}

.mini-disc-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--gold);
  display: block;
}

.mini-player.playing .mini-disc {
  animation: disc-spin 2.6s linear infinite;
}

@keyframes disc-spin {
  to { transform: rotate(360deg); }
}

#mini-play-icon {
  position: relative;
  z-index: 1;
  margin-left: 2px;
}

.mini-lyric {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--off-white);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.footer {
  position: relative;
  z-index: 1;
  padding: 2.4rem 1rem 5.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

@media (min-width: 640px) {
  .wishbox-card { max-width: 260px; }
  .review-card { max-width: 38rem; }
}

@media (min-width: 1000px) {
  .section { padding: 9rem 2rem; }
  .facts-list { max-width: 46rem; }
}

@media (max-width: 480px) {
  .mini-player {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
