:root {
  --sky: #bfe6ff;
  --sky-2: #e6f5ff;
  --sky-deep: #4a9be0;
  --pink: #ffd1e3;
  --pink-deep: #ff8fb8;
  --ink: #3b4a6b;
  --muted: #7a89a8;
  --white: #fff;
  --shadow: 0 10px 30px rgba(74, 155, 224, .22);
  --radius: 26px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Fredoka", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-2) 55%, #fff0f7 100%) fixed;
  min-height: 100vh;
  overflow-x: hidden;
}
body.locked { overflow: hidden; height: 100vh; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }

/* ---------- nuvens ---------- */
.sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sky-fixed { position: fixed; z-index: 0; }
.cloud {
  position: absolute; left: -30%;
  width: 150px; height: 46px; border-radius: 60px;
  background: #fff; opacity: .9;
  animation: drift linear infinite;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 70px; height: 70px; left: 20px; top: -34px; }
.cloud::after  { width: 52px; height: 52px; right: 22px; top: -22px; }
.c1 { top: 12%; animation-duration: 38s; }
.c2 { top: 32%; transform: scale(.7); animation-duration: 52s; animation-delay: -20s; opacity: .75; }
.c3 { top: 62%; transform: scale(1.2); animation-duration: 64s; animation-delay: -40s; opacity: .8; }
.c4 { top: 82%; transform: scale(.55); animation-duration: 44s; animation-delay: -10s; opacity: .7; }
@keyframes drift { to { left: 120%; } }

