/* ZyberFi public pages (home, download, updates). Minimal: lots of space, thin lines, one accent color.
   Follows the light/dark setting through the tokens in site.css. */
.pub { background: var(--surface); color: var(--text); font-size: 15px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.pub h1, .pub h2 { letter-spacing: -.025em; }
.pub a:hover { text-decoration: none; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--border); }
.top .wrap { display: flex; align-items: center; gap: 32px; height: 64px; }
.top .brand { padding: 0; font-size: 1.05rem; }
.top .brand-logo { height: 30px; }
.top-links { display: flex; gap: 24px; margin-right: auto; }
.top-links a { color: var(--muted); font-weight: 500; font-size: .93rem; }
.top-links a:hover, .top-links a.on { color: var(--text); }
.top-actions { display: flex; gap: 6px; align-items: center; }
.top-actions .btn { padding: 7px 14px; font-size: .9rem; }
.pub .nav-toggle { margin-left: auto; }
.btn.dark { background: var(--text); border-color: var(--text); color: var(--surface); }
.btn.dark:hover { opacity: .88; background: var(--text); }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 0; text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); border: 1px solid var(--border); border-radius: 99px; padding: 5px 14px; margin-bottom: 28px; }
.pill:hover { color: var(--text); border-color: var(--muted); }
.pill b { color: var(--primary); font-weight: 600; }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); line-height: 1.05; font-weight: 700; margin: 0 auto 22px; max-width: 820px; }
.hero h1 span { color: var(--primary); }
.hero .lead { font-size: 1.15rem; line-height: 1.6; color: var(--muted); max-width: 580px; margin: 0 auto 34px; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 20px; }
.hero-cta .btn { padding: 12px 22px; font-size: 1rem; border-radius: 10px; }
.hero-note { color: var(--muted); font-size: .9rem; margin: 0 0 64px; }

/* The real dashboard with the real portal on a phone */
.shot { position: relative; max-width: 980px; margin: 0 auto; padding: 0 0 0 90px; }
.browser { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 30px 60px -30px rgba(11, 18, 32, .28); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.browser-bar span { margin-left: 10px; font-size: .72rem; color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.browser img, .browser picture { display: block; width: 100%; height: auto; }
.phone { position: absolute; left: 0; bottom: -40px; width: 24%; max-width: 210px; min-width: 110px; padding: 7px; border-radius: 28px; background: #0b0f17; box-shadow: 0 24px 50px -16px rgba(11, 18, 32, .45); }
.phone img { display: block; width: 100%; height: auto; border-radius: 22px; }
.hero + .boards { margin-top: 96px; }

/* ---------- Boards line ---------- */
.boards { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.boards .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 26px; padding-top: 22px; padding-bottom: 22px; color: var(--muted); font-size: .92rem; }
.boards b { color: var(--text); font-weight: 600; }
.boards .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--border); }

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.section.alt { background: var(--surface-2); }
.sec-head { max-width: 620px; margin: 0 0 56px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.12; font-weight: 700; margin: 0 0 14px; }
.sec-head p { color: var(--muted); font-size: 1.05rem; line-height: 1.6; margin: 0; }
.kicker { display: block; font-size: .8rem; font-weight: 600; color: var(--primary); margin-bottom: 12px; }

/* Tour: tabs + screenshot */
.show-tabs { display: flex; justify-content: center; margin-bottom: 28px; }
.show-frame { max-width: 980px; margin: 0 auto; }
.show-pane { display: none; }
.show-pane.on { display: block; animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; } }
.show-caption { text-align: center; color: var(--muted); margin: 20px auto 0; max-width: 560px; }
.phones { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; }
.phones .phone { position: relative; left: auto; bottom: auto; width: 240px; max-width: 70vw; }
.phones figure { margin: 0; display: grid; gap: 14px; justify-items: center; }
.phones figcaption { color: var(--muted); font-size: .9rem; }

