/* ==========================================================================
   BASE
   Fonts, reset, element defaults and site-wide utilities.
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------
   Self-hosted (no request to Google). Licences: assets/fonts/OFL-*.txt.
   latin covers German; latin-ext only loads if a page needs one of its glyphs. */
@font-face {
    font-family: 'Anton';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/anton-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Anton';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/anton-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/manrope-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/manrope-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-height) + 1rem);  /* anchors land below the sticky header */
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* No scrolling behind the open menu dialog. */
html:has(.mobile-menu[open]) {
    overflow: hidden;
}

body {
    min-height: 100vh;
    overflow-x: clip;  /* clip, not hidden: keeps position: sticky working */
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: var(--text-body);
    line-height: var(--leading-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    border: 0;
    background: none;
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

ul[role='list'],
ol[role='list'] {
    list-style: none;
}

fieldset {
    min-width: 0;
    border: 0;
}

/* --- Typography ----------------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: var(--leading-display);
    letter-spacing: 0.005em;
    text-transform: uppercase;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

strong {
    font-weight: 700;
}

/* --- Focus ------------------------------------------------------------------
   Always visible for keyboard users, in the colour of the surrounding text. */
:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* On dark panels the ring is drawn outside the button, on the dark ground. */
.event :focus-visible,
.donate-band :focus-visible,
.member__link:focus-visible {
    outline-color: var(--cream);
}

main:focus {
    outline: none;
}

::selection {
    background: var(--orange);
    color: var(--ink);
}

/* --- Utilities ------------------------------------------------------------ */
.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* The one orange word of a headline. */
.accent {
    color: var(--color-accent-text);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Hidden until a keyboard user tabs to it. */
.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 300;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-pill);
    background: var(--ink);
    color: var(--cream);
    font-size: var(--text-small);
    font-weight: 700;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

/* --- Scroll reveal ---------------------------------------------------------
   Elements with .fade-in rise into place once main.js sees them on screen
   (.is-visible). Without JavaScript or with reduced motion they are simply
   there. Add .delay-1 … .delay-4 to stagger neighbours. */
@media (prefers-reduced-motion: no-preference) {
    .js .fade-in {
        opacity: 0;
        transform: translateY(1.5rem);
        transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
    }

    .js .fade-in.is-visible {
        opacity: 1;
        transform: none;
    }

    /* Utilities win over component transitions, hence !important. */
    .delay-1 { transition-delay: 0.08s !important; }
    .delay-2 { transition-delay: 0.16s !important; }
    .delay-3 { transition-delay: 0.24s !important; }
    .delay-4 { transition-delay: 0.32s !important; }
}

/* --- Reduced motion: no animations anywhere -------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
