*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg-top:#fef9f0;--bg-mid:#f0e0cc;--bg-bot:#1a1826;
  --trunk:#4a3222;--branch:#5c3d2e;--branch-light:#7a5740;
  --leaf:#6b8f5e;--leaf-light:#8aab7a;--leaf-dark:#4a6b3e;
  --gold:#c4a35a;--gold-dark:#8a7030;--cream:#faf6ef;
  --text-dark:#2c1810;--text-light:#f5efe8;
  --frame-white:#fdfaf6;
  --shadow-soft:rgba(44,24,16,0.12);--shadow-strong:rgba(44,24,16,0.25);
  --transition-med:0.35s cubic-bezier(0.25,0.1,0.25,1);
}
html{scroll-behavior:smooth;-webkit-font-smoothing:antialiased}
body{
  font-family:'Lora',Georgia,serif;color:var(--text-dark);
  overflow-x:hidden;background:var(--bg-top);transition:background 1s ease;
}
body.scrolled-mid{background:var(--bg-mid)}
body.scrolled-bot{background:var(--bg-bot);color:var(--text-light)}
body.bloom-open{overflow:hidden}
#particlesCanvas{
  position:fixed;top:0;left:0;width:100%;height:100%;z-index:0;pointer-events:none
}

/* HERO */
#hero{position:relative;z-index:2;min-height:100vh;display:flex;align-items:center;justify-content:center;padding:60px 20px 80px}
.hero-inner{text-align:center;max-width:600px;width:100%}
.cover-wrapper{position:relative;display:inline-block;margin-bottom:40px}
.cover-frame{
  position:relative;display:inline-block;padding:12px;background:var(--frame-white);border-radius:6px;
  box-shadow:0 2px 8px var(--shadow-soft),0 8px 32px var(--shadow-strong),0 0 0 1px rgba(196,163,90,0.2);
  animation:frameAppear 1.2s cubic-bezier(0.22,0.61,0.36,1) both;
}
.frame-glow{
  position:absolute;inset:-6px;border-radius:10px;
  background:radial-gradient(ellipse at center,rgba(196,163,90,0.25),transparent 70%);
  z-index:-1;animation:glowPulse 4s ease-in-out infinite;
}
#coverPhoto{display:block;width:280px;height:280px;object-fit:cover;border-radius:2px}
@media(min-width:480px){#coverPhoto{width:340px;height:340px}}
.hero-bday{
  font-family:'Cormorant Garamond',Georgia,serif;font-size:16px;letter-spacing:0.14em;
  text-transform:uppercase;color:var(--gold);margin-bottom:8px;
  animation:fadeUp 1s 0.15s cubic-bezier(0.22,0.61,0.36,1) both;
}
.hero-title{
  font-family:'Playfair Display',Georgia,serif;font-size:clamp(42px,8vw,80px);font-weight:600;
  color:var(--text-dark);letter-spacing:0.04em;margin-bottom:12px;
  animation:fadeUp 1s 0.3s cubic-bezier(0.22,0.61,0.36,1) both;
}
.hero-tagline{
  font-family:'Cormorant Garamond',Georgia,serif;font-size:clamp(18px,3vw,24px);
  font-style:italic;color:#7a6652;letter-spacing:0.06em;
  animation:fadeUp 1s 0.5s cubic-bezier(0.22,0.61,0.36,1) both;
}
.hero-divider{
  display:flex;align-items:center;justify-content:center;gap:16px;margin:28px 0 16px;
  animation:fadeUp 1s 0.6s cubic-bezier(0.22,0.61,0.36,1) both;
}
.divider-line{width:60px;height:1px;background:linear-gradient(to right,transparent,var(--gold),transparent)}
.divider-diamond{font-size:8px;color:var(--gold);opacity:0.7}
.scroll-hint{
  position:absolute;bottom:36px;left:50%;transform:translateX(-50%);
  display:flex;flex-direction:column;align-items:center;gap:6px;
  font-size:11px;letter-spacing:0.12em;text-transform:uppercase;color:#b8a48e;
  animation:fadeUp 1s 0.9s cubic-bezier(0.22,0.61,0.36,1) both,bob 2.5s ease-in-out 1.9s infinite;
}
.scroll-arrow{color:var(--gold);opacity:0.6}

/* TREE SECTION */
#treeSection{position:relative;z-index:2;padding-bottom:200px}
#treeSvg{display:block;width:100%;height:auto;z-index:2;position:relative}

/* SVG elements */
.trunk-main{fill:#4a3222}
.trunk-hl{fill:rgba(255,255,255,0.035)}
.trunk-sd{fill:rgba(0,0,0,0.1)}
.branch-line{fill:none;stroke:var(--branch);stroke-linecap:round}
.branch-line.thin{stroke:var(--branch-light);opacity:0.6}
.leaf-dot{fill:var(--leaf);opacity:0.75}
.leaf-dot.light{fill:var(--leaf-light)}
.leaf-dot.dark{fill:var(--leaf-dark)}

.hanger-thread{opacity:0.7}
.hanger-knot{opacity:0.8}

/* ===== TREE ANIMALS ===== */
.tree-animal { pointer-events:none; }
.tree-animal.monkey {
  animation: monkeyIdle 3s ease-in-out infinite;
}
.tree-animal.squirrel {
  animation: squirrelIdle 1.8s ease-in-out infinite;
}
@keyframes monkeyIdle {
  0%,100% { transform: rotate(0deg); }
  30% { transform: rotate(2deg); }
  70% { transform: rotate(-2deg); }
}
@keyframes squirrelIdle {
  0%,100% { transform: translateY(0); }
  20% { transform: translateY(-2px); }
  50% { transform: translateY(0); }
  75% { transform: translateY(1px); }
}

.year-ring-outer{fill:none;stroke:rgba(138,112,48,0.3);stroke-width:1.2}
.year-ring-inner{fill:none;stroke:rgba(138,112,48,0.5);stroke-width:1.6}

.year-label-svg{
  font-family:'Cormorant Garamond',Georgia,serif;font-size:20px;font-weight:600;
  fill:var(--gold-dark);text-anchor:middle;letter-spacing:0.08em;
  paint-order:stroke;stroke:rgba(255,255,255,0.7);stroke-width:2.5;
  opacity:0;transition:opacity 0.8s ease;
}
.year-label-svg.visible{opacity:1}
@media(min-width:600px){.year-label-svg{font-size:22px}}

/* PHOTO LAYER */
#photoLayer{
  position:absolute;top:0;left:0;width:100%;pointer-events:none;z-index:3;
}
.photo-hanger{
  position:absolute;pointer-events:auto;cursor:pointer;
  opacity:0;
  transform:translate(-50%,-50%) rotate(var(--tilt,0deg)) scale(0.7);
  transition:opacity 0.5s ease,transform 0.5s cubic-bezier(0.22,0.61,0.36,1);
}
.photo-hanger.visible{
  opacity:1;
  transform:translate(-50%,-50%) rotate(var(--tilt,0deg)) scale(1);
}
.photo-hanger:hover{
  transform:translate(-50%,-50%) rotate(0deg) scale(1.1)!important;z-index:20;
}
.hanger-body{
  background:var(--frame-white);padding:5px 5px 22px;border-radius:2px;
  box-shadow:0 2px 5px rgba(44,24,16,0.12),0 4px 14px rgba(44,24,16,0.16);
  position:relative;transition:box-shadow var(--transition-med);
}
.photo-hanger:hover .hanger-body{
  box-shadow:0 4px 12px rgba(44,24,16,0.2),0 8px 30px rgba(44,24,16,0.3);
}
.hanger-body img,.hanger-body video{
  display:block;width:95px;height:95px;object-fit:cover;border-radius:1px;
}
@media(min-width:600px){.hanger-body img,.hanger-body video{width:110px;height:110px}}
@media(min-width:900px){.hanger-body img,.hanger-body video{width:120px;height:120px}}
.hanger-tape{
  position:absolute;top:-7px;left:50%;
  transform:translateX(-50%) rotate(var(--tape-rot,-3deg));
  width:28px;height:10px;background:rgba(255,255,240,0.65);
  border-radius:2px;box-shadow:0 1px 2px rgba(0,0,0,0.06);
}
.video-badge{
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  width:26px;height:26px;border-radius:50%;background:rgba(0,0,0,0.45);
  display:flex;align-items:center;justify-content:center;pointer-events:none;
}
.video-badge::after{
  content:'';display:block;border-left:8px solid white;
  border-top:5px solid transparent;border-bottom:5px solid transparent;margin-left:2px;
}

/* ROOTS */
.tree-roots{
  position:absolute;bottom:0;left:0;right:0;height:120px;z-index:4;pointer-events:none;
}
.tree-roots svg{width:60%;height:100%;max-width:300px;margin:0 auto;display:block}
.root-path{fill:none;stroke:var(--trunk);stroke-width:4;stroke-linecap:round;opacity:0.7}

/* FALL STAGE */
#fallStage{
  position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;pointer-events:none;
}
.falling-fruit{
  position:absolute;z-index:101;pointer-events:none;transition:none;
}

