/* TRIO LICHT — presentation mode (Apple-TV-style, 16:9, 4K-ready) */

:root {
    --tv-ease: cubic-bezier(0.32, 0.72, 0, 1);
    --tv-radius: 18px;
    --tv-glass: rgba(28, 28, 30, 0.55);
    --tv-glass-border: rgba(255, 255, 255, 0.14);
}

html.tv-present-html,
body.tv-present-body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.tv-stage {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

/* Letterbox to true 16:9 when viewport is not 16:9 */
.tv-stage__frame {
    position: relative;
    width: 100vw;
    height: calc(100vw * 9 / 16);
    max-height: 100vh;
    max-width: calc(100vh * 16 / 9);
    background: #0a0a0b;
    overflow: hidden;
}

.tv-deck {
    position: absolute;
    inset: 0;
}

/* ---------- slides ---------- */

.tv-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition:
        opacity 0.8s var(--tv-ease),
        transform 0.8s var(--tv-ease),
        visibility 0s linear 0.8s;
    pointer-events: none;
    will-change: opacity, transform;
}

.tv-slide--from-left  { transform: scale(1.02) translateX(-1.5%); }
.tv-slide--from-right { transform: scale(1.02) translateX(1.5%); }

.tv-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateX(0);
    transition:
        opacity 0.8s var(--tv-ease),
        transform 0.8s var(--tv-ease);
    pointer-events: auto;
    z-index: 1;
}

.tv-slide__media {
    position: absolute;
    inset: 0;
    background: #101012;
}

.tv-slide__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tv-slide__media--contain img {
    object-fit: contain;
    background: #0a0a0b;
}

.tv-slide__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.12) 38%, transparent 62%),
        linear-gradient(to right, rgba(0, 0, 0, 0.42) 0%, transparent 44%);
    pointer-events: none;
}

.tv-slide__copy {
    position: absolute;
    left: 5.2%;
    bottom: 10%;
    right: 30%;
    z-index: 2;
    max-width: 54rem;
    transform: translateY(14px);
    opacity: 0;
    transition: opacity 0.7s var(--tv-ease) 0.15s, transform 0.7s var(--tv-ease) 0.15s;
}

.tv-slide.is-active .tv-slide__copy {
    transform: translateY(0);
    opacity: 1;
}

.tv-slide__eyebrow {
    font-size: clamp(12px, 1vw, 17px);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.66);
    margin: 0 0 0.55em;
}

.tv-slide__frame {
    margin-left: 0.8em;
    font-weight: 400;
    opacity: 0.65;
    letter-spacing: 0.06em;
}

.tv-slide__title {
    font-size: clamp(2rem, 4.1vw, 4.4rem);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.015em;
    margin: 0 0 0.3em;
    text-shadow: 0 2px 26px rgba(0, 0, 0, 0.5);
}

.tv-slide__sub {
    font-size: clamp(14px, 1.3vw, 21px);
    font-weight: 400;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.86);
    margin: 0;
    max-width: 40rem;
}

/* progress hairline */
.tv-progress {
    position: absolute;
    left: 5.2%;
    right: 5.2%;
    bottom: 4.6%;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.16);
    z-index: 3;
    overflow: hidden;
}

.tv-progress__bar {
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.9);
}

/* sales cue card */
.tv-cue {
    position: absolute;
    right: 4.4%;
    bottom: 10%;
    z-index: 2;
    width: min(23rem, 31vw);
    padding: 1.15rem 1.3rem 1.2rem;
    border-radius: var(--tv-radius);
    background: var(--tv-glass);
    border: 1px solid var(--tv-glass-border);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.35s var(--tv-ease), transform 0.35s var(--tv-ease);
}

body.tv-notes-on .tv-slide.is-active .tv-cue {
    opacity: 1;
    transform: translateY(0);
}

.tv-cue__label {
    margin: 0 0 0.55em;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.tv-cue__meta {
    margin: 0 0 0.55em;
    font-size: 12.5px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.78);
}

.tv-cue__note {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.94);
}

.tv-cue__url {
    margin: 0.7em 0 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.42);
    word-break: break-all;
}

.tv-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.25rem;
}

/* ---------- floating glass control pill ---------- */

.tv-chrome {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 22px;
    z-index: 50;
    display: flex;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s var(--tv-ease), transform 0.3s var(--tv-ease);
}

.tv-chrome.is-visible,
.tv-present-body.is-hub .tv-chrome,
.tv-present-body.tv-grid-open .tv-chrome {
    opacity: 1;
    transform: translateY(0);
}

.tv-chrome__pill {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--tv-glass);
    border: 1px solid var(--tv-glass-border);
    backdrop-filter: blur(28px) saturate(170%);
    -webkit-backdrop-filter: blur(28px) saturate(170%);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    max-width: calc(100vw - 32px);
    overflow-x: auto;
    scrollbar-width: none;
}

.tv-chrome__pill::-webkit-scrollbar { display: none; }

.tv-chrome__brand {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.92);
    padding: 0 4px;
}

.tv-chrome__sep {
    width: 1px;
    height: 20px;
    flex: 0 0 1px;
    background: rgba(255, 255, 255, 0.16);
    margin: 0 4px;
}

.tv-chrome__counter {
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.72);
    padding: 0 8px;
}

.tv-btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background 0.18s var(--tv-ease), transform 0.18s var(--tv-ease);
}

.tv-btn:hover { background: rgba(255, 255, 255, 0.14); }
.tv-btn:active { transform: scale(0.92); }

.tv-btn--play {
    background: rgba(255, 255, 255, 0.94);
    color: #111;
    width: 42px;
    height: 42px;
}

