/* =========================================================================
   SOLVI – mozgás (mozgas.js). Szabályok: gombok és apró visszajelzések
   150–200 ms; blokkok egyszer, visszafogottan tűnnek fel (áttűnés és kis
   elmozdulás); egyetlen görgetéshez kötött mozgás van (a laptop fedele).
   Csak átlátszóság és elmozdulás animál. Csökkentett mozgásnál minden
   azonnal, kész állapotban látszik.
   ========================================================================= */

/* ---------- Megjelenés görgetéskor (main.js: .reveal → .in) ---------- */
.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Fejléc sötét szekciók fölött ---------- */
.site-header.on-dark { background: rgba(22, 22, 23, .78); border-bottom-color: rgba(255, 255, 255, .08); }
.site-header.on-dark .logo { color: var(--on-dark); }
.site-header.on-dark .nav-toggle span { background: var(--on-dark); }
@media (min-width: 861px) {
  .site-header.on-dark .nav a:not(.btn) { color: rgba(245, 245, 247, .8); }
  .site-header.on-dark .nav a:not(.btn):hover { color: #fff; }
  .site-header.on-dark .nav-cta { background: var(--on-dark); color: var(--ink); }
}

/* ---------- Hero: belépő ---------- */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .1em .06em .12em; margin: -.1em -.06em -.12em; }
.w > span { display: inline-block; }
.hero h1 .w > span { animation: wordUp .9s var(--ease) both; animation-delay: calc(var(--i) * 50ms + 80ms); }
@keyframes wordUp { from { transform: translateY(105%); } }
.js .hero .intro { animation: introUp .8s var(--ease) both; animation-delay: calc(var(--d, 0) * 50ms + 100ms); }
@keyframes introUp { from { opacity: 0; translate: 0 16px; } }

/* a kirakat beúszik; a laptop fedelét a mozgas.js nyitja ki (--lid), és
   görgetésre ugyanez csukja vissza */
.js .hero-stage { animation: showUp 1s var(--ease) .4s both; }
@keyframes showUp { from { opacity: 0; translate: 0 24px; } }
/* a macOS-értesítés jobbról becsúszik a laptop kijelzőjén, majd eltűnik */
.mac-note.pop { animation: noteIn 4.4s var(--ease) .8s both; }
@keyframes noteIn {
  0% { opacity: 0; translate: 110% 0; }
  12%, 86% { opacity: 1; translate: 0 0; }
  100% { opacity: 0; translate: 0 0; }
}
/* csukott állapotban a lapozó nem látszik (--lid a .hero-show-n) */
.hero-pager { opacity: calc(1 - var(--lid, 0) * 1.4); }
/* a lapozó csíkja a váltásig kitöltődik */
.hero-pager.run [aria-current] i { animation: fill var(--ido, 5s) linear both; }
@keyframes fill { from { transform: scaleX(0); } }

/* ---------- Szolgáltatás-csempék: élő mini-felületek ----------
   Csak akkor futnak, amikor a csempe látszik (.play, mozgas.js) */
.tile-art * { animation-play-state: paused; }
.tile.play .tile-art * { animation-play-state: running; }

