/* ============================================================
   Foundation — design tokens, type scale, spacing rhythm, base
   Edit the :root tokens to restyle the whole site. Sections only
   consume these tokens; they never hard-code colors or sizes.
   ============================================================ */
:root {
  /* Palette (light). Override --accent/--accent-contrast from the brand. */
  --bg: #faf9f7;
  --surface: #ffffff;
  --surface-2: #f1efeb;
  --text: #191817;
  --muted: #5f5b55;
  --accent: #19407a;
  --accent-contrast: #ffffff;
  --border: #e2dfd9;

  /* Typography: exactly two families site-wide. */
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Fluid type scale (minor-third at mobile widening toward desktop). */
  --step--1: clamp(0.83rem, 0.8rem + 0.16vw, 0.94rem);
  --step-0: clamp(1rem, 0.96rem + 0.22vw, 1.13rem);
  --step-1: clamp(1.25rem, 1.17rem + 0.42vw, 1.5rem);
  --step-2: clamp(1.56rem, 1.41rem + 0.78vw, 2.05rem);
  --step-3: clamp(1.95rem, 1.63rem + 1.62vw, 2.95rem);
  --step-4: clamp(2.44rem, 1.86rem + 2.9vw, 4.2rem);
  --step-5: clamp(3.05rem, 2.1rem + 4.7vw, 5.9rem);

  /* Spacing rhythm. Sections use --space-section for vertical rhythm. */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-section: clamp(4rem, 3rem + 5vw, 7rem);

  /* One radius + shadow language for the whole site. */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.06), 0 4px 12px rgb(0 0 0 / 0.06);
  --shadow-2: 0 2px 4px rgb(0 0 0 / 0.08), 0 12px 32px rgb(0 0 0 / 0.12);

  --container: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  /* Tickivo web components inherit the same system. */
  --tickivo-font: var(--font-body);
  --tickivo-font-display: var(--font-display);
  --tickivo-text: var(--text);
  --tickivo-bg: var(--bg);
  --tickivo-accent: var(--accent);
  --tickivo-accent-contrast: var(--accent-contrast);
  --tickivo-surface: var(--surface);
  --tickivo-radius: var(--radius);
  --tickivo-gap: var(--space-lg);
  --tickivo-border: var(--border);
  --tickivo-container: var(--container);
  --tickivo-gutter: var(--gutter);
  --tickivo-error: #b3261e;
  --tickivo-hero-overlay: linear-gradient(180deg, rgb(0 0 0 / 0.15), rgb(0 0 0 / 0.65));
  --tickivo-hero-text: #ffffff;
  /* The festival ticket module (apps/site-components/src/festival.ts) takes
     its shape from the same system. A festival template's tickets section
     retunes these tokens, and nothing else: the structure is Tickivo's. */
  --tickivo-muted: var(--muted);
  --tickivo-card-bg: var(--surface);
  --tickivo-card-text: var(--text);
  --tickivo-card-border: 1px solid var(--border);
  --tickivo-card-radius: var(--radius);
  --tickivo-card-shadow: var(--shadow-1);
  --tickivo-row-border: 1px solid var(--border);
  --tickivo-group-bg: var(--surface-2);
  --tickivo-group-text: var(--text);
  --tickivo-btn-bg: var(--accent);
  --tickivo-btn-text: var(--accent-contrast);
  --tickivo-btn-border: 1px solid transparent;
  --tickivo-btn-radius: var(--radius);
  --tickivo-btn-shadow: none;
  --tickivo-btn-font: var(--font-body);
  --tickivo-btn-case: none;
  --tickivo-step-bg: transparent;
  --tickivo-step-border: 1px solid var(--border);
  --tickivo-display-weight: 700;
  --tickivo-display-stretch: normal;
  --tickivo-display-style: normal;
  --tickivo-display-case: none;
  --tickivo-label-font: var(--font-body);
  --tickivo-label-weight: 600;
  --tickivo-label-stretch: normal;
  --tickivo-label-case: none;
  --tickivo-label-tracking: normal;
  --tickivo-bar-bg: var(--surface);
  --tickivo-bar-text: var(--text);
  --tickivo-tag-bg: var(--surface-2);
  --tickivo-tag-text: var(--text);

  color-scheme: light;
}

