/*
 * App landing page template — modelled on the Hootenanny landing page.
 * Everything here reads tokens from styles.css, which each app's
 * /css/apps/<slug>.css overrides (colours + fonts). Layout and spacing are
 * identical across apps.
 */

/* ------------------------------------------------------- app header */

.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.app-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 12px;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--heading, var(--ink));
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: var(--display-weight);
    letter-spacing: var(--display-tracking);
}
.app-brand:hover { text-decoration: none; }
.app-brand .app-icon { width: 36px; height: 36px; }

.app-header__right { display: flex; align-items: center; gap: 16px; }
.app-header__by { font-size: 13px; color: var(--ink-3); }
.app-header__by:hover { color: var(--ink); }
@media (max-width: 639px) { .app-header__by { display: none; } }

/* -------------------------------------------------------------- hero */

.app-hero { position: relative; overflow: hidden; }

.app-hero::before {
    content: "";
    position: absolute;
    top: -160px;
    right: -160px;
    width: 32rem;
    height: 32rem;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
}

.app-hero .container {
    position: relative;
    display: grid;
    gap: 48px;
    align-items: center;
    padding-block: 64px;
}
@media (min-width: 1024px) {
    .app-hero .container { grid-template-columns: 1fr 1fr; padding-block: 96px; }
}

.app-hero .lead { max-width: 36rem; margin-top: 20px; }
.app-hero .hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }

/* "In development" / "Coming soon" pill used in place of store badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
.status-pill--dev { background: #FFF4DB; border-color: #F1D79A; color: #5C4300; }
.status-pill--dev::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #D99A00;
}

/* ---------------------------------------------------------- headings */

.section-title { max-width: 42rem; }
.section-title .h-section { margin-top: 0; }
.section-title .eyebrow + .h-section { margin-top: 16px; }
.section-title--center { margin-inline: auto; text-align: center; }
.section-title--center .lead { margin-inline: auto; }

/* ------------------------------------------------ core-idea tiles */

.tiles {
    display: grid;
    gap: 24px;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
}
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .tiles--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.tile h3 { margin: 16px 0 0; font-size: 20px; }
.tile p { margin: 8px 0 0; line-height: 1.6; }

.tile__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-btn);
    background: var(--primary-tint);
    color: var(--primary-pressed);
}
.tile__icon svg { width: 24px; height: 24px; }

/* ------------------------------------------------ spotlight (split) */

