/* Media Kit — poster-style one-sheet */

/* Drop Unicephalon font files into /fonts; Orbitron is the fallback. */
@font-face {
    font-family: 'Unicephalon';
    /* filename is case-sensitive on the Linux/Docker server */
    src: url('fonts/unicephalon.ttf') format('truetype');
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Same tokens as styles.css */
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-tulip: #d948ec;
    --accent-daisy: #fbdb24;
    --bg-dark: #0a0a0f;

    --display: 'Unicephalon', 'Orbitron', sans-serif;
    --ink: #1b1537;
    --brand: #4338ca;
    --box: #4f46e5;
    --paper: #fbf9ff;
    --poster-bg: #ece8ff;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg-dark);
    color: var(--ink);
    line-height: 1.5;
    padding: 32px 16px 48px;
    overflow-x: hidden;
}

/* ── Poster canvas ─────────────────────────────────────────────────────────── */
/* The wrapper is the size container, so every cqi unit (including the poster's
   own padding/columns) is relative to the poster width, not the viewport. */
.poster-wrap {
    container-type: inline-size;
    width: min(1000px, 100%);
    margin: 0 auto;
}

.poster {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    padding: 4cqi 4cqi 2.4cqi;
    /* clip (not hidden) keeps aspect-ratio as a minimum, so content is never cut off */
    overflow: clip;
    border-radius: 18px;
    background: var(--poster-bg);
    box-shadow: 0 0 60px rgba(99, 102, 241, 0.35);

    display: grid;
    grid-template-columns: 56cqi 1fr;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
        "name    name"
        "stats   ."
        "about   ticket"
        "contact contact";
    column-gap: 3cqi;
}

/* Blurred, tinted zoom of the art behind everything (like the example) */
.poster-bg {
    position: absolute;
    inset: -10%;
    background:
        linear-gradient(160deg, rgba(236, 232, 255, 0.55) 0%, rgba(199, 190, 255, 0.55) 100%),
        url('img/leo.png') 30% 20% / 90% no-repeat;
    filter: blur(14px) saturate(0.8);
    opacity: 0.55;
    z-index: 0;
}

.poster > *:not(.poster-bg) {
    position: relative;
    z-index: 2;
}

/* ── Giant name ────────────────────────────────────────────────────────────── */
.name {
    grid-area: name;
    font-family: var(--display);
    font-weight: 900;
    text-transform: uppercase;
    color: var(--brand);
    line-height: 0.82;
    letter-spacing: -0.02em;
    z-index: 1 !important;
}

.name-top {
    display: block;
    font-size: 9.6cqi;
}

.name-main {
    display: block;
    font-size: 19cqi;
    margin-top: 1cqi;
}