/* Dark preset — set data-theme="dark" on <html>. Same tokens, re-tuned. */
:root[data-theme="dark"] {
  --bg: #121110;
  --surface: #1c1b19;
  --surface-2: #262421;
  --text: #f2f0ec;
  --muted: #a5a099;
  --border: #35322e;
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 12px rgb(0 0 0 / 0.4);
  --shadow-2: 0 2px 4px rgb(0 0 0 / 0.5), 0 12px 32px rgb(0 0 0 / 0.55);
  --tickivo-error: #ff7a6e;
  /* The low-stock tag is drawn in the error colour, light on a dark site. */
  --tickivo-low-stock-text: #2b0906;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* The shape layer's .bleed uses 100vw, which INCLUDES the scrollbar on
   desktops that show one — without this every bleed section overflows by
   the scrollbar's width and the page scrolls sideways. 'clip', not 'hidden':
   'hidden' makes <html> a scroll container and breaks position: sticky for
   every header in the library. Lives here, not in foundation/shape.ts, so
   no template can opt into bleed without it. */
html { overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Baseline for ordinary prose: break a word only when it would otherwise
     overflow its box. Safe everywhere, and it catches the plain blocks the
     narrower rules below do not reach - a footer wordmark is a <p>, and a
     credo pull-quote is one oversized sentence. */
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0 0 var(--space-md);
  letter-spacing: -0.01em;
  text-wrap: balance;
  /* A concept name is very often ONE long compound word — Swedish builds them
     by default ("Kulturforeningssammanslutningen") — and a display face renders
     it at 50-130px, so it can set a min-content width wider than the phone and
     scroll the whole page sideways. 'anywhere' fixes that by shrinking the
     intrinsic size, and it USED to be the rule here at every width.

     The cost was worse than the bug. 'anywhere' does not wait for a word to
     overflow; it lets the layout shrink the box first and then breaks the word
     to fit whatever is left. So a heading in a narrow grid column broke mid
     syllable on a 1440px desktop with room to spare — press rendered its about
     heading as "OM NOBELBE / RGET", which is the single most amateur thing a
     page can do to a customer's name.

     'break-word' breaks only a word that genuinely cannot fit its line, and it
     is paired below with 'min-width: 0' on the layout children that were the
     real cause of the sideways scroll: a flex/grid item defaults to
     'min-width: auto', which refuses to go below its content's min-content
     size. Fixing THAT is what makes the eager break unnecessary. Verified at
     390px across all eight templates: no page scrolls sideways. */
  overflow-wrap: break-word;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 var(--space-md); }
/* The chrome, whole. The header wordmark is the element that actually widens
   the top bar, and it is a link in one template and a paragraph in another, so
   targeting a tag name misses half of them. Everything in the header and
   footer is a short label or a name, where breaking beats a page that scrolls
   sideways - and scoping to the stamped chrome keeps 'anywhere' out of body
   copy, which keeps its gentler break-word baseline above. */
[data-tickivo-section="header-nav"] *,
[data-tickivo-section="footer"] * { overflow-wrap: anywhere; }

/* The other half of the wrap fix above. A flex or grid item is 'min-width:
   auto' by default, so it refuses to shrink below its content's min-content
   width — one long word in a heading then pushes its whole track wider than
   the viewport, and the page scrolls sideways no matter what the heading's
   overflow-wrap says. Zeroing it on the layout boxes is the actual repair;
   the heading rule above can then break words only when they truly do not
   fit, which is what keeps a venue's name whole on a desktop. */
.container > *,
.section > *,
.section-head { min-width: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--space-section); }
.section-head { max-width: 44rem; margin-bottom: var(--space-xl); }
.section-head p { color: var(--muted); font-size: var(--step-1); margin: 0; }

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}
:root[data-theme="dark"] .eyebrow { filter: brightness(1.35) saturate(0.85); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.85em 1.7em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: 600 var(--step-0)/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* layer: motion */
/* ============================================================
   Motion — plumbing. No keyframes live here: the template names
   them in --reveal-name / --parallax-name, and an element only
   moves once it carries data-reveal or data-parallax.

   Reveal: a timed entrance the first time a section scrolls into
   view — one section at a time, as a block. The components bundle
   marks <html data-reveal-js> when it is running and sets
   data-reveal="in" on each section as it enters — nothing is
   hidden without that marker, so a page with no script (or
   reduced motion) is simply still. Every top-level <section>
   reveals; a decorative band (aria-hidden), the chrome, and
   data-reveal="still" do not. Any other element carrying
   data-reveal reveals on its own.
   Only the two states the script writes are styled — "" (waiting)
   and "in" — so a value from any other script version, or one an
   author typed, is never hidden. (Measured: a tab holding a stale
   bundle wrote a value this stylesheet no longer knew, and every
   section on the page stayed at its first frame.)
     --reveal-name      the template's keyframes
     --reveal-duration  default 0.7s
     --reveal-easing    default an ease-out
     --reveal-stagger   between sections arriving together, 80ms
     --reveal-delay     per element; the script sets it

   Parallax: scroll-linked, inside @supports so an unsupported
   browser sees the page still, with nothing hidden.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  html[data-reveal-js] [data-reveal=""],
  html[data-reveal-js] [data-reveal="in"] {
    animation: var(--reveal-name, none) var(--reveal-duration, 0.7s) var(--reveal-easing, cubic-bezier(0.22, 1, 0.36, 1)) var(--reveal-delay, 0s) both paused;
  }
  html[data-reveal-js] [data-reveal="in"] {
    animation-play-state: running;
  }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    [data-parallax] {
      animation: var(--parallax-name, none) linear both;
      animation-timeline: view();
      animation-range: var(--parallax-range, cover 0% cover 100%);
    }
  }
}

/* layer: shape */
/* ============================================================
   Shape — bleed, arch, diagonal, overlap, tilt. Utilities a
   template's markup opts into by class. The overflow-x guard they
   rely on is in the foundation base, on <html>.
   ============================================================ */
.bleed {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
}
.bleed-inset {
  width: calc(100vw - var(--gutter) * 2);
  margin-inline: calc(50% - 50vw + var(--gutter));
  border-radius: var(--radius-lg);
}
/* Percentages, not viewport units: a radius relative to the element's own
   box is the same arch at every container width. */
.shape-arch {
  border-radius: 50% 50% var(--radius-lg) var(--radius-lg) / 28% 28% var(--radius-lg) var(--radius-lg);
}
.shape-diagonal {
  clip-path: polygon(0 var(--slant, 4vw), 100% 0, 100% 100%, 0 100%);
}
.shape-diagonal-bottom {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slant, 4vw)), 0 100%);
}
.overlap-up {
  margin-block-start: calc(var(--space-2xl) * -1);
  position: relative;
  z-index: 1;
}
.tilt-a { rotate: -2.5deg; }
.tilt-b { rotate: 1.8deg; }

