@font-face {
  font-family: 'HelvRounded';
  src: url('../assets/font/helvetica-rounded-bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Modernaesthetic';
  src: url('../assets/font/modernaesthetic.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'HelvCompressed';
  src: url('../assets/font/helvetica-compressed.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette from attachment */
  --obsidian: #0D1216;
  --forest: #30332F;
  --ruby: #59001C;
  --mist: #C1C1BD;
  --rose: #FFE6E6;

  --bg: var(--obsidian); /* background now Obsidian (dark) */
  --card-width: 360px;
  --card-padding: 2rem;
  --card-radius: 1rem;
}

* { box-sizing: border-box; }
html,body { height: 100%; }
body {
  margin: 0;
  font-family: Modernaesthetic, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* prevent accidental page scrolling caused by decorative drops */
  overflow: hidden;
}

.site-container{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding: 2rem;
}

.container{
  position: relative;
  /* rely on .site-container grid centering instead of manual top/left transform */
  width: fit-content;
  margin: 0 auto;
}

.card {
  /* responsive: use the smaller of the design width and 92vw so it expands on large screens */
  width: min(var(--card-width), 92vw);
  padding: var(--card-padding);
  /* ensure the card has enough vertical space so its children can center */
  min-height: 420px;
  border-radius: calc(var(--card-radius) * 1.2);
  /* translucent glass so background shows through */
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content: center; /* center children vertically */
  gap: 0.45rem; /* reduce vertical spacing between children (title, subtitle, gift) */
  text-align:center;
  position: relative;
  transition: all 0.2s ease-in-out;
  /* lighter shadow so the card feels floating but still shows the dark page */
  box-shadow: 0 10px 30px rgba(2,6,23,0.45);
  border: 1px solid rgba(255,255,255,0.03);
  z-index: 2; /* ensure card sits above balloons/drops */
}

/* Glassmorphism specifics */
.card--glass{
  backdrop-filter: blur(14px) saturate(140%);
  /* subtle light border to separate card from dark background */
  border: 1px solid rgba(255,255,255,0.06);
  background-clip: padding-box;
}

/* subtle inner highlight to emulate frosted glass */
.card::before{
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  mix-blend-mode: overlay;
}

/* decorative drops (5 boxes around the main card)
  NOTE: make the drops layer fixed so drops can be placed outside the card
  area (fills the page top/bottom like the design screenshots). Using fixed
  positions lets decorative elements occupy the viewport while remaining
  behind the interactive card. */
.drops { position: fixed; inset: 0; pointer-events: none; z-index: 1; }

/* drops-card: container for drops that should sit around the card itself
   (kept relative to the .container to preserve original positions for 1..5) */
.drops-card {
  position: absolute; /* will be placed inside .container which is relative */
  inset: 0; /* match the container area */
  pointer-events: none;
  z-index: 1; /* sit behind the card (card z-index:2) */
}
.drop{
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  border-left: 1px solid rgba(255,255,255,0.04);
  border-top: 1px solid rgba(255,255,255,0.03);
  box-shadow: 10px 10px 60px -8px rgba(0,0,0,0.6);
  position: absolute;
  transition: all 0.2s ease;
  transform: translate3d(0,0,0);
  opacity: 0.75;
  pointer-events: none;
  /* floating animation applied per-drop */
  will-change: transform;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}
.drop-1{ height:84px; width:84px; top: -24px; left: -36px; z-index: -1; animation: floatY 6s ease-in-out infinite; animation-delay: 0s; }
.drop-2{ height:76px; width:76px; bottom: -18px; right: -22px; animation: floatY 5.2s ease-in-out infinite; animation-delay: 0.6s; }
.drop-3{ height:96px; width:96px; bottom: 92px; right: -42px; z-index: -1; animation: floatY 7s ease-in-out infinite; animation-delay: 1.1s; }
.drop-4{ height:112px; width:112px; top: -40px; right: -44px; animation: floatY 5.8s ease-in-out infinite; animation-delay: 0.3s; }
.drop-5{ height:64px; width:64px; bottom: 140px; left: 72px; z-index: -1; animation: floatY 6.6s ease-in-out infinite; animation-delay: 0.9s; }
.drop-1{ height:84px; width:84px; top: -24px; left: -36px; z-index: -1; animation: floatY 5.1s ease-in-out infinite alternate; animation-delay: 0s; }
.drop-2{ height:76px; width:76px; bottom: -18px; right: -22px; animation: floatY 4.4s ease-in-out infinite alternate; animation-delay: 0.6s; }
.drop-3{ height:96px; width:96px; bottom: 92px; right: -42px; z-index: -1; animation: floatY 6s ease-in-out infinite alternate; animation-delay: 1.1s; }
.drop-4{ height:112px; width:112px; top: -40px; right: -44px; animation: floatY 4.9s ease-in-out infinite alternate; animation-delay: 0.3s; }
.drop-5{ height:64px; width:64px; bottom: 140px; left: 72px; z-index: -1; animation: floatY 5.6s ease-in-out infinite alternate; animation-delay: 0.9s; }

/* additional decorative drops to fill mobile vertical gaps */
.drop-6{ height:72px; width:72px; /* top area - place above/around card, outside of it */
  top: 6vh; left: 6vw; z-index: 0; /* faster, subtle up/down */
  animation: floatY 5.2s ease-in-out infinite alternate; animation-delay: 0.2s; }
.drop-7{ height:64px; width:64px; /* bottom area - place near lower viewport edge */
  bottom: 6vh; right: 8vw; z-index: 0; /* slower, floating down */
  animation: floatYDown 7s ease-in-out infinite alternate; animation-delay: 0.7s; }
.drop-8{ height:88px; width:88px; /* top-right area */
  top: 8vh; right: 10vw; z-index: 0; /* medium speed, up */
  animation: floatY 6.8s ease-in-out infinite alternate; animation-delay: 1.0s; }
.drop-9{ height:56px; width:56px; /* bottom-left area */
  bottom: 8vh; left: 8vw; z-index: 0; /* faster, floating down */
  animation: floatYDown 4.6s ease-in-out infinite alternate; animation-delay: 0.4s; }
.drop-10{ height:80px; width:80px; /* centered bottom area */
  bottom: 5vh; left: calc(50% - 40px); z-index: 0; /* slow, gentle up */
  animation: floatY 8s ease-in-out infinite alternate; animation-delay: 0.95s; }

@keyframes floatY {
  0% { transform: translate3d(0,0,0); }
  100% { transform: translate3d(0,-14px,0); }
}

@keyframes floatYDown {
  0% { transform: translate3d(0,0,0); }
  100% { transform: translate3d(0,14px,0); }
}

/* Balloon layer (behind card, rising balloons) */
.balloon-layer{
  position: fixed; /* span the whole viewport so balloons can appear across the page */
  inset: 0;
  z-index: 0; /* behind drops and card */
  pointer-events: none;
  overflow: visible;
}

.balloon{
  position: absolute;
  bottom: -40px;
  width: 28px;
  height: 36px;
  border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
  background: linear-gradient(180deg, rgba(255,230,230,0.95), rgba(255,200,200,0.85));
  box-shadow: 0 6px 18px rgba(13,18,22,0.25), inset 0 -6px 10px rgba(255,255,255,0.06);
  opacity: 0;
  transform: translate3d(0,0,0) scale(0.95);
  /* hint to the browser that transforms and opacity will change - helps GPU compositing */
  will-change: transform, opacity;
}

/* removed old pseudo-element used as a string; replaced by .balloon-string element in JS */

/* decorative balloon string */
.balloon-string{
  position: absolute;
  left: 50%;
  top: calc(100% - 6px); /* start just below the balloon */
  width: 2px;
  height: var(--string-length, 28px);
  transform-origin: top center;
  transform: translateX(-50%) rotate(var(--string-rot, 0deg));
  background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0.06));
  border-radius: 2px;
  will-change: transform;
  pointer-events: none;
}

@keyframes sway {
  0% { transform: translateX(-50%) rotate(calc(var(--string-rot, 0deg) - 6deg)); }
  100% { transform: translateX(-50%) rotate(calc(var(--string-rot, 0deg) + 6deg)); }
}

@keyframes riseUp {
  /* Keep animation purely on transform and opacity to stay on compositor thread */
  0% { transform: translate3d(0,0,0) scale(0.95); opacity: 0.9; }
  100% { transform: translate3d(0, var(--rise, -420px), 0) scale(1.02); opacity: 0; }
}

.title{
  margin:0;
  font-family: Modernaesthetic, HelvRounded, sans-serif;
  font-size: 1.9rem;
  line-height:1.05;
  color: var(--rose); /* light, warm title on dark card */
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
}

.subtitle{
  margin:0;
  /* prefer the rounded bold Helvetica (HelvRounded) for the subtitle text */
  font-family: HelvRounded, HelvCompressed, Modernaesthetic, sans-serif;
  font-size:0.9rem;
  font-weight: 700; /* ensure the bold OTF is used */
  color: var(--mist); /* readable muted text */
  opacity:0.95;
}

.gift-wrap{
  margin-top: 20px; /* move gift slightly lower in the card */
}

/* make the main gift container visually match the mini-gift boxes
   - same background gradient, border, radius, shadow and padding
   - slightly larger so gift image has similar padding ratio */
.gift-wrap{
  display: inline-grid;
  place-items: center;
  width: 116px; /* slightly larger than the gift image width (120 image fits inside) */
  height: 116px;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 8px 30px rgba(2,6,23,0.45);
}

/* ensure the contained .gift image scales nicely inside the box */
.gift-wrap .gift{ width: 88px; height: auto; }

/* grid of mini gifts revealed after main gift is clicked */
.gift-grid{
  display: flex;
  gap: 1rem;
  margin-top: 18px;
  align-items: center;
  justify-content: center;
}
.gift-grid[hidden]{
  display: none;
}
.mini-gift{
  width: 84px;
  height: 84px;
  border-radius: 12px;
  /* lighter, slightly warm ivory background at ~90% opacity for contrast on dark theme */
  background: rgba(255,250,240,0.9);
  /* subtle glass gradient on top to keep original style hint */
  background-image: linear-gradient(180deg, rgba(255,255,250,0.95), rgba(245,240,235,0.88));
  border: 1px solid rgba(255,255,255,0.06);
  /* soft outer shadow for depth (blur in 20-30px range, opacity 18%) */
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  display: inline-grid;
  place-items: center;
  padding: 10px;
  cursor: pointer;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 240ms ease-in-out;
  will-change: transform, opacity;
  position: relative; /* needed for pseudo-elements (halo / glow) */
  overflow: visible;
}
.mini-gift img{ width: 56px; height: 56px; object-fit: contain; position: relative; z-index: 2; }

/* radial halo behind the icon to improve legibility on dark background */
.mini-gift::before{
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 62%;
  height: 62%;
  border-radius: 14px; /* slightly rounded to match card shape */
  pointer-events: none;
  /* radial centered ivory -> transparent (60-70% opacity center) */
  background: radial-gradient(circle at center, rgba(255,250,240,0.68) 0%, rgba(255,250,240,0.2) 35%, rgba(255,250,240,0.0) 65%);
  z-index: 1;
  filter: blur(2px);
}

/* subtle warm glow accent near the bottom of the card */
.mini-gift::after{
  content: '';
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  width: 68%;
  height: 26%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255,200,120,0.12) 0%, rgba(255,200,120,0.06) 40%, rgba(0,0,0,0) 100%);
  z-index: 0;
  filter: blur(6px);
}
.mini-gift:hover{ transform: translateY(-6px) scale(1.04); }
.mini-gift:active{ transform: translateY(-2px) scale(0.98); }

