/* Home refresh: one strong featured story, then one compact screening room. */
#tab-home.active {
    display: flex;
    flex-direction: column;
    background: var(--ivory);
}

#tab-home .hero-carousel {
    order: 1;
    width: 100%;
    min-height: clamp(560px, 67vh, 720px);
    isolation: isolate;
    background: var(--ink);
}

#tab-home .hero-carousel::before {
    content: "" !important;
    position: absolute;
    z-index: 2;
    inset: 0;
    display: block !important;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(9, 10, 9, 0.67) 0%, rgba(9, 10, 9, 0.18) 44%, rgba(9, 10, 9, 0.08) 100%),
        linear-gradient(0deg, rgba(9, 10, 9, 0.54) 0%, transparent 48%);
}

.home-hero-signature {
    position: absolute;
    z-index: 5;
    top: 30px;
    left: clamp(24px, 4vw, 62px);
    padding: 10px 14px 10px 10px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--paper-white);
    background: rgba(13, 14, 13, 0.74);
    border-left: 3px solid var(--vermilion);
    backdrop-filter: blur(8px);
}

.home-hero-signature img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.home-hero-signature span {
    display: grid;
    gap: 3px;
    line-height: 1;
    text-transform: uppercase;
}

.home-hero-signature strong {
    font-family: var(--condensed);
    font-size: 0.86rem;
    letter-spacing: 0.14em;
}

.home-hero-signature small {
    color: #b8b2a7;
    font-family: var(--mono);
    font-size: 0.5rem;
    letter-spacing: 0.08em;
}

#tab-home .feature-sheet {
    right: clamp(20px, 4vw, 62px);
    bottom: clamp(20px, 4vw, 44px);
    width: min(850px, calc(100% - clamp(40px, 8vw, 124px)));
    min-height: 0;
    grid-template-areas:
        "name action"
        "specs action";
    grid-template-columns: minmax(0, 1fr) 154px;
    color: var(--paper-white);
    background: rgba(13, 14, 13, 0.88);
    border: 1px solid rgba(243, 239, 229, 0.28);
    border-top: 3px solid var(--vermilion);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(13px);
}

#tab-home .feature-name {
    grid-area: name;
    padding: 19px 22px 13px;
}

#tab-home .feature-name > span { margin-bottom: 7px; color: #ff776c; }

#tab-home .feature-name h2 {
    overflow: hidden;
    display: -webkit-box;
    color: var(--paper-white);
    font-size: clamp(1.35rem, 2vw, 2rem);
    line-height: 0.96;
    text-overflow: clip;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#tab-home .feature-name p { margin-top: 7px; color: #bbb4aa; }

#tab-home .release-specs {
    grid-area: specs;
    padding: 11px 22px 15px;
    gap: 14px;
    background: transparent;
    border-top: 1px solid rgba(243, 239, 229, 0.18);
}

#tab-home .release-specs dt { margin-bottom: 5px; color: #aaa49a; font-size: 0.53rem; }
#tab-home .release-specs dd { color: var(--paper-white); font-size: 0.9rem; }

#tab-home .action-zone {
    grid-area: action;
    padding: 18px;
    background: rgba(255, 255, 255, 0.045);
    border-left: 1px solid rgba(243, 239, 229, 0.18);
}

#tab-home .feature-action-label { display: none; }
#tab-home .primary-action { min-height: 44px; }

#tab-home .hero-carousel .carousel-nav,
#tab-home .hero-carousel .carousel-dots {
    z-index: 6;
}