/* layer: media */
/* ============================================================
   Media — image treatment, keyed on data-treatment on <html>.
   Wrap an authored image in .media and it takes the site's
   treatment; the gallery takes it through ::part(image). Every
   treatment is a filter chain on the image — no overlays, so a
   caption beside the image is never touched. The filters live in
   the <svg class="media-filters"> at the top of <body>.
   ============================================================ */
:root {
  --media-contrast: 1.6;
}

.media {
  display: block;
  overflow: hidden;
}
.media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- duotone: shadows to --duo-dark, highlights to --duo-light --- */
[data-treatment="duotone"] .media > img,
[data-treatment="duotone"] tickivo-gallery::part(image) {
  filter: grayscale(1) contrast(var(--media-contrast)) url(#duotone);
}

/* --- grain: colour kept, film grain inside the frame --------- */
[data-treatment="grain"] .media > img,
[data-treatment="grain"] tickivo-gallery::part(image) {
  filter: contrast(1.06) saturate(0.94) url(#grain);
}

/* --- halftone: dithered, then two-colour ---------------------- */
[data-treatment="halftone"] .media > img,
[data-treatment="halftone"] tickivo-gallery::part(image) {
  filter: grayscale(1) contrast(var(--media-contrast)) url(#halftone) url(#duotone);
}

/* layer: decor */
/* ============================================================
   Decor — sizing for the authored SVG motifs. They draw in
   currentColor, so colour is whatever the parent's is; set it
   with color: var(--accent) on the motif or its container.
   ============================================================ */
.decor {
  display: inline-block;
  width: 1.5em;
  height: auto;
  vertical-align: middle;
  flex: none;
}
.decor-lg { width: 4rem; }
.decor-xl { width: 7rem; }
.decor-rule { display: block; width: 100%; max-width: 12rem; height: auto; color: var(--muted); }
.decor-behind { position: absolute; inset: -0.35em -0.6em; width: auto; height: auto; z-index: -1; }

/* Template: affisch */
/* Palette: crown — a black flood warming to bronze, the crown's gold */
/* Selling: event-pages */
:root, :root[data-theme="dark"] {
  --bg: #0b0a07;
  --surface: #17140e;
  --surface-2: #3a2b11;
  --text: #f6f1e6;
  --muted: #bfb5a2;
  --accent: #f2c744;
  --accent-contrast: #0b0a07;
  --border: #d9cfbb;
  --font-display: Anybody, 'Arial Narrow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Familjen Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius-sm: 0px;
  --radius: 0px;
  --radius-lg: 0px;
  --container: 90rem;
  --duo-dark: var(--bg);
  --duo-light: var(--accent);
  /* The two gold bars that frame the name, taken from the logo. */
  --gc-bar: clamp(5px, 0.75vw, 12px);
  color-scheme: dark;
}

/* affisch motif */
:root, :root[data-theme="dark"] {
  /* Mixed from the flood so they follow every palette: a near-black of the
     flood's own hue for the ticker, the footer and the dots, and a paper just
     off white for the ticket stubs. */
  --affisch-ink: color-mix(in oklab, var(--bg) 40%, black);
  --affisch-paper: color-mix(in oklab, var(--text) 60%, white);
  --affisch-on-paper: color-mix(in oklab, var(--bg) 70%, black);
  --affisch-stretch: 55%;
  --shadow-1: none;
  --shadow-2: none;
}

body {
  position: relative;
  background-color: var(--bg);
  background-image: linear-gradient(160deg, var(--bg) 0%, var(--surface-2) 100%);
}
/* The halftone screen: dots of the ink, strongest where the light comes in
   (top right) and gone by the fold. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 130vh;
  pointer-events: none;
  background-image: radial-gradient(circle, var(--accent) 0 1.1px, transparent 1.5px);
  background-size: 7px 7px;
  opacity: 0.2;
  -webkit-mask-image: radial-gradient(120% 90% at 100% 0%, black 10%, transparent 70%);
  mask-image: radial-gradient(120% 90% at 100% 0%, black 10%, transparent 70%);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: var(--affisch-stretch);
  text-transform: uppercase;
  line-height: 0.84;
  letter-spacing: -0.005em;
}
.eyebrow { font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); filter: none; }
:root[data-theme="dark"] .eyebrow { filter: none; }

/* Hard edges, no lift: a poster is printed, not floating. */
.btn { border-radius: 0; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.btn:hover { transform: none; box-shadow: none; }
.btn-primary:hover { background: var(--affisch-ink); color: var(--accent); border-color: var(--accent); }
.btn-ghost:hover { color: var(--accent); }

/* affisch choreography: poster */
@media (prefers-reduced-motion: no-preference) {
@keyframes affisch-rise {
  from { opacity: 0; translate: 0 2.5rem; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes affisch-ticker {
  to { transform: translateX(-50%); }
}
:root {
  --reveal-name: affisch-rise;
  --reveal-duration: 0.8s;
  --reveal-easing: cubic-bezier(0.2, 0.7, 0.2, 1);
}
.s-affisch-ticker-track { animation: affisch-ticker 40s linear infinite; }
}

.s-affisch-header { position: relative; z-index: 5; }
.s-affisch-header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding-block: var(--space-lg);
}
.s-affisch-wordmark {
  margin-right: auto;
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 62%;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  /* A long name wraps between its words, never inside one. */
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}
.s-affisch-wordmark { display: inline-flex; align-items: center; gap: 0.3em; }
.s-gc-mark { width: 1.3em; height: auto; flex: none; color: var(--accent); }
.s-affisch-nav { display: none; gap: var(--space-lg); }
.s-affisch-nav a,
.s-affisch-account {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.s-affisch-nav a { position: relative; padding-block: 0.4em; }
.s-affisch-nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.3s ease;
}
.s-affisch-nav a:hover::after { transform: scaleX(1); }
.s-affisch-account { display: inline-flex; flex: none; }
.s-affisch-cta { flex: none; padding: 0.85em 1.4em; font-size: var(--step--1); white-space: nowrap; }
/* Four links, the full account label and the button need a wide bar; below
   it the links move into the menu. */
@media (min-width: 1200px) { .s-affisch-nav { display: flex; } }
/* The account chip stays at every width: on a phone the SDK draws it as its
   icon, and the login and Mitt konto are a must on every site. */
@media (max-width: 600px) {
  .s-affisch-header-inner { gap: var(--space-xs); }
  .s-affisch-wordmark { font-size: 1.4rem; line-height: 0.95; }
  /* No ticket button in the bar on a phone (Adam, 2026-09-29): the menu has it. */
  .s-affisch-cta { display: none; }
}
/* The menu. #stang is fixed and empty, so closing (moving the target to it)
   does not scroll the page; a section link closes it the same way. */
.s-affisch-burger { display: none; }
.s-affisch-menu-stop { position: fixed; top: 0; left: 0; width: 1px; height: 1px; }
.s-affisch-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15em;
  padding: var(--space-2xl) var(--gutter);
  overflow-y: auto;
  background: var(--surface-2);
  visibility: hidden;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.7, 0, 0.25, 1), visibility 0s linear 0.5s;
}
.s-affisch-menu:target { visibility: visible; transform: none; transition: transform 0.5s cubic-bezier(0.7, 0, 0.25, 1); }
html:has(.s-affisch-menu:target) { overflow: hidden; }
.s-affisch-menu a {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: var(--affisch-stretch);
  font-size: clamp(3rem, 14vw, 5.5rem);
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}
.s-affisch-menu a:hover { color: var(--accent); }
.s-affisch-menu .s-affisch-menu-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--gutter);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--text);
  font-family: var(--font-body);
  font-size: 1.8rem;
  line-height: 1;
}
.s-affisch-menu .s-affisch-menu-cta {
  align-self: flex-start;
  margin-top: var(--space-lg);
  padding: 0.85em 1.4em;
  background: var(--accent);
  color: var(--accent-contrast);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  font-stretch: 100%;
  letter-spacing: 0.08em;
}
/* The open menu covers the bar, so the sign-in link comes into it too, with
   its words, which the bar shows as an icon on a phone. */