/* Features: groups with the title on the left and a plain list on the right, no cards */
.fgroups { display: grid; }
.fgroup { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px 48px; padding: 44px 0; border-top: 1px solid var(--border); }
.fgroup:first-child { border-top: 0; padding-top: 0; }
.fgroup-head { display: flex; align-items: flex-start; gap: 12px; }
.fgroup-head .ico { flex: none; width: 22px; height: 22px; color: var(--primary); margin-top: 3px; }
.fgroup-head h3 { margin: 0; font-size: 1.15rem; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; text-transform: none; color: var(--text); }
.flist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
.flist h4 { margin: 0 0 6px; font-size: 1rem; font-weight: 600; letter-spacing: -.01em; color: var(--text); text-transform: none; }
.flist p { margin: 0; color: var(--muted); line-height: 1.6; font-size: .95rem; }
@media (max-width: 900px) {
    .fgroup { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .flist { grid-template-columns: 1fr; gap: 22px; }
    .fgroup { padding: 36px 0; }
}

/* Steps: numbered, side by side */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; counter-reset: step; }
.step { border-top: 1px solid var(--border); padding-top: 22px; }
.step::before { counter-increment: step; content: "0" counter(step); display: block; font-size: .85rem; font-weight: 600; color: var(--primary); margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.step h3 { font-size: 1.05rem; text-transform: none; letter-spacing: -.01em; color: var(--text); margin: 0 0 8px; }
.step p { margin: 0; color: var(--muted); line-height: 1.6; }

/* Pricing */
.price-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 400px)); justify-content: center; gap: 20px; }
.price-card { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 36px 32px 32px; display: grid; gap: 20px; }
.price-card.hot { border-color: var(--text); }
.price-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price-top h3 { margin: 0; font-size: 1rem; color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 600; }
.price-tag { font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; color: var(--primary); background: var(--primary-soft); }
.price-amount { display: flex; align-items: baseline; gap: 10px; }
.price-amount b { font-size: 3.4rem; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.price-amount span { color: var(--muted); }
.price-card > p { margin: 0; color: var(--muted); }
.price-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.price-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.price-list .ico { width: 17px; height: 17px; color: var(--primary); margin-top: 3px; }
.price-card .btn { width: 100%; padding: 12px; font-size: 1rem; border-radius: 10px; }
.plan-note { text-align: center; color: var(--muted); margin: 28px 0 0; font-size: .92rem; }

/* FAQ: lines */
.faq { max-width: 720px; margin: 0 auto; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; padding: 22px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 1.3rem; font-weight: 400; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 0 22px; color: var(--muted); line-height: 1.65; max-width: 640px; }

/* Closing call to action */
.cta { text-align: center; }
.cta h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; margin: 0 0 12px; }
.cta p { color: var(--muted); margin: 0 0 28px; font-size: 1.05rem; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--border); padding: 56px 0 40px; color: var(--muted); font-size: .9rem; }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.foot-logo { width: 110px; height: auto; display: block; margin-bottom: 14px; }
.foot h4 { color: var(--text); margin: 0 0 14px; font-size: .88rem; font-weight: 600; }
.foot-links { display: grid; gap: 10px; }
.foot-links a { color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.foot-links a:hover { color: var(--text); }
.foot-links .ico { width: 15px; height: 15px; }
.foot-bottom { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* ---------- Download and Updates ---------- */
.page-hero { padding: 88px 0 48px; }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); font-weight: 700; margin: 0 0 12px; }
.page-hero p { color: var(--muted); margin: 0; font-size: 1.08rem; max-width: 600px; }
.dl-section { padding-top: 0; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.dl-card { display: grid; gap: 18px; align-content: start; padding: 28px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.dl-head { display: flex; align-items: center; gap: 12px; }
.dl-head .ico { width: 22px; height: 22px; color: var(--primary); }
.dl-head h2 { margin: 0; font-size: 1.1rem; }
.dl-meta { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 8px 12px; margin: 0; font-size: .9rem; }
.dl-meta dt { color: var(--muted); }
.dl-meta dd { margin: 0; overflow-wrap: anywhere; }
.dl-btn { width: 100%; padding: 12px; font-size: 1rem; border-radius: 10px; }
.dl-note, .dl-soon { margin: 0; }
.dl-notes { font-size: .9rem; }
.timeline { max-width: 820px; padding-bottom: 96px; border-top: 1px solid var(--border); }
.rel { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; padding: 36px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 90px; }
.rel-meta { display: grid; gap: 6px; align-content: start; color: var(--muted); font-size: .9rem; }
.rel-ver { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.rel-body h2 { font-size: 1.25rem; margin: 0 0 12px; }
.notes { color: var(--text-2); line-height: 1.65; }
.notes ul { margin: 0 0 12px; padding-left: 20px; }
.notes li { margin-bottom: 4px; }
.notes p { margin: 0 0 10px; }
.rel-files { display: grid; gap: 8px; margin-top: 18px; }
.rel-file { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; font-size: .9rem; }
.rel-file .ico { color: var(--muted); }
.rel-file span { margin-right: auto; }

/* ---------- Motion ----------
   Everything here is decoration: without JS or with "reduce motion" the page looks the same, only still. */
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
@keyframes drift1 { to { transform: translate(120px, 60px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-140px, 40px) scale(.9); } }
@keyframes shine { to { background-position: 300% 50%; } }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* Scroll progress line (added by public.js) */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; background: linear-gradient(90deg, #22b8ff, var(--primary)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); pointer-events: none; }

/* Hero: soft moving glow over a faint grid */
.hero { position: relative; isolation: isolate; }
.hero-bg { position: absolute; inset: -64px 0 auto; height: 860px; overflow: hidden; z-index: -1; pointer-events: none; }
.glow { --c: #22b8ff; position: absolute; width: 1000px; height: 1000px; opacity: .2;
    background: radial-gradient(circle closest-side, var(--c) 0%, color-mix(in srgb, var(--c) 55%, transparent) 30%, color-mix(in srgb, var(--c) 22%, transparent) 55%, color-mix(in srgb, var(--c) 6%, transparent) 78%, transparent 100%); }
.g1 { top: -420px; left: -260px; animation: drift1 18s ease-in-out infinite alternate; }
.g2 { --c: var(--primary); top: -360px; right: -300px; animation: drift2 22s ease-in-out infinite alternate; }
.grid-lines { position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 56px 56px; opacity: .45;
    -webkit-mask-image: radial-gradient(ellipse 50% 45% at 50% 35%, #000, transparent); mask-image: radial-gradient(ellipse 50% 45% at 50% 35%, #000, transparent); }
@media (prefers-color-scheme: dark) { .glow { opacity: .16; } .grid-lines { opacity: .7; } }

/* Hero entrance, one part after another */
.js .hero .wrap > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.js .hero .wrap > :nth-child(2) { animation-delay: .08s; }
.js .hero .wrap > :nth-child(3) { animation-delay: .16s; }
.js .hero .wrap > :nth-child(4) { animation-delay: .24s; }
.js .hero .wrap > :nth-child(5) { animation-delay: .3s; }
.js .hero .wrap > :nth-child(6) { animation-delay: .4s; animation-duration: 1.2s; }
.hero h1 span { background: linear-gradient(90deg, #22b8ff, var(--primary), #6d5dfc, #22b8ff); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 10s linear infinite; }
.pill b { display: inline-flex; align-items: center; gap: 7px; }
.pill b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 var(--primary); }
.pill b { position: relative; }
.pill b::after { content: ""; position: absolute; left: 0; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--primary); animation: ping 2s cubic-bezier(0, 0, .2, 1) infinite; }

/* The screenshot leans back and stands up as you scroll (public.js sets --tilt) */
.shot { perspective: 1600px; }
.shot .browser { transform: rotateX(var(--tilt, 0deg)); transform-origin: 50% 0; transition: transform .1s linear; will-change: transform; }
.js .shot .phone { animation: bob 6s ease-in-out infinite; }

/* Buttons and links */
.btn { transition: transform .15s, box-shadow .2s, background .15s, opacity .15s; }
.pub .btn:hover { transform: translateY(-1px); }
.btn.dark:hover { opacity: 1; box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--text) 60%, transparent); }
.arrow { display: inline-block; transition: transform .2s; }
.btn:hover .arrow { transform: translateX(4px); }
.top-links a { position: relative; }
.top-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px; background: var(--primary); transform: scaleX(0); transition: transform .25s; }
.top-links a:hover::after, .top-links a.on::after { transform: scaleX(1); }

/* Numbers strip */
.stats { padding: 72px 0 0; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; text-align: center; }
.stat-item { display: grid; gap: 6px; }
.stat-item b { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums;
    background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 55%, transparent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-item span { color: var(--muted); font-size: .92rem; }

/* Cards light up where the pointer is (public.js sets --mx/--my) */
.spot { position: relative; overflow: hidden; transition: border-color .2s, transform .25s, box-shadow .25s; }
.spot::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--primary) 12%, transparent), transparent 60%); }
.spot:hover::before { opacity: 1; }
.spot:hover { transform: translateY(-3px); box-shadow: 0 24px 48px -28px rgba(11, 18, 32, .35); }
.spot > * { position: relative; }

