/* ------------------------------------------------------------------
   Per-app landing page (/app/{slug}). Same layout as the original
   getlivebpm.com homepage: hero with store badges + 3D phone, feature
   grid, "how it works" steps, screenshots, FAQ, privacy CTA.
   The accent colour comes from the app record (--app-accent).
   ------------------------------------------------------------------ */

.app-page {
    --app-accent: #4D96FF;
    --ink-900: #0f172a;
    --ink-700: #1e293b;
    --ink-500: #475569;
    --ink-400: #64748b;
    --ink-300: #94a3b8;
    --ink-200: #cbd5e1;
    --ink-100: #e2e8f0;
    --ink-50:  #f1f5f9;
    --radius-md: 24px;
    --radius-lg: 40px;
    background-image:
        radial-gradient(at 0% 0%,     color-mix(in srgb, var(--app-accent) 12%, transparent) 0px, transparent 50%),
        radial-gradient(at 100% 0%,   rgba(255, 77, 151, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(107, 203, 119, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 100%,   rgba(255, 217, 61, 0.08) 0px, transparent 50%);
}
.app-page h1, .app-page h2, .app-page h3 { font-weight: 800; letter-spacing: -0.02em; color: var(--ink-900); }
.app-page h1 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.05; -webkit-text-fill-color: initial; background: none; }
.app-page h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.15; }
.app-page h3 { font-size: 1.25rem; }
.app-page p { color: var(--ink-500); }
.app-page .accent { color: var(--app-accent); }

.app-page .section-label {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 0.18em;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--ink-300);
    margin-bottom: 12px;
}

/* Breadcrumb */
.app-page .crumbs { font-size: 0.82rem; color: var(--ink-400); padding-top: 1.25rem; }
.app-page .crumbs a { color: var(--ink-400); text-decoration: none; }
.app-page .crumbs a:hover { color: var(--ink-900); }
.app-page .crumbs span::before { content: '/'; margin: 0 0.5rem; }

/* Hero */
.app-page .hero { padding: 40px 0 60px; }
.app-page .hero-copy .lead { font-size: clamp(1rem, 1.3vw, 1.15rem); color: var(--ink-500); max-width: 560px; margin-top: 20px; }
.app-page .app-icon-lg {
    width: 84px; height: 84px; border-radius: 22px;
    border: 1px solid var(--ink-100);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    object-fit: cover;
    margin-bottom: 20px;
    background: #fff;
}
.app-page .hero-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.app-page .badge-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 999px;
    background: #fff; border: 1px solid var(--ink-100);
    font-size: 12px; font-weight: 700; color: var(--ink-500);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    margin: 0; text-transform: none; letter-spacing: 0;
}
.app-page .badge-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--app-accent); }