.s-affisch-menu .s-affisch-menu-account {
  display: inline-flex;
  align-self: flex-start;
  margin-top: var(--space-md);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 700;
  font-stretch: 100%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.s-affisch-menu-account::part(label) { display: inline; }
@media (max-width: 1199px) {
  .s-affisch-burger {
    display: grid;
    place-items: center;
    flex: none;
    width: 48px;
    height: 48px;
    border: 2px solid var(--text);
  }
  .s-affisch-burger span { width: 22px; height: 2px; background: var(--text); box-shadow: 0 -7px 0 var(--text), 0 7px 0 var(--text); }
}
@media (max-width: 600px) { .s-affisch-burger { width: 44px; height: 44px; } }
@media (min-width: 1200px) { .s-affisch-menu { display: none; } }
/* Every section's head lives with the header, which every page has: a site
   that sells on its page has no calendar to carry it. */
/* The section head every block opens with: a heading set like a poster
   line, a hairline under it, the intro pushed right. */
.s-affisch-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
  align-items: end;
  gap: var(--space-sm) var(--space-xl);
  border-bottom: 2px solid var(--border);
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-xl);
}
.s-affisch-head .eyebrow { grid-column: 1 / -1; }
.s-affisch-head h2 { font-size: clamp(3.5rem, 9vw, 10.5rem); margin: 0; }
.s-affisch-head p { margin: 0 0 var(--space-2xs); max-width: 24rem; justify-self: end; font-size: var(--step-0); font-weight: 500; }
/* The heading shares its line with the intro only where both fit: beside a
   24rem intro, a tablet left "Kommande" a column too narrow for the word. */