/* FRAGMENT LAYER */
#fragmentLayer{
  position:fixed;top:0;left:0;width:100%;height:100%;z-index:150;pointer-events:none;
}
.fragment-piece{
  position:absolute;background-size:cover;background-repeat:no-repeat;
  transition:all 0.7s cubic-bezier(0.22,0.61,0.36,1);
  box-shadow:0 2px 8px rgba(0,0,0,0.3);
  border-radius:1px;
}
.fragment-piece.scattered{
  transition:all 0.5s cubic-bezier(0.22,0.61,0.36,1);
}

/* ===== BIRD STAGE ===== */
#birdStage {
  position:fixed; top:0; left:0; width:100%; height:100%;
  z-index:105; pointer-events:none; display:none;
}
#birdStage.active { display:block; }
#birdSvg {
  position:absolute; top:0; left:0;
  transition: none;
}
#birdSvg.fly-right { transform: scaleX(-1); }
#birdSvg.flapping .wing-near {
  animation: flapNear 0.12s ease-in-out infinite;
  transform-origin: 38px 22px;
}
#birdSvg.flapping .wing-far {
  animation: flapFar 0.12s ease-in-out 0.06s infinite;
  transform-origin: 28px 20px;
}
@keyframes flapNear {
  0%,100% { transform: rotate(0deg); }
  50% { transform: rotate(-35deg); }
}
@keyframes flapFar {
  0%,100% { transform: rotate(0deg); }
  50% { transform: rotate(30deg); }
}