/* weboldal: a lap elemei sorban felépülnek, majd újrakezdik */
.mb {
  width: min(600px, 100%); border-radius: 14px 14px 0 0; background: #fff; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 30px 60px -30px rgba(0, 0, 0, .3);
}
.mb-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; background: #F5F5F7; border-bottom: 1px solid var(--line); }
.mb-bar i { width: 9px; height: 9px; border-radius: 50%; background: #D2D2D7; }
.mb-bar span { margin: 0 auto; transform: translateX(-21px); font-size: .7rem; color: var(--ink-3); background: #fff; padding: 3px 14px; border-radius: 6px; }
.mb-page { padding: 18px 22px 0; display: grid; gap: 18px; }
.mb-nav { display: flex; align-items: center; gap: 12px; }
.mb-nav b { width: 58px; height: 11px; border-radius: 6px; background: var(--ink); margin-right: auto; }
.mb-nav span { width: 34px; height: 6px; border-radius: 3px; background: #D2D2D7; }
.mb-nav em { width: 58px; height: 20px; border-radius: 99px; background: var(--accent); }
.mb-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: center; }
.mb-text { display: grid; gap: 9px; }
.mb-text b { height: 15px; border-radius: 4px; background: var(--ink); }
.mb-text span { height: 7px; border-radius: 4px; background: #D2D2D7; }
.mb-text .short { width: 64%; }
.mb-text em { justify-self: start; margin-top: 6px; padding: 7px 14px; border-radius: 99px; background: var(--ink); color: #fff; font: 500 .66rem/1 var(--font-body); font-style: normal; }
.mb-img { aspect-ratio: 4 / 3; border-radius: 12px; background: radial-gradient(circle at 70% 30%, #FFD9C7 0 18%, transparent 19%), linear-gradient(160deg, #FFB08A, #0E7A5F); }
.mb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mb-cards i { height: 64px; border-radius: 12px 12px 0 0; background: #F5F5F7; }
.mb [class*="k"] { animation: build 9s var(--ease) infinite both; }
.mb .k1 { animation-delay: 0s; } .mb .k2 { animation-delay: .15s; } .mb .k3 { animation-delay: .3s; }
.mb .k4 { animation-delay: .45s; } .mb .k5 { animation-delay: .6s; } .mb .k6 { animation-delay: .5s; }
.mb .k7 { animation-delay: .8s; } .mb .k8 { animation-delay: .92s; } .mb .k9 { animation-delay: 1.04s; }
@keyframes build {
  0% { opacity: 0; transform: translateY(10px); }
  7%, 88% { opacity: 1; transform: none; }
  95%, 100% { opacity: 0; transform: none; }
}

/* webshop: kosárba, a számláló nő, jön a „Fizetve” értesítés */
.shop { position: relative; width: min(300px, 100%); padding-bottom: 28px; }
.shop-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: .82rem; font-weight: 600; }
.cart { position: relative; width: 26px; height: 22px; border: 2px solid var(--ink); border-top-width: 2px; border-radius: 3px 3px 7px 7px; }
.cart b {
  position: absolute; top: -9px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #fff; font: 600 .66rem/18px var(--font-body); text-align: center;
}
.cart b:last-child { opacity: 0; animation: cartSwap 6s var(--ease) infinite both; }
@keyframes cartSwap { 0%, 30% { opacity: 0; transform: scale(.4); } 34%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.shop-card { background: #fff; border-radius: 20px; padding: 12px 12px 14px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 22px 40px -26px rgba(0, 0, 0, .3); }
/* a termékkép a saját, solvi-logós szérumunk */
.shop-img { position: relative; aspect-ratio: 1.35; border-radius: 13px; overflow: hidden; background: #F3E2D4; }
.shop-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 46%; display: block; }
.shop-info { display: flex; justify-content: space-between; margin: 12px 2px 12px; font-size: .84rem; }
.shop-info span { color: var(--ink-3); }
.shop-btn { display: block; text-align: center; padding: 10px; border-radius: 99px; background: var(--ink); color: #fff; font: 500 .8rem/1 var(--font-body); font-style: normal; animation: press 6s var(--ease) infinite both; }
@keyframes press { 0%, 22% { transform: none; background: var(--ink); } 26% { transform: scale(.95); background: var(--accent); } 32%, 100% { transform: none; background: var(--ink); } }
.toast {
  position: absolute; left: 8%; right: 8%; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 16px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 34px -14px rgba(0, 0, 0, .35); font-size: .76rem; line-height: 1.25;
  animation: toast 6s var(--ease) infinite both;
}
.toast i { width: 26px; height: 26px; border-radius: 50%; background: #34C759; display: grid; place-items: center; flex: none; }
.toast i::after { content: ""; width: 10px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.toast b { display: block; }
.toast span { color: var(--ink-3); }
@keyframes toast { 0%, 44% { opacity: 0; transform: translateY(14px) scale(.96); } 50%, 88% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateY(6px); } }

/* mobilapp: kiválasztott időpont, majd „Lefoglalva” */
.mini-phone {
  position: relative; width: 214px; height: 330px; margin-bottom: -60px; padding: 9px; border-radius: 38px 38px 0 0;
  background: #1B1B1D; box-shadow: inset 0 0 0 2px #4A4A4D, inset 0 0 0 5px #0A0A0B, 0 30px 50px -26px rgba(0, 0, 0, .45);
}
.mini-phone .island { position: absolute; z-index: 2; top: 17px; left: 50%; width: 64px; height: 19px; translate: -50% 0; border-radius: 99px; background: #000; }
.app { height: 100%; border-radius: 30px 30px 0 0; background: #fff; padding: 46px 14px 0; }
.app-title { font-weight: 600; font-size: 1.1rem; letter-spacing: -.03em; margin-bottom: 12px; }
.days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.days span { display: grid; justify-items: center; gap: 2px; padding: 7px 0; border-radius: 12px; background: #F5F5F7; font-size: .62rem; color: var(--ink-3); }
.days b { font-size: .9rem; color: var(--ink); }
.days .sel { background: var(--ink); color: #A1A1A6; }
.days .sel b { color: #fff; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.slots span { padding: 7px 0; border-radius: 10px; text-align: center; font-size: .66rem; background: #F5F5F7; }
.slots .sel { animation: slotSel 6s var(--ease) infinite both; }
@keyframes slotSel { 0%, 24% { background: #F5F5F7; color: var(--ink); } 30%, 92% { background: var(--accent); color: #fff; } 100% { background: #F5F5F7; } }
.app-btn { position: relative; display: block; height: 34px; border-radius: 99px; background: var(--ink); overflow: hidden; font-style: normal; animation: appBtn 6s var(--ease) infinite both; }
.app-btn span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: .74rem; font-weight: 500; }
.app-btn span:last-child { opacity: 0; animation: appDone 6s var(--ease) infinite both; }
.app-btn span:first-child { animation: appLabel 6s var(--ease) infinite both; }
@keyframes appBtn { 0%, 52% { background: var(--ink); } 58%, 92% { background: #34C759; } 100% { background: var(--ink); } }
@keyframes appLabel { 0%, 52% { opacity: 1; transform: none; } 58%, 94% { opacity: 0; transform: translateY(-100%); } 100% { opacity: 1; } }
@keyframes appDone { 0%, 52% { opacity: 0; transform: translateY(100%); } 58%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* automatizálás: a jel végigfut a folyamaton */
.flow { display: flex; align-items: center; width: 100%; padding-bottom: 8px; }
.node {
  flex: none; width: 130px; display: grid; justify-items: start; gap: 2px; padding: 14px; border-radius: 18px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 18px 34px -24px rgba(0, 0, 0, .3);
  animation: nodeOn 6s var(--ease) infinite both;
}
.node i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #F5F5F7; margin-bottom: 10px; transition: background .3s; }
.node svg { width: 19px; height: 19px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.node b { font-size: .86rem; font-weight: 600; letter-spacing: -.02em; }
.node span { font-size: .72rem; color: var(--ink-3); }
.f2 { animation-delay: 1.4s; } .f3 { animation-delay: 2.8s; } .f4 { animation-delay: 4.2s; }
@keyframes nodeOn {
  0% { box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 18px 34px -24px rgba(0, 0, 0, .3); }
  5%, 22% { box-shadow: 0 0 0 2px var(--accent), 0 18px 34px -18px rgba(14, 122, 95, .55); }
  32%, 100% { box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 18px 34px -24px rgba(0, 0, 0, .3); }
}
.wire { position: relative; flex: 1; height: 2px; margin: 0 8px; border-radius: 2px; background: #D2D2D7; }
.wire i { position: absolute; top: 50%; left: 0; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: wire 6s cubic-bezier(.45, 0, .2, 1) infinite both; }
.w1 i { animation-delay: .6s; } .w2 i { animation-delay: 2s; } .w3 i { animation-delay: 3.4s; }
@keyframes wire { 0% { left: 0; opacity: 0; } 2% { opacity: 1; } 14% { left: 100%; opacity: 1; } 17%, 100% { left: 100%; opacity: 0; } }
.flow-log { margin-top: 18px; font-size: .84rem; color: var(--ink-3); animation: logIn 6s var(--ease) infinite both; }
.flow-log .ok { color: #1F9D49; font-weight: 600; }
@keyframes logIn { 0%, 74% { opacity: 0; transform: translateY(6px); } 80%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.t-auto .tile-art { flex-direction: column; align-items: stretch; justify-content: center; padding-bottom: 40px; }

/* AI-asszisztens: kérdés, gépelés, válasz */
.chat { display: grid; gap: 8px; width: min(380px, 100%); padding-bottom: 40px; font-size: .86rem; line-height: 1.4; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 20px; }
.msg.me { justify-self: end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; animation: msgIn 7s var(--ease) infinite both; }
.msg.bot { justify-self: start; background: #fff; border-bottom-left-radius: 6px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .04); animation: botIn 7s var(--ease) infinite both; }
.msg.typing { justify-self: start; display: flex; gap: 4px; padding: 13px 14px; background: #fff; border-bottom-left-radius: 6px; animation: typing 7s var(--ease) infinite both; }
.msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: #A1A1A6; animation: dot 1s ease-in-out infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; }
.msg.typing i:nth-child(3) { animation-delay: .3s; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; animation: chipsIn 7s var(--ease) infinite both; }
.chat .chips { margin: 2px 0 0; }
.chat .chips span { padding: 7px 12px; border-radius: 99px; background: #fff; color: var(--accent-ink); font-size: .76rem; font-weight: 500; box-shadow: 0 0 0 1px rgba(14, 122, 95, .3); }
@keyframes msgIn { 0% { opacity: 0; transform: translateY(8px); } 6%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes typing { 0%, 12% { opacity: 0; height: 0; padding-block: 0; } 16%, 34% { opacity: 1; height: 32px; padding-block: 13px; } 38%, 100% { opacity: 0; height: 0; padding-block: 0; } }
@keyframes botIn { 0%, 37% { opacity: 0; transform: translateY(8px); } 42%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes chipsIn { 0%, 48% { opacity: 0; transform: translateY(6px); } 54%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }
@keyframes dot { 0%, 100% { transform: none; opacity: .5; } 50% { transform: translateY(-3px); opacity: 1; } }

/* egyedi rendszer: kimutatás, az oszlopok egyszer felnőnek */
.dash { width: min(380px, 100%); margin-bottom: 40px; padding: 20px 20px 18px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 22px 40px -28px rgba(0, 0, 0, .3); }
.dash-kpi { display: grid; gap: 2px; margin-bottom: 18px; }
.dash-kpi span { font-size: .76rem; color: var(--ink-3); }
.dash-kpi b { font-size: 2.1rem; font-weight: 600; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.dash-kpi em { font-style: normal; font-size: .74rem; color: #1F9D49; font-weight: 500; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 104px; }
.bars i { flex: 1; height: calc(var(--h) * 100%); border-radius: 6px 6px 3px 3px; background: #E8E8ED; transform-origin: 50% 100%; animation: bar 1.4s var(--ease) both; }
.bars i:last-child { background: var(--accent); }
.bars i:nth-child(2) { animation-delay: .07s; } .bars i:nth-child(3) { animation-delay: .14s; } .bars i:nth-child(4) { animation-delay: .21s; }
.bars i:nth-child(5) { animation-delay: .28s; } .bars i:nth-child(6) { animation-delay: .35s; } .bars i:nth-child(7) { animation-delay: .42s; }
@keyframes bar { from { transform: scaleY(0); } }

/* üzemeltetés: állapotlista */
.status { list-style: none; margin: 0; padding: 6px 20px; width: 100%; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .04); }
.status li { display: flex; align-items: center; gap: 12px; padding: 13px 0; font-size: .92rem; font-weight: 500; }
.status li + li { border-top: 1px solid var(--line); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: #34C759; box-shadow: 0 0 0 0 rgba(52, 199, 89, .5); animation: ping 2.4s ease-out infinite; }
.status li:nth-child(2) i { animation-delay: .6s; } .status li:nth-child(3) i { animation-delay: 1.2s; } .status li:nth-child(4) i { animation-delay: 1.8s; }
.status span { margin-left: auto; color: var(--ink-3); font-weight: 400; font-size: .86rem; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, .45); } 70%, 100% { box-shadow: 0 0 0 7px rgba(52, 199, 89, 0); } }

/* =========================================================================
   Reszponzív
   ========================================================================= */
@media (max-width: 1080px) {
  .flow { flex-wrap: wrap; gap: 12px; }
  .node { width: calc(50% - 6px); }
  .wire { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mac-note { opacity: 1; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .tile-art *, .tile-art *::before, .tile-art *::after { animation: none !important; }
  .typing { display: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
