/* ────────────────────────────────────────────────────────────────
   Shared marketing-page styles for individual Krackin apps.
   Scoped under .ap; accent is themed per page via a body class:
     .theme-shop  → ShopMate (green)
     .theme-pack  → PackMate (blue)
   Reuses site.css for header/footer, store badges and the lightbox.
   Self-hosted only; CSP-safe (no inline JS).
   ──────────────────────────────────────────────────────────────── */

.ap {
    --ap: #22a447;
    --ap-2: #157a33;
    --ap-soft: rgba(34, 164, 71, 0.14);
    --ap-glow: rgba(34, 164, 71, 0.22);
    --ap-ink: #0c1018;
    --ap-panel: rgba(255, 255, 255, 0.04);
    --ap-line: rgba(255, 255, 255, 0.10);
    --ap-muted: #aeb4c2;
}
.ap.theme-shop {
    --ap: #22a447; --ap-2: #157a33;
    --ap-soft: rgba(34, 164, 71, 0.14); --ap-glow: rgba(34, 164, 71, 0.22);
}
.ap.theme-pack {
    --ap: #3275ff; --ap-2: #1b4fd6;
    --ap-soft: rgba(50, 117, 255, 0.14); --ap-glow: rgba(50, 117, 255, 0.22);
}

/* ── HERO ─────────────────────────────────────────────────────── */
.ap-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--ap-line);
    background:
        radial-gradient(900px 480px at 16% -10%, var(--ap-glow), transparent 60%),
        radial-gradient(820px 460px at 92% 0%, rgba(255,255,255,0.06), transparent 62%),
        linear-gradient(180deg, #0a0e16 0%, #0c1119 60%, #0a0e16 100%);
}
.ap-hero-inner {
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 52px 24px 44px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 44px;
    align-items: center;
}
.ap-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ap);
    margin: 0 0 14px;
}
.ap-eyebrow img { width: 28px; height: 28px; border-radius: 8px; }
.ap-hero h1 {
    font-size: clamp(2.1rem, 4.6vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
}
.ap-hero h1 .ap-accent {
    background: linear-gradient(90deg, var(--ap), #cfe9d6);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    color: var(--ap);
}
.ap-lead { font-size: 1.08rem; color: var(--ap-muted); max-width: 540px; margin: 0 0 22px; }
.ap-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.ap-chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 13px; font-size: 0.8rem; font-weight: 600;
    color: var(--fg); background: var(--ap-panel); border: 1px solid var(--ap-line); border-radius: 999px;
}
.ap-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ap); box-shadow: 0 0 10px var(--ap); }

.ap-hero-media { display: flex; justify-content: center; }
.ap-shot {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 22px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    border: 1px solid var(--ap-line);
}

