/* =====================================================================
   TALKS - cinema layout
   Left: big featured screen (plays inline, 3D tilt, 3D flip when the talk changes)
   Right: playlist of all talks, each lifts toward you in 3D on hover.
   ===================================================================== */
.talks3d { position: relative; padding: 120px 0 110px; overflow: hidden; }
.talks3d::before { content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(55% 55% at 35% 60%, rgba(32,156,207,.10), transparent 70%), radial-gradient(35% 40% at 95% 20%, rgba(255,0,51,.06), transparent 70%); }

/* ---- heading row ---- */
.t3-head { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 44px; }
.t3-heading { margin: 12px 0 0; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(3rem, 6.4vw, 6.6rem); line-height: .95; letter-spacing: -.02em; color: #fff; }
.t3-heading em { font-style: italic; color: #c7cf15; }
.t3-sub { margin: 14px 0 0; max-width: 520px; font-size: 1.02rem; line-height: 1.65; color: rgba(255,255,255,.65); }
.t3-yt { flex: none; display: inline-flex; gap: 10px; align-items: center; padding: 13px 22px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .92rem;
    color: #fff; background: #ff0033; box-shadow: 0 14px 30px -12px rgba(255,0,51,.6); transition: .3s; }
.t3-yt:hover { transform: translateY(-2px); background: #e6002e; }
.t3-yt i { font-size: 1.15rem; }

/* ---- cinema grid ---- */
.t4-cinema { position: relative; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: clamp(22px, 2.6vw, 40px); align-items: stretch; }

/* featured screen */
.t4-screen-wrap { perspective: 1600px; }
.t4-screen {
    position: relative; aspect-ratio: 16 / 9; border-radius: 26px; overflow: hidden; background: #000; transform-style: preserve-3d;
    box-shadow: 0 60px 120px -40px rgba(0,0,0,.95), 0 0 0 1px rgba(32,156,207,.45), 0 0 80px -30px rgba(32,156,207,.35);
    transform: rotateX(calc(var(--py, 0) * -4deg)) rotateY(calc(var(--px, 0) * 6deg)); transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.t4-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.t4-screen:hover .t4-poster { transform: scale(1.08); }
.t4-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(3,3,3,.15) 0%, rgba(3,3,3,0) 35%, rgba(3,3,3,.88) 100%); }
.t4-play {
    position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 2; width: clamp(78px, 7vw, 110px); aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer;
    display: grid; place-items: center; font-size: clamp(1.3rem, 1.8vw, 1.8rem); color: #ffffff;
    background: linear-gradient(145deg, #4fc0ec, #209ccf 55%, #15729a); box-shadow: 0 20px 60px -10px rgba(32,156,207,.65), inset 0 1px 0 rgba(255,255,255,.7); transition: transform .35s;
}
.t4-play i { margin-left: 5px; }
.t4-play:hover { transform: translate(-50%, -50%) scale(1.08); }
.t4-ring { position: absolute; inset: -12px; border-radius: 50%; border: 1px solid rgba(32,156,207,.55); animation: t4pulse 2.4s ease-out infinite; pointer-events: none; }
@keyframes t4pulse { 0% { transform: scale(.88); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
.t4-caption { position: absolute; left: clamp(20px, 3vw, 40px); right: clamp(20px, 3vw, 40px); bottom: clamp(18px, 3vw, 36px); z-index: 2; display: grid; gap: 8px; pointer-events: none; }
.t4-tag { display: inline-flex; gap: 8px; align-items: center; width: fit-content; padding: 6px 13px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: #fff; background: rgba(4,4,4,.6); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.18); }
.t4-tag i { color: #ff3d3d; }
.t4-title { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(2rem, 3.6vw, 3.6rem); line-height: 1; color: #fff; text-shadow: 0 6px 30px rgba(0,0,0,.6); }
.t4-full { font-size: .9rem; color: rgba(255,255,255,.7); }
.t4-screen.is-playing .t4-poster, .t4-screen.is-playing .t4-shade, .t4-screen.is-playing .t4-play, .t4-screen.is-playing .t4-caption { display: none; }
.t4-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3; }

/* playlist */
.t4-list-wrap { display: flex; flex-direction: column; min-height: 0; padding: 18px; border-radius: 26px;
    background: linear-gradient(160deg, rgba(22,22,24,.75), rgba(6,6,7,.6)); border: 1px solid rgba(255,255,255,.08); }
.t4-list-label { padding: 2px 6px 12px; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.t4-list { list-style: none; margin: 0; padding: 0 4px 0 0; display: grid; gap: 8px; overflow-y: auto; max-height: 100%; perspective: 900px; scrollbar-width: thin; scrollbar-color: rgba(32,156,207,.4) transparent; }
.t4-item {
    width: 100%; display: grid; grid-template-columns: 128px 1fr; gap: 14px; align-items: center; padding: 8px; border-radius: 16px; cursor: pointer; text-align: left;
    background: transparent; border: 1px solid transparent; color: inherit; font: inherit;
    transform-origin: left center; transition: transform .4s cubic-bezier(.2,.8,.2,1), background .3s, border-color .3s;
}
.t4-item:hover { background: rgba(255,255,255,.04); transform: translateX(6px) rotateY(-8deg) translateZ(20px); }
.t4-item.is-active { background: rgba(32,156,207,.1); border-color: rgba(32,156,207,.45); }
.t4-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.t4-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.t4-item:hover .t4-thumb img { transform: scale(1.08); }
.t4-thumb i { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    font-size: .7rem; padding-left: 2px; color: #050505; background: rgba(255,255,255,.9); opacity: 0; transition: opacity .3s; }
.t4-item:hover .t4-thumb i, .t4-item.is-active .t4-thumb i { opacity: 1; }
.t4-item.is-active .t4-thumb i { background: #209ccf; }
.t4-info { display: grid; gap: 3px; min-width: 0; }
.t4-info small { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: #c7cf15; }
.t4-info strong { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 1.15rem; line-height: 1.15; color: #fff; }

@media (max-width: 1000px) {
    .t4-cinema { grid-template-columns: 1fr; }
    .t4-list-wrap { padding: 14px; }
    .t4-list { grid-auto-flow: column; grid-auto-columns: 220px; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; }
    .t4-item { grid-template-columns: 1fr; }
    .t4-item:hover { transform: none; }
}
@media (max-width: 760px) {
    .talks3d { padding: 90px 0 70px; }
    .t3-head { flex-direction: column; align-items: flex-start; }
    .t4-play { width: 64px; }
}
@media (prefers-reduced-motion: reduce) { .t4-ring { animation: none; } .t4-screen { transform: none; transition: none; } }

/* desktop: playlist is exactly as tall as the featured screen and scrolls inside */
@media (min-width: 1001px) {
    .t4-list-wrap { position: relative; }
    .t4-list { position: absolute; left: 18px; right: 14px; top: 48px; bottom: 18px; max-height: none; align-content: start; }
}

/* =====================================================================
   Playlist fix: no inner scroll, no 3D skew - a clean, fully visible list
   ===================================================================== */
.t4-cinema { align-items: start; }
@media (min-width: 1001px) {
    .t4-list-wrap { position: static; padding: 16px; }
    .t4-list { position: static !important; inset: auto !important; overflow: visible !important; max-height: none !important; gap: 6px; }
}
.t4-list { perspective: none !important; }
.t4-item {
    grid-template-columns: 112px 1fr; gap: 14px; padding: 8px 10px; border-radius: 14px;
    transform: none !important; transform-origin: center;
}
.t4-item:hover { transform: none !important; background: rgba(32,156,207,.10); border-color: rgba(32,156,207,.35); }
.t4-item.is-active { background: linear-gradient(90deg, rgba(32,156,207,.18), rgba(32,156,207,.04)); border-color: rgba(32,156,207,.55); }
.t4-item.is-active::before { content: ""; position: absolute; left: -16px; top: 18%; bottom: 18%; width: 3px; border-radius: 3px; background: #c7cf15; }
.t4-item { position: relative; }
.t4-thumb { border-radius: 9px; }
.t4-info small { font-size: .64rem; letter-spacing: .14em; }
.t4-info strong { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; font-size: .98rem; line-height: 1.3; letter-spacing: -.005em; }
.t4-list-label { display: flex; justify-content: space-between; align-items: center; }
@media (max-width: 1000px) {
    .t4-item { grid-template-columns: 1fr; }
    .t4-item.is-active::before { left: 10%; right: 10%; top: auto; bottom: -6px; width: auto; height: 3px; }
}

/* =====================================================================
   Playlist = exactly as tall as the featured screen, scrolls inside
   ===================================================================== */
@media (min-width: 1001px) {
    .t4-cinema { align-items: stretch; }
    .t4-list-wrap { position: relative; display: flex; flex-direction: column; min-height: 0; padding: 16px 10px 16px 16px; }
    /* the list is taken out of flow so the wrap never grows taller than the screen */
    .t4-list {
        position: absolute !important; left: 16px; right: 8px; top: 52px; bottom: 14px; inset: 52px 8px 14px 16px !important;
        overflow-y: auto !important; overflow-x: hidden; max-height: none !important;
        padding: 6px 8px 6px 4px; align-content: start; scroll-behavior: smooth; overscroll-behavior: contain;
        -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18px, #000 calc(100% - 26px), transparent 100%);
                mask-image: linear-gradient(180deg, transparent 0, #000 18px, #000 calc(100% - 26px), transparent 100%);
        scrollbar-width: thin; scrollbar-color: rgba(32,156,207,.55) rgba(255,255,255,.04);
    }
    .t4-list::-webkit-scrollbar { width: 6px; }
    .t4-list::-webkit-scrollbar-track { background: rgba(255,255,255,.04); border-radius: 6px; }
    .t4-list::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #c7cf15, #209ccf); border-radius: 6px; }
    .t4-item.is-active::before { left: -4px; }
}
.t4-list-label .t4-count { font-family: 'Space Grotesk', sans-serif; letter-spacing: .1em; color: #c7cf15; }
