/* ══════════════════════════════════════════════════════════════════════
   Pyxely homepage (html/erp.html, served at pyxely.com/). Light by default;
   dark when theme.js sets <html data-theme="dark">. Screens: images/home/*.webp
   (local demo store "Pixel Point Games", fictional data).
   ══════════════════════════════════════════════════════════════════════ */
:root {
    --bg: #ffffff;
    --bg-soft: #f5f7fb;
    --card: #ffffff;
    --ink: #0b1220;
    --ink-2: #334155;
    --muted: #64748b;
    --line: rgba(15, 23, 42, .08);
    --line-2: rgba(15, 23, 42, .14);
    --green: #10b981;
    --cyan: #06b6d4;
    --blue: #3b82f6;
    --violet: #8b5cf6;
    --grad: linear-gradient(120deg, #10b981 0%, #06b6d4 48%, #3b82f6 100%);
    --grad-soft: linear-gradient(120deg, rgba(16, 185, 129, .10), rgba(6, 182, 212, .10) 48%, rgba(59, 130, 246, .12));
    --shadow-window: 0 1px 2px rgba(15, 23, 42, .06), 0 22px 50px -14px rgba(15, 23, 42, .20), 0 60px 120px -40px rgba(59, 130, 246, .28);
    --nav-bg: rgba(255, 255, 255, .78);
    --radius: 20px;
}
:root[data-theme="dark"] {
    --bg: #060a16;
    --bg-soft: #0a1122;
    --card: #0f172a;
    --ink: #f8fafc;
    --ink-2: #cbd5e1;
    --muted: #94a3b8;
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .16);
    --grad-soft: linear-gradient(120deg, rgba(16, 185, 129, .14), rgba(6, 182, 212, .12) 48%, rgba(59, 130, 246, .16));
    --shadow-window: 0 1px 2px rgba(0, 0, 0, .4), 0 22px 50px -14px rgba(0, 0, 0, .6), 0 60px 120px -40px rgba(59, 130, 246, .35);
    --nav-bg: rgba(6, 10, 22, .72);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.hm {
    margin: 0; background: var(--bg); color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.hm img { max-width: 100%; height: auto; display: block; }
.hm a { color: inherit; }
.hm h1, .hm h2, .hm h3 { margin: 0; color: var(--ink); font-weight: 800; }
.hm-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.hm-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── buttons ─────────────────────────────────────────────── */
.hm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 15px 26px; border-radius: 14px; font-size: 16px; font-weight: 700;
    text-decoration: none; white-space: nowrap; border: 1px solid transparent;
    transition: transform .25s cubic-bezier(.16, 1, .3, 1), box-shadow .25s, background .25s, border-color .25s;
}
.hm-btn:hover { transform: translateY(-2px); }
.hm-btn i { font-size: 14px; }
.hm-btn--primary { background: var(--grad); color: #fff !important; box-shadow: 0 8px 24px -6px rgba(59, 130, 246, .45); }
.hm-btn--primary:hover { box-shadow: 0 14px 32px -8px rgba(59, 130, 246, .55); }
.hm-btn--ghost { background: var(--card); color: var(--ink) !important; border-color: var(--line-2); }
.hm-btn--ghost:hover { border-color: var(--ink-2); }
.hm-btn--outline { background: transparent; color: var(--ink) !important; border-color: var(--line-2); }
.hm-btn--outline:hover { border-color: var(--blue); }
.hm-btn--light { background: #fff; color: #0b1220 !important; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .35); }
.hm-btn--sm { padding: 10px 18px; font-size: 14px; border-radius: 12px; }

/* ── nav ─────────────────────────────────────────────────── */
.hm-nav { position: sticky; top: 0; z-index: 50; }
.hm-nav::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: var(--nav-bg); border-bottom: 1px solid transparent;
    backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
    transition: border-color .3s;
}
.hm-nav.is-scrolled::before { border-bottom-color: var(--line); }
.hm-nav__row { display: flex; align-items: center; gap: 24px; height: 72px; }
.hm-nav__logo { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.hm-logo { height: 30px; width: auto; }
.hm-nav__links { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.hm-nav__links a { text-decoration: none; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.hm-nav__links a:hover { color: var(--ink); }
.hm-nav__links .hm-btn { color: #fff; }
.hm-nav__phone-signin, .hm-nav__menu { display: none; }
.hm-nav__theme {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px;
    border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); font-size: 15px; cursor: pointer;
    transition: color .2s, border-color .2s;
}
.hm-nav__theme:hover { color: var(--ink); border-color: var(--ink-2); }

/* ── hero ────────────────────────────────────────────────── */
.hm-hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hm-glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; pointer-events: none; z-index: 0; }
.hm-glow--a { width: 560px; height: 560px; left: -160px; top: -120px; background: radial-gradient(circle, rgba(16, 185, 129, .35), transparent 65%); }
.hm-glow--b { width: 640px; height: 640px; right: -200px; top: 60px; background: radial-gradient(circle, rgba(59, 130, 246, .35), transparent 65%); }
.hm-hero__text { position: relative; z-index: 1; text-align: center; max-width: 900px; }
.hm-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
    font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--card); border: 1px solid var(--line);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.hm-chip i { color: var(--green); }
.hm-hero h1 {
    margin-top: 22px; font-size: clamp(42px, 6.4vw, 80px); line-height: 1.02; letter-spacing: -.04em; font-weight: 850;
}
.hm-lead { margin: 22px auto 0; max-width: 640px; font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); }
.hm-actions { display: flex; justify-content: center; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hm-note { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.hm-note i { color: var(--green); margin-right: 4px; }
.hm-hero__shot { position: relative; z-index: 1; margin-top: 56px; max-width: 1180px; perspective: 2200px; }
.hm-window--hero { transform: rotateX(7deg) scale(.98); transform-origin: 50% 0; animation: hm-straighten 1.4s .25s cubic-bezier(.16, 1, .3, 1) forwards; }
@keyframes hm-straighten { to { transform: rotateX(0) scale(1); } }
.hm-hero__text > * { animation: hm-rise .9s cubic-bezier(.16, 1, .3, 1) both; }
.hm-hero__text > :nth-child(2) { animation-delay: .06s; }
.hm-hero__text > :nth-child(3) { animation-delay: .12s; }
.hm-hero__text > :nth-child(4) { animation-delay: .18s; }
.hm-hero__text > :nth-child(5) { animation-delay: .24s; }
@keyframes hm-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ── app window frame ────────────────────────────────────── */
.hm-window {
    margin: 0; background: var(--card); border: 1px solid var(--line-2); border-radius: 18px;
    overflow: hidden; box-shadow: var(--shadow-window);
}
.hm-window__bar {
    position: relative; display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px;
    background: var(--bg-soft); border-bottom: 1px solid var(--line);
}
.hm-window__bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.hm-window__bar i:nth-child(2) { background: #febc2e; }
.hm-window__bar i:nth-child(3) { background: #28c840; }
.hm-window__bar span {
    position: absolute; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 600; color: var(--muted);
    padding: 3px 14px; border-radius: 8px; background: var(--card); border: 1px solid var(--line);
}
:root[data-theme="dark"] .hm-window img { filter: brightness(.94); }

/* ── section heads ───────────────────────────────────────── */
.hm-head { text-align: center; max-width: 760px; margin: 0 auto 24px; }
.hm-eyebrow {
    display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 12px;
}
.hm-head h2, .hm-online h2, .hm-cta h2 { font-size: clamp(32px, 4.2vw, 50px); line-height: 1.08; letter-spacing: -.03em; }
.hm-head p { margin: 16px auto 0; color: var(--muted); font-size: 18px; max-width: 560px; }

/* ── how it works ────────────────────────────────────────── */
.hm-how { padding: 110px 0 40px; }
.hm-step {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center;
    padding: 72px 0;
}
.hm-step--flip .hm-step__text { order: 2; }
.hm-step__num {
    display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px;
    font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 22px;
}
.hm-step__num--green { background: linear-gradient(135deg, #34d399, #059669); box-shadow: 0 10px 24px -8px rgba(16, 185, 129, .6); }
.hm-step__num--cyan { background: linear-gradient(135deg, #22d3ee, #0891b2); box-shadow: 0 10px 24px -8px rgba(6, 182, 212, .6); }
.hm-step__num--blue { background: linear-gradient(135deg, #60a5fa, #2563eb); box-shadow: 0 10px 24px -8px rgba(59, 130, 246, .6); }
.hm-step__num--violet { background: linear-gradient(135deg, #a78bfa, #7c3aed); box-shadow: 0 10px 24px -8px rgba(139, 92, 246, .6); }
.hm-step h3 { font-size: clamp(28px, 3.1vw, 40px); line-height: 1.1; letter-spacing: -.03em; }
.hm-step p { margin: 14px 0 0; font-size: 19px; color: var(--muted); max-width: 440px; }
.hm-ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.hm-ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; font-weight: 500; color: var(--ink-2); }
.hm-ticks i {
    flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; color: var(--green); background: rgba(16, 185, 129, .12); margin-top: 2px;
}
.hm-stack { position: relative; padding-bottom: 90px; }
.hm-window--inset { position: absolute; width: 56%; left: -8%; bottom: 0; }

/* ── sell online ─────────────────────────────────────────── */
.hm-online { padding: 60px 0; }
.hm-online__box {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center;
    background: var(--grad-soft); border: 1px solid var(--line); border-radius: 32px; padding: 56px;
}
.hm-online__box p { margin: 16px 0 0; color: var(--muted); font-size: 18px; max-width: 480px; }
.hm-logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hm-logos li {
    display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 18px;
    background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.hm-logos i { font-size: 24px; width: 28px; text-align: center; }
.hm-logos .fa-globe { color: var(--cyan); }
.hm-logos .fa-google { color: #ea4335; }
.hm-logos .fa-facebook { color: #1877f2; }
.hm-logos .fa-shopify { color: #5e8e3e; }

/* ── pricing ─────────────────────────────────────────────── */
.hm-pricing { padding: 110px 0 60px; }
.hm-toggle {
    display: flex; width: max-content; margin: 28px auto 44px; padding: 5px; gap: 4px; border-radius: 999px;
    background: var(--bg-soft); border: 1px solid var(--line);
}
.hm-toggle__btn {
    border: 0; background: transparent; cursor: pointer; padding: 10px 20px; border-radius: 999px;
    font: 600 15px 'Inter', system-ui, sans-serif; color: var(--muted); display: inline-flex; align-items: center; gap: 8px;
}
.hm-toggle__btn.is-active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.hm-toggle__save { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: rgba(16, 185, 129, .14); color: #059669; }
.hm-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.hm-plan {
    position: relative; display: flex; flex-direction: column; padding: 34px 30px 30px; border-radius: 24px;
    background: var(--card); border: 1px solid var(--line-2);
}
.hm-plan--pop { border: 2px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box; box-shadow: 0 30px 60px -30px rgba(59, 130, 246, .45); }
.hm-plan__badge {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%); padding: 5px 14px; border-radius: 999px;
    background: var(--grad); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; white-space: nowrap;
}
.hm-plan__name { font-size: 15px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.hm-plan__price { display: flex; align-items: baseline; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.hm-plan__amount { font-size: 50px; font-weight: 850; letter-spacing: -.04em; line-height: 1; }
.hm-plan__per { font-size: 15px; color: var(--muted); }
.hm-plan__note { min-height: 22px; margin-top: 8px; font-size: 14px; font-weight: 600; color: #059669; }
.hm-plan__desc { margin: 6px 0 20px; font-size: 15px; color: var(--muted); }
.hm-plan__list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 11px; flex: 1; align-content: start; }
.hm-plan__list li { display: flex; gap: 10px; font-size: 15px; color: var(--ink-2); }
.hm-plan__list i { color: var(--green); font-size: 13px; margin-top: 5px; }
.hm-plan__all { font-weight: 700; color: var(--ink) !important; }
.hm-plan .hm-btn { width: 100%; }
.hm-fine { text-align: center; margin: 30px auto 0; max-width: 620px; font-size: 14px; color: var(--muted); }

/* ── call to action ──────────────────────────────────────── */
.hm-cta { padding: 60px 0 110px; }
.hm-cta__box {
    position: relative; overflow: hidden; text-align: center; border-radius: 36px; padding: 84px 32px;
    background: var(--grad); color: #fff;
}
.hm-cta__box::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(600px 300px at 15% 0%, rgba(255, 255, 255, .28), transparent 60%),
                radial-gradient(500px 300px at 90% 100%, rgba(255, 255, 255, .18), transparent 60%);
}
.hm-cta h2 { color: #fff; position: relative; }
.hm-cta p { position: relative; margin: 14px 0 30px; font-size: 19px; opacity: .92; }
.hm-cta .hm-btn { position: relative; }

/* ── footer ──────────────────────────────────────────────── */
.hm-footer { border-top: 1px solid var(--line); padding: 34px 0; }
.hm-footer__row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.hm-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.hm-footer nav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; }
.hm-footer nav a:hover { color: var(--ink); }
.hm-footer p { margin: 0 0 0 auto; font-size: 13px; color: var(--muted); }

/* ── reveal on scroll (only when home.js runs) ───────────── */
.hm-js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.16, 1, .3, 1), transform .9s cubic-bezier(.16, 1, .3, 1); }
.hm-js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .hm-js [data-reveal], .hm-hero__text > *, .hm-window--hero { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

/* ── tablet ──────────────────────────────────────────────── */
@media (max-width: 980px) {
    .hm-step, .hm-step--flip { grid-template-columns: 1fr; gap: 32px; padding: 48px 0; }
    .hm-step--flip .hm-step__text { order: 0; }
    .hm-step p { max-width: none; }
    .hm-online__box { grid-template-columns: 1fr; padding: 40px 32px; gap: 32px; }
    .hm-plans { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; gap: 28px; }
    .hm-window--inset { left: auto; right: -2%; width: 60%; }
}

/* ── phone ───────────────────────────────────────────────── */
@media (max-width: 860px) {
    .hm-nav__row { height: 64px; gap: 12px; }
    .hm-nav__links {
        display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
        gap: 4px; padding: 12px 16px 18px; background: var(--card); border-bottom: 1px solid var(--line);
        box-shadow: 0 20px 40px -16px rgba(15, 23, 42, .25);
    }
    .hm-nav__links.is-open { display: flex; }
    .hm-nav__links a { padding: 12px 8px; font-size: 16px; }
    .hm-nav__links .hm-btn { margin-top: 6px; padding: 13px; }
    .hm-nav__signin { display: none; }
    .hm-nav__theme { margin-left: auto; width: 42px; height: 42px; }
    .hm-nav__phone-signin {
        display: inline-flex; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line-2);
        font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink);
    }
    .hm-nav__menu {
        display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px;
        border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font-size: 17px; cursor: pointer;
    }
}
@media (max-width: 640px) {
    body.hm { font-size: 16px; }
    .hm-wrap { padding: 0 16px; }
    .hm-hero { padding-top: 44px; }
    .hm-hero h1 { font-size: 40px; }
    .hm-actions .hm-btn { width: 100%; }
    .hm-hero__shot { margin-top: 40px; }
    .hm-window { border-radius: 12px; }
    .hm-window__bar { height: 26px; padding: 0 10px; gap: 5px; }
    .hm-window__bar i { width: 8px; height: 8px; }
    .hm-window__bar span { font-size: 10px; padding: 1px 8px; }
    .hm-how { padding-top: 72px; }
    .hm-step h3 { font-size: 28px; }
    .hm-step p { font-size: 17px; }
    .hm-stack { padding-bottom: 0; display: grid; gap: 16px; }
    .hm-window--inset { position: static; width: 100%; }
    .hm-online__box { padding: 32px 20px; border-radius: 24px; }
    .hm-logos li { padding: 14px; font-size: 15px; gap: 10px; }
    .hm-toggle__btn { padding: 9px 14px; font-size: 14px; }
    .hm-plan { padding: 30px 22px 24px; }
    .hm-cta__box { padding: 56px 20px; border-radius: 26px; }
    .hm-footer p { margin: 0; width: 100%; }
}