@media (max-width: 1199px) {
  .s-affisch-head { grid-template-columns: minmax(0, 1fr); }
  .s-affisch-head h2 { font-size: clamp(3.5rem, 11vw, 10.5rem); }
  .s-affisch-head p { justify-self: start; }
}

/* The poster without a photograph, set as the Geez City lockup: the crown,
   the name between two gold bars, and the next show right under it. */
.s-affisch-hero { position: relative; }
.s-affisch-hero-bare { padding-block: var(--space-lg) var(--space-2xl); }
.s-affisch-chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-bottom: var(--space-md); }
.s-affisch-chips span {
  border: 2px solid var(--border);
  color: var(--text);
  padding: 0.35em 0.7em;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.s-gc-lockup { color: var(--accent); }
/* The crown sits right on the top bar, as it does in the logo. */
.s-gc-crown { display: block; width: clamp(6.5rem, 17vw, 16rem); height: auto; margin: 0 auto; }
.s-affisch-hero-title {
  /* The full width divided by the name's own width in em (the composer's
     letter table, with 4% for kerning), so the name runs bar to bar. */
  font-size: min(30rem, calc((100vw - 2 * var(--gutter)) / (var(--ems, 3.3) * 1.04)));
  line-height: 0.8;
  overflow-wrap: break-word;
  color: var(--text);
}
.s-affisch-hero-bare .s-affisch-hero-title {
  margin: 0;
  padding: 0.1em 0 0.05em;
  border-block: var(--gc-bar) solid var(--accent);
}
.s-gc-hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--space-lg) var(--space-2xl);
  margin-top: var(--space-xl);
}
.s-affisch-hero-sub { margin: 0; max-width: 22ch; font-size: var(--step-2); font-weight: 600; line-height: 1.15; }
.s-gc-next { display: grid; gap: var(--space-sm); justify-items: start; }
.s-gc-next-label { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.s-gc-ctas { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-xs); }
.s-gc-next tickivo-countdown {
  --tickivo-surface: transparent;
  --tickivo-text: var(--text);
  --tickivo-radius: 0px;
}
/* The countdown set as one poster line between two thin gold rules. */
.s-gc-next tickivo-countdown::part(countdown) { justify-content: flex-start; gap: var(--space-lg); padding: var(--space-xs) 0; border-block: 2px solid var(--accent); }
.s-gc-next tickivo-countdown::part(unit) { border: 0; border-radius: 0; padding: 0; min-width: 0; background: transparent; }
.s-gc-next tickivo-countdown::part(value) { font-family: var(--font-display); font-weight: 900; font-stretch: 58%; font-size: clamp(2.5rem, 4vw, 3.75rem); line-height: 0.9; }
@media (max-width: 899px) {
  .s-gc-hero-foot { grid-template-columns: minmax(0, 1fr); }
}

