/* StoryBinge lander — cinematic, cover-first. No JS. */

@font-face {
    font-family: "Playfair Display";
    src: url("/fonts/PlayfairDisplay-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("/fonts/Inter-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #0c0910;
    --bg-raise: #17121e;
    --bg-raise-2: #21182a;
    --line: #3a2f46;
    --text: #f7f1ea;
    --text-dim: #c4b6c8;
    --accent: #E8467C;
    --accent-deep: #b32e5d;
    --gold: #E0C48A;
    --serif: "Playfair Display", Georgia, "Iowan Old Style", serif;
    --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --wide: 1180px;
    --phone-ratio: 1206 / 2622;
    --phone-bezel: 9px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.shell { max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }

.muted { color: var(--text-dim); }

/* ---------- accessibility ---------- */

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100vh;
    z-index: 100;
    background: var(--accent-deep);
    color: #fff;
    font-weight: 600;
    padding: 0.55rem 1.2rem;
    border-radius: 0 0 10px 10px;
}

.skip-link:focus { top: 0; }

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

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

.site-header {
    border-bottom: 1px solid var(--line);
    background: rgba(12, 9, 16, 0.92);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 10;
}

body:has(.hero:not(.hero-slim)) .site-header {
    position: absolute;
    left: 0;
    right: 0;
    border: 0;
    box-shadow: none;
    background: linear-gradient(180deg, rgba(12, 9, 16, 0.72), transparent);
    backdrop-filter: none;
}

.header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.1rem;
    font-size: 0.88rem;
    flex: 1;
}

.site-nav a { color: var(--text-dim); }

.site-nav a:hover { color: var(--gold); }

.site-nav .nav-genre { opacity: 0.75; }

.header-cta {
    margin-left: auto;
    display: inline-block;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}

.header-cta:hover { filter: brightness(1.08); }

.logo {
    font-family: var(--serif);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.logo-accent { color: var(--accent); }

.genre-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    font-size: 0.85rem;
}

.genre-nav a {
    color: var(--text-dim);
    padding: 0.15rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s;
}

.genre-nav a:hover { color: var(--gold); }

@media (max-width: 639px) {
    .header-row { flex-wrap: wrap; gap: 0.45rem 0.8rem; }

    .site-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        max-width: 100%;
        order: 3;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.2rem;
    }

    .site-nav::-webkit-scrollbar { display: none; }

    .site-nav a { flex: 0 0 auto; white-space: nowrap; }

    .header-cta { order: 2; }
}

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

.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 6.5rem 0 3rem;
    overflow: hidden;
    isolation: isolate;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% 30%;
    filter: saturate(1.05);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(12, 9, 16, 0.92) 0%, rgba(12, 9, 16, 0.72) 42%, rgba(12, 9, 16, 0.28) 100%),
        linear-gradient(180deg, rgba(12, 9, 16, 0.35) 0%, transparent 28%, rgba(12, 9, 16, 0.75) 100%);
}

.hero-slim {
    min-height: 0;
    padding: 7rem 0 2.25rem;
    display: block;
    background:
        radial-gradient(ellipse 70% 80% at 80% 0%, rgba(232, 70, 124, 0.16), transparent 55%),
        var(--bg);
}

.hero-slim .hero-bg { display: none; }

.hero-slim .hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    max-width: 14em;
}

.hero-title,
.display-title {
    font-family: var(--serif);
    font-size: clamp(2.6rem, 7vw, 5.1rem);
    line-height: 0.98;
    letter-spacing: -0.03em;
    max-width: 9em;
    text-wrap: balance;
}

.display-title {
    font-size: clamp(2rem, 4.6vw, 3.4rem);
    max-width: 16em;
    margin-bottom: 0.7rem;
}

.hero-sub {
    margin-top: 1.25rem;
    color: var(--text-dim);
    font-size: 1.12rem;
    max-width: 34em;
    line-height: 1.55;
}

