:root {
    --ink: #fff4de;
    --soft: rgba(255, 244, 222, 0.74);
    --muted: rgba(255, 244, 222, 0.52);
    --black: #130208;
    --panel: #21040d;
    --wine: #4e071c;
    --wine-bright: #7a1230;
    --coral: #f04b32;
    --coral-hot: #ff7754;
    --line: rgba(255, 244, 222, 0.12);
    --shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
    --body: "Manrope", system-ui, sans-serif;
    --display: "Archivo", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    background: #130208;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    width: 100%;
    max-width: 100%;
    background:
        radial-gradient(circle at 50% 0%, rgba(240, 75, 50, 0.2), transparent 34rem),
        linear-gradient(180deg, #130208 0%, #23040f 44%, #100106 100%);
    color: var(--ink);
    font-family: var(--body);
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
    overflow-x: hidden;
    overscroll-behavior-x: none;
    touch-action: auto;
}

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

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

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    padding: max(12px, env(safe-area-inset-top)) 16px 10px;
    background: linear-gradient(180deg, rgba(19, 2, 8, 0.9), rgba(19, 2, 8, 0.36));
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(240, 75, 50, 0.22);
}

.brand-wordmark {
    color: #fff4de;
    font-family: var(--display);
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    text-shadow: 0 8px 22px rgba(0, 0, 0, 0.38);
}

.header-pill {
    min-height: 42px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 244, 222, 0.18);
    border-radius: 999px;
    color: var(--ink);
    background: rgba(255, 244, 222, 0.08);
    font-weight: 800;
}

.hero {
    min-height: 100svh;
    padding: 78px 16px 28px;
    display: grid;
    align-content: center;
    gap: 24px;
}

.hero-media {
    position: relative;
    min-height: 430px;
    display: grid;
    place-items: center;
    touch-action: auto;
}

.phone-frame {
    position: relative;
    z-index: 2;
    width: min(76vw, 330px);
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border: 1px solid rgba(255, 244, 222, 0.2);
    border-radius: 34px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.phone-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 8px rgba(19, 2, 8, 0.5);
    pointer-events: none;
}

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

.phone-top {
    position: absolute;
    top: 13px;
    left: 18px;
    right: 18px;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.watch-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 110px 22px 24px;
    background: linear-gradient(180deg, transparent, rgba(19, 2, 8, 0.94) 58%);
}

.series-badge,
.story-tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: var(--coral);
    color: white;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.watch-overlay h1 {
    margin: 12px 0 8px;
    font-family: var(--display);
    font-size: clamp(38px, 12vw, 56px);
    line-height: 0.88;
    letter-spacing: -0.04em;
}

.watch-overlay p {
    margin: 0;
    color: var(--soft);
    font-size: 15px;
    line-height: 1.35;
}

.poster-fan {
    position: absolute;
    top: 58px;
    width: min(38vw, 180px);
    aspect-ratio: 9 / 14;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 244, 222, 0.14);
    border-radius: 20px;
    background: var(--panel);
    opacity: 0.66;
    filter: saturate(1.1) contrast(1.04);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 240ms ease, opacity 240ms ease, filter 240ms ease;
}

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

.poster-fan:hover,
.poster-fan:focus-visible {
    opacity: 0.92;
    filter: saturate(1.18) contrast(1.08);
}

.poster-fan-left {
    left: 0;
    transform: rotate(-10deg);
}

.poster-fan-left:hover,
.poster-fan-left:focus-visible {
    transform: translateX(6px) rotate(-7deg) scale(1.03);
}

.poster-fan-right {
    right: 0;
    transform: rotate(10deg);
}

.poster-fan-right:hover,
.poster-fan-right:focus-visible {
    transform: translateX(-6px) rotate(7deg) scale(1.03);
}

.hero-carousel-ui {
    position: absolute;
    left: 50%;
    bottom: 8px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(-50%);
}

.hero-step {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 244, 222, 0.16);
    border-radius: 50%;
    background: rgba(19, 2, 8, 0.62);
    color: var(--ink);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-dots {
    display: flex;
    gap: 6px;
    padding: 0 2px;
}

.hero-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 244, 222, 0.34);
    transition: width 220ms ease, background 220ms ease;
}

.hero-dot.active {
    width: 18px;
    background: var(--coral-hot);
}

.swipe-hint {
    position: absolute;
    left: 50%;
    bottom: -24px;
    z-index: 4;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    transform: translateX(-50%);
    white-space: nowrap;
}