/* The ticker is the crown's gold, laid across the page a little askew like
   tape on a wall. */
.s-affisch-ticker { overflow: hidden; background: var(--accent); color: var(--accent-contrast); rotate: -1.5deg; margin-inline: -3vw; }
.s-affisch-ticker-track {
  display: flex;
  width: max-content;
  padding-block: 0.7em;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 70%;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}
.s-affisch-ticker-track span::after {
  content: "✺";
  margin-inline: 0.7em;
  color: var(--accent-contrast);
  font-weight: 400;
}

/* One column, explicitly: the component's own sheet sets a multi-column
   template on the list, and a wide stub in one of its narrow tracks crushes
   the title to a letter a line. */
.s-affisch-events tickivo-events::part(list) { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
/* A ticket on its side: the event on the paper, the buy line on the stub,
   a dashed perforation between them with a notch cut at each end. */
.s-affisch-events tickivo-events::part(card) {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14rem;
  background: var(--affisch-paper);
  color: var(--affisch-on-paper);
  border-radius: 0;
  text-decoration: none;
  -webkit-mask:
    radial-gradient(circle 14px at calc(100% - 14rem) 0, transparent 97%, black),
    radial-gradient(circle 14px at calc(100% - 14rem) 100%, transparent 97%, black);
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(circle 14px at calc(100% - 14rem) 0, transparent 97%, black),
    radial-gradient(circle 14px at calc(100% - 14rem) 100%, transparent 97%, black);
  mask-composite: intersect;
  transition: translate 0.35s ease, rotate 0.35s ease;
}
.s-affisch-events tickivo-events::part(card):hover { background: var(--affisch-paper); translate: 0 -4px; rotate: -0.4deg; }
.s-affisch-events tickivo-events::part(image) { display: none; }
.s-affisch-events tickivo-events::part(body) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-sm) var(--space-xl);
  padding: var(--space-lg) var(--space-xl);
}
.s-affisch-events tickivo-events::part(title) {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 58%;
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  line-height: 0.88;
  text-transform: uppercase;
  color: var(--affisch-on-paper);
}
.s-affisch-events tickivo-events::part(meta) {
  margin: 0;
  max-width: 22rem;
  text-align: right;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}