/* ---------- abertura ---------- */
.cover {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #9fd6ff 0%, var(--sky) 50%, #ffe3ef 100%);
  transition: opacity .9s ease, transform .9s ease, visibility .9s;
}
.cover.gone { opacity: 0; transform: scale(1.08); visibility: hidden; }
.cover-inner { position: relative; z-index: 2; display: grid; justify-items: center; gap: 22px; padding: 24px; text-align: center; }
.cover-kicker { font-family: "Pacifico", cursive; font-size: clamp(1.2rem, 5vw, 1.7rem); color: #fff; text-shadow: 0 2px 10px rgba(74,155,224,.55); }
.tap-hint { font-weight: 600; font-size: 1.15rem; color: #fff; text-shadow: 0 2px 8px rgba(74,155,224,.55); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }

/* envelope */
.envelope {
  --w: min(300px, 78vw);
  position: relative; width: var(--w); height: calc(var(--w) * .68);
  border: 0; padding: 0; background: none; cursor: pointer;
  filter: drop-shadow(0 18px 24px rgba(74,155,224,.35));
  animation: bob 3.2s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.envelope:focus-visible { outline: 4px solid #fff; outline-offset: 8px; border-radius: 14px; }
@keyframes bob { 50% { transform: translateY(-12px) rotate(-1.2deg); } }
.envelope > span { position: absolute; display: block; }
.env-back { inset: 0; background: #ffb3d1; border-radius: 14px; }
.env-letter {
  left: 7%; right: 7%; top: 6%; bottom: 8%;
  background: #fff; border-radius: 10px;
  display: grid; place-items: end center; overflow: hidden;
  transition: transform .9s cubic-bezier(.3,1.4,.5,1) .35s;
  z-index: 2;
}
.env-front {
  inset: 0; z-index: 3; border-radius: 14px;
  background: linear-gradient(135deg, #ffc9de, #ffa9cb);
  clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%);
}
.env-flap {
  left: 0; right: 0; top: 0; height: 58%; z-index: 4;
  background: #ff9cc3; border-radius: 14px 14px 0 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top; transition: transform .6s ease, z-index 0s .3s;
}
.env-heart {
  left: 50%; top: 46%; z-index: 5; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: #fff; color: #ff6fa3; font-size: 26px; line-height: 46px; text-align: center;
  box-shadow: 0 3px 8px rgba(255,111,163,.4);
  transition: opacity .3s;
}
.cover-cinna { width: 60%; margin-bottom: -6%; }
.cover.open .env-flap { transform: rotateX(180deg); z-index: 1; }
.cover.open .env-heart { opacity: 0; }
.cover.open .env-letter { transform: translateY(-62%) scale(1.12); }
.cover.open .envelope { animation: none; }
.cover.open .tap-hint, .cover.open .cover-kicker { opacity: 0; transition: opacity .4s; animation: none; }

/* efeitos (corações/estrelas/confete) */
.fx { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.fx i {
  position: absolute; top: -40px; font-style: normal; user-select: none;
  animation: fall linear forwards; will-change: transform;
}
@keyframes fall {
  to { transform: translate3d(var(--dx, 0), 110vh, 0) rotate(var(--rot, 360deg)); }
}

/* ---------- Cinnamoroll ---------- */
.cinna { width: 100%; height: auto; display: block; overflow: visible; }
.ear { transform-box: fill-box; transform-origin: 85% 12%; animation: ear 2.4s ease-in-out infinite; }
.ear-r { transform-origin: 15% 12%; animation-delay: -1.2s; animation-direction: reverse; }
@keyframes ear { 50% { transform: rotate(-9deg); } }
.tail { transform-box: fill-box; transform-origin: 0 50%; animation: wag .7s ease-in-out infinite alternate; }
@keyframes wag { to { transform: rotate(14deg); } }
.eyes { transform-box: fill-box; transform-origin: center; animation: blink 4.5s infinite; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.08); } }

/* ---------- site ---------- */
.site { position: relative; z-index: 1; opacity: 0; transition: opacity 1s ease .3s; }
.site.show { opacity: 1; }
.site > *:not(.sky) { position: relative; z-index: 1; }

.hero { min-height: 100svh; display: grid; align-content: center; justify-items: center; gap: 10px; padding: 40px 20px 60px; text-align: center; }
.hero-cinna { width: min(220px, 52vw); animation: float 4s ease-in-out infinite; filter: drop-shadow(0 14px 14px rgba(74,155,224,.25)); }
@keyframes float { 50% { transform: translateY(-14px); } }
.eyebrow { font-size: 1.05rem; color: var(--muted); margin-top: 8px; }
.name {
  font-family: "Pacifico", cursive; font-weight: 400;
  font-size: clamp(3.2rem, 15vw, 6.5rem); line-height: 1.1;
  color: #fff; -webkit-text-stroke: 0;
  text-shadow: 0 3px 0 var(--sky-deep), 0 6px 18px rgba(74,155,224,.45);
}
.age { font-size: 1.6rem; font-weight: 600; color: var(--pink-deep); }
.lead { max-width: 34ch; font-size: 1.15rem; color: var(--ink); }

.countdown { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }
.countdown .box {
  min-width: 68px; padding: 10px 8px; border-radius: 18px;
  background: rgba(255,255,255,.85); box-shadow: var(--shadow);
}
.countdown b { display: block; font-size: 1.7rem; color: var(--sky-deep); line-height: 1.1; }
.countdown span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.countdown .party { font-family: "Pacifico", cursive; font-size: 1.5rem; color: var(--pink-deep); padding: 10px 18px; background: rgba(255,255,255,.85); border-radius: 18px; }

.card-section {
  max-width: 640px; margin: 0 auto 40px; padding: 34px 22px;
  background: rgba(255,255,255,.82); backdrop-filter: blur(6px);
  border-radius: var(--radius); box-shadow: var(--shadow);
  width: calc(100% - 32px);
}
.card-section h2 { font-family: "Pacifico", cursive; font-weight: 400; font-size: 1.9rem; text-align: center; color: var(--sky-deep); margin-bottom: 22px; }
.muted { text-align: center; color: var(--muted); }
.muted.small { font-size: .9rem; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.info-card { background: linear-gradient(160deg, #fff, var(--sky-2)); border: 2px solid #fff; border-radius: 20px; padding: 18px 12px; text-align: center; box-shadow: 0 6px 16px rgba(74,155,224,.14); }
.info-card.wide { grid-column: 1 / -1; }
.info-card .ico { font-size: 1.9rem; }
.info-card h3 { font-size: 1.05rem; color: var(--pink-deep); margin: 4px 0; }
.info-card p { font-size: 1.1rem; font-weight: 500; }
.map { width: 100%; height: 260px; border: 0; border-radius: 20px; margin-top: 16px; box-shadow: var(--shadow); }
.obs { margin-top: 16px; text-align: center; font-weight: 500; color: var(--ink); }

/* ---------- botões / formulário ---------- */
.btn {
  display: inline-block; margin-top: 12px; padding: 13px 26px;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  font: 600 1.05rem "Fredoka", sans-serif;
  transition: transform .15s, box-shadow .15s;
}
.btn:active { transform: scale(.96); }
.btn-main { width: 100%; background: linear-gradient(135deg, #ff9cc3, #ff7aa9); color: #fff; box-shadow: 0 8px 18px rgba(255,111,163,.4); font-size: 1.15rem; padding: 15px; }
.btn-main:disabled { opacity: .6; cursor: wait; }
.btn-soft { background: var(--sky); color: var(--ink); }
.btn-soft:hover { box-shadow: 0 6px 14px rgba(74,155,224,.3); }

.form { display: grid; gap: 18px; }
.form label, .form legend { font-weight: 500; display: grid; gap: 6px; }
.form small { color: var(--muted); font-weight: 400; }
.form input[type=text], .form input[type=number], .form textarea {
  width: 100%; padding: 13px 16px; font: 400 1rem "Fredoka", sans-serif; color: var(--ink);
  background: #fff; border: 2px solid var(--sky); border-radius: 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form textarea:focus { border-color: var(--sky-deep); box-shadow: 0 0 0 4px rgba(74,155,224,.2); }
.choice { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.choice legend { padding: 0; margin-bottom: 8px; }
.pill { display: block !important; position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; }
.pill span { display: block; padding: 13px 16px; border-radius: 16px; background: #fff; border: 2px solid var(--sky); text-align: center; cursor: pointer; transition: all .2s; }
.pill input:checked + span { background: var(--pink); border-color: var(--pink-deep); font-weight: 600; transform: scale(1.02); }
.pill input:focus-visible + span { box-shadow: 0 0 0 4px rgba(74,155,224,.3); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { padding: 12px 14px; border-radius: 14px; background: #fff0f4; color: #c0396b; text-align: center; font-weight: 500; }
.form-msg a { color: inherit; }

.thanks { text-align: center; display: grid; justify-items: center; gap: 10px; animation: pop .6s cubic-bezier(.3,1.5,.5,1); }
.thanks-cinna { width: 150px; }
.thanks h3 { font-family: "Pacifico", cursive; font-weight: 400; font-size: 1.8rem; color: var(--pink-deep); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

.footer { text-align: center; padding: 10px 20px 50px; color: var(--muted); }

@media (min-width: 640px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
  .cloud { left: 10%; }
}
