/* Advent of Analyzers: Indico header banner.
   Paste into: event management, Settings -> Layout -> Stylesheet.
   The image is assets/aoa2026-header-globe-4to1.jpg, uploaded via
   https://indico.cern.ch/event/1736195/manage/images/
   Photo: Maximilien Brice / CERN, "Globe under snow" (https://cds.cern.ch/record/1311150)

   NOTE: the banner shows a hard-coded title and subtitle (see ::before / ::after below).
   If the Indico event title is renamed, update the text here as well. */

/* Height: 240 px up to a 1280 px wide window, then it grows with the width (18.75vw, max 400 px),
   so every screen shows the same view: the whole Globe and snow at the bottom.
   The photo fills the width, so horizontal % positions match the photo. */
.confTitleBox {
    position: relative;
    height: min(max(240px, 18.75vw), 400px);
    background:
        radial-gradient(ellipse 30% 55% at 61% 30%, rgba(0, 25, 60, 0.35) 0%, rgba(0, 25, 60, 0) 100%),
        url("https://indico.cern.ch/event/1736195/images/51649-aoa2026-header-globe-4to1.jpg") center 65% / cover no-repeat;
    border: none;
}

/* Above ~2130 px the height stops at 400 px, so move the view up to keep the top of the Globe visible. */
@media (min-width: 2140px) {
    .confTitleBox { background-position: center, center 45%; }
}

/* Title in the open sky between the Globe (ends at ~46%) and the tree (starts at ~76%). */
.confTitleBox .confTitle {
    position: absolute;
    left: 48%;
    top: 12%;
    width: 27%;
    margin: 0;
    padding: 0;
    float: none;
    text-align: center;
}

.confTitleBox .confTitle h1 {
    margin: 0;
    padding: 0;
    line-height: 1.15;
}

.confTitleBox .confTitle h1 a {
    text-decoration: none !important;
}

/* Hide the original one-line title text on the banner (it stays in the page for search and screen readers) */
.confTitleBox .confTitle h1,
.confTitleBox .confTitle h1 a,
.confTitleBox .conference-title-link,
.confTitleBox .conference-title-link > span {
    font-size: 0 !important;
    line-height: 0 !important;
}

/* Title and subtitle */
.confTitleBox .conference-title-link::before,
.confTitleBox .conference-title-link::after {
    display: block;
    line-height: 1.15;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.confTitleBox .conference-title-link::before {
    content: "Advent of Analyzers";
    font-size: clamp(22px, 2.4vw, 40px);
    font-weight: bold;
}

.confTitleBox .conference-title-link::after {
    content: "FCCAnalyses hackathon";
    font-size: clamp(14px, 1.35vw, 22px);
    font-weight: normal;
    margin-top: 0.3em;
}

/* Small screens: too little room beside the Globe. The image is scaled to a fixed 260 px height
   (1040 px wide) and shifted so the Globe (centre at x = 382 px) is always in the middle of the screen.
   calc(50% + 138px) puts the image's left edge at (screen width / 2 - 382 px).
   The centred title sits in the sky above the dome (the top of the Globe is ~58 px from the top). */
@media (max-width: 768px) {
    .confTitleBox {
        height: 260px;
        background:
            linear-gradient(to bottom, rgba(0, 25, 60, 0.45) 0%, rgba(0, 25, 60, 0) 30%),
            url("https://indico.cern.ch/event/1736195/images/51649-aoa2026-header-globe-4to1.jpg") calc(50% + 138px) top / auto 260px no-repeat;
    }
    .confTitleBox .confTitle {
        position: static;
        width: auto;
        padding: 6px 12px 0;
    }
    .confTitleBox .conference-title-link::before { font-size: 21px; }
    .confTitleBox .conference-title-link::after { font-size: 13px; margin-top: 0.15em; }
}