/* ── Character art ─────────────────────────────────────────────────────────── */
.leo-art {
    position: absolute !important;
    right: -7cqi;
    top: 12cqi;
    width: 58cqi;
    height: auto;
    z-index: 3 !important;
    filter: drop-shadow(0 1cqi 2cqi rgba(27, 21, 55, 0.35));
    /* the bust is cropped flat at the bottom; fade it out behind the ticket */
    -webkit-mask-image: linear-gradient(to bottom, #000 85%, transparent);
    mask-image: linear-gradient(to bottom, #000 85%, transparent);
    pointer-events: none;
}

/* ── Stat boxes ────────────────────────────────────────────────────────────── */
.stats {
    grid-area: stats;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3cqi;
    margin: 2.5cqi 0 3cqi 1cqi;
    z-index: 4 !important;
}

.stat-box {
    background: var(--box);
    color: #fff;
    border: 0.5cqi solid #fff;
    border-radius: 3.2cqi;
    box-shadow: 0 0 0 0.9cqi var(--box), 0 1.2cqi 2cqi rgba(27, 21, 55, 0.25);
    padding: 1.2cqi 1.2cqi;
    text-align: center;
}

.stat-box-wide {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.4cqi;
    padding: 1.2cqi;
}

.stat-box h2 {
    font-family: var(--display);
    font-weight: 900;
    font-size: 2.7cqi;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
    margin-bottom: 0.6cqi;
}

.stat-box-wide h2 {
    margin-bottom: 0;
}

.stat-box p {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: 2.3cqi;
    line-height: 1.35;
    text-transform: uppercase;
}

.stat {
    color: var(--accent-daisy);
}

/* ── About card ────────────────────────────────────────────────────────────── */
.about {
    grid-area: about;
    align-self: start;
    background: var(--paper);
    border: 0.7cqi solid var(--box);
    border-radius: 5cqi 5cqi 2cqi 2cqi;
    padding: 1.8cqi 2.4cqi 2cqi;
    text-align: center;
    font-size: 1.5cqi;
    line-height: 1.42;
    box-shadow: 0 1.5cqi 3cqi rgba(27, 21, 55, 0.2);
    z-index: 4 !important;
}

.about h2 {
    font-family: var(--display);
    font-weight: 900;
    font-size: 3.2cqi;
    color: var(--ink);
    line-height: 1.1;
    margin-bottom: 1.1cqi;
}

.about p + p {
    margin-top: 1cqi;
}

.about code {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.95em;
    padding: 0 0.4em;
    border-radius: 0.3em;
    background: rgba(99, 102, 241, 0.14);
    color: var(--brand);
}

.about strong {
    color: var(--brand);
}

.about .tulip {
    color: #b21fc9;
}

.about .daisy {
    color: #a07d00;
}

.about-cta {
    font-family: var(--display);
    font-weight: 900;
    color: var(--brand);
    font-size: 1.9cqi;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── Schedule ticket (sits over the bottom edge of the art) ────────────────── */
.ticket {
    grid-area: ticket;
    align-self: start;
    justify-self: center;
    margin-top: -2cqi;
    width: 30cqi;
    padding: 2.6cqi 2.4cqi 2.4cqi;
    background: #fff;
    border: 0.4cqi dashed var(--box);
    border-radius: 1.6cqi;
    box-shadow: 0 0 0 1.2cqi #fff, 0 1.6cqi 3cqi rgba(27, 21, 55, 0.3);
    text-align: center;
    transform: rotate(4deg);
    z-index: 5 !important;
}

.ticket-label {
    font-family: var(--display);
    font-weight: 900;
    font-size: 1.7cqi;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--secondary-color);
}

.ticket-days {
    font-family: var(--display);
    font-weight: 900;
    font-size: 2.9cqi;
    white-space: nowrap;
    text-transform: uppercase;
    color: var(--brand);
    line-height: 1.2;
    margin: 0.6cqi 0;
}

.ticket-time {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    font-size: 3cqi;
    color: var(--ink);
}

.ticket-time span {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 1.5cqi;
    color: #5b5578;
}

.ticket-live {
    display: inline-flex;
    align-items: center;
    gap: 0.8cqi;
    margin-top: 1.2cqi;
    padding: 0.5cqi 1.4cqi;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 1.35cqi;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ticket-live .dot {
    width: 1cqi;
    height: 1cqi;
    border-radius: 50%;
    background: #ff3b5c;
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.sticker {
    position: absolute;
    display: grid;
    place-items: center;
    font-weight: 900;
    line-height: 1;
}

.sticker-star {
    left: -6cqi;
    bottom: -5cqi;
    width: 10cqi;
    height: 10cqi;
    font-size: 10cqi;
    color: var(--box);
    transform: rotate(-14deg);
    text-shadow: 0 0 0 #fff, 0.4cqi 0.4cqi 0 #fff, -0.4cqi -0.4cqi 0 #fff, 0.4cqi -0.4cqi 0 #fff, -0.4cqi 0.4cqi 0 #fff;
}

.sticker-code {
    right: -2.5cqi;
    top: -3.5cqi;
    padding: 0.8cqi 1.4cqi;
    font-family: 'Orbitron', monospace;
    font-size: 2.4cqi;
    color: var(--ink);
    background: var(--accent-daisy);
    border: 0.4cqi solid #fff;
    border-radius: 1.2cqi;
    transform: rotate(12deg);
    box-shadow: 0 0.6cqi 1.2cqi rgba(27, 21, 55, 0.3);
}

/* ── Contact strip ─────────────────────────────────────────────────────────── */
.contact {
    grid-area: contact;
    display: flex;
    align-items: center;
    gap: 2.6cqi;
    margin-top: 2.5cqi;
    z-index: 4 !important;
}

.qr {
    flex: none;
    width: 17cqi;
    padding: 1.2cqi;
    background: #fff;
    border-radius: 1.4cqi;
    box-shadow: 0 0.8cqi 1.6cqi rgba(27, 21, 55, 0.2);
}

.qr svg {
    display: block;
    width: 100%;
    height: auto;
}

.qr svg path,
.qr svg rect[fill="black"] {
    fill: var(--ink);
}

.links {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 1.4cqi 3.5cqi;
    min-width: 0;
}

.links li {
    display: flex;
    align-items: center;
    gap: 1.2cqi;
    min-width: 0;
}

.links a {
    font-family: 'Roboto Slab', serif;
    font-weight: 500;
    font-size: 1.9cqi;
    color: var(--ink);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.links a:hover {
    color: var(--brand);
    text-decoration: underline;
}

.ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 3.4cqi;
    height: 3.4cqi;
    border-radius: 0.9cqi;
    color: #fff;
}

.ico svg {
    width: 62%;
    height: 62%;
}

.ico-mail { background: var(--brand); }
.ico-twitch { background: #9146ff; }
.ico-yt { background: #ff0000; }
.ico-x { background: #000; }
.ico-discord { background: #5865f2; }

.credit {
    position: absolute !important;
    right: 4cqi;
    bottom: 2cqi;
    font-size: 1.5cqi;
    color: var(--ink);
    opacity: 0.8;
    z-index: 4 !important;
}

/* ── Buttons below the poster ──────────────────────────────────────────────── */
.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.action-btn {
    font-family: var(--display);
    font-weight: 900;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 24px;
    border-radius: 999px;
    border: 2px solid var(--primary-color);
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
}

.action-ghost {
    background: transparent;
    color: #c7c9ff;
}

/* ── Phones / narrow screens: reflow into a single column ──────────────────── */
@media (max-width: 760px) {
    body {
        padding: 16px 16px 40px;
    }

    .poster {
        aspect-ratio: auto;
        padding: 20px 16px 16px;
        grid-template-columns: 1fr;
        grid-template-areas:
            "name"
            "art"
            "ticket"
            "stats"
            "about"
            "contact"
            "credit";
    }

    .name-top { font-size: 10.5cqi; }
    .name-main { font-size: 30cqi; }

    .leo-art {
        grid-area: art;
        position: relative !important;
        right: auto;
        top: auto;
        width: 86%;
        justify-self: center;
        margin-top: -6cqi;
        -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent);
        mask-image: linear-gradient(to bottom, #000 80%, transparent);
    }

    .ticket {
        width: 78%;
        margin-top: -14cqi;
        padding: 16px 14px;
        border-width: 2px;
        border-radius: 12px;
        box-shadow: 0 0 0 8px #fff, 0 10px 20px rgba(27, 21, 55, 0.3);
        transform: rotate(-3deg);
    }

    .ticket-label { font-size: 0.75rem; }
    .ticket-days { font-size: 1.5rem; margin: 4px 0; }
    .ticket-time { font-size: 1.3rem; }
    .ticket-time span { font-size: 0.75rem; }
    .ticket-live { font-size: 0.65rem; gap: 6px; margin-top: 8px; padding: 3px 10px; }
    .ticket-live .dot { width: 7px; height: 7px; }

    .sticker-star { font-size: 3.2rem; width: 3.2rem; height: 3.2rem; left: -18px; bottom: -22px; }
    .sticker-code { font-size: 0.9rem; right: -12px; top: -16px; padding: 4px 8px; border-width: 2px; border-radius: 8px; }

    .stats {
        margin: 36px 6px 28px;
        gap: 18px;
    }

    .stat-box {
        border-width: 3px;
        border-radius: 16px;
        box-shadow: 0 0 0 5px var(--box), 0 8px 16px rgba(27, 21, 55, 0.25);
        padding: 12px 8px;
    }

    .stat-box-wide { gap: 12px; padding: 10px; }
    .stat-box h2 { font-size: 0.95rem; margin-bottom: 4px; }
    .stat-box p { font-size: 0.85rem; }

    .about {
        font-size: 0.95rem;
        border-width: 4px;
        border-radius: 24px 24px 12px 12px;
        padding: 18px 16px 20px;
    }

    .about h2 { font-size: 1.6rem; margin-bottom: 10px; }
    .about p + p { margin-top: 10px; }
    .about-cta { font-size: 0.9rem; }

    .contact {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        margin-top: 24px;
    }

    .qr {
        width: 150px;
        padding: 10px;
        border-radius: 10px;
        align-self: center;
    }

    .links { grid-template-columns: 1fr; gap: 8px; }
    .links li { gap: 10px; }
    .links a { font-size: 0.95rem; }
    .ico { width: 28px; height: 28px; border-radius: 7px; }

    .credit {
        grid-area: credit;
        position: static !important;
        justify-self: center;
        font-size: 0.75rem;
        margin-top: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ticket-live .dot { animation: none; }
    .action-btn { transition: none; }
}

/* ── Print / Save as PDF: poster fills one page ────────────────────────────── */
@media print {
    @page {
        size: 1000px 1334px;
        margin: 0;
    }

    html, body {
        background: var(--poster-bg);
        padding: 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .poster-wrap {
        width: 1000px;
    }

    .poster {
        height: 1334px;
        border-radius: 0;
        box-shadow: none;
    }

    .actions {
        display: none;
    }

    .ticket-live .dot {
        animation: none;
    }
}
