/* VISION Links. Colours and type after visionrecordings.nl. */
:root {
    --slate: #15181c;
    --ebony: #020308;
    --line: rgba(255, 255, 255, 0.14);
    --text: #ffffff;
    --muted: #b2bac5;
    --dim: #6c7c91;
    --heading: 'bebas-neue-pro-expanded', 'Arial Narrow', Arial, Helvetica, sans-serif;
    --body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--slate);
    color: var(--text);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
}

/* On a preview from Nova: this is not what the public sees yet. */
.preview {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 0;
    padding: max(8px, env(safe-area-inset-top)) 16px 8px;
    background: var(--text);
    color: var(--ebony);
    font-family: var(--heading);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
}

/* The artwork (or the page's own background), blurred and darkened. */
.backdrop {
    position: fixed;
    inset: -80px;
    width: calc(100% + 160px);
    height: calc(100% + 160px);
    object-fit: cover;
    filter: blur(48px) brightness(0.3) saturate(1.1);
    /* Its own layer: the blur is painted once, not on every scroll frame. */
    transform: translateZ(0);
    z-index: -1;
    pointer-events: none;
}

.page {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    /* Clear of the notch and the home bar, in any orientation. */
    padding: max(32px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(48px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

/* The padding is for thumbs: the logo is 18 pixels high, the link 44. */
.wordmark {
    display: block;
    width: 132px;
    margin: -13px auto 15px;
    padding: 13px 0;
    box-sizing: content-box;
    color: var(--text);
}

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

.artwork {
    display: block;
    width: 100%;
    /* In its own shape: not every cover is square. */
    height: auto;
    background: var(--ebony);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.title {
    margin: 28px 0 0;
    font-family: var(--heading);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-wrap: balance;
}

.description {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.services {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    background: var(--ebony);
    border: 1px solid var(--line);
}

.services li + li {
    border-top: 1px solid var(--line);
}

.service {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 60px;
    padding: 12px 20px;
    color: var(--text);
    text-decoration: none;
}

.service__icon {
    flex: none;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* A platform we have no logo for still lines up with the others. */
span.service__icon {
    border: 2px solid var(--line);
    border-radius: 50%;
}

/* An uploaded logo is usually a wordmark: it takes the place of the name. */
.service__logo {
    display: block;
    width: auto;
    max-width: 100%;
    height: 22px;
    object-fit: contain;
    object-position: left center;
    /* Whatever its colours, white like the rest: the shape is the logo. */
    filter: brightness(0) invert(1);
}

.service__name {
    flex: 1;
    min-width: 0;
    font-family: var(--heading);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    /* Only a word too long for the row is broken, not every word. */
    overflow-wrap: break-word;
}

.service__action {
    flex: none;
    /* A long text ("Limited vinyl box set") must leave room for the name. */
    max-width: 55%;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-family: var(--heading);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 2px;
    text-align: right;
    text-transform: uppercase;
}

/* The arrow says "this row is the button" without a box around the word. */
.service__action::after {
    content: '';
    width: 7px;
    height: 7px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    flex: none;
    transition: transform 120ms ease;
}

/* The whole row answers, as on the site: white, black type. */
.service {
    transition: background-color 120ms ease, color 120ms ease;
    /* Our own pressed state instead of the browser's grey flash. */
    -webkit-tap-highlight-color: transparent;
}

/* Under a finger, on a keyboard, and under a mouse. Hover only where
   there is one: on a touch screen it would stick to the row last tapped,
   still white when the visitor comes back from Spotify. */
.service:active,
.service:focus-visible {
    background: var(--text);
    color: var(--ebony);
    outline: none;
}

.service:active .service__action,
.service:focus-visible .service__action {
    color: var(--ebony);
}

/* Logos are white: turn them black with the row. */
.service:active .service__icon,
.service:active .service__logo,
.service:focus-visible .service__icon,
.service:focus-visible .service__logo {
    filter: brightness(0);
}

@media (hover: hover) {
    .service:hover {
        background: var(--text);
        color: var(--ebony);
    }

    .service:hover .service__action {
        color: var(--ebony);
    }

    .service:hover .service__action::after {
        transform: translateX(3px) rotate(45deg);
    }

    .service:hover .service__icon,
    .service:hover .service__logo {
        filter: brightness(0);
    }
}

.socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 4px;
    margin-top: 28px;
}

/* Small type, but a target a thumb can hit: 44 pixels high. */
.socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    color: var(--dim);
    font-family: var(--heading);
    font-size: 13px;
    letter-spacing: 2px;
    text-decoration: none;
    text-transform: uppercase;
}

.socials a:hover,
.socials a:focus-visible {
    color: var(--text);
}

@media (min-width: 600px) {
    .page {
        padding-top: 56px;
    }

    .title {
        font-size: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .service,
    .service__action::after {
        transition: none;
    }
}

/* Profile: a link-in-bio page. The page is about the links, not one
   release: no artwork or title (the wordmark above says whose page it
   is), links in plain type. */
/* The wordmark is the title here. Still there for screen readers. */
.page--profile .title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.page--profile .description {
    margin-top: 4px;
    text-align: center;
}

.page--profile .services {
    margin-top: 24px;
}

.page--profile .service {
    min-height: 56px;
}

.page--profile .service__name {
    font-family: var(--body);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
}
