:root {
  --night1: #0b0620; --night2: #2a1150; --purple: #5b2a86; --purple-soft: rgba(91,42,134,.35);
  --orange: #ff7a1a; --orange-deep: #d95a00; --yellow: #ffd166; --green: #7ed957;
  --ink: #fbf7ff; --ink-soft: rgba(251,247,255,.78); --card: rgba(20,10,44,.84); --card-line: rgba(255,255,255,.10);
  --radius: 18px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; color: var(--ink); background: var(--night1);
  font-family: 'Nunito', system-ui, -apple-system, sans-serif; font-size: 17px; line-height: 1.5;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
a { color: var(--yellow); }
h1, h2, h3 { margin: 0; }

/* ---------- ÉGBOLT ---------- */
#sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 100%, #3a1560 0%, var(--night2) 35%, var(--night1) 75%); }
#stars { position: absolute; inset: 0; }
.star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: .7;
  animation: twinkle var(--d, 3s) ease-in-out infinite alternate; }
.star.b { width: 3px; height: 3px; box-shadow: 0 0 6px #fff; }
@keyframes twinkle { from { opacity: .15; transform: scale(.7); } to { opacity: .95; transform: scale(1.1); } }
.moon { position: absolute; top: 7vh; right: 10vw; width: min(28vw, 150px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fffbe6 0%, #ffe9a6 45%, #f2c96b 100%);
  box-shadow: 0 0 40px 12px rgba(255,220,140,.35), 0 0 120px 40px rgba(255,200,100,.18);
  animation: moonrise 4s ease-out both; }
.moon::before, .moon::after { content: ""; position: absolute; border-radius: 50%; background: rgba(200,150,60,.25); }
.moon::before { width: 22%; height: 22%; left: 30%; top: 55%; }
.moon::after { width: 14%; height: 14%; left: 62%; top: 32%; box-shadow: -18px 30px 0 -2px rgba(200,150,60,.22); }
@keyframes moonrise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.cloud { position: absolute; width: 60vw; max-width: 380px; height: 60px; border-radius: 60px;
  background: rgba(60,30,100,.55); filter: blur(10px); animation: drift 60s linear infinite; }
.cloud.c1 { top: 12vh; left: -30vw; }
.cloud.c2 { top: 22vh; left: -60vw; width: 45vw; animation-duration: 85s; animation-delay: -30s; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(200vw); } }
.hills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 34vh; }
.house { position: absolute; bottom: 8vh; left: 50%; width: min(64vw, 340px); transform: translateX(-46%); }
.house .win rect { animation: flicker 2.2s ease-in-out infinite; transform-origin: center; }
.house .win rect:nth-child(2) { animation-delay: -.7s; } .house .win rect:nth-child(4) { animation-delay: -1.3s; } .house .win rect:nth-child(5) { animation-delay: -.3s; }
@keyframes flicker { 0%,100% { opacity: .95; } 40% { opacity: .55; } 55% { opacity: .9; } 70% { opacity: .5; } }
.tree { position: absolute; bottom: 6vh; width: min(30vw, 160px); }
.tree.t1 { left: -4vw; } .tree.t2 { right: -6vw; transform: scaleX(-1); }
.fog { position: absolute; left: -20%; right: -20%; height: 30vh; bottom: 0; opacity: .55;
  background: radial-gradient(60% 60% at 30% 70%, rgba(200,180,240,.35), transparent 70%),
              radial-gradient(50% 60% at 75% 80%, rgba(200,180,240,.28), transparent 70%);
  filter: blur(14px); animation: fogmove 22s ease-in-out infinite alternate; }
