:root {
  --cream: #fff8f0;
  --peach: #ffd9b3;
  --coral: #ff8a5c;
  --coral-dark: #f2683c;
  --ink: #4a3b35;
  --soft: #8a766c;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: "Fredoka", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 50% 20%, var(--peach), var(--cream) 70%);
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 1.5rem;
  overflow-x: hidden;
}

.card {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  border: 2px solid rgba(255, 138, 92, 0.25);
  border-radius: 28px;
  padding: 3rem 2.5rem;
  max-width: 540px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(242, 104, 60, 0.18);
}

.poule {
  font-size: 5rem;
  line-height: 1;
  display: inline-block;
  animation: bob 2.6s ease-in-out infinite;
  cursor: pointer;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}

.hello {
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--coral-dark);
}

/* 🐔 secret message — pops up after 5 chicken pokes */
.secret {
  margin-top: 0.9rem;
  display: flex;
  justify-content: center;
}

.secret[hidden] {
  display: none;
}

.secret-bubble {
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, #ffd9b3, #ff8fab);
  color: #6a2c3f;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.7rem 1.2rem;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(242, 104, 60, 0.3);
  animation: pop-in 0.6s cubic-bezier(0.18, 1.4, 0.4, 1) both;
}

/* little speech-bubble tail pointing up toward the chicken */
.secret-bubble::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid #ffd6b0;
}

@keyframes pop-in {
  0% { transform: scale(0) translateY(8px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.headline {
  margin-top: 0.5rem;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
}

.sub {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--soft);
}

.cta-row {
  margin-top: 1.8rem;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta {
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  color: white;
  background: var(--coral);
  border: 2px solid var(--coral);
  border-radius: 999px;
  padding: 0.85rem 2rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 20px rgba(242, 104, 60, 0.35);
}

.cta:hover {
  background: var(--coral-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(242, 104, 60, 0.45);
}

.cta:active {
  transform: translateY(0);
}

a.cta {
  text-decoration: none;
}

.cta-secondary {
  background: white;
  color: var(--coral-dark);
  border: 2px solid var(--coral);
  box-shadow: 0 8px 20px rgba(242, 104, 60, 0.15);
}

.cta-secondary:hover {
  background: var(--peach);
  color: var(--coral-dark);
}

.footer {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--soft);
  letter-spacing: 0.02em;
}

.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.confetti {
  position: absolute;
  top: -20px;
  font-size: 1.4rem;
  animation: fall linear forwards;
}

.confetti-img {
  height: auto;
  filter: drop-shadow(0 3px 5px rgba(74, 59, 53, 0.25));
}

@keyframes fall {
  to {
    transform: translateY(105vh) rotate(540deg);
    opacity: 0;
  }
}

/* The wandering eagles */
.eagle-layer {
  pointer-events: none;
}

.eagle {
  position: fixed;
  top: 0;
  left: 0;
  width: clamp(70px, 12vw, 140px);
  height: auto;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  will-change: transform;
  /* CSS variables set per-flight from JS */
  --fly-y: 30vh;
  --start-x: -200px;
  --end-x: 110vw;
  --flip: 1;
}

.eagle.is-flying {
  animation: fly-across var(--fly-duration, 7s) linear forwards;
}

@keyframes fly-across {
  0% {
    opacity: 0;
    transform: translate(var(--start-x), var(--fly-y)) scaleX(var(--flip));
  }
  8% { opacity: 1; }
  50% {
    transform: translate(calc((var(--start-x) + var(--end-x)) / 2), calc(var(--fly-y) - 8vh)) scaleX(var(--flip));
  }
  92% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(var(--end-x), var(--fly-y)) scaleX(var(--flip));
  }
}

/* 🌷 Tulips sprouting from the bottom corners */
.tulips-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.tulip {
  position: absolute;
  bottom: -16px;
  width: 64px;
  transform-origin: bottom center;
  transform: rotate(var(--angle, 0deg));
  transition: opacity 0.8s ease;
}

.tulip.left {
  left: -14px;
}

.tulip.right {
  right: -14px;
}

.tulip.is-fading {
  opacity: 0;
}

.tulip-inner {
  transform-origin: bottom center;
  animation: sprout 1.5s cubic-bezier(0.18, 0.7, 0.3, 1.25) forwards,
    sway 4.5s ease-in-out 1.5s infinite;
}

.tulip svg {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes sprout {
  0% { transform: scaleY(0); opacity: 0; }
  8% { opacity: 1; }
  70% { transform: scaleY(1.05); }
  100% { transform: scaleY(1); opacity: 1; }
}

@keyframes sway {
  0%, 100% { rotate: -2.5deg; }
  50% { rotate: 2.5deg; }
}

@media (prefers-reduced-motion: reduce) {
  .poule { animation: none; }
  .confetti { animation: none; }
}