.s-affisch-events tickivo-events::part(card)::after {
  content: "Köp biljetter →";
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--space-md);
  border-left: 2px dashed color-mix(in oklab, currentColor 30%, transparent);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* Until the paper is wide, the date and place go under the name, not beside it. */
@media (max-width: 1099px) {
  .s-affisch-events tickivo-events::part(body) { grid-template-columns: minmax(0, 1fr); }
  .s-affisch-events tickivo-events::part(meta) { text-align: left; }
}
@media (max-width: 767px) {
  .s-affisch-events tickivo-events::part(card) {
    grid-template-columns: minmax(0, 1fr);
    -webkit-mask:
      radial-gradient(circle 14px at 0 calc(100% - 4rem), transparent 97%, black),
      radial-gradient(circle 14px at 100% calc(100% - 4rem), transparent 97%, black);
    -webkit-mask-composite: source-in;
    mask:
      radial-gradient(circle 14px at 0 calc(100% - 4rem), transparent 97%, black),
      radial-gradient(circle 14px at 100% calc(100% - 4rem), transparent 97%, black);
    mask-composite: intersect;
  }
  .s-affisch-events tickivo-events::part(body) { grid-template-columns: minmax(0, 1fr); padding: var(--space-lg); }
  .s-affisch-events tickivo-events::part(meta) { text-align: left; }
  .s-affisch-events tickivo-events::part(card)::after { justify-content: flex-start; height: 4rem; padding-inline: var(--space-lg); border-left: 0; border-top: 2px dashed color-mix(in oklab, currentColor 30%, transparent); }
}
.s-affisch-events tickivo-events[lang="en"]::part(card)::after { content: "Buy tickets →"; }
.s-affisch-events tickivo-events::part(more) {
  display: inline-block;
  margin-top: var(--space-lg);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.s-affisch-about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--space-lg) var(--space-2xl);
  align-items: start;
  border-top: 2px solid var(--border);
  padding-top: var(--space-lg);
}
.s-affisch-about-head h2 { font-size: clamp(3rem, 8vw, 7.5rem); margin: var(--space-2xs) 0 0; }
.s-affisch-about-lead { margin-top: 0; font-size: var(--step-2); font-weight: 600; line-height: 1.2; }
.s-affisch-about-copy p { max-width: 58ch; }
.s-affisch-about-media { grid-column: 1 / -1; }
.s-affisch-about-media img { display: block; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
@media (max-width: 767px) {
  .s-affisch-about-grid { grid-template-columns: minmax(0, 1fr); }
  .s-affisch-about-media img { aspect-ratio: 4 / 3; }
}

/* Composition: strip — see templates/gallery.ts. One snapped row, scrolled. */
.s-affisch-gallery tickivo-gallery::part(gallery) {
  display: grid;
  /* none, explicitly: the component's own sheet sets grid-template-columns,
     and an explicit template wins over grid-auto-columns for every item that
     fits in it — measured, the 480px frames rendered at 203px in six borrowed
     tracks. */
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * var(--space-md)) / 4);
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* The frames are the section's photography, so the row keeps its own scroll
     gutter rather than letting a scrollbar crop the captions. */
  padding-bottom: var(--space-md);
  scrollbar-width: thin;
}
.s-affisch-gallery tickivo-gallery::part(item) { margin: 0; scroll-snap-align: start; }
@media (max-width: 640px) {
  .s-affisch-gallery tickivo-gallery::part(gallery) { grid-auto-columns: min(86vw, 22rem); }
}
.s-affisch-gallery tickivo-gallery::part(image) { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 0; }
/* Full strength: the component's own meta line is 75 % opaque, which on the
   flood's lighter end left a 13 px caption under 4.5:1. */