.fog.f2 { animation-duration: 31s; animation-delay: -12s; bottom: 6vh; opacity: .35; }
@keyframes fogmove { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
#flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
#flash.on { animation: lightning 1.1s ease-out; }
@keyframes lightning { 0% { opacity: 0; } 5% { opacity: .9; } 12% { opacity: .1; } 20% { opacity: .7; } 30% { opacity: 0; } 100% { opacity: 0; } }

/* denevérek */
.bat { position: absolute; width: 56px; left: -60px; top: var(--y, 20vh); will-change: transform;
  animation: fly var(--t, 14s) linear var(--delay, 0s) infinite; }
.bat svg { width: 100%; overflow: visible; }
.bat .w { transform-origin: 50% 40%; animation: flap .28s ease-in-out infinite alternate; }
.bat .w.r { animation-name: flapr; }
@keyframes flap { from { transform: rotate(-22deg); } to { transform: rotate(18deg); } }
@keyframes flapr { from { transform: rotate(22deg); } to { transform: rotate(-18deg); } }
@keyframes fly { 0% { transform: translate(0, 0) scale(var(--s,1)); } 25% { transform: translate(30vw, -6vh) scale(var(--s,1)); }
  50% { transform: translate(60vw, 4vh) scale(var(--s,1)); } 75% { transform: translate(90vw, -8vh) scale(var(--s,1)); } 100% { transform: translate(125vw, 0) scale(var(--s,1)); } }

/* ---------- KÉPERNYŐK ---------- */
.screen { position: relative; z-index: 1; }
#gate { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); text-align: center; transition: opacity .8s ease, transform .8s ease; }
#gate.leaving { opacity: 0; transform: scale(1.08); pointer-events: none; }
.whisper { margin: 0; font-style: italic; color: var(--ink-soft); animation: fadein 1.6s ease both .4s; letter-spacing: .02em; }
.hint { margin: 0; font-size: 14px; color: var(--ink-soft); }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.door-scene { position: relative; width: min(70vw, 270px); }
.door-frame { position: relative; width: 100%; aspect-ratio: 606 / 900; border-radius: 50% 50% 3% 3% / 34% 34% 3% 3%;
  background: #07030d; box-shadow: 0 0 70px rgba(255,140,40,.14), 0 24px 50px rgba(0,0,0,.7); perspective: 900px; overflow: visible; }
.door-glow { position: absolute; inset: 4%; border-radius: 50% 50% 2% 2% / 34% 34% 2% 2%;
  background: radial-gradient(60% 80% at 50% 70%, #ffb347 0%, #ff7a1a 40%, #7a2d00 100%); opacity: .95; }
.peek { position: absolute; width: 50%; left: 25%; bottom: 8%; filter: drop-shadow(0 0 14px rgba(255,160,50,.7)); transform: translateY(30%) scale(.6); opacity: 0; transition: transform .8s cubic-bezier(.3,1.5,.5,1) .4s, opacity .4s ease .4s; }
.door-frame.open .peek { transform: none; opacity: 1; }
.door { position: absolute; inset: 0; background: url(img/ajto.webp?v=1) center / 100% 100% no-repeat;
  transform-origin: left center; transform-style: preserve-3d; transition: transform 1.6s cubic-bezier(.6,0,.3,1);
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.55)); }
.door .knocker { position: absolute; left: 50%; top: 40%; width: 22%; margin-left: -11%; transform-origin: 50% 22%;
  filter: drop-shadow(0 4px 5px rgba(0,0,0,.6)); -webkit-user-select: none; user-select: none; pointer-events: none; }
.door-frame.knocking .knocker { animation: knock .32s ease-in-out 3; }
@keyframes knock { 0%,100% { transform: rotate(0); } 40% { transform: rotateX(-35deg) rotate(-6deg); } 70% { transform: rotate(3deg); } }
.door-frame.knocking .door { animation: shake .32s ease-in-out 3; }
@keyframes shake { 0%,100% { transform: translateX(0); } 45% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
.door-frame.open .door { transform: rotateY(-112deg); }
.web { position: absolute; width: 60%; left: -24%; top: -3%; z-index: 3; opacity: .92; pointer-events: none; }

.big-btn { appearance: none; border: 0; border-radius: 999px; padding: 16px 28px; font-weight: 900; font-size: 19px; color: #1a0a00;
  background: linear-gradient(180deg, #ffa24a, var(--orange)); box-shadow: 0 6px 0 var(--orange-deep), 0 14px 30px rgba(255,122,26,.35);
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; animation: pulse 2.4s ease-in-out infinite; }
.big-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--orange-deep), 0 6px 14px rgba(255,122,26,.3); }
.big-btn[disabled] { opacity: .6; animation: none; cursor: default; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* ---------- BULI ---------- */
#party { padding: 8px 16px calc(40px + env(safe-area-inset-bottom)); animation: fadein 1s ease both; }
.wrap { max-width: 560px; margin: 0 auto; }
.hero { position: relative; text-align: center; padding: 56px 0 8px; }
.pumpkin.big { position: absolute; width: 104px; bottom: 30px; animation: glow 2.6s ease-in-out infinite alternate; }
.p-left { left: -10px; transform: rotate(-10deg); } .p-right { right: -10px; transform: rotate(10deg) scale(.85); }
@keyframes glow { from { filter: drop-shadow(0 0 10px rgba(255,140,30,.35)) brightness(.92); } to { filter: drop-shadow(0 0 26px rgba(255,160,50,.75)) brightness(1.08); } }
.eyebrow { margin: 0 0 6px; letter-spacing: .32em; text-transform: uppercase; font-size: 13px; font-weight: 900; color: var(--yellow); }
.title { font-family: 'Creepster', cursive; font-weight: 400; line-height: .95; text-shadow: 0 0 24px rgba(255,122,26,.55), 0 4px 0 #3a1050; }
.title .name { font-size: clamp(66px, 22vw, 108px); color: var(--orange); display: inline-block; }
.title .name span { display: inline-block; animation: dropin .7s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes dropin { from { transform: translateY(-60px) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.title .sub { font-size: clamp(32px, 10vw, 52px); color: var(--ink); letter-spacing: .02em; animation: fadein 1s ease both .9s; }
.tagline { margin: 12px 0 0; color: var(--ink-soft); font-weight: 700; animation: fadein 1s ease both 1.2s; }
.ghost-wrap { position: relative; height: 200px; margin: 8px auto 0; width: 150px; }
.ghost { width: 124px; position: absolute; left: 13px; top: 22px; cursor: pointer; filter: drop-shadow(0 0 22px rgba(210,225,255,.45)); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  animation: bob 3s ease-in-out infinite; transition: transform .2s; }
.ghost:active { transform: scale(.92); }
.ghost.jump { animation: jump .6s ease; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-12px) rotate(3deg); } }
@keyframes jump { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-30px) scale(1.1, .9); } 100% { transform: translateY(0); } }
.bubble { position: absolute; left: 50%; top: -14px; transform: translate(-50%, 10px); background: #fff; color: #2b1a4a; font-weight: 900;
  padding: 6px 14px; border-radius: 16px; opacity: 0; transition: .25s; white-space: nowrap; font-family: 'Creepster', cursive; font-size: 24px; letter-spacing: .04em; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -8px; border: 8px solid transparent; border-top-color: #fff; border-bottom: 0; margin-left: -8px; }
.bubble.show { opacity: 1; transform: translate(-50%, 0); }

.card { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 18px 20px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.invite { margin-top: 18px; }
.invite p { margin: 0 0 12px; } .invite p:last-child { margin: 0; }
.countdown { font-weight: 900; color: var(--yellow); }
.h2 { font-family: 'Creepster', cursive; font-weight: 400; font-size: 36px; color: var(--orange); margin: 34px 0 12px; text-align: center; letter-spacing: .03em; }
.details .card { margin-bottom: 10px; }
.row { display: flex; gap: 14px; align-items: flex-start; }
.row .ico { width: 26px; height: 26px; flex: 0 0 26px; margin-top: 2px; color: var(--orange); }
.row b { display: block; color: var(--yellow); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 2px; }
.row span { display: block; }
.row .link { display: inline-block; margin-top: 6px; font-weight: 700; }
.row a[hidden] { display: none; }
.small { color: var(--ink-soft); text-align: center; margin: 0 0 14px; }

.patch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.patch .pumpkin { width: 100%; cursor: pointer; transition: transform .15s, filter .3s; filter: brightness(.7) saturate(.85); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.patch .pumpkin:active { transform: scale(.9); }
.patch .pumpkin:focus:not(:focus-visible), .ghost:focus:not(:focus-visible) { outline: none; }
.patch .pumpkin.laugh { animation: wobble .6s ease; }
.patch .pumpkin.laugh { filter: brightness(1.2) drop-shadow(0 0 18px rgba(255,160,50,.8)); }
@keyframes wobble { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-10deg) scale(1.08); } 50% { transform: rotate(10deg) scale(1.08); } 80% { transform: rotate(-5deg); } }
.score { text-align: center; font-weight: 700; margin: 12px 0 0; }
.candy { position: fixed; z-index: 5; pointer-events: none; width: 40px; margin: -8px 0 0 -20px; will-change: transform; animation: candyfly 1s cubic-bezier(.2,.8,.4,1) both; }
@keyframes candyfly { from { transform: translate(0,0) scale(.6) rotate(0); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(var(--r)); opacity: 0; } }

.rsvp form { display: grid; gap: 14px; }
.rsvp label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; color: var(--yellow); }
.rsvp input[type=text], .rsvp input[type=email], .rsvp textarea { width: 100%; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.18); background: rgba(0,0,0,.28);
  color: var(--ink); padding: 12px 14px; font-weight: 400; font-size: 17px; outline: none; transition: border-color .15s, box-shadow .15s; }
.rsvp input:focus, .rsvp textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,122,26,.22); }
.rsvp textarea { resize: vertical; }
.choice { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.choice legend { font-weight: 700; font-size: 15px; color: var(--yellow); padding: 0; margin-bottom: 8px; }
.opt { display: block; position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; }
.opt span { display: block; padding: 14px 16px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.18); background: rgba(0,0,0,.28); font-weight: 700; color: var(--ink); transition: .15s; }
.opt input:checked + span { border-color: var(--green); background: rgba(126,217,87,.16); box-shadow: 0 0 0 4px rgba(126,217,87,.18); }
.opt.no input:checked + span { border-color: #d98ee6; background: rgba(217,142,230,.14); box-shadow: 0 0 0 4px rgba(217,142,230,.18); }
.opt input:focus-visible + span { outline: 2px solid var(--yellow); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.msg { margin: 0; min-height: 1.2em; text-align: center; font-weight: 700; color: #ff9d9d; }
.msg.ok { color: var(--green); }
.success { text-align: center; animation: popin .6s cubic-bezier(.3,1.5,.5,1) both; }
.success-ico { display: block; width: 110px; margin: 0 auto 8px; filter: drop-shadow(0 0 18px rgba(255,160,50,.55)); animation: bob 2s ease-in-out infinite; }
.success h3 { font-family: 'Creepster', cursive; font-weight: 400; font-size: 34px; color: var(--orange); margin-bottom: 8px; }
.success p { margin: 0; color: var(--ink-soft); }
@keyframes popin { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.foot { text-align: center; color: var(--ink-soft); margin-top: 36px; }

.mute { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 10; width: 60px; height: 60px; border-radius: 50%; border: 1px solid var(--card-line);
  background: var(--card); color: #fff; font-size: 20px; cursor: pointer; backdrop-filter: blur(6px); }
.mute[hidden] { display: none; }

@media (min-width: 720px) {
  body { font-size: 18px; }
  .pumpkin.big { width: 140px; bottom: 40px; }
  .p-left { left: -70px; } .p-right { right: -70px; }
  .house { width: 360px; bottom: 6vh; }
  .patch { grid-template-columns: repeat(6, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .bat, .cloud, .fog, .star, .ghost, .big-btn, .success-ico, .house .win rect, .pumpkin.big { animation: none !important; }
}

/* helyszín, térkép-linkek, tömegközlekedés */
.addr { display: block; color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(255,209,102,.5); text-underline-offset: 3px; margin-top: 2px; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill { display: inline-block; padding: 10px 14px; border-radius: 999px; background: var(--orange); color: #1a0a00; font-weight: 800; font-size: 15px; text-decoration: none; }
.pill.alt { background: transparent; color: var(--yellow); border: 1.5px solid rgba(255,209,102,.5); }
.transit { list-style: none; padding: 0; margin: 4px 0 6px; display: grid; gap: 8px; }
.transit li { padding-left: 12px; border-left: 2px solid rgba(255,122,26,.55); }
.transit li b { display: block; color: var(--ink); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin: 0; }
.mute .ico { width: 30px; height: 30px; display: block; margin: auto; }