/* Desktop feature: one cinematic scene; the interface stays out of the artwork. */
@media (min-width: 761px) {
    #tab-home .hero-carousel {
        min-height: clamp(640px, 76vh, 840px);
        overflow: hidden;
        background: #070809;
        border: 0;
    }

    #tab-home .home-hero-signature,
    #tab-home .hero-carousel::after { display: none !important; }

    #tab-home .hero-carousel::before {
        z-index: 2;
        background:
            linear-gradient(90deg, rgba(6, 7, 8, 0.96) 0%, rgba(6, 7, 8, 0.83) 24%, rgba(6, 7, 8, 0.36) 45%, rgba(6, 7, 8, 0.03) 69%, rgba(6, 7, 8, 0.2) 100%),
            linear-gradient(0deg, rgba(6, 7, 8, 0.8) 0%, rgba(6, 7, 8, 0) 42%);
    }

    #tab-home .hero-slide.active { display: block; }

    #tab-home .hero-slide-bg {
        position: absolute;
        z-index: 0;
        inset: 0;
        width: 100%;
        height: 100%;
        object-position: center;
        filter: saturate(0.92) contrast(1.08) brightness(0.82);
        clip-path: none;
        box-shadow: none;
    }

    #tab-home .hero-slide.active::after { display: none; }

    #tab-home .photo-note {
        z-index: 5;
        top: clamp(26px, 3vw, 48px);
        right: clamp(28px, 4vw, 72px);
        padding: 0;
        color: rgba(255, 253, 247, 0.78);
        background: transparent;
        border: 0;
        box-shadow: none;
        font-size: 0.56rem;
        letter-spacing: 0.12em;
    }

    #tab-home .feature-sheet {
        position: absolute;
        z-index: 4;
        top: auto;
        right: auto;
        bottom: clamp(50px, 9vh, 110px);
        left: clamp(42px, 7.3vw, 142px);
        width: min(630px, 48vw);
        min-height: 0;
        display: grid;
        grid-template-areas:
            "name"
            "specs"
            "action";
        grid-template-columns: 1fr;
        color: var(--paper-white);
        background: transparent;
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
    }

    #tab-home .hero-slide .feature-sheet {
        opacity: 0;
        transform: translateY(22px);
        animation: none;
    }

    #tab-home .hero-slide.active .feature-sheet {
        animation: home-cinematic-sheet-enter 720ms 180ms both cubic-bezier(0.22, 0.74, 0.24, 1);
    }

    #tab-home .feature-name {
        grid-area: name;
        margin: 0;
        padding: 0 0 25px;
    }

    #tab-home .feature-name > span {
        margin-bottom: 14px;
        color: #ff7569;
        font-size: 0.62rem;
        font-weight: 700;
        letter-spacing: 0.16em;
    }

    #tab-home .feature-name h2 {
        overflow: visible;
        display: block;
        max-width: 620px;
        color: var(--paper-white);
        font-family: var(--sans);
        font-size: clamp(2.4rem, 4vw, 4.7rem);
        font-weight: 780;
        line-height: 0.94;
        letter-spacing: -0.055em;
        text-align: left;
        text-transform: none;
        text-overflow: clip;
        -webkit-line-clamp: initial;
    }

    #tab-home .feature-name p {
        max-width: 420px;
        margin-top: 15px;
        color: rgba(255, 253, 247, 0.68);
        font-size: 0.76rem;
        line-height: 1.5;
        white-space: normal;
    }

    #tab-home .release-specs {
        grid-area: specs;
        max-width: 500px;
        padding: 18px 0 20px;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: clamp(14px, 2.2vw, 34px);
        background: transparent;
        border-top: 1px solid rgba(255, 253, 247, 0.22);
    }

    #tab-home .release-specs div {
        min-width: 0;
        padding: 0;
        border: 0;
    }

    #tab-home .release-specs dt {
        margin-bottom: 6px;
        color: rgba(255, 253, 247, 0.54);
        font-size: 0.52rem;
        font-weight: 600;
        line-height: 1.2;
    }

    #tab-home .release-specs dd {
        overflow: hidden;
        color: var(--paper-white);
        font-size: 0.9rem;
        font-weight: 700;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #tab-home .action-zone {
        grid-area: action;
        margin: 0;
        padding: 0;
        width: auto;
        background: transparent;
        border: 0;
    }

    #tab-home .primary-action {
        min-height: 48px;
        max-width: 170px;
        padding-inline: 18px;
        box-shadow: none;
    }

    #tab-home .hero-carousel .carousel-nav {
        top: 50%;
        right: clamp(20px, 2.2vw, 42px);
        bottom: auto;
        left: auto;
        flex-direction: column;
        gap: 8px;
        z-index: 6;
        transform: translateY(-50%);
    }

    #tab-home .hero-carousel .carousel-nav button {
        width: 38px;
        height: 38px;
        color: rgba(255, 253, 247, 0.86);
        background: rgba(4, 5, 6, 0.26);
        border: 1px solid rgba(255, 253, 247, 0.22);
        box-shadow: none;
        opacity: 0.72;
    }

    #tab-home .hero-carousel .carousel-nav button:hover {
        color: var(--paper-white);
        background: rgba(4, 5, 6, 0.52);
        border-color: rgba(255, 253, 247, 0.65);
        opacity: 1;
    }

    #tab-home .hero-carousel .carousel-dots {
        right: auto;
        bottom: clamp(30px, 4vw, 58px);
        left: clamp(42px, 7.3vw, 142px);
        gap: 7px;
        z-index: 6;
    }

    #tab-home .hero-carousel .carousel-dot {
        width: 20px;
        height: 2px;
        background: rgba(255, 253, 247, 0.32);
    }

    #tab-home .hero-carousel .carousel-dot:hover,
    #tab-home .hero-carousel .carousel-dot.active {
        width: 30px;
        height: 2px;
        background: var(--vermilion);
    }

    @keyframes home-cinematic-sheet-enter {
        from { opacity: 0; transform: translateY(22px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

#tab-home .weekly-trailer {
    order: 2;
    min-height: 0;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
    grid-template-rows: 50px minmax(280px, 1fr);
    color: var(--ink);
    background: var(--paper-white);
    border-top: 1px solid var(--ink);
    border-right: 0;
    border-bottom: 1px solid var(--rule);
}

#tab-home .weekly-trailer-head {
    grid-column: 1 / -1;
    grid-row: 1;
    padding-inline: clamp(22px, 4vw, 62px);
    color: var(--paper-white);
    background: var(--ink);
}

#tab-home .weekly-trailer-media {
    grid-column: 1;
    grid-row: 2;
    min-height: 280px;
    aspect-ratio: auto;
    border-right: 5px solid var(--vermilion);
}