.s-affisch-gallery tickivo-gallery::part(caption) { opacity: 1; font-size: var(--step--1); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

.s-affisch-faq tickivo-faq::part(item) { display: block; border-bottom: 2px solid var(--border); }
.s-affisch-faq tickivo-faq::part(question) {
  padding-block: var(--space-md);
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 62%;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1;
  text-transform: uppercase;
}
.s-affisch-faq tickivo-faq::part(answer) { max-width: 64ch; padding-bottom: var(--space-md); font-size: var(--step-0); }

.s-affisch-footer {
  margin-top: var(--space-section);
  overflow: hidden;
  background: var(--affisch-ink);
  color: var(--affisch-paper);
}
.s-affisch-footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-md) var(--space-2xl);
  padding-block: var(--space-2xl) var(--space-lg);
}
.s-affisch-footer-nav, .s-footer-links { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-lg); }
.s-affisch-footer-nav a, .s-footer-links a {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--affisch-paper);
}
.s-affisch-footer-nav a:hover, .s-footer-links a:hover { color: var(--accent); }
.s-affisch-footer-legal { margin: 0 0 0 auto; font-size: var(--step--1); letter-spacing: 0.06em; opacity: 0.7; }
/* Sized from the name's length so it fills the width at any name, then
   pushed into the bottom edge. */
.s-affisch-footer-mark {
  margin: var(--space-md) 0 -0.2em;
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: var(--affisch-stretch);
  font-size: calc(208vw / var(--len, 8));
  line-height: 0.74;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--accent);
}

/* The tickets: warm paper with the buy line on a gold stub. */
.s-affisch-events tickivo-events::part(card)::after { background: var(--accent); color: var(--accent-contrast); }

/* Past artists, billed like a festival poster. */
.s-affisch-poster { text-align: center; }
/* Each tier is a block of set rows, ruled off from the next like the bands
   of a bill. On a phone every name takes its own line, so no star is ever
   left hanging at the end of a row; from 760px the rows are fixed, with the
   stars only ever between two names. */
.s-affisch-tier {
  display: grid;
  justify-items: center;
  margin: 0 auto;
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: var(--affisch-stretch);
  text-transform: uppercase;
  letter-spacing: -0.005em;
}
.s-affisch-tier + .s-affisch-tier {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 2px solid var(--border);
}
.s-gc-row {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.s-affisch-tier b { display: none; font-weight: 400; font-size: 0.5em; line-height: 1; color: var(--accent); }
.s-affisch-tier-1 { font-size: 16vw; line-height: 0.92; }
.s-affisch-tier-2 { font-size: 8.5vw; line-height: 1.05; }
.s-affisch-tier-3 { font-size: clamp(1.2rem, 5.5vw, 1.6rem); line-height: 1.3; font-weight: 800; font-stretch: 64%; color: var(--muted); }
@media (min-width: 760px) {
  .s-gc-row { flex-direction: row; flex-wrap: wrap; justify-content: center; column-gap: 0.28em; }
  .s-affisch-tier b { display: block; }
  .s-affisch-tier-1 { font-size: min(8vw, 9rem); }
  .s-affisch-tier-1 .s-gc-row + .s-gc-row { margin-top: 0.06em; }
  .s-affisch-tier-2 { font-size: min(5vw, 4.5rem); }
  .s-affisch-tier-3 { font-size: min(2.6vw, 2.4rem); }
}
.s-affisch-act { padding-inline: 0.05em; white-space: nowrap; transition: color 0.2s ease; }
.s-affisch-act:hover { color: var(--accent); }

/* page transitions */
/* ============================================================
   Page transitions — the foundation's, in CSS alone. A page
   crossfades into the next on every same-origin navigation, and
   the header holds still across it; the old page stays on screen
   until the new one can paint, so nothing flashes between them.
   Chrome and Safari animate; another browser, or a visitor who
   asked for less motion, gets a plain navigation. No script is
   involved. Never name a second element site-header: two of one
   name skip the transition.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  @supports (view-transition-name: root) {
    @view-transition {
      navigation: auto;
    }
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
      animation-duration: 220ms;
    }
    header:has(tickivo-account) {
      view-transition-name: site-header;
    }
  }
}