#birdSvg.pecking .bird-body {
  animation: peckBody 0.25s ease-in-out;
}
#birdSvg.pecking .bird-beak {
  animation: peckBeak 0.25s ease-in-out;
}
@keyframes peckBody {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(6px,4px); }
}
@keyframes peckBeak {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  50% { transform: translate(4px,2px) rotate(8deg); }
}

/* SPLASH */
#splashLayer{
  position:fixed;top:0;left:0;width:100%;height:100%;z-index:102;pointer-events:none;
}
.splash-particle{
  position:absolute;border-radius:50%;pointer-events:none;
  animation:splashBurst 0.8s cubic-bezier(0.22,0.61,0.36,1) both;
}
.splash-impact{
  position:absolute;border-radius:50%;
  background:radial-gradient(circle,rgba(255,240,210,0.9),rgba(196,163,90,0.3),transparent);
  pointer-events:none;
  animation:impactRing 0.6s ease-out both;
}
@keyframes splashBurst{
  0%{transform:translate(0,0) scale(1.2);opacity:1}
  60%{opacity:0.7}
  100%{transform:translate(var(--sx),var(--sy)) scale(0.1);opacity:0}
}
@keyframes impactRing{
  0%{transform:translate(-50%,-50%) scale(0);opacity:1}
  100%{transform:translate(-50%,-50%) scale(8);opacity:0}
}

