@font-face {
    font-family: "Inter";
    src: url("fonts/InterVariable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Headlines. A variable font with an optical-size axis: big titles get its characterful display cut, small ones
   its calmer text cut, chosen by the browser from the font size. Latin subset (covers å, ä, ö, é). */
@font-face {
    font-family: "Bricolage Grotesque";
    src: url("fonts/BricolageGrotesque-Variable.woff2") format("woff2");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

/* Design tokens: warm paper, near-black ink and the logo's gold. Gold (--accent) is for fills and borders only; use
   --accent-text for gold-toned text. Components read these instead of writing their own colours. */
:root {
    --bg: #faf7f0;
    --surface: #ffffff;
    --surface-2: #f3eee2;
    --ink: #141414;
    --text: #1f1f1f;
    --heading: var(--ink);
    --muted: #5f5a52;
    --border: #e4ddcd;
    --accent: #f5c842;
    --accent-text: #7a5c00;
    --accent-soft: #fdf3d3;
    --accent-mid: #f9e08b;   /* between the two: "Visa på karta" */
    --link-brown: #6b4423;   /* "Alla konserter med/på …" (the user's choice, 2026-10-27) */
    --primary: var(--ink);
    --primary-hover: #000000;
    --on-primary: #ffffff;
    --on-accent: var(--ink);
    --danger: #b32121;
    --hero-bg: var(--bg);
    --hero-text: var(--ink);
    --band-bg: #22201c;
    --band-text: #f3eee2;

    --radius-xs: 0.375rem;
    --radius-s: 0.5rem;
    --radius-m: 1rem;
    --radius-l: 1.75rem;
    --radius-pill: 999px;

    /* Soft, warm-tinted shadows: resting, raised (pinned bars, popups) and lifted (a hovered card). */
    --shadow-1: 0 1px 2px rgb(60 45 10 / 0.06), 0 2px 8px rgb(60 45 10 / 0.04);
    --shadow-2: 0 6px 24px rgb(60 45 10 / 0.14);
    --shadow-lift: 0 10px 30px rgb(60 45 10 / 0.14), 0 2px 6px rgb(60 45 10 / 0.06);

    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
    --dur-fast: 150ms;
    --dur: 250ms;

    --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-display: "Bricolage Grotesque", var(--font);

    /* A fluid type scale: each step grows with the screen between a phone and a wide desktop. */
    --step--1: 0.85rem;
    --step-0: 1rem;
    --step-1: clamp(1.1rem, 1.05rem + 0.25vw, 1.25rem);
    --step-2: clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem);
    --step-3: clamp(1.6rem, 1.4rem + 1vw, 2.2rem);
    --step-4: clamp(2rem, 1.6rem + 2vw, 3.2rem);
    --step-5: clamp(2.4rem, 1.6rem + 4vw, 4.5rem);

    --container: 72rem;
    --container-text: 44rem;
    color-scheme: light;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Links in text keep the text's colour (no browser blue or visited purple); the underline marks them. Links styled
   as buttons or cards set their own colour. */
a {
    color: inherit;
}

h1, h2, h3 {
    color: var(--heading);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-wrap: balance;
}

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 1rem;
}

h1:focus {
    outline: none;
}

:focus-visible {
    outline: 3px solid var(--accent-text);
    outline-offset: 2px;
}

/* Buttons are pills: ink by default, outlined as the quieter choice, gold for the one thing to do (tickets).
   They lift a little under the pointer and press down when clicked. */
.btn,
.btn-outline,
.btn-accent {
    display: inline-block;
    padding: 0.6rem 1.6rem;
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-pill);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast),
        transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast);
}

.btn {
    background: var(--primary);
    color: var(--on-primary);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
}

.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

/* Hover effects only where there is a pointer (hover: hover), here and in every component: a touch screen keeps
   :hover on whatever was tapped last, so a tapped button would stay filled and lifted. */
@media (hover: hover) {
    .btn:hover {
        background: var(--primary-hover);
        border-color: var(--primary-hover);
    }

    .btn-outline:hover {
        background: var(--primary);
        color: var(--on-primary);
    }

    .btn-accent:hover {
        background: var(--primary);
        border-color: var(--primary);
        color: var(--on-primary);
    }

    .btn:hover,
    .btn-outline:hover,
    .btn-accent:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-1);
    }
}

.btn:active,
.btn-outline:active,
.btn-accent:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* A grid of concert cards (EventCard), on the start page and the favorites page: 1 column on phones, 2 from 600px,
   3 from 960px. Fixed counts, not auto-fill, so the start page's page size can fill every row (Home.ListPageSize). */