.hero-swap .phone-frame {
    animation: phoneSwap 280ms ease both;
}

.hero-swap .poster-fan-left {
    animation: leftSwap 280ms ease both;
}

.hero-swap .poster-fan-right {
    animation: rightSwap 280ms ease both;
}

@keyframes phoneSwap {
    0% { transform: translateY(10px) scale(0.985); filter: brightness(0.86); }
    100% { transform: translateY(0) scale(1); filter: brightness(1); }
}

@keyframes leftSwap {
    0% { transform: translateX(24px) rotate(-5deg); opacity: 0.28; }
    100% { transform: translateX(0) rotate(-10deg); opacity: 0.66; }
}

@keyframes rightSwap {
    0% { transform: translateX(-24px) rotate(5deg); opacity: 0.28; }
    100% { transform: translateX(0) rotate(10deg); opacity: 0.66; }
}

.hero-copy {
    text-align: center;
    max-width: 620px;
    margin: 0 auto;
}

.kicker {
    margin: 0 0 10px;
    color: var(--coral-hot);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h2,
h3,
p {
    margin-top: 0;
}

.hero-copy h2,
.section-heading h2,
.closing-cta h2 {
    margin-bottom: 12px;
    font-family: var(--display);
    font-size: clamp(36px, 10vw, 76px);
    line-height: 0.92;
    letter-spacing: -0.05em;
}

.hero-copy p:not(.kicker),
.section-heading p,
.quick-hooks span {
    color: var(--soft);
    line-height: 1.5;
}

.hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 22px 0 18px;
}

.primary-action,
.ghost-action {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
}

.primary-action {
    color: white;
    background: linear-gradient(135deg, var(--coral-hot), var(--coral) 42%, var(--wine-bright));
    box-shadow: 0 14px 30px rgba(240, 75, 50, 0.28);
}

.ghost-action {
    color: var(--ink);
    border: 1px solid var(--line);
    background: rgba(255, 244, 222, 0.07);
}

.proof-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.proof-strip::-webkit-scrollbar,
.story-rail::-webkit-scrollbar {
    display: none;
}

.proof-strip span {
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(255, 244, 222, 0.06);
    font-size: 13px;
    font-weight: 800;
}

.quick-hooks {
    display: grid;
    gap: 10px;
    padding: 18px 16px 28px;
}

.quick-hooks article {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 244, 222, 0.06);
}

.quick-hooks strong {
    display: block;
    margin-bottom: 4px;
    font-size: 17px;
}

.catalog,
.closing-cta {
    padding: 34px 0;
}

.section-heading {
    padding: 0 16px;
}

.category-block {
    padding: 22px 0 18px;
}

.category-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    padding: 0 16px;
    margin-bottom: 14px;
}

.category-header h3 {
    margin: 0;
    font-family: var(--display);
    font-size: 34px;
    letter-spacing: -0.04em;
}

.category-header p {
    max-width: 180px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    text-align: right;
}

.story-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(148px, 44vw);
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 16px;
    -webkit-overflow-scrolling: touch;
    touch-action: auto;
    padding: 0 16px 12px;
    scrollbar-width: none;
}

@media (hover: none) and (pointer: coarse) {
    body {
        overscroll-behavior-y: none;
    }

    .story-rail {
        touch-action: pan-x pan-y;
    }
}

.story-card {
    position: relative;
    appearance: none;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 244, 222, 0.12);
    border-radius: 18px;
    background: var(--panel);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    scroll-snap-align: start;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3);
}

.story-card:focus-visible,
.primary-action:focus-visible,
.ghost-action:focus-visible,
.header-pill:focus-visible,
.modal-close:focus-visible {
    outline: 3px solid rgba(255, 119, 84, 0.7);
    outline-offset: 3px;
}

.story-poster {
    position: relative;
    aspect-ratio: 9 / 13.6;
    background: var(--wine);
}

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

.story-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 34%, rgba(19, 2, 8, 0.92));
}

.story-tag {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    background: rgba(240, 75, 50, 0.92);
}

.episode-meta {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    font-size: 11px;
    font-weight: 900;
}

.play-dot {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 244, 222, 0.94);
    color: var(--wine);
}

.story-card strong {
    display: block;
    min-height: 56px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.15;
}