/* ── STORE BADGES row spacing (badges themselves come from site.css) ── */
.ap-stores { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── SECTION SHELLS ───────────────────────────────────────────── */
.ap-section { max-width: var(--max-width); margin: 0 auto; padding: 54px 24px; }
.ap-band { background: linear-gradient(180deg, #0b1019, #0d1320); border-top: 1px solid var(--ap-line); border-bottom: 1px solid var(--ap-line); }
.ap-head { text-align: center; max-width: 700px; margin: 0 auto 34px; }
.ap-kicker { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ap); margin: 0 0 10px; }
.ap-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.02em; margin: 0 0 12px; }
.ap-head p { color: var(--ap-muted); margin: 0; font-size: 1.02rem; }

/* ── FEATURE GRID ─────────────────────────────────────────────── */
.ap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.ap-card {
    background: var(--ap-panel);
    border: 1px solid var(--ap-line);
    border-radius: var(--radius);
    padding: 24px 22px;
}
.ap-card .ap-ic {
    width: 44px; height: 44px; border-radius: 12px;
    display: grid; place-items: center; margin-bottom: 14px;
    background: var(--ap-soft); color: var(--ap);
}
.ap-card .ap-ic svg { width: 24px; height: 24px; }
.ap-card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.ap-card p { margin: 0; color: var(--ap-muted); font-size: 0.95rem; line-height: 1.55; }
.ap-card .ap-pro { display: inline-block; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #2a1a00; background: linear-gradient(90deg, #f6a821, #ffce6b); padding: 2px 7px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }

/* ── SCREENSHOT GALLERY (horizontal scroll) ───────────────────── */
.ap-gallery {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 6px 24px 18px;
    max-width: 100%;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.ap-gallery::-webkit-scrollbar { height: 8px; }
.ap-gallery::-webkit-scrollbar-thumb { background: var(--ap-line); border-radius: 99px; }
.ap-gallery img {
    flex: 0 0 auto;
    width: 240px;
    height: auto;
    border-radius: 18px;
    border: 1px solid var(--ap-line);
    box-shadow: 0 16px 36px rgba(0,0,0,0.45);
    scroll-snap-align: center;
    background: #0e1320;
}
.ap-gallery-wrap { max-width: var(--max-width); margin: 0 auto; }
.ap-gallery-hint { text-align: center; color: var(--ap-muted); font-size: 0.82rem; margin: 4px 0 0; }

/* ── COMPANION / FAMILY SECTION ───────────────────────────────── */
.ap-companion {
    background:
        radial-gradient(700px 320px at 50% -20%, var(--ap-glow), transparent 62%),
        linear-gradient(180deg, #0b1019, #0a0e16);
    border-top: 1px solid var(--ap-line);
    border-bottom: 1px solid var(--ap-line);
}
.ap-fam-row {
    display: grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 0 auto 26px;
}
.ap-fam-app { text-align: center; }
.ap-fam-app img { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 12px 30px rgba(0,0,0,0.45); }
.ap-fam-app span { display: block; margin-top: 8px; font-weight: 700; font-size: 0.95rem; }
.ap-fam-link {
    width: 54px; height: 54px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--ap-soft); color: var(--ap);
    border: 1px solid var(--ap-line);
}
.ap-fam-link svg { width: 26px; height: 26px; }
.ap-fam-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 28px; }
.ap-fam-point { background: var(--ap-panel); border: 1px solid var(--ap-line); border-left: 3px solid var(--ap); border-radius: var(--radius); padding: 18px 20px; }
.ap-fam-point h4 { margin: 0 0 6px; font-size: 1rem; }
.ap-fam-point p { margin: 0; color: var(--ap-muted); font-size: 0.92rem; line-height: 1.55; }
.ap-fam-cta { text-align: center; margin-top: 28px; }

/* ── FAQ ──────────────────────────────────────────────────────── */
.ap-faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.ap-faq details { background: var(--ap-panel); border: 1px solid var(--ap-line); border-radius: var(--radius); padding: 4px 20px; }
.ap-faq details[open] { border-color: var(--ap); }
.ap-faq summary { list-style: none; cursor: pointer; font-weight: 600; font-size: 1.02rem; padding: 16px 32px 16px 0; position: relative; }
.ap-faq summary::-webkit-details-marker { display: none; }
.ap-faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; line-height: 1; color: var(--ap); }
.ap-faq details[open] summary::after { content: "\2212"; }
.ap-faq summary:hover { color: var(--ap); }
.ap-faq-a { padding: 0 0 16px; }
.ap-faq-a p { margin: 0; color: var(--ap-muted); font-size: 0.96rem; line-height: 1.62; }

/* ── FINAL CTA ────────────────────────────────────────────────── */
.ap-final {
    text-align: center;
    background: radial-gradient(700px 360px at 50% -20%, var(--ap-glow), transparent 60%), linear-gradient(180deg, #0b1019, #0a0e16);
    border-top: 1px solid var(--ap-line);
}
.ap-final h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin: 0 0 12px; letter-spacing: -0.02em; }
.ap-final p { color: var(--ap-muted); max-width: 560px; margin: 0 auto 24px; }
.ap-final .ap-stores { justify-content: center; }
.ap-banner-btn {
    position: relative; display: block; width: 100%; max-width: 920px;
    margin: 0 auto 30px; padding: 0; border: 0; background: none;
    border-radius: var(--radius); overflow: hidden; cursor: zoom-in; line-height: 0;
}
.ap-banner-btn img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--ap-line); box-shadow: 0 18px 44px rgba(0,0,0,0.5); transition: transform 0.25s ease; }
.ap-banner-btn:hover img, .ap-banner-btn:focus-visible img { transform: scale(1.015); }
.ap-banner-btn:focus-visible { outline: 2px solid var(--ap); outline-offset: 3px; }
.ap-disclaimer { max-width: 720px; margin: 28px auto 0; font-size: 0.8rem; line-height: 1.55; color: var(--ap-muted); opacity: 0.8; }

/* accent the active footer/nav link colour to match theme on these pages */
.ap .btn-accent { background: var(--ap); color: #06210d; border-color: transparent; font-weight: 700; }
.ap .btn-accent:hover { background: var(--ap-2); color: #fff; }

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 900px) {
    .ap-hero-inner { grid-template-columns: 1fr; gap: 28px; text-align: center; }
    .ap-lead { margin-left: auto; margin-right: auto; }
    .ap-eyebrow, .ap-chips, .ap-stores { justify-content: center; }
    .ap-hero-media { order: -1; }
}
@media (max-width: 520px) {
    .ap-hero-inner { padding: 38px 20px 30px; }
    .ap-section { padding: 40px 20px; }
    .ap-fam-row { gap: 10px; }
    .ap-fam-app img { width: 64px; height: 64px; }
    .ap-fam-link { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
    .ap-banner-btn img { transition: none; }
}