/* reveal animation */
.gift-grid.revealed{
  animation: revealGrid 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes revealGrid{
  0% { transform: translateZ(0) scale(0.96); opacity: 0; }
  60% { transform: translateZ(0) scale(1.02); opacity: 1; }
  100% { transform: translateZ(0) scale(1); opacity: 1; }
}

.gift{
  width:120px;
  height:auto;
  cursor:pointer;
  transition: transform 280ms cubic-bezier(.2,.9,.3,1), filter 200ms;
  user-select:none;
  filter: drop-shadow(0 10px 18px rgba(13,18,22,0.5));
  transform-origin: 50% 50%;
}

/* animation when the main gift exits (fade + scale + rotate) */
.gift.gift--exit{
  /* smoother, quicker exit using gentle easing */
  animation: giftExit 420ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes giftExit{
  0% { opacity: 1; transform: translateZ(0) translateY(0) scale(1) rotate(0); }
  45% { opacity: 0.98; transform: translateZ(0) translateY(-8px) scale(1.03) rotate(-4deg); }
  100% { opacity: 0; transform: translateZ(0) translateY(-40px) scale(0.72) rotate(-10deg); }
}

/* slight upward nudge for title/subtitle to reduce empty space above the text */
.title{
  transform: translateY(-6px);
}
.subtitle{
  transform: translateY(-2px);
}

.gift:hover{
  transform: translateY(-6px) scale(1.03);
  filter: drop-shadow(0 18px 36px rgba(89,0,28,0.18));
}

/* Idle animation for the gift box: scale up, snap back, shake, then rest small for 1.5s */
.gift.gift--idle{
  transform-origin: 50% 50%;
  /* subtle, slow breathe using a smooth easing */
  animation: giftIdle 3600ms cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes giftIdle {
  /* 0-18%: quick pop bigger then shrink; include rotation shake during the pop */
  0%   { transform: translateY(0) scale(1) rotate(0); }
  6%   { transform: translateY(-6px) scale(1.06) rotate(-8deg); }
  10%  { transform: translateY(-10px) scale(1.12) rotate(8deg); }
  14%  { transform: translateY(-5px) scale(1.04) rotate(-6deg); }
  18%  { transform: translateY(0) scale(0.96) rotate(0); }
  /* 18-65%: small settle while small (no shake) */
  30%  { transform: translateY(0) scale(0.96) rotate(0); }
  65%  { transform: translateY(0) scale(0.96) rotate(0); }
  /* 65-100%: rest/idle small for remaining time */
  100% { transform: translateY(0) scale(0.96) rotate(0); }
}

/* allow JS to pause the idle animation briefly while the click/pop animation runs */
.gift.gift--paused{ animation-play-state: paused !important; }
*** End Patch

.gift:active{
  transform: translateY(0) scale(0.98) rotate(0deg);
}

/* surprise UI removed */

@media (min-width: 320px){
  /* slightly larger on small devices */
  :root{ --card-width: 520px; }
}

@media (min-width: 760px){
  /* desktop: allow the card to expand more horizontally */
  :root{ --card-width: 760px; }
  .title{ font-size:2.4rem; }
}

/* Mobile adjustments: place some drops near the top/bottom to avoid empty space */
@media (max-width: 480px){
  /* mobile: keep drops clearly outside the card and closer to the viewport edges */
  .drop-6{ top: 4vh; left: 15vw; }
  .drop-8{ top: 6vh; right: 4vw; }
  /* raise these so they sit higher on small screens */
  .drop-10{ bottom: 18vh; left: calc(50% - 40px); }
  .drop-9{ bottom: 15vh; left: 4vw; }
  /* move drop-7 slightly left (increase right offset) */
  .drop-7{ bottom: 12vh; right: 6vw; }
}

/* -------------------- Memories page styles -------------------- */
.memories-page{
  min-height:100vh;
  padding: 3.2rem 1.25rem;
  background: radial-gradient(1200px 600px at 10% 10%, rgba(255,230,235,0.03), transparent 8%),
              linear-gradient(180deg, rgba(8,10,12,0.98), rgba(8,10,12,0.99));
  color: var(--mist);
  font-family: 'Poppins', Modernaesthetic, system-ui, -apple-system, 'Segoe UI', Roboto, Arial;
}

.mem-back{
  position: fixed;
  left: 18px;
  top: 16px;
  z-index: 40;
  background: transparent;
  color: var(--rose);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 8px 12px;
  border-radius: 10px;
  backdrop-filter: blur(6px);
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(2,6,23,0.6);
}

.mem-header{
  max-width: 980px;
  margin: 36px auto 18px;
  text-align: center;
}
.mem-title{
  margin: 0 0 6px;
  font-family: 'Playfair Display', 'Poppins', Modernaesthetic, serif;
  font-size: clamp(1.6rem, 3.2vw, 2.8rem);
  color: var(--rose);
  letter-spacing: 0.6px;
}
.mem-sub{
  margin: 0;
  color: rgba(255,255,255,0.62);
  font-size: 0.95rem;
}

.mem-gallery{
  max-width: 1100px;
  margin: 18px auto 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 10px;
}
.mem-item{
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 12px 36px rgba(2,6,23,0.5);
  transition: transform 320ms cubic-bezier(.2,.9,.3,1), box-shadow 320ms ease, filter 320ms ease;
}
.mem-item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center center;
}
.mem-item:hover{
  transform: scale(1.02);
  box-shadow: 0 20px 54px rgba(2,6,23,0.6);
}
.mem-item:focus-within{
  outline: 2px solid rgba(255,230,235,0.12);
}

/* hover gentle zoom with soft shadow and a subtle overlay */
.mem-item::after{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0;
  transition: opacity 260ms ease;
}
.mem-item:hover::after{ opacity: 1; }

/* Responsive: tablet -> 2 columns; mobile -> 1 column */
@media (max-width: 900px){
  .mem-gallery{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px){
  .mem-gallery{ grid-template-columns: 1fr; gap: 12px; }
  .mem-header{ margin-top: 20px; }
  .mem-back{ left: 12px; top: 10px; padding: 6px 10px; }
}

/* subtle dreamy tint on images */
.mem-item img{ filter: saturate(0.95) contrast(1.02) brightness(0.98); }

/* small helper to make images keyboard-focusable */
.mem-item img[tabindex]{ outline: none; }

/* Page fade-in for emotional, nostalgic feel */
.memories-page{
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 560ms cubic-bezier(.2,.9,.3,1), transform 560ms cubic-bezier(.2,.9,.3,1);
}
.memories-page.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* Exit animation when user clicks Back: slide down + fade out */
.memories-page.is-exiting{
  opacity: 0;
  transform: translateY(18px) scale(0.998);
  transition: opacity 420ms cubic-bezier(.22,.9,.3,1), transform 420ms cubic-bezier(.22,.9,.3,1);
}

/* Image entry animation + initial hidden state */
.mem-item{
  opacity: 0;
  transform: translateY(8px) scale(0.995);
}
.mem-item.is-visible{
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 520ms ease, transform 520ms cubic-bezier(.2,.9,.3,1);
}

/* Hover: gentle enlarge + softer shadow + smooth transition */
.mem-item:hover{
  transform: scale(1.03);
  box-shadow: 0 26px 68px rgba(2,6,23,0.64);
  transition: transform 300ms cubic-bezier(.2,.9,.3,1), box-shadow 300ms ease;
}

/* Lyrics subtitle box (center bottom) */
.lyric-subtitle{
  position: fixed;
  left: 50%;
  bottom: 6.5vh;
  transform: translateX(-50%) translateY(0);
  z-index: 120;
  max-width: 86%;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(6,8,10,0.6), rgba(4,6,8,0.48));
  color: #fff;
  border-radius: 12px;
  text-align: center;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial;
  font-size: 1rem;
  line-height: 1.25;
  box-shadow: 0 10px 40px rgba(0,0,0,0.55);
  opacity: 0.94; /* keep container visible so play button is clickable */
  pointer-events: auto;
  transition: opacity 220ms ease, transform 220ms ease;
}
.lyric-subtitle .line{ display: block; white-space: pre-wrap; opacity: 0; transition: opacity 220ms ease; }
.lyric-subtitle.show .line{ opacity: 1; }

/* Play/Pause button inside subtitle */
.lyric-play{
  display: inline-grid;
  place-items: center;
  margin-left: 10px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  color: var(--rose);
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
  font-weight: 600;
}
.lyric-subtitle .controls{ display:flex; align-items:center; justify-content:center; gap:8px; }

/* Debug overlay for lyric/player state (temporary) */
/* debug overlay removed */




