/* NGNS "flair" layer — motion, shine and scroll effects on top of site.css.
   Everything here is decoration: the site works the same without it, and
   prefers-reduced-motion turns the moving parts off. */

html, body { overflow-x: clip; }

/* ---------- scroll progress ---------- */
.fx-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100; pointer-events: none;
  background: linear-gradient(90deg, #007571, #18FF85, #22E6F2); transform-origin: 0 50%; transform: scaleX(0);
  box-shadow: 0 0 12px rgba(24,255,133,.7); }

/* ---------- particle / snow canvas ---------- */
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* ---------- ambient blobs drift ---------- */
.ambient span { will-change: transform; animation: fx-float 22s ease-in-out infinite alternate; }
.ambient .b { animation-duration: 28s; animation-delay: -6s; }
.ambient .c { animation-duration: 34s; animation-delay: -12s; }
@keyframes fx-float { 0% { translate: 0 0; scale: 1; } 50% { translate: 6vw -4vh; scale: 1.12; } 100% { translate: -5vw 5vh; scale: .94; } }

/* ---------- header gets a glowing edge once you scroll ---------- */
.site-header.scrolled { box-shadow: 0 1px 0 rgba(24,255,133,.18), 0 10px 40px rgba(0,0,0,.25); }
.nav a { position: relative; }
.nav a::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 4px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #007571, #18FF85); transform: scaleX(0); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.brand-mark { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }

/* ---------- shimmering gradient headline words ---------- */
h1 em, h2 em {
  background: linear-gradient(100deg, #0A9A8E 0%, #18FF85 30%, #B8FFD9 45%, #18FF85 60%, #0A9A8E 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fx-shimmer 6s ease-in-out infinite; padding-right: .06em; }
[data-theme="light"] h1 em, [data-theme="light"] h2 em {
  background-image: linear-gradient(100deg, #007571 0%, #00A86B 35%, #2FD18B 50%, #00A86B 65%, #007571 100%); }
@keyframes fx-shimmer { 0%,100% { background-position: 100% 0; } 50% { background-position: 0 0; } }

/* headline words rise in on load */
.fx-word { display: inline-block; opacity: 0; transform: translateY(.45em) rotate(2deg); filter: blur(6px);
  transition: opacity .8s ease, transform .9s cubic-bezier(.2,.8,.2,1), filter .8s ease; transition-delay: calc(var(--i) * 70ms); }
.fx-ready .fx-word { opacity: 1; transform: none; filter: none; }

/* ---------- scroll reveals (blur + rise, staggered) ---------- */
.fx-reveal { opacity: 0; transform: translateY(28px) scale(.98); filter: blur(4px);
  transition: opacity .9s ease, transform 1s cubic-bezier(.2,.8,.2,1), filter .9s ease; transition-delay: calc(var(--d, 0) * 1ms); }
.fx-reveal.fx-in { opacity: 1; transform: none; filter: none; }

/* section headings: a gradient underline draws in */
.fx-line::after { content: ""; display: block; height: 3px; width: 72px; margin-top: 12px; border-radius: 3px;
  background: linear-gradient(90deg, #007571, #18FF85); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 1.1s cubic-bezier(.2,.8,.2,1) .25s; }
.fx-line.fx-drawn::after { transform: scaleX(1); }
.cta-band .fx-line::after, .hol-head .fx-line::after { display: none; }

/* ---------- glass cards: cursor spotlight + border glow ---------- */
.fx-spot { background-image: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), rgba(24,255,133,.13), transparent 45%), var(--glass); }
[data-theme="light"] .fx-spot { background-image: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), rgba(0,117,113,.10), transparent 45%), var(--glass); }
.fx-spot::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 1;
  background: radial-gradient(260px circle at var(--mx, -999px) var(--my, -999px), rgba(24,255,133,.8), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s; }
.fx-spot:hover::before { opacity: 1; }

/* 3D tilt */
.fx-tilt { transition: transform .6s cubic-bezier(.2,.8,.2,1), box-shadow .4s; will-change: transform; }
.fx-tilt.fx-tilting { transition: transform .1s linear, box-shadow .4s; box-shadow: 0 30px 70px rgba(0,0,0,.35), 0 0 0 1px rgba(24,255,133,.22); }

/* ---------- buttons: shine sweep, magnet, glow ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after { content: ""; position: absolute; inset: -2px; z-index: -1; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.6) 48%, transparent 66%);
  transform: translateX(-130%); }
.btn:hover::after { transform: translateX(130%); transition: transform .8s ease; }
.btn:not(.ghost) { animation: fx-breathe 4.5s ease-in-out infinite; }
@keyframes fx-breathe { 0%,100% { box-shadow: 0 12px 30px var(--btn-shadow), inset 0 1px rgba(255,255,255,.3); } 50% { box-shadow: 0 14px 46px color-mix(in srgb, var(--cta) 60%, transparent), inset 0 1px rgba(255,255,255,.3); } }
.header-cta::after { animation: fx-sweep 5s ease-in-out infinite 2s; }
@keyframes fx-sweep { 0%, 70% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }

/* click sparkle burst */
.fx-spark { position: fixed; z-index: 120; pointer-events: none; font-size: 16px; left: 0; top: 0;
  animation: fx-spark .9s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes fx-spark { 0% { opacity: 1; transform: translate(var(--x0), var(--y0)) scale(.6); } 100% { opacity: 0; transform: translate(var(--x1), var(--y1)) scale(1.25) rotate(var(--r)); } }

/* ---------- spinning light around the "next meeting" card ---------- */
.fx-ringwrap { position: relative; border-radius: var(--r-lg); padding: 2px; overflow: hidden; isolation: isolate; margin-bottom: 22px; }
.fx-ringwrap::before { content: ""; position: absolute; inset: -80%; z-index: -2; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 66%, rgba(24,255,133,.75) 80%, rgba(34,230,242,.8) 88%, transparent 96%);
  animation: spin 6s linear infinite; }
.fx-ringwrap::after { content: ""; position: absolute; inset: 2px; border-radius: calc(var(--r-lg) - 2px); z-index: -1; background: var(--bg-2); pointer-events: none; }
.fx-ringwrap > .next-up { margin-bottom: 0; border-color: transparent; }

/* ---------- marquee band (home) ---------- */
.fx-marquee { position: relative; overflow: hidden; padding: 16px 0; margin: 0 0 34px; border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(0,117,113,.22), rgba(24,255,133,.08), rgba(0,117,113,.22)); transform: rotate(-1.4deg) scale(1.02); }
.fx-marquee-track { display: flex; width: max-content; animation: fx-marquee 40s linear infinite; }
.fx-marquee span { font-family: var(--display); font-size: clamp(1.35rem, 3.4vw, 2.3rem); white-space: nowrap; padding: 0 20px; color: var(--ink); }
.fx-marquee span i { font-style: normal; color: var(--leaf); padding-left: 40px; }
.fx-marquee:hover .fx-marquee-track { animation-play-state: paused; }
@keyframes fx-marquee { to { transform: translateX(-50%); } }

/* ---------- hero: emoji drift with the cursor, card floats ---------- */
.emoji-sky span { transition: translate .8s cubic-bezier(.2,.8,.2,1); translate: calc(var(--px, 0) * 1px) calc(var(--py, 0) * 1px); }
.emoji-sky span:nth-child(even) { translate: calc(var(--px, 0) * -1.4px) calc(var(--py, 0) * -1.4px); }
.hero-card { transition: translate .8s cubic-bezier(.2,.8,.2,1); translate: calc(var(--px, 0) * -.5px) calc(var(--py, 0) * -.5px); }
.faces img { transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.faces img:hover { transform: translateY(-6px) scale(1.15); z-index: 2; position: relative; }

/* ---------- little bounces ---------- */
.pill { transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.pill:hover { transform: translateY(-2px) scale(1.06); }
.tile .em, .meeting .day span, .rules li h3 { transition: transform .5s cubic-bezier(.3,1.6,.5,1); }
.tile .em { display: inline-block; width: max-content; }
.tile:hover .em, .meeting:hover .day span { transform: scale(1.25) rotate(-8deg); }
.mobile-nav a.row span { display: inline-block; transition: transform .4s cubic-bezier(.3,1.6,.5,1); }
.mobile-nav a.row:hover span { transform: scale(1.3) rotate(-10deg); }

/* ---------- back-to-top with progress ring ---------- */
.fx-top { position: fixed; left: 18px; bottom: 18px; z-index: 60; width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--glass-edge); cursor: pointer;
  display: grid; place-items: center; background: var(--glass-solid); color: var(--ink); font-size: 1.15rem; font-weight: 700;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(16px) scale(.8); pointer-events: none; transition: opacity .3s, transform .4s cubic-bezier(.2,.8,.2,1); }
.fx-top.show { opacity: 1; transform: none; pointer-events: auto; }
.fx-top:hover { transform: translateY(-3px); }
.fx-top svg { position: absolute; inset: -1px; width: 50px; height: 50px; transform: rotate(-90deg); }
.fx-top circle { fill: none; stroke-width: 3; }
.fx-top .bg { stroke: var(--line); }
.fx-top .fg { stroke: #18FF85; stroke-linecap: round; stroke-dasharray: 144.5; stroke-dashoffset: 144.5; filter: drop-shadow(0 0 4px rgba(24,255,133,.7)); }

/* ---------- page entrance ---------- */
body.fx-enter main { animation: fx-enter .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes fx-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- reduced motion: keep the look, drop the motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ambient span, h1 em, h2 em, .btn:not(.ghost), .header-cta::after, .fx-ringwrap::before, .fx-marquee-track, body.fx-enter main { animation: none !important; }
  .fx-word, .fx-reveal { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .fx-line::after { transform: scaleX(1); transition: none; }
  .fx-canvas, .fx-spark { display: none; }
}
