:root {
  --bg-deep: #0f1219;
  --bg-card: rgba(22, 26, 36, 0.72);
  --gold: #d4a853;
  --gold-light: #f0d48a;
  --gold-dim: rgba(212, 168, 83, 0.35);
  --blush: #e8c4b8;
  --cream: #f5efe6;
  --text: #f0ebe3;
  --text-muted: rgba(240, 235, 227, 0.62);
  --border: rgba(212, 168, 83, 0.22);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 20px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
}

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

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

.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(212, 168, 83, 0.12), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 70%, rgba(232, 196, 184, 0.08), transparent 55%),
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(15, 18, 25, 0.9), transparent 70%);
}

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

/* ── Password Gate ── */

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(8, 10, 14, 0.88);
  backdrop-filter: blur(24px);
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}

.gate.gate--exit {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-card {
  width: min(420px, 100%);
  padding: 3rem 2.5rem 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  animation: gateIn 0.9s var(--ease-out) both;
}

@keyframes gateIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
}

.gate-ornament {
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 1rem;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.gate-label {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.gate-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.gate-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.input-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.input-wrap input {
  width: 100%;
  padding: 1rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-spring);
}

.input-wrap input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
  transform: scale(1.01);
}

.input-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(212, 168, 83, 0.08) 50%, transparent 60%);
  transform: translateX(-100%);
  pointer-events: none;
}

.input-wrap:focus-within .input-shine {
  animation: shine 1.2s ease;
}

@keyframes shine {
  to { transform: translateX(100%); }
}

.gate-error {
  color: #e8a0a0;
  font-size: 0.85rem;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s, background 0.35s;
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.35s var(--ease-spring);
}

.btn-primary {
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 8px 32px rgba(212, 168, 83, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 40px rgba(212, 168, 83, 0.45);
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* ── Main Site ── */

.site {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  transition: opacity 0.6s var(--ease-out);
}

.site.site--visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 0 2rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  margin-bottom: 1.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(212, 168, 83, 0.06);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.hero-line {
  display: block;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.hero-name {
  display: block;
  font-size: clamp(3.5rem, 12vw, 6.5rem);
  background: linear-gradient(135deg, var(--cream) 20%, var(--gold-light) 55%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: nameShimmer 6s ease-in-out infinite;
  background-size: 200% 200%;
}

@keyframes nameShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-lede {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-muted);
  max-width: 28ch;
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

.section {
  margin-bottom: 4rem;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.eyebrow.center {
  text-align: center;
}

.invite-card {
  position: relative;
  padding: 2.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.5s var(--ease-out), border-color 0.5s;
}

.invite-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 168, 83, 0.4);
}

.card-shimmer {
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg, transparent, rgba(212, 168, 83, 0.06), transparent 30%);
  animation: rotate 12s linear infinite;
  pointer-events: none;
}

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

.invite-inner {
  position: relative;
}

.invite-card h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 500;
  margin-bottom: 1rem;
}

.invite-message {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 52ch;
  margin-bottom: 2.5rem;
}

.details-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .details-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.detail {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.3s, transform 0.4s var(--ease-spring);
}

.detail:hover {
  background: rgba(212, 168, 83, 0.06);
  transform: scale(1.02);
}

.detail--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.3s, transform 0.4s var(--ease-spring), border-color 0.3s;
}

.detail--link:hover {
  border-color: rgba(212, 168, 83, 0.25);
}

.detail-cta {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  transition: letter-spacing 0.35s;
}

.detail--link:hover .detail-cta {
  letter-spacing: 0.16em;
}

.detail--silent-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.detail-icon {
  font-size: 1.3rem;
  color: var(--gold);
  line-height: 1;
  margin-top: 0.15rem;
}

.detail-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.detail-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
}

.detail-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.actions {
  padding-top: 1rem;
}

.action-cards {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .action-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.75rem;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.45s var(--ease-spring), border-color 0.45s, box-shadow 0.45s;
}

.action-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(212, 168, 83, 0.45);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.action-card--primary {
  border-color: rgba(212, 168, 83, 0.35);
}

.action-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 168, 83, 0.15), transparent 70%);
  top: var(--mouse-y, 50%);
  left: var(--mouse-x, 50%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.action-card:hover .action-glow {
  opacity: 1;
}

.action-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
  border-radius: 12px;
  background: rgba(212, 168, 83, 0.1);
  color: var(--gold);
  transition: transform 0.45s var(--ease-spring), background 0.45s;
}

.action-card:hover .action-icon {
  transform: scale(1.1) rotate(-3deg);
  background: rgba(212, 168, 83, 0.18);
}

.action-icon svg {
  width: 24px;
  height: 24px;
}