/* Feature titles get an accent line on hover */
.flist > div { padding-left: 14px; border-left: 2px solid transparent; transition: border-color .25s; }
.flist > div:hover { border-left-color: var(--primary); }

/* Steps: the top line draws in */
.step { border-top: 1px solid var(--border); background: linear-gradient(var(--primary), var(--primary)) no-repeat 0 0 / 0 2px; transition: background-size 1s cubic-bezier(.2, .7, .2, 1); margin-top: -1px; }
.stagger.in .step, .no-motion .step { background-size: 100% 2px; }

/* FAQ answers slide in */
.faq details[open] p { animation: rise .35s ease both; }
.faq summary:hover { color: var(--primary); }

/* Download and Updates headers get the same glow */
.page-hero { position: relative; isolation: isolate; }
.page-hero::before { content: ""; position: absolute; z-index: -1; top: -120px; left: -10%; width: 700px; height: 600px; background: radial-gradient(closest-side, #22b8ff, transparent); opacity: .16; animation: drift1 20s ease-in-out infinite alternate; pointer-events: none; }

/* ---------- Appear on scroll ---------- */
.js .rv { opacity: 0; transform: translateY(18px); filter: blur(4px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1), filter .8s; }
.js .rv.in { opacity: 1; transform: none; filter: none; }
.js .stagger > * { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1), background-size 1s cubic-bezier(.2, .7, .2, 1), border-color .25s; transition-delay: calc(var(--i, 0) * 70ms); }
.js .stagger.in > * { opacity: 1; transform: none; }
.js .stagger.in > .spot:hover { transform: translateY(-3px); }

@media (max-width: 760px) {
    .wrap { padding: 0 16px; }
    .top-links, .top-actions .hide-sm { display: none; }
    .top-links.open { display: flex; position: fixed; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 6px 16px 12px; }
    .top-links.open a { padding: 12px 0; font-size: 1rem; }
    .pub .nav-toggle { display: grid; }
    .top .wrap { gap: 10px; }
    .hero { padding-top: 56px; }
    .hero-note { margin-bottom: 44px; }
    .shot { padding-left: 46px; }
    .phone { padding: 5px; border-radius: 18px; bottom: -24px; }
    .phone img { border-radius: 14px; }
    .hero + .boards { margin-top: 64px; }
    .section { padding: 72px 0; }
    .steps { grid-template-columns: 1fr; gap: 32px; }
    .foot .wrap { grid-template-columns: 1fr; }
    .rel { grid-template-columns: 1fr; gap: 10px; }
    .price-amount b { font-size: 2.8rem; }
    .page-hero { padding: 56px 0 36px; }
    .stats { padding-top: 56px; }
    .stats .wrap { grid-template-columns: 1fr 1fr; gap: 32px 16px; }
    .glow { width: 640px; height: 640px; }
    .g1 { top: -320px; left: -300px; }
    .g2 { top: -240px; right: -360px; }
    .top-links a::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .js .rv, .js .stagger > * { opacity: 1; transform: none; filter: none; transition: none; }
    .js .hero .wrap > *, .glow, .page-hero::before, .js .shot .phone, .hero h1 span, .pill b::after, .faq details[open] p { animation: none; }
    .shot .browser { transform: none; }
    .step { background-size: 100% 2px; transition: none; }
    .show-pane.on { animation: none; }
}