/* BLOOM OVERLAY */
#bloom{
  position:fixed;inset:0;z-index:300;
  display:flex;align-items:center;justify-content:center;
  opacity:0;pointer-events:none;transition:opacity 0.45s ease;
}
#bloom.bloom-visible{opacity:1;pointer-events:auto}
#bloom.bloom-hidden{opacity:0;pointer-events:none}
.bloom-bg{
  position:absolute;inset:0;
  background:radial-gradient(ellipse at center,rgba(20,16,28,0.9) 0%,rgba(6,4,10,0.97) 100%);
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
}
.bloom-close{
  position:absolute;top:18px;right:26px;z-index:10;
  background:none;border:none;color:rgba(255,255,255,0.5);
  font-size:38px;cursor:pointer;transition:color 0.25s;line-height:1;
  font-family:'Cormorant Garamond',Georgia,serif;
}
.bloom-close:hover{color:white}
.bloom-card{
  position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;
  max-width:88vw;max-height:88vh;
  animation:bloomIn 0.55s cubic-bezier(0.22,0.61,0.36,1) both;
}
@keyframes bloomIn{
  from{transform:scale(0.25) translateY(40px);opacity:0}
  to{transform:scale(1) translateY(0);opacity:1}
}
.bloom-year{
  font-family:'Cormorant Garamond',Georgia,serif;font-size:13px;
  letter-spacing:0.18em;text-transform:uppercase;color:var(--gold);margin-bottom:14px;
  opacity:0;animation:fadeIn 0.4s 0.15s ease both;
}
.bloom-media-wrap{
  position:relative;padding:8px;background:rgba(253,250,246,0.05);border-radius:10px;
  box-shadow:0 0 0 1px rgba(196,163,90,0.18),0 0 60px rgba(196,163,90,0.08),0 8px 50px rgba(0,0,0,0.4);
  opacity:0;animation:fadeIn 0.4s 0.25s ease both;
}
.bloom-media{border-radius:6px;overflow:hidden;max-width:82vw;max-height:55vh}
.bloom-media img{display:block;max-width:82vw;max-height:55vh;object-fit:contain;border-radius:6px}
.bloom-media video{display:block;max-width:82vw;max-height:55vh;border-radius:6px;outline:none}
.bloom-desc{
  font-family:'Cormorant Garamond',Georgia,serif;font-size:24px;font-style:italic;
  color:rgba(255,255,255,0.82);text-align:center;max-width:580px;
  margin-top:22px;line-height:1.45;letter-spacing:0.03em;padding:0 20px;
  opacity:0;animation:fadeIn 0.5s 0.35s ease both;
}
.bloom-desc::before{content:'\201C';color:var(--gold);font-size:32px;margin-right:4px}
.bloom-desc::after{content:'\201D';color:var(--gold);font-size:32px;margin-left:4px}
@keyframes fadeIn{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:translateY(0)}
}
@media(min-width:600px){.bloom-desc{font-size:28px}}
@media(max-width:480px){
  .bloom-desc{font-size:18px}
  .bloom-media-wrap{padding:5px}
  .bloom-media{max-width:90vw;max-height:50vh}
  .bloom-media img,.bloom-media video{max-width:90vw;max-height:50vh}
}

