@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
    --bg: #0b0e14;
    --bg-panel: #131826;
    --accent: #ff6a3d;
    --accent-2: #3ddbff;
    --text: #f4f6fb;
    --text-dim: #9aa4b8;
    --critical: #ff3b3b;
    --warning: #ffb020;
    --info: #3ddbff;
    --safe-margin: 4vw;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: 'IBM Plex Sans', sans-serif;
}

.stage {
    position: relative;
    width: 100vw;
    height: 100vh;
}

.slide {
    position: absolute;
    inset: 0;
    padding: var(--safe-margin);
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: relay-fade-in 0.6s ease both;
    background-size: cover;
    background-position: center;
}

@keyframes relay-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Category slides with a photo OR video background get a left-to-right dark
   gradient so text stays readable on the left while the imagery shows
   through on the right — an editorial-graphics look rather than flat text
   on black. Z-index is explicit throughout (video: 0, gradient: 1, content:
   2, credit: 3) to avoid relying on DOM order / stacking-context guesswork. */
.slide.has-bg-video > .bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.slide.has-bg-photo::before,
.slide.has-bg-video::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 14, 20, 0.96) 0%, rgba(11, 14, 20, 0.82) 42%, rgba(11, 14, 20, 0.32) 100%);
    z-index: 1;
}

.slide.has-bg-photo > *,
.slide.has-bg-video > * {
    position: relative;
    z-index: 2;
}

.slide.has-bg-photo > .photo-credit,
.slide.has-bg-video > .photo-credit {
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    font-size: 0.68rem;
    color: rgba(244, 246, 251, 0.35);
    z-index: 3;
}

/* Persistent brand mark, top-left, on top of every slide. */
.brand {
    position: fixed;
    top: var(--safe-margin);
    left: var(--safe-margin);
    z-index: 50;
    display: flex;
    align-items: center;
}

.brand img {
    height: clamp(38px, 5.5vh, 64px);
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.55));
}

.module-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-2);
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    margin-bottom: 1.5rem;
}

.module-header i {
    color: var(--accent);
}

.module-body h2 {
    font-family: 'Archivo', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.1;
    margin: 0 0 1rem;
}

.module-body p {
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    color: var(--text-dim);
    max-width: 60ch;
}

.headline-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.headline-list li {
    font-size: clamp(1rem, 1.6vw, 1.4rem);
    color: var(--text-dim);
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
}

.headline-list li.headline-primary {
    color: var(--text);
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 600;
    border-left-color: var(--accent-2);
}

.headline-source {
    color: var(--text-dim);
    font-size: 0.85em;
    font-style: italic;
}

.media-fill {
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
}

/* Shown only when the display is pinned to one module via ?preview=<key>. */
body.relay-preview::after {
    content: 'PREVIEW';
    position: fixed;
    bottom: 8px;
    right: 12px;
    font: 700 0.8rem 'Archivo', sans-serif;
    letter-spacing: 0.1em;
    color: var(--bg);
    background: var(--accent-2);
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 200;
    opacity: 0.85;
}

.today-columns {
    display: flex;
    gap: 4rem;
    width: 100%;
}

.today-columns > div {
    flex: 0 1 auto;
    min-width: 20ch;
}

.today-columns h3 {
    font-family: 'Archivo', sans-serif;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: clamp(1.3rem, 2vw, 1.9rem);
    margin: 0 0 1rem;
}

.today-columns .headline-list {
    gap: 1.1rem;
}

.today-columns .headline-list li {
    font-size: clamp(1.2rem, 2.2vw, 2rem);
}

/* Birthdays slide — big celebratory names. */
.birthday-list li.headline-primary {
    border-left-color: var(--accent);
    font-size: clamp(1.8rem, 3.5vw, 3rem);
}

/* Recently Launched showcase — up to 3 cards of screenshot + title + blurb. */
.launch-cards {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    width: 100%;
}

.launch-card {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-panel);
    border-radius: 12px;
    overflow: hidden;
}

.launch-shot {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg);
}

.launch-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.launch-meta {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.launch-meta h3 {
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: clamp(1.1rem, 1.8vw, 1.6rem);
    margin: 0;
    color: var(--text);
}

.launch-meta p {
    margin: 0;
    color: var(--text-dim);
    font-size: clamp(0.9rem, 1.3vw, 1.15rem);
}

.launch-url {
    font-family: 'Archivo', sans-serif;
    font-size: 0.9rem;
    color: var(--accent-2);
}

/* --- Grab: recent client media ------------------------------------------ */
/* Ported from the internal relay-server so both boards render Grab media the
   same way. The server sends either a single video item (played full-screen
   via .media-fill) or up to 10 images — items[0] is the hero, the rest fill a
   3x3 grid. */

/* Sits inside the standard slide frame (safe-margin padding) like every other
   page, rather than bleeding edge-to-edge. The slide carries no header and no
   caption, so the collage gets the full frame. */
.slide-grab {
    gap: 1rem;
}

/* 1 large hero + a 3×3 grid of smaller tiles. object-fit:contain shows each 3:4
   portrait graphic in full (no top/bottom crop). */
.grab-collage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    gap: 0.5rem;
    border-radius: 12px;
    overflow: hidden;
}

.grab-hero {
    flex: 0 0 40%;
    height: 100%;
    overflow: hidden;
}

.grab-hero img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.grab-grid {
    flex: 1 1 auto;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 0.5rem;
}

.grab-tile {
    overflow: hidden;
    background: var(--bg-panel);
    border-radius: 6px;
}

.grab-tile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.grab-tile-empty {
    background: var(--bg-panel);
}

