/* The talk decks on the site's own pages: the poster cards and the pop-up
   player. A page with {{DECK_PLAYER}} loads this (build_pages in build.py):
   Promotional Materials, Become a Sponsor and Volunteer. The slides themselves
   are deck.css, inside the player's frame. */

/* The Presentations band on Promotional Materials. */
.dk-intro{max-width:720px;text-align:center}
.dk-grid{width:100%;max-width:1040px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:32px;margin-top:8px}

/* A deck's card: the poster, then a heading, a line or two and its buttons. */
.dk-card{margin:0;display:flex;flex-direction:column;gap:10px}
.dk-poster{position:relative;display:block;border-radius:10px;overflow:hidden;box-shadow:0 1px 2px rgba(0,0,0,.18),0 8px 22px rgba(0,0,0,.14);transition:transform .2s ease,box-shadow .2s ease}
.dk-poster:hover{transform:translateY(-2px);box-shadow:0 2px 4px rgba(0,0,0,.2),0 14px 30px rgba(0,0,0,.2)}
.dk-poster img{display:block;width:100%;height:auto;aspect-ratio:16/9}
.dk-badge{position:absolute;left:12px;bottom:12px;display:inline-flex;align-items:center;gap:7px;padding:6px 12px;border-radius:999px;background:rgba(12,6,7,.74);color:#fff;font:600 13.5px/1.2 var(--font-body)}
.dk-badge .ic{width:16px;height:16px}
.dk-text{flex:1;display:flex;flex-direction:column;gap:10px}
.dk-card h3{font-size:1.25rem;margin:6px 0 0}
.dk-text > p{margin:0;color:#5b4f52}
.dk-text > .dk-actions{flex:1;display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;margin-top:6px}
.btn.dk-pdf{background-image:none;color:var(--red-deep);box-shadow:inset 0 0 0 2px #E9C9CD}

/* One deck on a page about something else, the poster beside its lines. */
.dk-slot{margin-top:clamp(40px,5vw,64px)}
.dk-card.is-wide{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:14px 36px;align-items:center;max-width:920px;margin-inline:auto}
.dk-card.is-wide .dk-text{flex:none}
.dk-card.is-wide .dk-actions{flex:none}

/* The player. */
.dk-player{--dk-w:min(94vw,calc((100vh - 140px) * 16 / 9));width:var(--dk-w);max-width:none;max-height:none;margin:auto;padding:0;border:0;background:none;overflow:visible;color:#fff}
.dk-player::backdrop{background:rgba(12,5,6,.91)}
.dk-player[open]{animation:dk-in .22s ease}
@keyframes dk-in{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}
.dk-head{display:flex;align-items:center;justify-content:space-between;gap:16px;height:52px}
.dk-name{margin:0;font:700 19px/1.2 var(--font-alt);color:#fff}
.dk-close{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 15px;border:0;border-radius:999px;background:rgba(255,255,255,.15);color:#fff;font:600 15px/1 var(--font-body);cursor:pointer}
.dk-close:hover{background:rgba(255,255,255,.26)}
.dk-close .ic{width:18px;height:18px}
.dk-stage{height:calc(var(--dk-w) * 9 / 16 + 56px);border-radius:12px;overflow:hidden;background:#0B0506 center top/100% auto no-repeat}
.dk-stage iframe{display:block;width:100%;height:100%;border:0}
html.dk-open{overflow:hidden}

@media (max-width:760px){
  .dk-grid{grid-template-columns:minmax(0,1fr);gap:28px}
  .dk-card.is-wide{grid-template-columns:minmax(0,1fr)}
}
@media (prefers-reduced-motion:reduce){
  .dk-player[open]{animation:none}
  .dk-poster{transition:none}
}
/* A phone, either way up: the player is the whole screen. */
@media (orientation:portrait) and (max-width:820px),(max-height:520px){
  .dk-player{width:100vw;height:100vh;height:100dvh;margin:0;background:#0B0506}
  .dk-box{display:flex;flex-direction:column;height:100%}
  .dk-head{flex:none;height:46px;padding:0 8px 0 14px}
  .dk-name{font-size:16px}
  .dk-close{min-height:34px}
  .dk-stage{flex:1;height:auto;border-radius:0}
}
/* Held sideways there is little height: Close moves into the black margin. */
@media (max-height:520px){
  .dk-name{display:none}
  .dk-head{position:absolute;top:6px;right:6px;z-index:2;height:auto;padding:0}
}
