/**
 * bands.css - Programme bands for thailandfilm.events
 * (slate.php, companies.php, services.php)
 *
 * Every title, company or service is a wide band. The backdrop is its own
 * poster or images, blurred and darkened, so each band carries the colours
 * of what it shows. Filters are written as a sentence.
 *
 * @version 1.1.0 - 2026-10-19: indigo/cream from the TIFFCOM artwork
 * @version 1.0.0 - 2026-10-19
 */

.pv-page {
    --band-ink: #FFFFF2;
    --band-line: rgba(255, 255, 242, 0.24);
    --band-dark: #1F1C52;
    max-width: 1120px;
    margin: 0 auto;
    padding: 2rem clamp(0px, 1.5vw, 20px) 3rem;
}
.pv-page [hidden] { display: none !important; }
.pv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Page head ---------- */
.pv-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.8rem 1.6rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--text-color);
}
.pv-head h1 {
    font-weight: 300;
    font-size: clamp(2.1rem, 3.6vw, 3rem);
    line-height: 1;
    margin: 0.3rem 0 0;
}

.pv-find input[type="search"] {
    width: 280px;
    max-width: 100%;
    border: 0;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237A6E64' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 0 50%;
    padding: 0.4rem 0 0.4rem 1.6rem;
    font: 400 0.92rem var(--body-font);
    color: var(--text-color);
    box-shadow: none;
}
.pv-find input[type="search"]:focus {
    border-bottom-color: var(--primary-color);
    box-shadow: none;
    outline: none;
}

/* ---------- Filter written as a sentence ---------- */
.pv-sentence {
    font-family: var(--display-font);
    font-size: 1.2rem;
    font-weight: 300;
    margin: 1.1rem 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.4rem;
    color: var(--text-color);
}
.pv-sentence select {
    appearance: none;
    -webkit-appearance: none;
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--primary-color);
    border-radius: 0;
    box-shadow: none;
    background-color: transparent;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--primary-color) 50%),
        linear-gradient(135deg, var(--primary-color) 50%, transparent 50%);
    background-position: calc(100% - 8px) 58%, calc(100% - 3px) 58%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
    color: var(--primary-color);
    font: italic 400 1.2rem/1.3 var(--display-font);
    padding: 0 1.15rem 0 0.1rem;
    cursor: pointer;
}
.pv-sentence select.is-set { font-weight: 600; }
.pv-sentence select:focus { outline: none; box-shadow: none; }
.pv-sentence select:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 3px; }
.pv-count {
    font-family: var(--body-font);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-color);
    margin-left: 0.6rem;
}

.pv-empty { margin: 2rem 0; color: var(--muted-color); }
.pv-empty button {
    background: none;
    border: 0;
    border-bottom: 1px solid var(--primary-color);
    color: var(--primary-color);
    font: inherit;
    padding: 0;
    cursor: pointer;
}

/* ---------- The band ---------- */
.pv-bands { display: flex; flex-direction: column; gap: 0.8rem; }