.hero-split {
    display: grid;
    gap: 2.5rem;
    align-items: center;
    width: 100%;
}

@media (min-width: 900px) {
    .hero-split { grid-template-columns: minmax(0, 1fr) auto; gap: 3.25rem; }
}

.kicker {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 0.85rem;
}

.age-note {
    margin-top: 1rem;
    color: var(--text-dim);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}

.hero-phones {
    display: flex;
    justify-content: center;
    align-items: center;
}

.device {
    --phone-h: min(68svh, 640px);
    margin: 0;
    width: calc(var(--phone-h) * var(--phone-ratio) + 2 * var(--phone-bezel));
    background: #0a0a0c;
    border-radius: 42px;
    padding: var(--phone-bezel);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 36px 70px rgba(0, 0, 0, 0.5);
}

.hero .device { --phone-h: min(70svh, 680px); }

.duo .device { --phone-h: min(58svh, 560px); }

@media (max-width: 899px) {
    .hero .device { --phone-h: min(52svh, 480px); }
}

.device-screen {
    position: relative;
    border-radius: 34px;
    overflow: hidden;
    background: #120e16;
    aspect-ratio: var(--phone-ratio);
}

.device-shot .device-screen img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center top;
}

.device-island {
    position: absolute;
    top: 10px;
    left: 50%;
    width: 86px;
    height: 22px;
    transform: translateX(-50%);
    background: #000;
    border-radius: 20px;
    z-index: 2;
}

.player-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.player-art {
    aspect-ratio: 1 / 1;
    margin: 42px 22px 0;
    width: calc(100% - 44px);
    border-radius: 18px;
    object-fit: cover;
    flex: 0 0 auto;
}

.player-ui {
    padding: 1rem 1.15rem 1.4rem;
    text-align: center;
    background: linear-gradient(#120e16, #1a1322);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.player-story {
    font-family: var(--serif);
    font-size: 1.05rem;
    line-height: 1.2;
}

.player-ch {
    color: var(--text-dim);
    font-size: 0.72rem;
    margin-top: 0.25rem;
    letter-spacing: 0.04em;
}

.player-bar {
    height: 3px;
    background: #3a3144;
    border-radius: 99px;
    margin: 1.1rem 0 0.35rem;
}

.player-bar i {
    display: block;
    width: 18%;
    height: 100%;
    background: var(--accent);
    border-radius: 99px;
}

.player-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: var(--text-dim);
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    margin-top: 1rem;
}

.player-controls .play {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    position: relative;
}

.player-controls .play::after {
    content: "";
    position: absolute;
    left: 21px;
    top: 17px;
    border-style: solid;
    border-width: 9px 0 9px 14px;
    border-color: transparent transparent transparent #fff;
}