.split {
    display: grid;
    gap: 48px;
    align-items: center;
}
@media (min-width: 1024px) {
    .split { grid-template-columns: 1fr 1fr; }
    .split--flip .split__media { order: -1; }
}
.split p.body { font-size: 18px; line-height: 1.65; max-width: 36rem; margin: 16px 0 0; }
.split .detail { margin: 16px 0 0; font-size: 14px; font-weight: 600; color: var(--ink-3); }
.split strong { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------- does / doesn't */

.compare {
    display: grid;
    gap: 24px;
    margin-top: 40px;
}
@media (min-width: 768px) { .compare { grid-template-columns: 1fr 1fr; } }

.compare .card { padding: 28px; }
.compare h3 { margin: 0; font-size: 20px; }
.compare .good-title { color: var(--primary-pressed); }
.compare .bad-title { color: var(--ink-2); }

.checklist {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}
.checklist li { display: flex; align-items: flex-start; gap: 12px; color: var(--ink); }
.checklist--bad li { color: var(--ink-2); }

.mark {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
.mark--good { background: var(--primary-tint); color: var(--primary-pressed); }
.mark--bad { background: var(--surface-sunk); color: var(--ink-3); }

/* ---------------------------------------------------- how it works */

.steps {
    display: grid;
    gap: 32px;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
}
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.step__n {
    display: block;
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, var(--grad-from), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.step h3 { margin: 12px 0 0; font-size: 20px; }
.step p { margin: 8px 0 0; }

.shot-pair {
    display: grid;
    gap: 32px;
    max-width: 640px;
    margin: 48px auto 0;
}
@media (min-width: 640px) { .shot-pair { grid-template-columns: 1fr 1fr; gap: 24px; } }
/* One screenshot instead of two: centred, same size as a pair's phone */
.shot-pair--single { max-width: 260px; }
@media (min-width: 640px) { .shot-pair--single { grid-template-columns: 1fr; } }

/* --------------------------------------------------- little things */

.little {
    display: grid;
    gap: 24px;
}
@media (min-width: 640px) { .little { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.little .emoji { font-size: 26px; line-height: 1; }
.little h3 { margin: 14px 0 0; font-size: 18px; }
.little p { margin: 6px 0 0; }

/* ------------------------------------------------------ chip row */

.chip-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}
.chip-row li {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.narrow { max-width: 896px; }
.narrow-faq { max-width: 768px; }

/* --------------------------------------------------------- plans */

.plans {
    display: grid;
    gap: 24px;
    max-width: 800px;
    margin: 40px auto 0;
}
@media (min-width: 768px) { .plans { grid-template-columns: 1fr 1fr; } }

.plan { padding: 28px; display: flex; flex-direction: column; }
.plan--featured { border: 2px solid var(--primary); box-shadow: var(--shadow-md); }
.plan h3 { margin: 0; font-size: 24px; }
.plan__tag { margin: 4px 0 0; font-weight: 600; color: var(--ink-2); }
.plan .checklist { margin-top: 20px; }
.plan__note { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: 14px; color: var(--ink-3); }

/* ----------------------------------------------------------- FAQ */

.faq { display: flex; flex-direction: column; gap: 12px; margin-top: 40px; }

.faq details {
    padding: 16px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
}
.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    flex-shrink: 0;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    color: var(--ink-3);
    transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 12px 0 0; line-height: 1.65; }

/* ----------------------------------------------------- final CTA */

.cta-card {
    max-width: 896px;
    margin: 0 auto;
    padding: 56px 32px;
    border-radius: var(--radius-card);
    background: linear-gradient(135deg, var(--grad-from), var(--grad-to));
    box-shadow: var(--shadow-lg);
    text-align: center;
    color: #FFFFFF;
}
.cta-card h2 { color: #FFFFFF; font-size: clamp(28px, 3.4vw, 36px); margin: 0; }
.cta-card p { color: rgba(255, 255, 255, 0.92); font-size: 18px; margin: 12px auto 0; max-width: 36rem; }
.cta-card .store-badges { justify-content: center; margin-top: 28px; }
.cta-card .hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.cta-card .status-pill { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.35); color: #FFFFFF; box-shadow: none; }
.cta-card .status-pill--dev::before { background: #FFD266; }
.cta-card .copy-email { justify-content: center; margin-top: 16px; color: rgba(255, 255, 255, 0.92); }
.cta-card .copy-email a { color: #FFFFFF; }
.cta-card .copy-btn { background: transparent; border-color: rgba(255, 255, 255, 0.45); color: #FFFFFF; }

.cta-section { padding: 0 var(--gutter) 80px; }

/* ---------------------------------------------------- app footer */

.app-footer { border-top: 1px solid var(--border); background: var(--surface-sunk); font-size: 14px; }
.app-footer .container { padding-block: 40px; }
.app-footer__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.app-footer .app-brand { font-size: 19px; }
.app-footer .app-brand .app-icon { width: 28px; height: 28px; }
.app-footer__summary { margin: 8px 0 0; max-width: 24rem; }
.app-footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.app-footer__links a { color: var(--ink); font-weight: 600; }
.app-footer__links a:hover { color: var(--link); }
.app-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--ink-3);
}
.app-footer__bottom p { margin: 0; color: inherit; }
.app-footer__bottom a { color: var(--ink-2); font-weight: 600; }

/* ------------------------------------------------ screenshot frames */
/*
 * <figure class="shot shot--phone"> … </figure>
 * Contents: either a real <img class="shot__img" width height loading="lazy">
 * or a placeholder <div class="shot__ph"><span>Screenshot</span>label</div>.
 * Both use the same aspect ratio, so swapping is a one-line change.
 */

.shot { margin: 0; }

.shot--phone {
    width: 100%;
    max-width: 300px;
    margin-inline: auto;
    padding: 6px;
    border-radius: 2rem;
    background: #1B1B1F;
    box-shadow: var(--shadow-lg);
}
.shot--phone .shot__img,
.shot--phone .shot__ph { border-radius: 1.6rem; aspect-ratio: 9 / 19.5; }

.shot--sm { max-width: 260px; }

@media (min-width: 1024px) { .shot--tilt { transform: rotate(-2deg); } }

.shot--wide {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}
.shot--wide .shot__img,
.shot--wide .shot__ph { aspect-ratio: 16 / 10; }

.shot__img { display: block; width: 100%; height: auto; object-fit: cover; }

.shot__ph {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 24px;
    background:
        linear-gradient(160deg, var(--primary-tint), var(--surface-sunk));
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}
.shot__ph span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
}