.action-card h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.action-card p {
  flex: 1;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.action-cta {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  transition: letter-spacing 0.35s;
}

.action-card:hover .action-cta {
  letter-spacing: 0.14em;
}

.action-card--wide {
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
  max-width: 640px;
  margin: 0 auto;
}

.action-card--wide .action-icon {
  margin-bottom: 0;
  flex-shrink: 0;
}

.action-card-body {
  flex: 1;
}

@media (max-width: 520px) {
  .action-card--wide {
    flex-direction: column;
    align-items: flex-start;
  }

  .action-card--wide .action-icon {
    margin-bottom: 0.5rem;
  }
}

/* ── Gift Card Section ── */

.gift-section {
  text-align: center;
}

.gift-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.gift-lede {
  color: var(--text-muted);
  max-width: 40ch;
  margin: 0 auto 2.5rem;
}

.gift-card-wrap {
  perspective: 1200px;
  margin-bottom: 2rem;
}

.gift-card-visual {
  position: relative;
  width: min(380px, 92vw);
  margin: 0 auto;
  padding: 1.75rem 1.5rem 1.5rem;
  background: linear-gradient(145deg, #353940 0%, #22252a 45%, #1a1c20 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s;
  cursor: default;
}

.gift-card-visual:hover {
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(212, 168, 83, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.gift-card-texture {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background:
    radial-gradient(circle at 20% 30%, rgba(212, 168, 83, 0.08), transparent 40%),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.015) 2px,
      rgba(255, 255, 255, 0.015) 4px
    );
  pointer-events: none;
}

.gift-card-shine {
  position: absolute;
  inset: -100%;
  background: linear-gradient(
    105deg,
    transparent 42%,
    rgba(255, 255, 255, 0.04) 48%,
    rgba(212, 168, 83, 0.1) 50%,
    rgba(255, 255, 255, 0.04) 52%,
    transparent 58%
  );
  transform: translateX(-120%);
  pointer-events: none;
  transition: transform 0.8s var(--ease-out);
}

.gift-card-visual:hover .gift-card-shine {
  transform: translateX(120%);
}

.gift-card-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
}

.gift-card-brand {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240, 235, 227, 0.55);
}

.gift-card-amount {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold-light);
}

.gift-card-logo-block {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1.25rem 0;
  margin-bottom: 1.25rem;
}

.gift-card-logo-line {
  display: block;
  width: 72%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 235, 227, 0.35), transparent);
}

.gift-card-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
}

.gift-card-logo-jc {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  color: var(--cream);
  margin-bottom: 0.15rem;
}

.gift-card-logo-name {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--cream);
}

.gift-card-logo-sub {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(240, 235, 227, 0.5);
  margin-top: 0.35rem;
}

.gift-card-footer {
  position: relative;
  padding-top: 0.5rem;
}

.gift-card-for {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--cream);
  margin-bottom: 0.2rem;
}

.gift-card-for strong {
  font-weight: 600;
  color: var(--gold-light);
}

.gift-card-note {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: rgba(240, 235, 227, 0.75);
  margin-bottom: 0.35rem;
}

.gift-card-from {
  font-size: 0.82rem;
  color: rgba(240, 235, 227, 0.45);
}

.gift-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

.wallet-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  background: #000;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s, background 0.3s;
}

.wallet-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  background: #111;
}

.wallet-btn:active {
  transform: scale(0.98);
}

.wallet-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.gift-details {
  width: min(380px, 92vw);
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gift-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.gift-detail-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.gift-detail-value {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  transition: background 0.25s, color 0.25s;
}

.gift-detail-value svg {
  width: 16px;
  height: 16px;
  opacity: 0.45;
  transition: opacity 0.25s;
}

.copy-btn:hover {
  background: rgba(212, 168, 83, 0.1);
  color: var(--gold-light);
}

.copy-btn:hover svg {
  opacity: 1;
}

.copy-btn.copied {
  color: var(--gold);
}

.gift-qr {
  width: 120px;
  height: 120px;
  margin: 0.75rem auto 0;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.footer {
  text-align: center;
  padding: 3rem 0 1rem;
  color: var(--text-muted);
}

.footer p:first-child {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.footer-note {
  font-size: 0.85rem;
  font-style: italic;
}

/* ── Reveal animations ── */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.reveal--in {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }

/* ── Confetti ── */

.confetti-piece {
  position: fixed;
  width: 8px;
  height: 8px;
  pointer-events: none;
  z-index: 200;
  animation: confettiFall var(--fall-duration, 2s) var(--ease-out) forwards;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--drift-x, 0), var(--drift-y, 120px)) rotate(var(--spin, 360deg)) scale(0.3);
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
