/* PageGlow: warm minimalism from the app — near-black warm surfaces, amber glow. */
:root {
    --bg: #120e0b;
    --card: rgba(41, 33, 26, 0.82);
    --ink: #f7ede1;
    --ink-2: rgba(247, 237, 225, 0.68);
    --glass: rgba(41, 33, 26, 0.9);
    --line: rgba(255, 255, 255, 0.09);
    --amber: #f4a842;
    --amber-deep: #d9822b;
    --glow: #ffc978;
    --ember: #e5482e;
    --focus-ring: var(--amber);
    --device-shadow: 0 50px 110px -40px rgba(244, 168, 66, 0.55);
    --maxw: 1080px;
    color-scheme: dark;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
}

/* Lamp glow behind the page */
.glow {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(55% 45% at 75% 10%, rgba(255, 201, 120, 0.28), transparent 70%),
        radial-gradient(60% 50% at 15% 0%, rgba(217, 130, 43, 0.16), transparent 72%);
}

h1,
h2,
.brand {
    font-family: "Fraunces", "New York", Georgia, serif;
}

/* --- Top bar --- */
.icon-sprite {
    position: absolute;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    min-height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 600;
    text-decoration: none;
}

.brand img {
    border-radius: 22%;
}

.tabs {
    display: flex;
    gap: 2px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--glass);
}

.tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding-inline: 16px;
    border-radius: 999px;
    color: var(--ink-2);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.tab svg {
    display: none;
}

.tab:hover {
    color: var(--ink);
}

.tab.is-active {
    background: rgba(244, 168, 66, 0.14);
    color: var(--glow);
}

.pill-link {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    min-height: 44px;
    padding-inline: 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.pill-link:hover {
    border-color: color-mix(in srgb, var(--amber) 40%, transparent);
    color: var(--glow);
}

[data-section] {
    scroll-margin-top: 76px;
}

/* --- Hero --- */
.hero {
    padding-block: clamp(24px, 6vw, 72px) clamp(40px, 7vw, 88px);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: clamp(32px, 6vw, 72px);
}

.hero-icon {
    width: 104px;
    height: 104px;
    border-radius: 22.5%;
    box-shadow: 0 18px 50px -20px rgba(244, 168, 66, 0.6);
    margin-bottom: 28px;
}

.btn-store {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-height: 52px;
    padding: 11px 24px 11px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--amber), var(--glow));
    color: var(--bg);
    text-align: left;
    text-decoration: none;
    box-shadow: 0 14px 30px -12px rgba(244, 168, 66, 0.75);
    transition: transform 0.25s, box-shadow 0.25s;
}

.btn-store:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px -12px rgba(244, 168, 66, 0.85);
}

.btn-store svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.btn-store span {
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.1;
}

.btn-store small {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
}

.hero-copy .btn-store {
    margin-top: 24px;
}

@media (prefers-reduced-motion: reduce) {
    .btn-store {
        transition: none;
    }

    .btn-store:hover {
        transform: none;
    }
}

h1 {
    margin-top: 18px;
    font-size: clamp(2.4rem, 6vw, 3.9rem);
    line-height: 1.06;
    letter-spacing: -0.02em;
    font-weight: 600;
}

h1 em {
    font-style: italic;
    color: var(--amber);
}

.lead {
    margin-top: 20px;
    max-width: 34em;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    color: var(--ink-2);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.chip {
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--line);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-2);
}

.hero-device {
    display: flex;
    justify-content: center;
    --device-w: 290px;
}

/* --- Features --- */
.features {
    padding-bottom: clamp(48px, 8vw, 96px);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature {
    padding: 24px;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--line);
}

.feature-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: var(--amber);
    background: rgba(244, 168, 66, 0.14);
}

.feature-icon-red {
    color: var(--ember);
    background: rgba(229, 72, 46, 0.16);
}

.feature h2 {
    margin-top: 14px;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.feature p {
    margin-top: 6px;
    color: var(--ink-2);
}

/* --- Screenshots --- */
.gallery,
.support {
    padding-bottom: clamp(48px, 8vw, 96px);
}

.gallery h2,
.support h2 {
    font-size: clamp(1.55rem, 3.5vw, 2.15rem);
    line-height: 1.2;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(10px, 2vw, 18px);
    margin-top: 22px;
    list-style: none;
}

.gallery-shot {
    display: block;
    border-radius: 16px;
}

.gallery-shot img {
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: inherit;
}

/* --- Support and download --- */
.support-copy {
    margin-bottom: 24px;
}

.support-copy p {
    margin-top: 8px;
    color: var(--ink-2);
}

.support-copy a {
    color: var(--glow);
}

.download-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(20px, 4vw, 36px);
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--card);
}

.download-copy {
    flex: 1 1 30rem;
}

.download-copy p {
    max-width: 60ch;
    margin-top: 10px;
    color: var(--ink-2);
}

.download-copy strong {
    color: var(--ink);
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--line);
    padding-block: 28px 40px;
    font-size: 0.9rem;
    color: var(--ink-2);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.site-footer a {
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--amber);
}

.footer-note {
    flex-basis: 100%;
    font-size: 0.8rem;
}

/* --- Narrow screens --- */
@media (max-width: 820px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-icon,
    .lead {
        margin-inline: auto;
    }

    .chips {
        justify-content: center;
    }

    .hero-device {
        --device-w: 250px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    body {
        padding-bottom: calc(84px + env(safe-area-inset-bottom));
    }

    .topbar {
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        background: color-mix(in srgb, var(--bg) 94%, transparent);
    }

    .topbar-inner {
        grid-template-columns: 1fr auto;
        min-height: 58px;
    }

    .tabs {
        position: fixed;
        bottom: calc(12px + env(safe-area-inset-bottom));
        left: 50%;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: min(420px, calc(100% - 32px));
        padding: 6px;
        border-radius: 32px;
        transform: translateX(-50%);
        -webkit-backdrop-filter: saturate(180%) blur(18px);
        backdrop-filter: saturate(180%) blur(18px);
        box-shadow: 0 16px 36px -14px rgba(0, 0, 0, 0.5);
    }

    .tab {
        flex-direction: column;
        gap: 3px;
        padding: 6px 2px;
        font-size: 0.72rem;
    }

    .tab svg {
        display: block;
        width: 22px;
        height: 22px;
    }
}