.pv-band {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) auto;
    gap: 1.6rem;
    align-items: center;
    padding: 1.3rem 1.5rem;
    min-height: 236px;
    background: var(--band-dark);
    color: var(--band-ink);
}
.pv-band-bg {
    position: absolute;
    inset: -48px;
    z-index: -2;
    background-repeat: no-repeat;
    filter: blur(32px) saturate(1.35) brightness(0.48);
    transform: scale(1.1);
}
.pv-band::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(16, 14, 44, 0.62), rgba(16, 14, 44, 0.2) 72%);
    pointer-events: none;
}
.pv-band--plain { background: linear-gradient(180deg, #262262 0%, #2B3990 100%); }

.pv-band a { color: inherit; }

.pv-band-poster { display: block; line-height: 0; }
.pv-band-poster img,
.pv-band-poster .pv-blank {
    width: 140px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}
.pv-blank {
    display: flex;
    align-items: flex-end;
    padding: 0.7rem;
    background: linear-gradient(200deg, var(--primary-color), var(--band-dark) 78%);
    color: var(--band-ink);
    font-family: var(--display-font);
    font-size: 0.95rem;
    line-height: 1.15;
    box-sizing: border-box;
}

.pv-band-text { min-width: 0; }
.pv-band-meta {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.82;
}
.pv-band h2 {
    font-family: var(--display-font);
    font-weight: 500;
    font-size: clamp(1.5rem, 2.6vw, 2.2rem);
    line-height: 1.05;
    margin: 0.35rem 0 0.55rem;
    color: var(--band-ink);
    text-wrap: balance;
}
.pv-band h2 a { text-decoration: none; }
.pv-band h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.pv-band p {
    margin: 0 0 0.85rem;
    max-width: 62ch;
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.92;
}

.pv-band-credit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 1.1rem;
    font-size: 0.8rem;
    opacity: 0.94;
}
.pv-band-co { font-weight: 700; text-decoration: none; }
.pv-band-co:hover { text-decoration: underline; }

/* Stage: dot colour carries the group, text stays light */
.pv-stage {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}
.pv-stage::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dot, currentColor);
}
.pv-stage--dev      { --dot: #A9BDEB; }
.pv-stage--prod     { --dot: #F0AE62; }
.pv-stage--done     { --dot: #9FD3A4; }
.pv-stage--released { --dot: #FBF8F2; }

.pv-band-act { display: flex; flex-direction: column; gap: 0.5rem; }
.pv-band-act a {
    display: block;
    text-align: center;
    min-width: 150px;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(255, 255, 242, 0.62);
    color: var(--band-ink);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    transition: background 0.15s, color 0.15s;
}
.pv-band-act a:hover { background: rgba(255, 255, 242, 0.14); }
.pv-band-act a.is-primary { background: var(--band-ink); color: var(--band-dark); border-color: var(--band-ink); }
.pv-band-act a.is-primary:hover { background: #FFFFFF; }
.pv-band a:focus-visible { outline: 2px solid var(--band-ink); outline-offset: 3px; }

/* ---------- Service band: landscape image in place of the poster ---------- */
.pv-svcband { grid-template-columns: 240px minmax(0, 1fr) auto; min-height: 200px; }
.pv-svcband .pv-band-poster img,
.pv-svcband .pv-band-poster .pv-blank { width: 240px; aspect-ratio: 3 / 2; }

/* ---------- Company band: company across the top, its titles underneath ---------- */
.pv-coband { display: block; padding: 1.4rem 1.5rem 1.2rem; min-height: 0; }
.pv-coband::after {
    background:
        linear-gradient(180deg, rgba(16, 14, 44, 0.18), rgba(16, 14, 44, 0.5)),
        linear-gradient(90deg, rgba(16, 14, 44, 0.55), rgba(16, 14, 44, 0.15) 75%);
}
.pv-co-top {
    display: grid;
    grid-template-columns: 2rem 92px minmax(0, 1fr) auto;
    gap: 1.3rem;
    align-items: center;
}
.pv-co-num {
    align-self: start;
    padding-top: 0.2rem;
    font-family: var(--display-font);
    font-size: 1.1rem;
    color: #C9CEF2;
}
.pv-co-logo {
    width: 92px;
    height: 92px;
    background: #FFFFFF;
    padding: 8px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    text-decoration: none;
}
.pv-co-logo img { max-width: 100%; max-height: 100%; object-fit: contain; transform: scale(var(--logo-zoom, 1)); }
.pv-co-logo span { font-family: var(--display-font); font-size: 2rem; color: var(--band-dark); }
.pv-coband .pv-band-text p { margin-bottom: 0.7rem; }

.pv-reel {
    list-style: none;
    margin: 1.2rem 0 0 calc(2rem + 1.3rem);
    padding: 1.1rem 0 0.4rem;
    border-top: 1px solid var(--band-line);
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 242, 0.35) transparent;
}
.pv-reel li { flex: 0 0 auto; width: 104px; }
.pv-reel li.is-svc { width: 210px; }
.pv-reel a { display: block; text-decoration: none; color: inherit; }
.pv-reel img,
.pv-reel .pv-blank {
    width: 100%;
    height: 156px;
    object-fit: cover;
    display: block;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.38);
    transition: transform 0.15s;
}
.pv-reel a:hover img,
.pv-reel a:hover .pv-blank { transform: translateY(-3px); }
.pv-reel b {
    display: block;
    margin-top: 0.5rem;
    font-family: var(--display-font);
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.2;
}
.pv-reel a:hover b { text-decoration: underline; text-underline-offset: 0.15em; }
.pv-reel small {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.75;
    line-height: 1.35;
}

/* ---------- Narrower screens ---------- */
@media (max-width: 1100px) {
    .pv-band-act a { min-width: 130px; }
    .pv-co-top { grid-template-columns: 92px minmax(0, 1fr) auto; }
    .pv-co-num { display: none; }
    .pv-reel { margin-left: 0; }
}

@media (max-width: 760px) {
    .pv-page { padding-top: 1.4rem; }
    .pv-head { align-items: flex-start; flex-direction: column; }
    .pv-find, .pv-find input[type="search"] { width: 100%; }
    .pv-sentence, .pv-sentence select { font-size: 1.05rem; }
    .pv-count { margin-left: 0; flex-basis: 100%; margin-top: 0.3rem; }

    .pv-band { grid-template-columns: 88px minmax(0, 1fr); gap: 1rem; padding: 1rem; min-height: 0; align-items: start; }
    .pv-band-poster img, .pv-band-poster .pv-blank { width: 88px; }
    .pv-band h2 { font-size: 1.35rem; margin: 0.25rem 0 0.45rem; }
    .pv-band p { display: none; }
    .pv-band-act { grid-column: 1 / -1; flex-direction: row; }
    .pv-band-act a { flex: 1; min-width: 0; padding: 0.6rem 0.5rem; }

    .pv-svcband { grid-template-columns: 120px minmax(0, 1fr); }
    .pv-svcband .pv-band-poster img, .pv-svcband .pv-band-poster .pv-blank { width: 120px; }

    .pv-coband { padding: 1rem; }
    .pv-co-top { grid-template-columns: 60px minmax(0, 1fr); gap: 1rem; align-items: start; }
    .pv-co-logo { width: 60px; height: 60px; padding: 5px; }
    .pv-co-logo span { font-size: 1.4rem; }
    .pv-coband .pv-band-text p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.88rem;
    }
    .pv-reel { margin-top: 1rem; padding-top: 0.9rem; gap: 0.7rem; }
    .pv-reel li { width: 84px; }
    .pv-reel li.is-svc { width: 170px; }
    .pv-reel img, .pv-reel .pv-blank { height: 126px; }
}

@media (prefers-reduced-motion: reduce) {
    .pv-reel img, .pv-reel .pv-blank, .pv-band-act a { transition: none; }
}
