/* ============================================================
   Phantom Shelf — signed-out landing
   ============================================================ */

.landing {
    --ln-ink:      #16232A;
    --ln-paper:    #F7FAFB;
    --ln-body:     #3E4C54;
    --ln-muted:    #5E6B71;
    --ln-rule:     #E2E9EC;
    --ln-line:     #CFDADF;
    --ln-mint:     #BFE6D2;
    --ln-sky:      #BFDCF2;
    --ln-peach:    #F6D3BE;
    --ln-rose:     #EFC9DA;
    --ln-mono:     'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    position: fixed;
    inset: 0;
    z-index: 900;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: var(--ln-paper);
    color: var(--ln-ink);
    font-family: 'Bricolage Grotesque', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
}

.landing[hidden] { display: none; }

body.landing-open { padding: 0; overflow: hidden; }
body.landing-open .app-shell { display: none; }

.ln-container {
    width: 100%;
    /* A proportional gutter instead of a hard 1280px cap, matching the app's
       .view: the nav and shelf hold the same share of the width at every size
       rather than stranding in the centre of a wide window. 3.5% overtakes the
       44px floor around ~1257px, so narrower screens are unchanged and wider
       ones fill — the shelf rail simply shows more covers. */
    padding: 0 max(44px, 3.5%);
}

/* Nav.
   styles.css carries a legacy bare `header { background: var(--navy); ... }`
   rule from the old scanner app that paints every <header>. This nav is a
   <header>, so it must set its own background (and drop that rule's margin) or
   it renders as a dark bar with the wordmark invisible on it — the same reason
   .app-header sets its own background. */
.ln-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 22px;
    padding-bottom: 22px;
    margin: 0;
    background: transparent;
    text-align: left;
}

.ln-wordmark {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.015em;
}

/* Hero */
.ln-hero {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 0;
}

.ln-title {
    margin: 0;
    max-width: 820px;
    font-size: clamp(44px, 5.94vw, 76px);
    line-height: 0.98;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-wrap: pretty;
}

.ln-sub {
    margin: 22px 0 0;
    max-width: 560px;
    font-size: 19px;
    line-height: 1.55;
    color: var(--ln-body);
    text-wrap: pretty;
}

.ln-cta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 32px;
}

.ln-btn {
    padding: 16px 26px;
    border: 1px solid var(--ln-line);
    border-radius: 999px;
    background: transparent;
    color: var(--ln-ink);
    font-family: var(--ln-mono);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: opacity 140ms ease, border-color 140ms ease;
}

.ln-btn-primary {
    padding: 16px 30px;
    border-color: var(--ln-ink);
    background: var(--ln-ink);
    color: var(--ln-paper);
}

.ln-btn-primary:hover { opacity: 0.88; }
.ln-btn-ghost:hover { border-color: var(--ln-ink); }

/* Venn */
.ln-venn-wrap {
    position: relative;
    width: 430px;
    height: 210px;
    margin-top: 44px;
    flex: none;
}

.ln-venn {
    position: absolute;
    left: 0;
    top: 0;
    width: 430px;
    height: 210px;
}

.ln-venn-circle {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    mix-blend-mode: multiply;
}

.ln-venn-label {
    position: absolute;
    font-family: var(--ln-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ln-venn-circle.is-books  { left: 60px;  top: 0;    background: var(--ln-mint); }
.ln-venn-circle.is-comics { left: 150px; top: 0;    background: var(--ln-sky); }
.ln-venn-circle.is-film   { left: 105px; top: 58px; background: var(--ln-peach); }
.ln-venn-circle.is-games  { left: 195px; top: 58px; background: var(--ln-rose); }

.ln-venn-label.is-books  { left: 18px;  top: 18px; }
.ln-venn-label.is-comics { left: 312px; top: 18px; }
.ln-venn-label.is-film   { left: 10px;  top: 176px; }
.ln-venn-label.is-games  { left: 316px; top: 176px; }

/* Shelf */
.ln-shelf {
    margin-top: 40px;
    border-top: 1px solid var(--ln-rule);
}

.ln-shelf .ln-container { padding-top: 22px; }

.ln-shelf-caption {
    margin-bottom: 18px;
    font-family: var(--ln-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ln-muted);
}

/* A horizontal scroll rail, like the app's .section-scroll-row: fixed-width
   tiles, left-aligned, overflowing off the right edge rather than stretching to
   fill. */
.ln-covers {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}
.ln-covers::-webkit-scrollbar { display: none; }

/* Tile treatment follows the app's library grid tiles: a prominent ~172px-wide
   cover at 2:3 (172x258, matching .shelf-all-grid) with a type-coloured corner
   halo, soft drop shadow and a slight per-index tilt. */
.ln-cover {
    flex: 0 0 172px;
    width: 172px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ln-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.ln-tag {
    font-family: var(--ln-mono);
    font-size: 11.5px;
    font-weight: 400;
    color: var(--ln-muted);
}

.ln-frame {
    position: relative;
    aspect-ratio: 2 / 3;
}

/* A corner halo proportional to the tile, echoing the app's shelf tiles */
.ln-halo {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 47.5%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    mix-blend-mode: multiply;
    transform: translateX(-24%);
}

.ln-card {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 6px 6px 0 0;
    background: var(--ln-cover);
    box-shadow: 0 6px 16px rgba(22, 35, 42, 0.14);
    transform-origin: bottom center;
    overflow: hidden;
}

/* Real cover art fills the card; the --ln-cover block shows behind it while it
   loads and if it never arrives (broken/absent artwork). */
.ln-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.ln-cover:nth-child(4n + 1) .ln-card { transform: rotate(-1.2deg); }
.ln-cover:nth-child(4n + 2) .ln-card { transform: rotate(0.9deg); }
.ln-cover:nth-child(4n + 3) .ln-card { transform: rotate(-0.6deg); }
.ln-cover:nth-child(4n + 4) .ln-card { transform: rotate(1.1deg); }

.ln-cover.is-books  .ln-halo { background: var(--ln-mint); }
.ln-cover.is-comics .ln-halo { background: var(--ln-sky); }
.ln-cover.is-film   .ln-halo { background: var(--ln-peach); }
.ln-cover.is-games  .ln-halo { background: var(--ln-rose); }

.ln-rule {
    height: 3px;
    background: var(--ln-ink);
}

/* Mobile */
@media (max-width: 760px) {
    .ln-container { padding: 0 22px; }

    .ln-nav { padding-bottom: 0; }
    .ln-wordmark { font-size: 18px; }

    .ln-hero { padding: 46px 26px 0; }
    .ln-title { font-size: 44px; line-height: 1; letter-spacing: -0.035em; }
    .ln-sub { margin-top: 18px; font-size: 16px; line-height: 1.5; }

    .ln-cta {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-top: 26px;
    }

    .ln-btn {
        width: 100%;
        padding: 17px 0;
        font-size: 14px;
    }

    /* 430×210 board scaled to 0.7, per the mobile artboard */
    .ln-venn-wrap {
        width: 301px;
        height: 154px;
        margin-top: 30px;
    }

    .ln-venn {
        transform: scale(0.7);
        transform-origin: top left;
    }

    .ln-venn-label { font-size: 14px; letter-spacing: 0.08em; }

    .ln-shelf .ln-container { padding-top: 16px; }
    .ln-shelf-caption { margin-bottom: 14px; font-size: 10px; }

    .ln-name { font-size: 12px; }
    .ln-tag { font-size: 10.5px; }
    .ln-card { border-radius: 5px 5px 0 0; }
}