#tab-home .weekly-trailer-caption {
    grid-column: 2;
    grid-row: 2;
    min-height: 280px;
    padding: clamp(28px, 4vw, 58px);
    align-content: center;
    background:
        repeating-linear-gradient(90deg, transparent 0 74px, rgba(17, 17, 15, 0.055) 75px 76px),
        var(--ivory);
    border-top: 0;
    border-left: 0;
}

#tab-home .weekly-trailer-caption h1 {
    overflow: visible;
    font-size: clamp(2rem, 3vw, 3.5rem);
    line-height: 0.97;
    text-overflow: clip;
    white-space: normal;
}

#tab-home .weekly-trailer-caption p {
    max-width: 690px;
    overflow: visible;
    display: block;
    font-size: 0.82rem;
    line-height: 1.72;
    -webkit-line-clamp: initial;
}

#tab-home .catalog-section { order: 3; }

/* Brand entrance: brief, dismissible, and shown once per browser session. */
.brand-entry {
    position: fixed;
    z-index: 10050;
    inset: 0;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: var(--paper-white);
    background: #10110f;
}

.brand-entry[hidden] { display: none; }

.brand-entry-grid {
    position: absolute;
    inset: -20%;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(243, 239, 229, 0.11) 1px, transparent 1px),
        linear-gradient(90deg, rgba(243, 239, 229, 0.11) 1px, transparent 1px);
    background-size: 52px 52px;
    transform: perspective(680px) rotateX(56deg) translateY(-10%);
    transform-origin: center top;
    animation: brand-grid-enter 1200ms var(--motion-ease-out) both;
}

.brand-entry::before,
.brand-entry::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.brand-entry::before {
    width: min(78vw, 880px);
    height: min(78vw, 880px);
    border: 1px solid rgba(237, 61, 47, 0.54);
    border-radius: 50%;
    transform: scale(0.3);
    animation: brand-ring-enter 1120ms 130ms var(--motion-ease-out) both;
}

