/* The music page is a Wallflower page and wears wallflower.css. What it adds
   is room for pictures: some of them run from one edge of the window to the
   other instead of staying in the column, because the dashboard taking on a
   cover's colors is something to look at more than something to read. */

/* A picture that runs to the window's edges is 100vw wide, and 100vw counts
   a classic scrollbar, so it would reach under the scrollbar and scroll the
   page sideways by its width. Clipping at the root cuts that sliver off without making the root a
   scroll container. */
html {
    overflow-x: clip;
}

/* The page opens on a wall at night, from the bar to the window's edges: the
   iPad between its speakers, and the title on the wall above them, larger than
   the column's. The drawing keeps all of the speakers and the room above them
   in view and grows more wall or shelf to fill the band. Its shelf fades into
   the page, and the page's text begins on the fade: the band pulls what
   follows up by that much. */
#main .cover {
    --scene: min(99.4vw, 85vh);
    position: relative;
    width: 100vw;
    margin-inline: calc(50% - 50vw);
    margin-block: 0 calc(var(--scene) * -.24);
    color: #ffffff;
}

#main .cover ~ * {
    position: relative;
}

/* The way back to Wallflower's page, right over the title, at the start of
   the page's text column: the titles are wider than the column, so it is
   pushed in by half the difference, the column's 26em divided by the link's
   own size. */
#main .cover .back {
    align-self: flex-start;
    margin-inline-start: max(0px, calc((100% - 26em / .8) / 2));
    display: inline-flex;
    align-items: center;
    gap: .3em;
    margin-bottom: .4em;
    color: rgba(255, 255, 255, .75);
    font-size: .8em;
    font-weight: 500;
    text-decoration: none;
}

#main .cover .back:hover {
    color: #ffffff;
}

#main .cover .back .chevron {
    width: .9em;
    height: .9em;
    transform: scaleX(-1);
}

#main .cover .back .chevron:dir(rtl) {
    transform: none;
}

/* The title is centred in the wall above the iPad. The drawing is scaled to
   fit the band, by its width or its height, whichever is tighter, and the
   iPad's top is 1050 of its units above the band's bottom edge. */
#main .cover .titles {
    position: absolute;
    inset-inline: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    height: calc(var(--scene) - 1050 * min(100vw / 1560, var(--scene) / 1550));
    max-width: calc(40em + var(--safe-start) + var(--safe-end));
    margin-inline: auto;
    padding-block: 0;
    padding-inline: calc(3em + var(--safe-start)) calc(3em + var(--safe-end));
    text-align: center;
}

/* One line wherever it can be: on two, it would reach down onto the iPad. */
#main .cover h1 {
    margin: 0;
    color: #ffffff;
    font-size: min(2.6em, 7.5vw);
}

#main .cover .scene {
    display: block;
    width: 100%;
    height: var(--scene);
}

#main .cover + .appstore {
    margin-block: 0 1.5em;
}

@media only screen and (max-width: 700px) {
    /* Taller than the drawing, so the title, on two lines here, has wall of
       its own above the iPad. */
    #main .cover {
        --scene: 112vw;
    }

    #main .cover .titles {
        padding-inline: calc(2em + var(--safe-start)) calc(2em + var(--safe-end));
    }

    #main .cover .back {
        font-size: 1em;
    }

    #main .cover h1 {
        font-size: 2.2em;
    }
}

/* A paragraph that stands for a section of its own, without a heading, and
   gets a heading's room instead. */
#main .statement {
    margin-block: 2.5em;
}

/* No video plays on this page, so a device shot can cast a drop-shadow,
   which follows each device's own outline, rather than index.css's
   box-shadow, whose corner is the 13-inch iPad's. */
#main .device {
    box-shadow: none;
    filter: drop-shadow(0 .75em 2.5em rgba(0, 0, 0, .35));
}

/* A detail worth knowing rather than a point the page makes: small, quiet,
   outlined in the page's quiet ink, with an info mark in front of it. */
#main .info {
    position: relative;
    padding: .75em 1em;
    padding-inline-start: 3.2em;
    margin-block-start: 3em;
    border: 2px solid var(--quiet-color);
    border-radius: 1em;
    color: var(--quiet-color);
    font-size: .6em;
}

/* On a phone the page's text is half its size, and .6em of it would be too
   small to read. */
@media only screen and (max-width: 700px) {
    #main .info {
        font-size: .9em;
    }
}

/* The mark stands at the first line, centred on it: the padding, half the
   1.4 line height, less half the mark. */
#main .info .icon {
    position: absolute;
    inset-inline-start: .9em;
    top: .6em;
    width: 1.7em;
    height: 1.7em;
}

#main .info strong {
    color: inherit;
}

/* The badges as the music tile sets them: small, outlined, in the page's
   ink. A list, because that's what they are. */
#main .badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5em;
    margin-block: 1em 2em;
    padding: 0;
    list-style: none;
}

#main .badges li {
    margin: 0;
    padding: .2em .6em;
    border: 2px solid currentColor;
    border-radius: .45em;
    font-size: .55em;
    font-weight: 700;
    white-space: nowrap;
}

/* The setup steps, numbered in discs of the page's ink: few enough to take
   in at once, which is the point of them. */
#main .steps {
    list-style: none;
    padding: 0;
    counter-reset: step;
}

#main .steps li {
    position: relative;
    margin-block: 0 .75em;
    padding-inline-start: 1.9em;
    counter-increment: step;
}

#main .steps li::before {
    content: counter(step);
    position: absolute;
    inset-inline-start: 0;
    top: .05em;
    width: 1.3em;
    height: 1.3em;
    border-radius: 50%;
    background: #000000;
    color: #ffffff;
    font-size: .9em;
    line-height: 1.3em;
    text-align: center;
}

@media (prefers-color-scheme: dark) {
    #main .steps li::before {
        background: #ff9500;
        color: #000000;
    }
}
