/* Vitalize StoryNest — welcome hero (v8).
   The hero scene is the user's own design-3 image (see hero-bg.css for the
   background). Nav, headline, button and 4 feature cards are real DOM in
   index.html. Gentle animations only: twinkling stars, sun-glow pulse,
   lantern flicker, headline fade-in, CTA soft pulse, cards sliding in.
   All animations are disabled under prefers-reduced-motion. */
.welcome-hero{min-height:100vh;min-height:100svh;position:relative;isolation:isolate;overflow:hidden;background-color:#081a43;background-size:cover;background-position:center 32%;background-repeat:no-repeat;display:flex;flex-direction:column}
.welcome-hero::after{content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,rgba(4,13,40,.28),transparent 22%,transparent 68%,rgba(4,20,37,.45));pointer-events:none}
.hero-glow{position:absolute;left:44%;top:56%;width:300px;height:180px;z-index:1;background:radial-gradient(ellipse at center,rgba(255,214,106,.75),rgba(255,179,71,.28) 55%,transparent 75%);filter:blur(6px);pointer-events:none;animation:glowPulse 4s ease-in-out infinite}
.hero-lantern{position:absolute;left:31.5%;top:29%;width:34px;height:44px;z-index:1;background:radial-gradient(circle,rgba(255,214,106,.95),rgba(255,179,71,.25) 70%,transparent);border-radius:50%;filter:blur(2px);pointer-events:none;animation:flicker 2.8s ease-in-out infinite}
.sparkles{position:absolute;inset:0;z-index:2;pointer-events:none}
.sparkles span{position:absolute;color:#fff7cc;font-size:20px;text-shadow:0 0 12px #ffd76a;animation:twinkle 3.2s ease-in-out infinite}
.sparkles span:nth-child(1){left:12%;top:16%;animation-delay:0s}
.sparkles span:nth-child(2){left:30%;top:10%;animation-delay:.7s;font-size:15px}
.sparkles span:nth-child(3){left:56%;top:20%;animation-delay:1.3s;font-size:24px}
.sparkles span:nth-child(4){left:72%;top:9%;animation-delay:.4s;font-size:15px}
.sparkles span:nth-child(5){left:86%;top:28%;animation-delay:1.8s}
.sparkles span:nth-child(6){left:44%;top:7%;animation-delay:2.2s;font-size:14px}
@keyframes twinkle{0%,100%{opacity:.25;transform:scale(.8)}50%{opacity:1;transform:scale(1.15)}}
@keyframes glowPulse{0%,100%{opacity:.65;transform:scale(1)}50%{opacity:1;transform:scale(1.08)}}
@keyframes flicker{0%,100%{opacity:.85}25%{opacity:.6}50%{opacity:1}75%{opacity:.7}}
@keyframes fadeUp{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}
@keyframes ctaPulse{0%,100%{box-shadow:0 8px 0 #b67c12,0 14px 30px rgba(11,22,62,.4)}50%{box-shadow:0 8px 0 #b67c12,0 14px 34px rgba(11,22,62,.55);transform:translateY(-2px)}}
.hero-content{position:relative;z-index:3;width:min(760px,52%);margin:11vh 0 0 42%;text-align:center;color:#fff;animation:fadeUp .7s ease both}
.hero-content h1{font-family:Georgia,'Times New Roman',serif;font-style:italic;font-weight:500;font-size:clamp(42px,5.3vw,78px);line-height:1.02;letter-spacing:-2px;margin:0 0 14px;text-shadow:0 4px 20px rgba(9,26,71,.65)}
.hero-content h1 em{font-family:Georgia,serif;font-weight:500}
.scribble{color:#ffd52e;font-size:52px;line-height:.5;margin-bottom:20px;text-shadow:0 2px 10px #f7bd25}
.hero-content p{font-size:clamp(17px,1.5vw,23px);line-height:1.5;max-width:600px;margin:0 auto 28px;text-shadow:0 2px 12px #091a47;animation:fadeUp .7s .15s ease both}
.hero-cta{background:linear-gradient(180deg,#ffe34d,#ffc928);color:#11152b;border:0;padding:19px 42px;border-radius:38px;font-size:20px;font-weight:850;cursor:pointer;animation:fadeUp .7s .3s ease both,ctaPulse 2.6s 1.2s ease-in-out infinite}
.hero-cta.secondary{background:rgba(8,20,32,.55);color:#fff;border:1.5px solid rgba(255,255,255,.85);box-shadow:none;animation:fadeUp .7s .45s ease both}
.hero-cta + .hero-cta{margin-left:12px}
.hero-cta:hover{transform:translateY(-3px)}
.hero-cards{position:relative;z-index:3;width:min(880px,90%);margin:auto auto 24px;display:grid;grid-template-columns:repeat(4,1fr);gap:14px;padding:14px;border:1px solid rgba(255,255,255,.6);border-radius:34px;background:rgba(30,37,65,.48);backdrop-filter:blur(16px);box-shadow:0 15px 50px rgba(7,19,45,.33)}
.hero-card{border:none;border-radius:25px;padding:16px 10px 14px;text-align:center;color:#111a3a;min-height:145px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;box-shadow:inset 0 1px 0 rgba(255,255,255,.72);animation:fadeUp .6s ease both}
.hero-card:nth-child(1){background:linear-gradient(145deg,#fff,#d9d8ff);animation-delay:.35s}
.hero-card:nth-child(2){background:linear-gradient(145deg,#fff0bd,#ffda73);animation-delay:.45s}
.hero-card:nth-child(3){background:linear-gradient(145deg,#e5f5ff,#a9d8ff);animation-delay:.55s}
.hero-card:nth-child(4){background:linear-gradient(145deg,#ffe3f0,#ffb6d2);animation-delay:.65s}
.hero-card:hover{transform:translateY(-3px)}
.hero-card strong{font-size:17px}
.hero-card span:last-child{font-size:13px;line-height:1.3;margin-top:5px;max-width:150px}
.hc-icon{font-size:43px;line-height:1.1;margin-bottom:8px;filter:drop-shadow(0 4px 3px rgba(108,59,155,.27))}
@media(max-width:900px){
  .welcome-hero{background-position:38% center}
  .hero-content{width:90%;margin:9vh auto 0}
  .hero-content h1{font-size:clamp(38px,8vw,64px)}
  .hero-cards{width:94%;gap:7px;padding:8px;border-radius:22px}
  .hero-card{min-height:118px;padding:10px 5px;border-radius:16px}
  .hc-icon{font-size:30px}.hero-card strong{font-size:13px}.hero-card span:last-child{font-size:11px}
}
@media(max-width:520px){
  .welcome-hero{min-height:940px;background-position:34% center}
  .hero-content{margin-top:48px;width:94%;padding:18px 12px;background:rgba(5,17,48,.22);border-radius:24px;backdrop-filter:blur(3px)}
  .hero-content h1{font-size:43px;letter-spacing:-1.6px}
  .hero-content p{font-size:16px}
  .hero-cta{font-size:16px;padding:15px 25px}
  .hero-cta + .hero-cta{margin-left:0;margin-top:10px}
  .hero-cards{grid-template-columns:repeat(2,1fr);width:92%}
  .hero-card{min-height:110px}
  .hero-glow{left:30%;top:60%}
  .hero-lantern{left:26%;top:24%}
}
@media(prefers-reduced-motion:reduce){
  .welcome-hero *,.welcome-hero{animation:none!important}
}

/* ---- v12: hero button press feedback + small-phone fit ----
   The hero CTA keeps its soft pulse, but a tap visibly dims/presses it
   (filter works even while the pulse animation owns transform). Hero
   cards clear their entrance animation in JS after it plays, so hover
   lift and :active press work afterwards. On ~360–430px phones the
   headline shrinks, CTAs go full-width stacked, cards stay 2-up. */
.hero-cta{transition:filter .18s ease,box-shadow .18s ease}
.hero-cta:active{filter:brightness(.88) saturate(1.15)}
.hero-cta.secondary:active{filter:brightness(1.25)}
.hero-card{transition:transform .18s ease,box-shadow .18s ease,filter .18s ease}
.hero-card:active{transform:scale(.96);filter:brightness(.97)}
.hero-card.entrance-done{animation:none}
@media(max-width:430px){
  .welcome-hero{min-height:860px}
  .hero-content{margin-top:40px}
  .hero-content h1{font-size:36px;letter-spacing:-1.2px}
  .hero-content p{font-size:15px;margin-bottom:20px}
  .scribble{font-size:40px}
  .hero-cta{display:block;width:100%;font-size:17px;padding:16px 20px}
  .hero-cta + .hero-cta{margin-left:0;margin-top:10px}
  .hero-cards{width:94%;gap:6px;padding:7px;border-radius:20px}
  .hero-card{min-height:104px;padding:8px 4px;border-radius:14px}
  .hero-card strong{font-size:12px}
  .hero-card span:last-child{font-size:10px;max-width:130px}
  .hero-glow{left:28%;top:62%}
  .hero-lantern{left:24%;top:22%}
}
