/* ══════════════════════════════════════════════
   GALYM APP — page-specific styles
   Loaded only on /app/, so the homepage and
   every other page never pay for this CSS.
══════════════════════════════════════════════ */

.app-hero {
    padding-top: calc(var(--nav-h, 64px) + 1.75rem);
    padding-bottom: 0.5rem;
}

.app-hero-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

/* Kill the default .breadcrumb bottom margin (from core.css) so the
   author line sits right under it — same override as the robot guide's
   .page-header-section .breadcrumb. */
.app-hero-wrap .breadcrumb {
    margin-bottom: 0;
}

/* ── Author credit — small line under the breadcrumb.
   Same look as .article-meta / .article-author on /news/ pages:
   12px, muted color, no extra weight or color on the name. ── */
.app-author-credit {
    font-size: 12px;
    color: var(--muted);
    margin: 0.35rem 0 0;
}

/* ── Google Play button ──
   Mobile-first: full-width, generous tap target (min 48px tall).
   From tablet up it shrinks back to a natural inline size. ── */
.app-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    margin-top: 1.1rem;
    padding: 0.75rem 1.2rem;
    min-height: 52px;
    box-sizing: border-box;
    background: #14201a;
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}

.app-play-btn:hover,
.app-play-btn:focus-visible {
    background: #1c2c23;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(20, 32, 26, 0.5);
}

.app-play-btn:active {
    transform: translateY(0);
}

.app-play-btn-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.app-play-btn-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.app-play-btn-text small {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 480px) {
    .app-play-btn {
        width: auto;
        justify-content: flex-start;
        max-width: fit-content;
    }
}

/* ── App Store note — small follow-up line under the Play button ── */
.app-appstore-note {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin-top: 0.8rem;
}

.app-appstore-note a {
    color: var(--accent2);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.app-appstore-note a:hover,
.app-appstore-note a:focus-visible {
    color: var(--accent);
}

/* No visual/video column anymore — this is a plain text hero,
   same shape as an article/page header. Single column at every
   width, width capped on the content itself (title/lead), not
   the wrapper, so it doesn't stretch edge-to-edge on desktop. */
.app-hero-inner {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.app-hero-content {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.app-hero-title {
    font-family: var(--font-display);
    font-size: clamp(26px, 6.5vw, 44px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.12;
    max-width: 20ch;
    margin-bottom: 0.4rem;
}

.app-hero-lead {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.7;
    max-width: 46ch;
}

/* ── Phone mockup — shared by the hero visual and the screenshots grid ──
   .phone-mock is a plain layout wrapper (sizing + optional caption below).
   .phone-frame is the actual dark bezel; a fixed aspect-ratio means every
   mockup renders at the same height regardless of the source screenshot's
   own proportions. ── */
.phone-mock {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
}

.phone-frame {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 9 / 19.5;
    background: #14201a;
    border-radius: 30px;
    box-shadow: 0 24px 48px -16px rgba(20, 32, 26, 0.45);
    overflow: hidden;
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 26%;
    height: 7px;
    background: #14201a;
    border-radius: 5px;
    z-index: 2;
}

/* image sized with calc so bezel (top 14 / sides 8 / bottom 22) always stays visible */
.phone-frame img {
    position: absolute;
    top: 14px;
    left: 8px;
    width: calc(100% - 16px);
    height: calc(100% - 36px);
    object-fit: cover;
    object-position: center top;
    border-radius: 18px;
}

.phone-mock figcaption {
    margin-top: 0.9rem;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    line-height: 1.5;
}

.app-hero-visual {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.app-hero-visual .phone-mock {
    width: 200px;
    max-width: 200px;
}

.app-section-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Feature grid — own cards, not shared with about.html's .goal-card ── */
.app-features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin-top: 2rem;
}

.app-feature-card {
    background: var(--bg2);
    border: 0.5px solid var(--border);
    border-radius: 8px;
    padding: 1.8rem;
    position: relative;
    overflow: hidden;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.app-feature-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.app-feature-card:hover::after { transform: scaleX(1); }

.app-feature-card:hover {
    background: var(--bg3);
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(45, 106, 79, 0.15);
    border-color: rgba(45, 106, 79, 0.35);
}

.app-feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    background: rgba(45, 106, 79, 0.14);
    border: 0.5px solid rgba(45, 106, 79, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent2);
    margin-bottom: 1.5rem;
    transition: background 0.3s, transform 0.3s;
}
.app-feature-card:hover .app-feature-icon {
    background: rgba(45, 106, 79, 0.3);
}

.app-feature-card h3 {
    font-family: var(--font-body);
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.3px;
    transition: color 0.3s;
}
.app-feature-card:hover h3 { color: var(--accent2); }

.app-feature-card > p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.75;
}

/* ── Screenshots gallery — swipeable strip on mobile, grid from tablet up ── */
.app-screens-grid {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    margin-top: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    /* extra bottom padding so phone bezel + shadow are not clipped by the scroller */
    padding: 0.25rem 0.25rem 1.5rem;
    -webkit-overflow-scrolling: touch;
}

.app-screens-grid .phone-mock {
    flex: 0 0 62%;
    max-width: 220px;
    scroll-snap-align: center;
}

/* ══════════════════════════════════════════════
   TABLET (min-width: 768px)
══════════════════════════════════════════════ */
@media (min-width: 768px) {
    .app-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .app-hero-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
    }

    .app-hero-content {
        flex: 0 1 30rem;
        max-width: 30rem;
    }

    .app-hero-title {
        max-width: none;
    }

    .app-hero-lead {
        max-width: none;
    }

    .app-hero-stats {
        grid-template-columns: repeat(4, 1fr);
        max-width: none;
    }

    .app-hero-visual {
        flex: 0 0 auto;
        margin-top: 0;
    }

    .app-hero-visual .phone-mock {
        width: 230px;
        max-width: 230px;
    }

    .app-screens-grid {
        overflow-x: visible;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.25rem 0 1.25rem;
    }

    .app-screens-grid .phone-mock {
        flex: 0 0 auto;
        width: 220px;
        max-width: 220px;
    }
}


/* ══════════════════════════════════════════════
   DESKTOP (min-width: 1024px)
══════════════════════════════════════════════ */
@media (min-width: 1024px) {
    .app-hero-wrap {
        padding: 0 6vw 3rem;
    }
    .app-hero-title {
        font-size: clamp(32px, 3.6vw, 46px);
    }

    .app-hero-content {
        flex-basis: 34rem;
        max-width: 34rem;
    }

    .app-features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .app-hero-visual .phone-mock {
        width: 260px;
        max-width: 260px;
    }

    .app-screens-grid .phone-mock {
        width: 230px;
        max-width: 230px;
    }
}