@keyframes frameAppear{
  from{opacity:0;transform:translateY(30px) scale(0.92)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@keyframes fadeUp{
  from{opacity:0;transform:translateY(24px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes glowPulse{0%,100%{opacity:0.2}50%{opacity:0.5}}
@keyframes bob{
  0%,100%{transform:translateX(-50%) translateY(0)}
  50%{transform:translateX(-50%) translateY(8px)}
}

/* ===== RESPONSIVE ===== */
/* Tablet */
@media(max-width:900px){
  #coverPhoto{width:240px;height:240px}
  .cover-wrapper{margin-bottom:30px}
  .hero-bday{font-size:13px}
  .hero-title{font-size:clamp(32px,7vw,56px)}
  .hero-tagline{font-size:clamp(15px,2.5vw,20px)}
  #hero{padding:50px 16px 70px}

  .hanger-body img,.hanger-body video{width:85px;height:85px}
  .hanger-body{padding:4px 4px 18px}
  .hanger-tape{width:22px;height:8px;top:-5px}
  .video-badge{width:22px;height:22px}
  .video-badge::after{border-left-width:6px;border-top-width:4px;border-bottom-width:4px}

  .year-label-svg{font-size:16px;stroke-width:2}
  .year-ring-outer,.year-ring-inner{stroke-width:0.8}

  #birdSvg{width:60px;height:auto}
  .bloom-close{font-size:32px;top:12px;right:16px}
}

/* Phone */
@media(max-width:600px){
  #coverPhoto{width:180px;height:180px}
  .cover-frame{padding:8px}
  .cover-wrapper{margin-bottom:24px}
  .hero-bday{font-size:11px;letter-spacing:0.1em}
  .hero-title{font-size:clamp(28px,9vw,40px)}
  .hero-tagline{font-size:14px}
  .hero-divider{margin:20px 0 12px}
  .divider-line{width:40px}
  #hero{padding:40px 14px 60px;min-height:100vh}
  .scroll-hint{bottom:24px;font-size:10px}
  .scroll-arrow{width:18px;height:18px}

  .hanger-body img,.hanger-body video{width:62px;height:62px}
  .hanger-body{padding:3px 3px 14px}
  .hanger-tape{width:18px;height:6px;top:-4px}
  .video-badge{width:18px;height:18px}
  .video-badge::after{border-left-width:5px;border-top-width:3px;border-bottom-width:3px}

  .year-label-svg{font-size:14px;stroke-width:1.8}
  .tree-roots{height:80px}
  .tree-roots svg{width:80%}
  #treeSection{padding-bottom:120px}

  .bloom-close{font-size:30px;top:8px;right:12px}
  .bloom-year{font-size:11px;margin-bottom:10px}
  .bloom-media-wrap{padding:5px}
  .bloom-media{max-width:94vw;max-height:48vh}
  .bloom-media img,.bloom-media video{max-width:94vw;max-height:48vh}
  .bloom-desc{font-size:16px;margin-top:14px;max-width:90vw}
  .bloom-desc::before,.bloom-desc::after{font-size:22px}
  .bloom-card{max-width:96vw}

  #birdSvg{width:48px}
  #fallStage .falling-fruit{transform:translate(-50%,-50%) scale(0.7)!important}
  #fallStage .falling-fruit .hanger-body img,
  #fallStage .falling-fruit .hanger-body video{width:80px;height:80px}

  .fragment-piece{box-shadow:0 1px 4px rgba(0,0,0,0.25)}
}

/* Small phone */
@media(max-width:380px){
  #coverPhoto{width:150px;height:150px}
  .hero-title{font-size:26px}
  .hero-tagline{font-size:13px}
  .hero-bday{font-size:10px}

  .hanger-body img,.hanger-body video{width:50px;height:50px}
  .hanger-body{padding:2px 2px 10px}
  .hanger-tape{width:14px;height:5px;top:-3px}

  .year-label-svg{font-size:12px;stroke-width:1.5}

  #birdSvg{width:38px}
  .bloom-desc{font-size:14px}
}