/* Store badges */
.app-page .store-badges { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.app-page .store-badge {
    position: relative;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 18px 10px 14px;
    border-radius: 14px;
    background: var(--ink-900); color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    transition: transform 0.12s ease, background 0.2s ease;
}
.app-page .store-badge:hover { transform: translateY(-1px); background: var(--ink-700); color: #fff; }
.app-page .store-badge svg { width: 28px; height: 28px; flex-shrink: 0; }
.app-page .store-badge .store-label { display: flex; flex-direction: column; line-height: 1.1; }
.app-page .store-badge .store-caption { font-size: 10px; opacity: 0.75; letter-spacing: 0.05em; }
.app-page .store-badge .store-name { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.app-page .store-badge.disabled { cursor: not-allowed; pointer-events: none; opacity: 0.55; }
.app-page .store-badge .ribbon {
    position: absolute; top: -10px; right: -8px;
    background: var(--app-accent); color: #fff;
    font-size: 9px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
    padding: 4px 8px; border-radius: 8px;
}
.app-page .store-badge.web { background: #fff; color: var(--ink-900); border: 1px solid var(--ink-100); box-shadow: 0 8px 20px rgba(15,23,42,0.06); }
.app-page .store-badge.web:hover { background: var(--ink-50); color: var(--ink-900); }

/* Phone (3D mount or static fallback) */
.app-page .phone-mount { width: 100%; max-width: 560px; height: 620px; position: relative; margin: 0 auto; }
.app-page .phone-static {
    width: 270px; margin: 0 auto; padding: 12px;
    border-radius: 42px; background: var(--ink-900);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25), inset 0 0 0 2px rgba(255,255,255,0.08);
}
.app-page .phone-static img { display: block; width: 100%; border-radius: 32px; aspect-ratio: 1 / 2; object-fit: cover; background: #000; }

/* Sections */
.app-page .section { padding: 80px 0; }
.app-page .section-muted { background: rgba(255,255,255,0.7); border-top: 1px solid var(--ink-100); border-bottom: 1px solid var(--ink-100); }
.app-page .section-title { text-align: center; max-width: 700px; margin: 0 auto 44px; }
.app-page .section-title p { margin-top: 10px; }

.app-page .feature-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.app-page .feature-card {
    background: #fff; border: 1px solid var(--ink-100); border-radius: var(--radius-md); padding: 28px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.app-page .feature-card:hover { border-color: var(--ink-200); box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06); transform: translateY(-2px); }
.app-page .feature-card .feature-num {
    display: block; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600;
    color: var(--app-accent); margin-bottom: 14px; letter-spacing: 0.02em;
}
.app-page .feature-card h3 { margin-bottom: 8px; }
.app-page .feature-card p { font-size: 0.95rem; margin: 0; }

.app-page .step-list { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.app-page .step-item { background: #fff; border: 1px solid var(--ink-100); border-radius: var(--radius-md); padding: 26px; counter-increment: step; }
.app-page .step-item::before {
    content: counter(step, decimal-leading-zero);
    font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700;
    color: var(--app-accent); display: block; margin-bottom: 10px;
}
.app-page .step-item h3 { font-size: 1.05rem; margin-bottom: 6px; }
.app-page .step-item p { font-size: 0.92rem; margin: 0; }

/* Screenshots strip */
.app-page .screens { display: flex; gap: 20px; overflow-x: auto; padding: 10px 4px 24px; scroll-snap-type: x mandatory; }
.app-page .screens img {
    flex: 0 0 auto; width: 220px; aspect-ratio: 9 / 19.5; object-fit: cover;
    border-radius: 28px; border: 6px solid var(--ink-900); background: #000;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18); scroll-snap-align: center;
}

/* FAQ */
.app-page .faq-group { max-width: 760px; margin: 0 auto; }
.app-page .faq-item { background: #fff; border: 1px solid var(--ink-100); border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.app-page .faq-item.open { border-color: var(--app-accent); box-shadow: 0 10px 28px color-mix(in srgb, var(--app-accent) 12%, transparent); }
.app-page .faq-question {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
    padding: 18px 22px; background: transparent; border: 0; text-align: left;
    font-family: inherit; font-size: 1rem; font-weight: 700; color: var(--ink-900); cursor: pointer;
}
.app-page .faq-icon {
    flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
    background: var(--ink-50); color: var(--ink-500);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px;
    transition: transform 0.25s ease, background-color 0.2s ease, color 0.2s ease;
}
.app-page .faq-item.open .faq-icon { transform: rotate(45deg); background: var(--app-accent); color: #fff; }
.app-page .faq-answer { max-height: 0; padding: 0 22px; overflow: hidden; transition: max-height 0.28s ease, padding 0.28s ease; }
.app-page .faq-item.open .faq-answer { max-height: 600px; padding: 0 22px 20px; }
.app-page .faq-answer p { margin: 0 0 10px; }

/* Pill buttons */
.app-page .btn-pill {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 22px; border-radius: 999px; font-weight: 700; font-size: 14px;
    border: none; cursor: pointer; text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.2s ease;
}
.app-page .btn-pill:hover { transform: translateY(-1px); text-decoration: none; }
.app-page .btn-dark { background: var(--ink-900); color: #fff; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18); }
.app-page .btn-dark:hover { background: var(--ink-700); color: #fff; }
.app-page .btn-ghost { background: transparent; color: var(--ink-700); border: 1px solid var(--ink-200); }
.app-page .btn-ghost:hover { background: #fff; color: var(--ink-900); }

/* Contact block on app page */
.app-page .glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-lg);
    padding: 32px;
}

@media (max-width: 576px) {
    .app-page .hero { padding: 24px 0 32px; }
    .app-page .section { padding: 56px 0; }
    .app-page .phone-mount { height: 460px; }
}
