.hero-header {
  text-align: center;
  margin-bottom: 5rem;
  animation: float-in 1s ease both;
}

.birthday-badge {
  font-size: 4rem;
  margin-bottom: 2rem;
  display: block;
  animation: bounce 2s infinite;
}

.birthday-badge img {
  height: 11rem;
  width: auto;
  display: block;
  margin: 0 auto;
  filter: url(#remove-black);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes float-in {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  background: linear-gradient(90deg, #ff6b9d, #ffd93d, #6bcb77, #4d96ff, #c77dff);
  background-size: 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s linear infinite;
  line-height: 1.1;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.hero-subtitle {
  color: rgba(255,255,255,0.85);
  font-size: 1.2rem;
  margin-top: 0.5rem;
  font-weight: 600;
}

.presents-row {
  display: flex;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: flex-end;
  justify-content: center;
  animation: float-in 1s 0.3s ease both;
}

.present-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  outline: none;
  user-select: none;
  transition: transform 0.2s ease;
}

.present-wrapper:hover { transform: translateY(-8px) scale(1.03); }
.present-wrapper:active { transform: translateY(0) scale(0.98); }
.present-wrapper:focus-visible .present-scene { outline: 3px solid #ffd93d; border-radius: 4px; }

.present-label {
  color: rgba(255,255,255,0.8);
  font-weight: 700;
  font-size: 1rem;
  margin-top: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.present-scene {
  position: relative;
  width: 160px;
  height: 180px;
  perspective: var(--perspective);
}

.present-box {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 160px;
  height: 130px;
  background: var(--box-color);
  border-radius: 4px 4px 6px 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
}

.ribbon-h {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 20px;
  background: var(--ribbon-color);
  opacity: 0.9;
}

.ribbon-v {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  background: var(--ribbon-color);
  opacity: 0.9;
}

.bow {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 30px;
}

.bow-loop {
  position: absolute;
  width: 28px;
  height: 20px;
  background: var(--ribbon-color);
  border-radius: 50%;
  top: 0;
}

.bow-loop-left {
  left: 0;
  transform: rotate(-30deg);
  transform-origin: right center;
}

.bow-loop-right {
  right: 0;
  transform: rotate(30deg);
  transform-origin: left center;
}

.bow-knot {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--ribbon-color);
  border-radius: 50%;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  filter: brightness(0.85);
  z-index: 2;
}

.lid {
  position: absolute;
  bottom: 118px;
  left: 0;
  width: 160px;
  height: 50px;
  transform-style: preserve-3d;
  transition: transform 0.4s ease-out;
}

.lid-top {
  position: absolute;
  inset: 0;
  background: var(--box-color, #ff6b9d);
  filter: brightness(1.1);
  border-radius: 4px 4px 0 0;
}

.present-box { --box-color: #ff6b9d; }
.lid { --box-color: inherit; }

.lid-flap {
  position: absolute;
  background: inherit;
  transition: transform var(--unfold-duration) var(--ease-unfold);
  backface-visibility: hidden;
}

.lid-flap-front,
.lid-flap-back {
  left: 0; right: 0;
  height: 50px;
}

.lid-flap-left,
.lid-flap-right {
  top: 0; bottom: 0;
  width: 80px;
}

.lid-flap-front {
  bottom: -50px; top: auto;
  transform-origin: top center;
  background: var(--box-color, #ff6b9d);
  filter: brightness(0.9);
}

.lid-flap-back {
  top: -50px;
  transform-origin: bottom center;
  background: var(--box-color, #ff6b9d);
  filter: brightness(1.15);
}

.lid-flap-left {
  left: 0;
  transform-origin: right center;
  background: var(--box-color, #ff6b9d);
  filter: brightness(0.85);
}

.lid-flap-right {
  right: 0; left: auto;
  transform-origin: left center;
  background: var(--box-color, #ff6b9d);
  filter: brightness(0.85);
}

#present1 .lid,
#present1 .lid-flap,
#present1 .lid-top { --box-color: #ff7043; background: var(--box-color); }

#present2 .lid,
#present2 .lid-flap,
#present2 .lid-top { --box-color: #4d96ff; background: var(--box-color); }

@keyframes box-shake {
  0%,100% { transform: translateX(0) rotate(0deg); }
  20%      { transform: translateX(-6px) rotate(-3deg); }
  40%      { transform: translateX(6px)  rotate(3deg); }
  60%      { transform: translateX(-4px) rotate(-2deg); }
  80%      { transform: translateX(4px)  rotate(2deg); }
}

.present-wrapper.is-opening .present-scene {
  animation: box-shake 0.35s ease both;
}

.present-wrapper.is-opening .lid-flap-back  { transform: rotateX(130deg); }
.present-wrapper.is-opening .lid-flap-front { transform: rotateX(-130deg); }
.present-wrapper.is-opening .lid-flap-left  { transform: rotateY(-130deg); }
.present-wrapper.is-opening .lid-flap-right { transform: rotateY(130deg); }

.present-wrapper.lid-risen .lid {
  transform: translateY(-120px) scale(0.85);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.2, 0, 0.6, 1),
              opacity   0.38s ease 0.07s;
}

@keyframes wiggle {
  0%,100% { transform: rotate(0deg); }
  20% { transform: rotate(-4deg); }
  40% { transform: rotate(4deg); }
  60% { transform: rotate(-3deg); }
  80% { transform: rotate(3deg); }
}

.present-wrapper:hover .present-box { animation: wiggle 0.5s ease; }
