/* Novello Player's sites: the frame both novelloplayer.com and account.novelloplayer.com draw around their pages
   (the page width, the masthead and its menu, the type for the big words, the 404 and 500 pages, the footer) and the
   few pieces both use (a row of buttons, a list of ticks). On top of novello.css; each site's own css/site.css goes
   after this file.

   Every colour, font, radius and shadow comes from the tokens in novello.css; nothing here redefines one. The custom
   properties below are the sites' own (prefixed --site-) and only hold layout numbers. */

:root {
    --site-gutter: 16px;
    --site-max: 1200px;
    --site-header: 64px;
}


@media (min-width: 760px) {
    :root { --site-gutter: 32px; }
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--site-header) + 16px); }

body { min-height: 100dvh; display: flex; flex-direction: column; }

.site-main { flex: 1 0 auto; overflow-x: clip; }

.wrap {
    width: 100%;
    max-width: calc(var(--site-max) + 2 * var(--site-gutter));
    margin: 0 auto;
    padding: 0 var(--site-gutter);
}

.wrap--narrow { max-width: calc(780px + 2 * var(--site-gutter)); }

.icon { flex: none; display: inline-block; vertical-align: middle; }

.skip {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    background: var(--surface-2);
    color: var(--text);
}
.skip:focus { top: 12px; }

.lead { font-size: 18.5px; color: var(--text-body); }

/* ---- Header ------------------------------------------------------------------------- */

.masthead {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(5, 8, 15, .8);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--line-soft);
}

.masthead__inner {
    max-width: calc(var(--site-max) + 2 * var(--site-gutter));
    height: var(--site-header);
    margin: 0 auto;
    padding: 0 var(--site-gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.masthead__brand .wordmark__name { font-size: 20px; }
.masthead__brand .mark { width: 30px; }

/* The menu: a checkbox and its label fold the links away on a phone. */
.nav-check { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.nav__toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    color: var(--text);
    cursor: pointer;
}
.nav__close { display: none; }
.nav-check:checked ~ .nav__toggle .nav__open { display: none; }
.nav-check:checked ~ .nav__toggle .nav__close { display: block; }
.nav-check:focus-visible ~ .nav__toggle { outline: 2px solid var(--cyan); outline-offset: 3px; }

.nav__panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 6px var(--site-gutter) 20px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
}
.nav-check:checked ~ .nav__panel { display: flex; }

.nav__link {
    padding: 14px 2px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--text-body);
    font: 500 17px/1.2 var(--font-body);
}
.nav__link:hover { color: var(--text); text-decoration: none; }
.nav__link.is-active { color: var(--text); }
.nav__account { margin-top: 16px; align-self: flex-start; }

@media (min-width: 880px) {
    .nav-check, .nav__toggle { display: none; }

    .nav__panel {
        display: flex;
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 2px;
        padding: 0;
        background: none;
        border: 0;
        box-shadow: none;
    }

    .nav__link {
        padding: 8px 12px;
        border: 0;
        border-radius: var(--r-sm);
        color: var(--muted);
        font-size: 15px;
    }
    .nav__link.is-active { color: var(--text); box-shadow: inset 0 -2px 0 var(--sky); border-radius: 0; }
    .nav__account { margin: 0 0 0 12px; align-self: center; }
}

/* ---- Type for the big words ---------------------------------------------------------- */

.hero__title,
.page-hero__title,
.section__head h2,
.show__title,
.split h2,
.closing__title,
.source h3,
.step h3,
.state-page h1,
.auth__title,
.acct-page__title,
.panel__title,
.linkpage__title,
.linkcard__h,
.linkcard--done h2,
.prose h1,
.prose h2 {
    text-transform: uppercase;
}


/* ---- A row of buttons, a list of ticks, chips ---------------------------------------------- */

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 639px) {
    .hero__actions .btn { flex: 1 1 100%; }
}

.ticks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: .42em;
    width: 13px;
    height: 7px;
    border-left: 2px solid var(--mint);
    border-bottom: 2px solid var(--mint);
    transform: rotate(-45deg);
}
.ticks--plain li::before { border-color: var(--cyan); }

/* Chips: a row of short links (the Help page's topics, the account's jump lists). */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chip {
    padding: 8px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    color: var(--text-body);
    font-size: 14.5px;
}
.chip:hover { border-color: var(--accent-border); color: var(--text); text-decoration: none; }

/* ---- 404 and 500 ------------------------------------------------------------------------------------------ */

.state-page { padding: 72px 0 120px; }
.state-page__code {
    margin-bottom: 12px;
    font: 700 clamp(120px, 26vw, 260px)/.8 var(--font-display);
    letter-spacing: -.02em;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.state-page h1 { font-size: clamp(40px, 6vw, 72px); }
.state-page .lead { max-width: 36em; margin: 16px 0 28px; }

/* ---- Footer -------------------------------------------------------------------------------------------------------- */

.footer { padding: 56px 0 32px; border-top: 1px solid var(--line); background: var(--bg-2); font-size: 15px; }

.footer__top { display: grid; gap: 40px; }
@media (min-width: 880px) { .footer__top { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; } }

.footer__pledge { max-width: 30em; margin-top: 16px; color: var(--muted); }
.footer__contact { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); }

.footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
@media (min-width: 640px) { .footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.footer__cols div { display: flex; flex-direction: column; gap: 10px; }
.footer__cols a { color: var(--muted); }
.footer__cols a:hover { color: var(--text); }
.footer__head { margin-bottom: 4px; color: var(--text); font: 600 15px/1.3 var(--font-body); letter-spacing: 0; }

.footer__base {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line-soft);
    color: var(--faint);
    font-size: 13.5px;
}
