/* =====================================================================
   base.css - colors, fonts, buttons, navigation, lightbox, small things
   Want a different look? Change the colors in :root first.
   ===================================================================== */

:root {
  --ink: #14040b;          /* darkest background */
  --wine: #2a0a17;
  --burgundy: #5b1330;
  --rose: #8c2a4a;
  --blush: #f4c2c9;
  --cream: #fbf1e3;
  --lav: #c9b8f0;
  --gold: #e6c27a;

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --script: 'Caveat', 'Segoe Script', 'Bradley Hand', cursive;
  --display: 'Great Vibes', 'Brush Script MT', cursive;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(.22, .8, .24, 1);
  --dock-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; overflow: hidden; }

body {
  font-family: var(--sans);
  color: var(--cream);
  background: radial-gradient(120% 90% at 50% 0%, #3a0f22 0%, #1d0711 48%, #0e0307 100%) fixed;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
svg { display: block; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

#app { position: fixed; inset: 0; }

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

/* ---------- small text helpers ---------- */
.eyebrow {
  font-size: .7rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--gold); font-weight: 500;
}
.intro { font-family: var(--script); font-size: 1.45rem; color: var(--blush); opacity: .95; line-height: 1.25; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px;
  border: 1px solid rgba(230, 194, 122, .55);
  background: rgba(255, 255, 255, .05);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: var(--cream); font-size: .95rem; letter-spacing: .04em;
  transition: transform .3s var(--ease), background .3s, box-shadow .3s, border-color .3s;
}
.btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .1); box-shadow: 0 8px 30px rgba(230, 194, 122, .18); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary {
  background: linear-gradient(135deg, #b23a63, #7a1f42);
  border-color: rgba(230, 194, 122, .8);
  box-shadow: 0 8px 28px rgba(178, 58, 99, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
  font-size: 1rem; padding: 1rem 1.9rem;
}
.btn-primary:hover { background: linear-gradient(135deg, #c8467a, #8a2549); box-shadow: 0 10px 36px rgba(200, 70, 122, .5); }
.btn-ghost { border-color: rgba(244, 194, 201, .35); font-size: .88rem; }

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 22px;
  background: radial-gradient(100% 80% at 50% 40%, #3a0f22, #0e0307);
  transition: opacity .9s ease, visibility 0s .9s;
}
body:not(.is-loading) #loader { opacity: 0; visibility: hidden; pointer-events: none; }
#loader p { font-family: var(--script); font-size: 1.5rem; color: var(--blush); letter-spacing: .02em; }
.orb {
  width: 54px; height: 54px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7dd, var(--gold) 45%, #c47a4a 100%);
  box-shadow: 0 0 40px 10px rgba(230, 194, 122, .45), 0 0 100px 30px rgba(244, 194, 201, .2);
  animation: orbPulse 1.8s ease-in-out infinite;
}
@keyframes orbPulse { 0%, 100% { transform: scale(.85); opacity: .8; } 50% { transform: scale(1.1); opacity: 1; } }

/* ---------- navigation (phone: bottom bar, computer: top bar) ---------- */
#nav {
  position: fixed; z-index: 40;
  left: 10px; right: 10px; bottom: calc(10px + var(--safe-b));
  height: var(--dock-h);
  display: flex; justify-content: space-around; align-items: center; gap: 2px;
  padding: 0 6px;
  background: rgba(30, 8, 18, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(244, 194, 201, .18);
  border-radius: 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(24px);
  transition: opacity .8s ease, transform .8s var(--ease);
}
#nav.show { opacity: 1; transform: none; }
#nav button {
  flex: 1; min-width: 0; height: 52px; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: rgba(251, 241, 227, .6); font-size: .6rem; letter-spacing: .06em;
  transition: color .3s, background .3s, transform .3s var(--ease);
}
#nav button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#nav button:hover { color: var(--cream); background: rgba(255, 255, 255, .06); }
#nav button.active { color: var(--gold); background: rgba(230, 194, 122, .12); }
#nav button.done::after { content: ''; position: absolute; }

@media (min-width: 860px) {
  #nav {
    left: 50%; right: auto; bottom: auto; top: calc(16px + var(--safe-t));
    transform: translate(-50%, -24px); height: 56px; padding: 0 8px; gap: 4px;
  }
  #nav.show { transform: translate(-50%, 0); }
  #nav button { flex-direction: row; gap: 8px; padding: 0 16px; height: 42px; font-size: .82rem; flex: none; }
  #nav button svg { width: 18px; height: 18px; }
}

/* ---------- music button ---------- */
.music {
  position: fixed; z-index: 41; top: calc(14px + var(--safe-t)); right: 14px;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(30, 8, 18, .6); border: 1px solid rgba(244, 194, 201, .25);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: grid; place-items: center;
  transition: transform .3s var(--ease), border-color .3s;
}
.music:hover { transform: scale(1.08); border-color: var(--gold); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.bars i { width: 3px; height: 4px; border-radius: 2px; background: var(--blush); transition: background .3s; }
.bars i:nth-child(1) { height: 7px; } .bars i:nth-child(2) { height: 13px; } .bars i:nth-child(3) { height: 9px; } .bars i:nth-child(4) { height: 15px; }
.music::after { content: ''; position: absolute; width: 26px; height: 2px; border-radius: 2px; background: var(--cream); opacity: .85; transform: rotate(-45deg); transition: opacity .3s; }
.music.playing::after { opacity: 0; }
.music.playing .bars i { background: var(--gold); animation: eq 1s ease-in-out infinite; }
.music.playing .bars i:nth-child(2) { animation-delay: -.3s; }
.music.playing .bars i:nth-child(3) { animation-delay: -.6s; }
.music.playing .bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }

/* ---------- toast ---------- */
#toast {
  position: fixed; z-index: 90; left: 50%; bottom: calc(var(--dock-h) + 36px + var(--safe-b));
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(88vw, 420px); text-align: center;
  padding: .75rem 1.2rem; border-radius: 16px;
  background: rgba(20, 4, 11, .92); border: 1px solid rgba(230, 194, 122, .4);
  font-size: .9rem; line-height: 1.4; color: var(--cream);
  transition: opacity .4s, transform .4s var(--ease);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 860px) { #toast { bottom: 34px; } }

/* ---------- picture viewer (lightbox) ---------- */
#lightbox {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(10, 2, 6, .94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .35s ease;
}
#lightbox.show { opacity: 1; }
.lb-stage {
  flex: 1; width: 100%; min-height: 0; overflow: auto; display: grid; place-items: center;
  padding: 64px 12px 8px; cursor: zoom-in;
}
.lb-stage img {
  max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, .6);
  animation: lbIn .45s var(--ease);
}
.lb-stage.zoom { cursor: zoom-out; place-items: start center; }
.lb-stage.zoom img { max-width: none; max-height: none; width: 190%; }
@keyframes lbIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.lb-info { padding: 6px 22px calc(18px + var(--safe-b)); text-align: center; max-width: 640px; }
.lb-info h3 { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
.lb-info p { font-family: var(--script); font-size: 1.3rem; color: var(--blush); margin-top: 2px; }
.lb-row { margin-top: 8px; display: flex; gap: 16px; justify-content: center; align-items: center; font-size: .78rem; letter-spacing: .15em; color: rgba(251, 241, 227, .55); }
.lb-dl { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(230, 194, 122, .5); letter-spacing: .08em; }
.lb-btn {
  position: absolute; z-index: 2; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15);
  display: grid; place-items: center; transition: background .3s, transform .3s var(--ease);
}
.lb-btn:hover { background: rgba(255, 255, 255, .18); transform: scale(1.08); }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--cream); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: calc(14px + var(--safe-t)); right: 14px; }
.lb-prev, .lb-next { top: 50%; margin-top: -23px; }
.lb-prev { left: 10px; } .lb-next { right: 10px; }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: calc(112px + var(--safe-b)); margin: 0; } }

/* ---------- people who prefer less motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