.closing-cta {
    margin: 16px;
    padding: 32px 18px;
    text-align: center;
    border: 1px solid rgba(255, 244, 222, 0.14);
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 119, 84, 0.3), transparent 20rem),
        linear-gradient(180deg, #350716, #1b030b);
}

.closing-cta .primary-action {
    min-width: 188px;
}

.bottom-download {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px max(12px, env(safe-area-inset-bottom));
    background: rgba(19, 2, 8, 0.9);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.bottom-download strong,
.bottom-download span {
    display: block;
}

.bottom-download span {
    color: var(--muted);
    font-size: 12px;
}

.bottom-download .primary-action {
    min-height: 48px;
    min-width: 118px;
    padding: 0 18px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: end;
    justify-content: center;
    background: rgba(5, 0, 3, 0.72);
    backdrop-filter: blur(10px);
}

.modal-backdrop.open {
    display: flex;
}

.modal-card {
    position: relative;
    width: 100%;
    max-height: 92svh;
    overflow: auto;
    border-radius: 26px 26px 0 0;
    background: var(--black);
    border: 1px solid rgba(255, 244, 222, 0.14);
    box-shadow: 0 -20px 70px rgba(0, 0, 0, 0.56);
}

.modal-card > img {
    width: 100%;
    height: 46svh;
    object-fit: cover;
}

.modal-content {
    padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
}

#modalCategory {
    color: var(--coral-hot);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.modal-content h2 {
    margin: 10px 0 10px;
    font-family: var(--display);
    font-size: clamp(34px, 11vw, 58px);
    line-height: 0.92;
    letter-spacing: -0.05em;
}

.modal-content p {
    color: var(--soft);
    line-height: 1.55;
}

.modal-content .primary-action {
    width: 100%;
    margin-top: 8px;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(19, 2, 8, 0.72);
    color: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

@media (min-width: 760px) {
    body {
        padding-bottom: 0;
    }

    .app-header {
        height: 82px;
        padding: 18px clamp(28px, 5vw, 80px);
    }

    .brand-icon {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .brand-wordmark {
        font-size: 28px;
    }

    .hero {
        grid-template-columns: 0.92fr 1fr;
        align-items: center;
        gap: clamp(32px, 6vw, 92px);
        padding: 108px clamp(28px, 6vw, 92px) 60px;
    }

    .hero-media {
        order: 2;
        min-height: 620px;
    }

    .hero-copy {
        order: 1;
        text-align: left;
    }

    .hero-actions {
        grid-template-columns: max-content max-content;
    }

    .quick-hooks {
        grid-template-columns: repeat(3, 1fr);
        padding: 28px clamp(28px, 6vw, 92px);
    }

    .catalog,
    .closing-cta {
        padding-top: 62px;
        padding-bottom: 62px;
    }

    .section-heading,
    .category-header {
        padding-left: clamp(28px, 6vw, 92px);
        padding-right: clamp(28px, 6vw, 92px);
    }

    .story-rail {
        grid-auto-columns: 210px;
        padding-left: clamp(28px, 6vw, 92px);
        padding-right: clamp(28px, 6vw, 92px);
    }

    .swipe-hint {
        display: none;
    }

    .category-header p {
        max-width: 420px;
        font-size: 14px;
    }

    .bottom-download {
        left: 50%;
        right: auto;
        bottom: 22px;
        width: min(520px, calc(100vw - 40px));
        transform: translateX(-50%);
        border: 1px solid var(--line);
        border-radius: 22px;
    }

    .modal-backdrop {
        align-items: center;
        padding: 24px;
    }

    .modal-card {
        display: grid;
        grid-template-columns: minmax(260px, 360px) minmax(320px, 460px);
        width: min(820px, 100%);
        border-radius: 24px;
    }

    .modal-card > img {
        height: 100%;
        min-height: 560px;
    }

    .modal-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 42px;
    }
}

@media (min-width: 1440px) {
    .story-rail {
        grid-auto-flow: initial;
        grid-auto-columns: initial;
        grid-template-columns: repeat(6, minmax(170px, 240px));
        justify-content: space-between;
        overflow-x: visible;
        scroll-snap-type: none;
    }

    .story-card {
        scroll-snap-align: none;
    }
}

@media (max-width: 380px) {
    .story-rail {
        grid-auto-columns: minmax(136px, 50vw);
    }

    .phone-frame {
        width: 78vw;
    }

    .bottom-download {
        gap: 8px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .bottom-download .primary-action {
        min-width: 104px;
        padding: 0 14px;
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