.event-list {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

@media (min-width: 600px) {
    .event-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 960px) {
    .event-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* A message that something went wrong: a rounded gold-tinted card with an icon. */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0 0;
    padding: 1rem 1.25rem;
    background: var(--accent-soft);
    color: var(--heading);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-1);
    font-weight: 500;
}

.alert-icon {
    flex: none;
    width: 1.4rem;
    height: 1.4rem;
    color: var(--accent-text);
}

.alert p {
    margin: 0;
}

/* The chosen filters above a list, on the site (links) and in the app (buttons): gold-tinted pills whose cross takes
   that one choice away. */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2.25rem;
    padding: 0.2rem 0.55rem 0.2rem 0.85rem;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--heading);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--dur-fast);
}

.chip-x {
    width: 0.75rem;
    height: 0.75rem;
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.5;
    stroke-linecap: round;
    transition: rotate var(--dur-fast) var(--ease-out);
}

@media (hover: hover) {
    .chip:hover {
        background: var(--accent);
    }

    .chip:hover .chip-x {
        rotate: 90deg;
    }
}

/* Shows or folds away the search form above a list ("Sök och filtrera", its name), at the end of its last row: a
   round button with only an arrow, down when folded and turned up when the form is open. */
.filter-toggle {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-left: auto;
    padding: 0;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--heading);
    cursor: pointer;
    transition: border-color var(--dur-fast);
}

.filter-toggle[hidden] {
    display: none;
}

.filter-toggle svg {
    width: 0.85rem;
    height: 0.6rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: rotate var(--dur-fast) var(--ease-out);
}

.filter-toggle[aria-expanded="true"] svg {
    rotate: 180deg;
}

@media (hover: hover) {
    .filter-toggle:hover {
        border-color: var(--muted);
    }
}

/* Rensa beside the festival switch, on the site (a link) and in the app (a button): a round outlined button with only
   an icon (ClearFilterIcon), always there. With something to clear it looks like the bar's chips ("Göteborg ×"): the
   soft gold, the icon in the heading colour, the full gold on hover (the user's choice, 2026-10-28); with nothing to
   clear, or while the switch is on, it looks like the bar's inputs, beige with their border and a soft grey icon (the
   user's choice, 2026-10-31), and can't be pressed. */
.clear-icon {
    --clear-bg: var(--surface);
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
}

.clear-icon:not([aria-disabled="true"], :disabled) {
    --clear-bg: var(--accent-soft);
    border-color: var(--accent-soft);
    background: var(--accent-soft);
    color: var(--heading);
}

@media (hover: hover) {
    .clear-icon:not([aria-disabled="true"], :disabled):hover {
        --clear-bg: var(--accent);
        border-color: var(--accent);
        background: var(--accent);
        color: var(--heading);
    }
}

.clear-icon:is([aria-disabled="true"], :disabled) {
    --clear-bg: var(--bg);
    border-color: var(--border);
    background: var(--bg);
    color: #a5a199;   /* --muted halfway to the paper: softer, like the inputs' placeholders */
    pointer-events: none;
}

.blazor-error-boundary {
    padding: 1rem;
    background: var(--danger);
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* Motion is a nicety: with reduced motion asked for, things change at once and nothing moves. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .btn:hover,
    .btn-outline:hover,
    .btn-accent:hover,
    .btn:active,
    .btn-outline:active,
    .btn-accent:active {
        transform: none;
    }
}

/* The site's tooltips (app.js, data-tooltip): a dark tip with light text, above the element or below it when there is
   no room, its arrow pointing at the element's middle (--arrow-x). Fixed in the viewport, so cards that clip their
   content don't cut it off; it never takes the pointer. */
.tooltip {
    position: fixed;
    z-index: 1000;
    /* As a popover (app.js, over a modal window): none of the browser's popover box (centred, bordered, clipped) */
    inset: auto;
    margin: 0;
    border: 0;
    overflow: visible;
    max-width: 16rem;
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius-s);
    background: var(--band-bg);
    color: var(--band-text);
    box-shadow: var(--shadow-2);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
    pointer-events: none;
    opacity: 0;
    transform: translateY(2px);
    transition: opacity var(--dur-fast), transform var(--dur-fast);
}

.tooltip.visible {
    opacity: 1;
    transform: none;
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: var(--arrow-x, 50%);
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: var(--band-bg);
}

.tooltip[data-below]::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: var(--band-bg);
}

@media (prefers-reduced-motion: reduce) {
    .tooltip {
        transform: none;
        transition: none;
    }
}

/* The site's "Föreslå ändring" form or a venue's map is open (AmendModal, MapModal, by :target): the page behind it
   doesn't scroll. */
html:has(.amend-modal:target),
html:has(.map-modal:target) {
    overflow: hidden;
}