.brand-entry::after {
    right: 0;
    bottom: 11%;
    left: 0;
    height: 2px;
    background: var(--vermilion);
    transform: scaleX(0);
    transform-origin: left center;
    animation: brand-line-enter 900ms 460ms var(--motion-ease-out) both;
}

.brand-entry-content {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    text-align: center;
}

.brand-entry-kicker {
    margin-bottom: 26px;
    color: #b8b2a7;
    font-family: var(--mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.17em;
}

.brand-entry-mark-wrap {
    position: relative;
    width: 112px;
    height: 112px;
    margin-bottom: 23px;
    display: grid;
    place-items: center;
    animation: brand-mark-enter 850ms 160ms var(--motion-ease-out) both;
}

.brand-entry-mark-wrap img {
    position: relative;
    z-index: 1;
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.brand-entry-orbit {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(243, 239, 229, 0.58);
    border-radius: 50%;
    animation: brand-orbit 2200ms linear infinite;
}

.brand-entry-orbit::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 8px;
    width: 9px;
    height: 9px;
    background: var(--vermilion);
    border-radius: 50%;
}

.brand-entry-content strong {
    font-family: var(--condensed);
    font-size: clamp(2.8rem, 8vw, 5.8rem);
    font-weight: 900;
    letter-spacing: 0.2em;
    line-height: 0.86;
    animation: brand-word-enter 720ms 380ms var(--motion-ease-out) both;
}

.brand-entry-content p {
    margin: 18px 0 0;
    color: #c5bfb4;
    font-size: 0.82rem;
    letter-spacing: 0.025em;
    animation: brand-word-enter 620ms 520ms var(--motion-ease-out) both;
}

.brand-entry-skip {
    position: absolute;
    z-index: 2;
    right: clamp(18px, 3vw, 44px);
    bottom: clamp(20px, 4vw, 42px);
    min-height: 38px;
    padding: 0 0 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--paper-white);
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(243, 239, 229, 0.55);
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-entry-skip:hover { color: var(--vermilion); border-color: var(--vermilion); }

.brand-entry.is-leaving {
    animation: brand-entry-leave 420ms var(--motion-ease-out) both;
}

body.brand-entry-active { overflow: hidden; }

@keyframes brand-grid-enter {
    from { opacity: 0; transform: perspective(680px) rotateX(56deg) translateY(15%); }
    to { opacity: 0.35; transform: perspective(680px) rotateX(56deg) translateY(-10%); }
}

@keyframes brand-ring-enter {
    from { opacity: 0; transform: scale(0.25); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes brand-line-enter { to { transform: scaleX(1); } }
@keyframes brand-mark-enter { from { opacity: 0; transform: scale(0.5) rotate(-18deg); } to { opacity: 1; transform: none; } }
@keyframes brand-word-enter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes brand-orbit { to { transform: rotate(360deg); } }
@keyframes brand-entry-leave { to { opacity: 0; transform: scale(1.025); } }

@media (max-width: 760px) {
    #tab-home .hero-carousel {
        min-height: clamp(590px, 88svh, 700px);
        overflow: hidden;
        background: #070809;
    }

    #tab-home .hero-carousel::before {
        z-index: 2;
        background:
            linear-gradient(180deg, rgba(5, 6, 7, 0.55) 0%, rgba(5, 6, 7, 0.03) 29%, rgba(5, 6, 7, 0.16) 44%, rgba(5, 6, 7, 0.94) 79%, #070809 100%);
    }

    #tab-home .home-hero-signature { display: none; }

    #tab-home .hero-slide-bg {
        inset: 0;
        width: 100%;
        height: 100%;
        object-position: center;
        filter: saturate(0.92) contrast(1.06) brightness(0.84);
        clip-path: none;
        box-shadow: none;
    }

    #tab-home .photo-note { display: none; }

    #tab-home .feature-sheet {
        z-index: 4;
        right: 18px;
        bottom: 42px;
        left: 18px;
        width: auto;
        min-height: 0;
        display: grid;
        grid-template-areas:
            "name"
            "specs"
            "action";
        grid-template-columns: 1fr;
        color: var(--paper-white);
        background: transparent;
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
    }

    #tab-home .hero-slide .feature-sheet {
        opacity: 0;
        transform: translateY(18px);
        animation: none;
    }

    #tab-home .hero-slide.active .feature-sheet {
        animation: home-mobile-sheet-enter 620ms 120ms both cubic-bezier(0.22, 0.74, 0.24, 1);
    }

    #tab-home .feature-name { padding: 0 0 16px; }
    #tab-home .feature-name > span {
        margin-bottom: 10px;
        color: #ff7569;
        font-size: 0.56rem;
        letter-spacing: 0.14em;
    }
    #tab-home .feature-name h2 {
        overflow: visible;
        display: block;
        max-width: 100%;
        color: var(--paper-white);
        font-family: var(--sans);
        font-size: clamp(1.95rem, 8.3vw, 2.4rem);
        font-weight: 780;
        line-height: 0.98;
        letter-spacing: -0.045em;
        text-transform: none;
        text-overflow: clip;
        overflow-wrap: anywhere;
        -webkit-line-clamp: initial;
    }
    #tab-home .feature-name p {
        margin-top: 10px;
        color: rgba(255, 253, 247, 0.67);
        font-size: 0.68rem;
        line-height: 1.45;
        white-space: normal;
    }

    #tab-home .release-specs {
        padding: 14px 0 16px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        background: transparent;
        border-top: 1px solid rgba(255, 253, 247, 0.22);
    }
    #tab-home .release-specs div { padding: 0; border: 0; }
    #tab-home .release-specs dt {
        margin-bottom: 5px;
        color: rgba(255, 253, 247, 0.55);
        font-size: 0.46rem;
    }
    #tab-home .release-specs dd {
        overflow: hidden;
        color: var(--paper-white);
        font-size: 0.75rem;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    #tab-home .action-zone {
        padding: 0;
        border-left: 0;
    }
    #tab-home .feature-action-label { display: none; }
    #tab-home .primary-action { min-height: 46px; max-width: 162px; }

    #tab-home .hero-carousel .carousel-nav {
        top: 18px;
        right: 14px;
        bottom: auto;
        left: auto;
        gap: 6px;
        z-index: 6;
    }

    #tab-home .hero-carousel .carousel-nav button {
        width: 36px;
        height: 36px;
        color: rgba(255, 253, 247, 0.9);
        background: rgba(4, 5, 6, 0.28);
        border: 1px solid rgba(255, 253, 247, 0.28);
        box-shadow: none;
    }

    #tab-home .hero-carousel .carousel-dots {
        top: 29px;
        right: auto;
        bottom: auto;
        left: 18px;
        gap: 6px;
        z-index: 6;
    }

    #tab-home .hero-carousel .carousel-dot {
        width: 16px;
        height: 2px;
        background: rgba(255, 253, 247, 0.38);
    }

    #tab-home .hero-carousel .carousel-dot.active {
        width: 24px;
        background: var(--vermilion);
    }

    #tab-home .weekly-trailer {
        grid-template-columns: 1fr;
        grid-template-rows: 46px 240px auto;
    }
    #tab-home .weekly-trailer-head { padding-inline: 16px; }
    #tab-home .weekly-trailer-media {
        grid-column: 1;
        grid-row: 2;
        min-height: 240px;
        border-right: 0;
        border-bottom: 4px solid var(--vermilion);
    }
    #tab-home .weekly-trailer-caption {
        grid-column: 1;
        grid-row: 3;
        min-height: 0;
        padding: 25px 18px 28px;
    }
    #tab-home .weekly-trailer-caption h1 { font-size: 1.8rem; }
    #tab-home .weekly-trailer-caption p { font-size: 0.74rem; line-height: 1.62; }
    .brand-entry-content strong { letter-spacing: 0.14em; }
    .brand-entry-kicker { font-size: 0.5rem; }

    @keyframes home-mobile-sheet-enter {
        from { opacity: 0; transform: translateY(18px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

@media (prefers-reduced-motion: reduce) {
    .brand-entry { display: none !important; }
    .brand-entry *,
    .brand-entry::before,
    .brand-entry::after { animation: none !important; }
}