.tv-btn--play:hover { background: #fff; }
.tv-btn--play svg path { fill: #111; }

.tv-btn--label {
    width: auto;
    padding: 0 14px;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.tv-btn.is-on {
    background: rgba(255, 255, 255, 0.22);
}

.tv-chrome__link {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    padding: 8px 10px;
    border-radius: 999px;
    transition: background 0.18s var(--tv-ease), color 0.18s var(--tv-ease);
}

.tv-chrome__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    text-decoration: none;
}

.tv-chrome__link--exit { color: #fff; font-weight: 600; }

/* ---------- hub (/present) ---------- */

.tv-hub {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5vh 5vw;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 20%, rgba(64, 68, 78, 0.5), transparent 62%),
        #0a0a0b;
}

.tv-hub__brand {
    font-size: clamp(2.2rem, 4.6vw, 4.6rem);
    font-weight: 800;
    letter-spacing: 0.06em;
    margin: 0 0 0.2em;
}

.tv-hub__tag {
    font-size: clamp(13px, 1.25vw, 20px);
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 3em;
}

.tv-hub__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 24rem));
    gap: 1.4rem;
    width: min(100%, 78rem);
}

.tv-hub__card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    aspect-ratio: 16 / 10;
    padding: 1.4rem 1.5rem;
    text-align: left;
    text-decoration: none;
    color: #fff;
    border-radius: var(--tv-radius);
    overflow: hidden;
    background: #161618 center / cover no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
    transition: transform 0.35s var(--tv-ease), box-shadow 0.35s var(--tv-ease), border-color 0.35s var(--tv-ease);
    outline: none;
}

.tv-hub__card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.18) 55%, transparent 85%);
    pointer-events: none;
}

.tv-hub__card:hover,
.tv-hub__card:focus-visible {
    transform: scale(1.045);
    border-color: rgba(255, 255, 255, 0.65);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(255, 255, 255, 0.25);
    color: #fff;
    text-decoration: none;
    z-index: 2;
}

.tv-hub__card > * { position: relative; z-index: 1; }

.tv-hub__card-kicker {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.66);
    margin-bottom: 0.55em;
}

.tv-hub__card-title {
    font-size: clamp(1.25rem, 1.8vw, 1.8rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 0.3em;
}

.tv-hub__card-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.68);
}

.tv-hub__shortcuts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.9rem 1.6rem;
    margin-top: 3em;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.5);
}

.tv-hub__shortcuts kbd {
    display: inline-block;
    min-width: 1.5em;
    padding: 0.2em 0.45em;
    margin: 0 0.18em;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-family: inherit;
    font-size: 11px;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
}

/* ---------- chooser grid overlay ---------- */

.tv-grid {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    background: rgba(8, 8, 9, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 3.2% 4%;
}

.tv-grid[hidden] { display: none !important; }

.tv-grid__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.4rem;
}

.tv-grid__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.tv-grid__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    flex: 1;
    min-width: 0;
}

.tv-pill {
    appearance: none;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 13px;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid transparent;
    transition: background 0.18s var(--tv-ease), color 0.18s var(--tv-ease), transform 0.18s var(--tv-ease);
}

.tv-pill:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
.tv-pill:active { transform: scale(0.95); }

.tv-pill.is-active {
    background: #fff;
    color: #111;
}

.tv-grid__start {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 0.65rem 1.6rem;
    font-size: 14px;
    font-weight: 700;
    background: #fff;
    color: #111;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.18s var(--tv-ease), box-shadow 0.18s var(--tv-ease);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.4);
}

.tv-grid__start:hover { transform: scale(1.05); }
.tv-grid__start:active { transform: scale(0.96); }

.tv-grid__close {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: #fff;
    border-radius: 999px;
    padding: 0.55rem 1.1rem;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.tv-grid__close:hover { background: rgba(255, 255, 255, 0.1); }

.tv-grid__body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
    gap: 1rem;
    align-content: start;
    padding: 4px;
}

.tv-grid__card {
    appearance: none;
    border: 0;
    padding: 0;
    text-align: left;
    color: #fff;
    background: transparent;
    cursor: pointer;
    border-radius: 14px;
    outline: none;
    transition: transform 0.3s var(--tv-ease);
}

.tv-grid__card:hover,
.tv-grid__card:focus-visible {
    transform: scale(1.055);
    z-index: 2;
}

.tv-grid__thumb {
    display: block;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    background: #1b1b1e center / cover no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.3s var(--tv-ease), border-color 0.3s var(--tv-ease);
}

.tv-grid__thumb--contain {
    background-size: contain;
    background-color: #0c0c0d;
}

.tv-grid__card:hover .tv-grid__thumb,
.tv-grid__card:focus-visible .tv-grid__thumb {
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.tv-grid__name {
    display: block;
    padding: 0.6rem 0.25rem 0.1rem;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-grid__type {
    display: block;
    padding: 0 0.25rem 0.4rem;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.46);
}

/* ---------- entry button on public homepage ---------- */

.tv-present-entry {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.82);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.tv-present-entry:hover {
    background: #111;
    border-color: #fff;
    color: #fff;
    text-decoration: none;
}

/* ---------- reduced motion & small screens ---------- */

@media (prefers-reduced-motion: reduce) {
    .tv-slide,
    .tv-slide.is-active,
    .tv-hub__card,
    .tv-grid__card {
        transition-duration: 0.01s !important;
    }
}

@media (max-width: 900px) {
    .tv-hub__grid {
        grid-template-columns: 1fr;
        width: min(100%, 24rem);
    }

    .tv-chrome__link:not(.tv-chrome__link--exit),
    .tv-btn--label,
    .tv-chrome__brand,
    .tv-chrome__counter {
        display: none;
    }

    .tv-cue {
        width: auto;
        left: 5%;
        right: 5%;
        bottom: 13%;
    }

    .tv-present-entry { display: none; }
}