.player-controls .skip {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.shelf-band {
    padding: 0 0 1rem;
    margin-top: -1.25rem;
    position: relative;
    z-index: 2;
}

.shelf {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    padding: 0 1.5rem 1.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.shelf-card {
    flex: 0 0 148px;
    scroll-snap-align: start;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
    transform: rotate(var(--tilt, 0deg));
    transition: transform 0.2s ease;
}

.shelf-card:nth-child(odd) { --tilt: -2.2deg; }
.shelf-card:nth-child(even) { --tilt: 2deg; }
.shelf-card:hover { transform: rotate(0deg) translateY(-8px); }

.shelf-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.split-formats { padding: 4rem 0 3rem; }

.duo {
    display: grid;
    gap: 2.5rem;
    margin-top: 2rem;
}

@media (min-width: 800px) {
    .duo { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

.duo-col { text-align: center; }

.duo-col .device { margin: 0 auto 1.3rem; width: calc(var(--phone-h) * var(--phone-ratio) + 2 * var(--phone-bezel)); }

.duo-col h3 {
    font-family: var(--serif);
    font-size: 2rem;
    margin-bottom: 0.4rem;
}

.duo-col p {
    color: var(--text-dim);
    max-width: 28em;
    margin: 0 auto;
}

.honest-band {
    padding: 3.5rem 0;
    border-top: 1px solid rgba(224, 196, 138, 0.18);
    border-bottom: 1px solid rgba(224, 196, 138, 0.18);
    background: linear-gradient(180deg, rgba(224, 196, 138, 0.05), transparent);
}

.honest-line {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 0.5rem;
    margin-top: 1.4rem;
}

.honest-line li {
    font-family: var(--serif);
    font-size: 1.15rem;
    padding: 0.45rem 0.95rem;
    border: 1px solid rgba(224, 196, 138, 0.28);
    border-radius: 999px;
    color: var(--gold);
}

.section-lead {
    color: var(--text-dim);
    max-width: 36em;
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
}

.cover-rail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.1rem;
    margin: 1.4rem 0 1.6rem;
}

@media (min-width: 640px) { .cover-rail { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .cover-rail { grid-template-columns: repeat(4, 1fr); } }

.catalog-pills { margin-top: 0.5rem; }

.cta-close {
    text-align: center;
    padding: 5rem 0 4.5rem;
    background:
        radial-gradient(ellipse 60% 80% at 50% 120%, rgba(232, 70, 124, 0.18), transparent 55%),
        var(--bg);
}

.cta-close .display-title { margin-left: auto; margin-right: auto; }
.cta-close .section-lead { margin: 0 auto 0.4rem; }
.cta-close .badge-row { justify-content: center; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }

.btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    transition: transform 0.1s, background 0.15s;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fff;
    box-shadow: 0 6px 22px rgba(232, 70, 124, 0.35);
}

.btn-primary:hover { filter: brightness(1.1); }

.btn-ghost { border-color: var(--line); color: var(--text); }

.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn-lg { padding: 0.85rem 2.25rem; font-size: 1.05rem; }

/* app-store badge placeholders */

.badge-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #000;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.45rem 1rem;
    line-height: 1.15;
    color: #fff;
}

.store-badge:hover { border-color: var(--text-dim); }

.store-badge-icon { font-size: 1.4rem; }

.store-badge small {
    display: block;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
}

/* ---------- sections & grid ---------- */

.section { padding: 2.5rem 0 1rem; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }

.section-title {
    font-family: var(--serif);
    font-size: 1.55rem;
    margin-bottom: 1.1rem;
}

.view-all { color: var(--accent); font-size: 0.9rem; white-space: nowrap; }

.view-all:hover { color: var(--gold); }

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.1rem;
}

@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- story card ---------- */

.card {
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, border-color 0.15s;
}

.card:hover { transform: translateY(-3px); border-color: var(--accent); }

.card-body { padding: 0.8rem 0.9rem 1rem; }

.card-title {
    font-family: var(--serif);
    font-size: 1.02rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.card-synopsis {
    color: var(--text-dim);
    font-size: 0.82rem;
    margin-top: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }

/* ---------- covers & gradient fallback ---------- */

.cover {
    position: relative;
    aspect-ratio: 2 / 3;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.cover img { width: 100%; height: 100%; object-fit: cover; }

.cover-title {
    font-family: var(--serif);
    font-size: 1.05rem;
    line-height: 1.25;
    padding: 0.9rem;
    color: rgba(255, 255, 255, 0.94);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    width: 100%;
    background: linear-gradient(to top, rgba(10, 6, 14, 0.65), transparent);
}

.cover-lg { border-radius: 14px; border: 1px solid var(--line); }

.cover-lg .cover-title { font-size: 1.5rem; }

.grad-0 { background: linear-gradient(150deg, #3d1130 0%, #7a1d4b 55%, #E8467C 130%); }
.grad-1 { background: linear-gradient(150deg, #14213d 0%, #2c3f77 55%, #7f9ad1 130%); }
.grad-2 { background: linear-gradient(150deg, #3a2410 0%, #86592a 55%, #D4A853 130%); }
.grad-3 { background: linear-gradient(150deg, #1d1035 0%, #45217a 55%, #9a6cf0 130%); }
.grad-4 { background: linear-gradient(150deg, #0e2e26 0%, #1e5f4d 55%, #55c4a0 130%); }
.grad-5 { background: linear-gradient(150deg, #34101a 0%, #742334 55%, #d95c6e 130%); }

.ribbon {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--gold);
    color: #241a08;
    font-size: 0.75rem;
    border-radius: 999px;
    width: 1.6rem;
    height: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ---------- chips, pills, tags ---------- */

.chip {
    display: inline-block;
    font-size: 0.72rem;
    padding: 0.14rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--text-dim);
    background: var(--bg-raise-2);
    white-space: nowrap;
}

.chip-status { border-color: var(--gold); color: var(--gold); background: transparent; }

.chip-link:hover { border-color: var(--accent); color: var(--accent); }

.chip-trope { text-transform: capitalize; }

.chip-heat { color: var(--accent); border-color: var(--accent-deep); }

.chip-ai { font-style: italic; }

.genre-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.5rem; }

.pill {
    padding: 0.42rem 1.1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-raise);
    color: var(--text-dim);
    font-size: 0.9rem;
    transition: border-color 0.15s, color 0.15s;
}

.pill:hover { border-color: var(--gold); color: var(--gold); }

.pill-active { border-color: var(--accent); color: #fff; background: var(--accent-deep); }

/* ---------- story page ---------- */

.story-page { padding: 2rem 0 3rem; }

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.crumbs a:hover { color: var(--gold); }

.crumb-current { color: var(--text); overflow-wrap: anywhere; }

.story-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; }

@media (min-width: 720px) {
    .story-layout { grid-template-columns: 300px 1fr; align-items: start; }
    .story-cover { position: sticky; top: 5rem; }
}

.story-cover { max-width: 300px; }

.story-title {
    font-family: var(--serif);
    font-size: clamp(1.7rem, 5vw, 2.6rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.story-chips { margin-top: 0.9rem; }

.sub-heading {
    font-family: var(--serif);
    font-size: 1.2rem;
    margin: 1.6rem 0 0.6rem;
    color: var(--gold);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem;
}

.free-note { font-family: var(--sans); font-size: 0.8rem; color: var(--text-dim); font-weight: 400; }

.synopsis { color: var(--text); max-width: 46em; }

.chapter-list { list-style: none; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }

.chapter-list li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg-raise);
    font-size: 0.92rem;
}

.chapter-list li:last-child { border-bottom: none; }

.chapter-list li.is-locked { color: var(--text-dim); background: var(--bg); }

.chapter-index {
    font-family: var(--serif);
    color: var(--gold);
    min-width: 1.6em;
    text-align: right;
}

.chapter-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.tag {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
}

.tag-free { background: rgba(212, 168, 83, 0.15); color: var(--gold); border: 1px solid var(--gold); }

.tag-locked { border: 1px solid var(--line); color: var(--text-dim); }

.cta-block { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

.cta-block .badge-row { margin-top: 1rem; }

.empty-state {
    color: var(--text-dim);
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    font-style: italic;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    margin-top: 3rem;
    padding: 2.5rem 0 2rem;
    background: #0f0c13;
    font-size: 0.9rem;
}

.footer-cols { display: grid; grid-template-columns: 1fr; gap: 2rem; }

@media (min-width: 720px) { .footer-cols { grid-template-columns: 2fr 1fr 1fr; } }

.footer-logo { font-size: 1.2rem; margin-bottom: 0.4rem; }

.footer-heading {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    margin-bottom: 0.6rem;
}

.footer-list { list-style: none; }

.footer-list a { color: var(--text-dim); line-height: 1.9; }

.footer-list a:hover, .footer-list a.active { color: var(--text); }

.footer-list a.active { color: var(--accent); }

.footer-copy { margin-top: 2rem; font-size: 0.8rem; }
