:root {
    --home-ink: #eef5ff;
    --home-ink-soft: rgba(238, 245, 255, 0.8);
    --home-navy-950: #0d2744;
    --home-navy-600: #7ea4cc;
}

body.home-page {
    background: var(--home-navy-950);
}

.home-poster {
    position: relative;
    height: calc(100vh - 56px);
    overflow: hidden;
    background: var(--home-navy-950);
}

.home-poster-image {
    display: block;
    width: 100%;
    height: calc(100vh - 56px);
    object-fit: cover;
    object-position: center bottom;
}

.home-search-shell {
    position: absolute;
    top: 41%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: min(64rem, calc(100vw - 2.5rem));
}

.home-search-card {
    padding: clamp(1rem, 1.8vw, 1.35rem) clamp(1.1rem, 2.4vw, 1.8rem);
    border-radius: 1.25rem;
    background: linear-gradient(180deg, rgba(11, 33, 56, 0.34), rgba(8, 24, 42, 0.2));
    border: 1px solid rgba(226, 240, 255, 0.24);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.home-search-eyebrow,
.home-search-title,
.home-search-label,
.home-search-hint {
    margin: 0;
}

.home-search-eyebrow {
    color: rgba(238, 245, 255, 0.72);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.home-search-title {
    margin-top: 0.35rem;
    color: var(--home-ink);
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.6rem, 2.4vw, 2.35rem);
    line-height: 1;
    max-width: 20ch;
}

.home-search-mode {
    display: inline-flex;
    align-self: stretch;
    gap: 0.45rem;
    padding: 0.3rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.home-search-mode-btn {
    min-height: 2.3rem;
    padding: 0.55rem 0.95rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(238, 245, 255, 0.78);
    font-weight: 700;
}

.home-search-mode-btn.is-active {
    background: #eef5ff;
    color: #163552;
}

.home-search-label {
    display: block;
    margin-top: 0.8rem;
    margin-bottom: 0.4rem;
    color: rgba(238, 245, 255, 0.84);
    font-size: 0.9rem;
}

.home-search-controls-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.7rem;
    align-items: stretch;
}

.home-search-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 12.5rem);
    gap: 0.7rem;
}

.home-search-input-wrap {
    position: relative;
}

.home-search-input {
    width: 100%;
    min-height: 3rem;
    padding: 0 1.05rem;
    border: 1px solid rgba(214, 231, 248, 0.14);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.96);
    color: #102a44;
    font-size: 1rem;
}

.home-search-input:focus {
    outline: none;
    border-color: rgba(214, 231, 248, 0.42);
    box-shadow: 0 0 0 0.2rem rgba(187, 215, 241, 0.18);
}

.home-search-results {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 8;
    overflow-y: auto;
    max-height: 18rem;
    border: 1px solid rgba(226, 240, 255, 0.22);
    border-radius: 1rem;
    background: rgba(9, 25, 43, 0.88);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.home-search-result-item {
    display: block;
    width: 100%;
    padding: 0.8rem 0.95rem;
    border: 0;
    border-bottom: 1px solid rgba(226, 240, 255, 0.1);
    background: transparent;
    color: #eef5ff;
    text-align: left;
    font-size: 0.96rem;
    line-height: 1.35;
    cursor: pointer;
}

.home-search-result-item:last-child {
    border-bottom: 0;
}

.home-search-result-item:hover {
    background: rgba(189, 220, 255, 0.1);
}

.home-search-empty {
    padding: 0.8rem 0.95rem;
    color: rgba(238, 245, 255, 0.75);
    font-size: 0.92rem;
}

.home-search-submit {
    min-height: 3rem;
    padding: 0 1.2rem;
    border: 0;
    border-radius: 0.95rem;
    background: #1b3c5f;
    color: #eef5ff;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.home-search-hint {
    margin-top: 0.55rem;
    color: rgba(238, 245, 255, 0.68);
    font-size: 0.88rem;
}

@media (max-width: 900px) {
    .home-poster {
        height: calc(100vh - 48px);
    }

    .home-poster-image {
        height: calc(100vh - 48px);
    }

    .home-search-shell {
        left: 50%;
        width: auto;
        right: auto;
        transform: translate(-50%, -50%);
        min-width: min(46rem, calc(100vw - 2rem));
    }
}

@media (max-width: 640px) {
    .home-poster {
        height: calc(100svh - 48px);
    }

    .home-poster-image {
        height: calc(100svh - 48px);
    }

    .home-search-shell {
        top: auto;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        transform: none;
        min-width: 0;
    }

    .home-search-controls-row {
        grid-template-columns: 1fr;
    }

    .home-search-input-row {
        grid-template-columns: 1fr;
    }

    .home-search-submit {
        width: 100%;
    }
}
