/* KLIRR HACK — gemensam stilmall för alla sidor.
   Mått och färger avlästa från Squarespace-originalet 2026-09-29 (desktop 1440 px).
   Rubriker: Bebas Neue ersätter Squarespaces licensierade Rama Gothic E. */

:root {
  --bg: #000;
  --fg: #fff;
  --accent: #f08e80;          /* knappar, länkade rubriker */
  --muted: rgba(255, 255, 255, .72);

  --font-body: 'Space Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --font-head: 'Bebas Neue', 'Arial Narrow', 'Helvetica Neue Condensed', Impact, sans-serif;

  /* Textstorlekar: originalets 19.36 / 16 / 14.27 px */
  --text-lg: clamp(1rem, .9rem + .35vw, 1.21rem);
  --text-md: 1rem;
  --text-sm: .892rem;

  /* Rubrikstorlekar: originalets 96.6 / 42.9 / 26.1 px */
  --h-xl: clamp(3rem, 1.6rem + 5.2vw, 6.04rem);
  --h-lg: clamp(2rem, 1.5rem + 1.6vw, 2.68rem);
  --h-md: clamp(1.4rem, 1.2rem + .6vw, 1.63rem);

  --gutter: clamp(1rem, 3vw, 2.7rem);
  --wide: 84.6rem;            /* 1354 px */
  --content: 56.2rem;         /* 899 px — brödtext på startsidan */
  --narrow: 49rem;            /* 785 px */
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  line-height: 1.4;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

p { margin: 0 0 1rem; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: .95;
  margin: 0 0 1.5rem;
}
.h-xl { font-size: var(--h-xl); }
.h-lg { font-size: var(--h-lg); }
.h-md { font-size: var(--h-md); }

.center { text-align: center; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--fg); color: var(--bg);
  padding: .6rem 1rem; font-size: var(--text-sm);
}
.skip-link:focus { top: 1rem; }

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

/* ---------- Behållare ---------- */

.wrap { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }
.wrap--content { width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), var(--narrow)); margin-inline: auto; }
.wrap--mid { width: min(100% - 2 * var(--gutter), 63.25rem); margin-inline: auto; }   /* 1012 px */

.section { padding-block: clamp(3rem, 6vw, 6rem); }

/* ---------- Sidhuvud ---------- */

.site-header {
  position: relative; z-index: 10;
  padding: 2.6rem var(--gutter) 1rem;
  text-align: center;
}
.site-title {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 1.75rem;
  letter-spacing: -.02em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
}
.site-nav ul {
  list-style: none; margin: 1.6rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.8rem;
}
.site-nav a {
  font-size: var(--text-sm);
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: .02em;
  padding-block: .2rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .3em; }

/* ---------- Sidfot ---------- */

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 2rem;
  padding: 2.8rem var(--gutter);
  font-size: var(--text-sm);
}
.site-footer p { margin: 0; }
.site-footer .today { color: var(--muted); }

/* ---------- Knappar ---------- */

.button {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  letter-spacing: .02em;
  text-decoration: none;
  text-align: center;
  padding: 1.2rem 1.6rem;
  transition: background-color .2s, color .2s;
}
.button:hover { background: var(--accent); color: var(--bg); }
.button--wide { min-width: min(100%, 20.6rem); padding-block: 1.45rem; }
.button--light { border-color: var(--fg); color: var(--fg); }
.button--light:hover { background: var(--fg); color: var(--bg); }

/* ---------- Hero med rullande text ---------- */

.hero {
  position: relative;
  margin-top: -10.8rem;                 /* sidhuvudet ligger ovanpå heron, som i originalet */
  padding-top: 17rem;
  background: linear-gradient(to bottom, #000 0%, #070707 35%, #1a1a1a 70%, #323232 100%);
  overflow: hidden;
}
.hero__tagline { text-align: center; margin: 0 var(--gutter) 1.8rem; }
.hero__stage { position: relative; }
.hero__glass {
  position: absolute; inset: 0 0 auto 0;
  width: 100%; height: auto;
  pointer-events: none;
  z-index: 2;
}
.hero__after { height: clamp(8rem, 42vw, 38rem); }   /* luft under texten där glaset syns */

.marquee {
  position: relative; z-index: 1;
  overflow: hidden;
  padding-block: 2.2vw;
  /* tonade kanter som i originalet */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
}
.marquee__track {
  display: flex; width: max-content;
  animation: marquee var(--marquee-duration, 60s) linear infinite;
  will-change: transform;
}
.marquee__group { display: flex; flex-shrink: 0; }
.marquee__item {
  font-family: var(--font-head);
  font-size: 26vw;
  line-height: .9;
  letter-spacing: -.03em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-right: .5em;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ---------- Tvåspaltig intro (startsidan) ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 14.5rem) minmax(0, var(--content));
  gap: 1.5rem clamp(1rem, 4vw, 4rem);
  width: min(100% - 2 * var(--gutter), var(--wide));
  margin-inline: auto;
}
.split__label { font-size: var(--h-md); }

/* ---------- Arrangörer (startsidan) ---------- */

.org {
  display: grid;
  grid-template-columns: minmax(0, 20.6rem) minmax(0, var(--narrow));
  gap: 2rem clamp(1.5rem, 4.5vw, 4.2rem);
  align-items: center;
  margin-bottom: 3rem;
}
.org__logo { justify-self: center; }
.org__logo--sambruk { width: 20.6rem; }
.org__logo--gavle { width: 7.9rem; }
.org h3 a { color: var(--accent); text-underline-offset: .15em; text-decoration-thickness: 1px; }
.orgs-title { margin-left: calc(20.6rem + clamp(1.5rem, 4.5vw, 4.2rem)); }

/* ---------- Kortrutnät (partners) ---------- */

.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4rem clamp(1rem, 3vw, 2.5rem);
}
.card { max-width: 13.2rem; margin-inline: auto; width: 100%; font-size: var(--text-md); }
.card__logo { width: 100%; margin-bottom: 1.3rem; }
.card h3 { font-size: var(--h-md); margin-bottom: .6rem; }
.card .button { margin-top: .4rem; }

/* ---------- Värdstad (startsidan) ---------- */

.host { width: min(100% - 2 * var(--gutter), 81rem); margin-inline: auto; }
.host img { width: 100%; object-fit: cover; }
/* Collaget: originalets positioner på en 1296 × 1156 px stor yta, omräknade till procent */
@media (min-width: 72rem) {
  .host { position: relative; aspect-ratio: 1296 / 1156; }
  .host > * { position: absolute; margin: 0; }
  .host .host__title { left: 0; top: 0; width: 78%; }
  .host .host__text { left: 0; top: 10.8%; width: 47.4%; }
  .host .host__img--julbock { left: 52.6%; top: 7.35%; width: 47.4%; height: 82.3%; z-index: 2; }
  .host .host__img--arkitektur { left: 0; top: 45.5%; width: 56.2%; height: 51%; z-index: 1; }
  .host .host__img--vag { left: 30.7%; top: 69.7%; width: 34.3%; height: 30.3%; z-index: 3; }
}

/* ---------- Flikar (accordion) ---------- */

.accordion { border-top: 1px solid rgba(255, 255, 255, .0); }
.accordion details { padding-block: .6rem; }
.accordion summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  cursor: pointer; list-style: none;
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: 1;
  padding-block: .5rem;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; flex: none;
  width: .6em; height: .6em;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform .25s;
}
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion--lg summary { font-size: var(--h-lg); }
.accordion--md summary { font-size: var(--h-md); }
.accordion__body { padding: 1.5rem 0 1rem; }
.accordion--lg .accordion__body { padding-left: clamp(0rem, 8vw, 7.4rem); }
.accordion--md .accordion__body { font-size: var(--text-sm); }

.contact { display: grid; grid-template-columns: minmax(0, 31rem) minmax(0, var(--narrow)); gap: 1rem 2rem; }

/* ---------- Jury-karusell (team) ---------- */

.carousel { position: relative; }
.carousel__track {
  list-style: none; margin: 0; padding: 0 var(--gutter);
  display: grid; grid-auto-flow: column; grid-auto-columns: min(26.6rem, 82vw);
  gap: 1.25rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > li { scroll-snap-align: start; font-size: var(--text-md); }
.carousel__track img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: .7rem; }
.carousel__track h3 { font-size: clamp(2rem, 1.6rem + 1vw, 2.58rem); margin-bottom: .5rem; }
.carousel__btn {
  position: absolute; top: 5.5rem; z-index: 2;
  width: 3rem; height: 3rem; border-radius: 50%; border: 0;
  background: var(--accent); color: var(--fg);
  font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.carousel__btn--prev { left: calc(var(--gutter) + 1rem); }
.carousel__btn--next { right: calc(var(--gutter) + 1rem); }
.carousel__btn:disabled { opacity: .35; cursor: default; }

/* ---------- Mentorer + arrangörer (team) ---------- */

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3.6rem 1.25rem;
  font-size: var(--text-sm);
}
.grid3 h3 { font-size: var(--h-md); margin-bottom: 1.8rem; }
.grid3__note { grid-column: 2; text-align: center; }

.people .person img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; margin-bottom: .9rem; }
.people h3 { font-size: var(--text-lg); margin-bottom: .1rem; }
.people .role { text-transform: uppercase; margin-bottom: 1rem; }

/* ---------- Vinnare (deltagare) ---------- */

.results { font-size: var(--text-lg); width: min(100% - 2 * var(--gutter), var(--content)); margin-inline: auto; }
.results > :not(h1) { max-width: 42rem; margin-inline: auto; }   /* rubrik 899 px, text 671 px som originalet */
.results h3 { font-size: var(--h-lg); margin-top: 3.5rem; }
.results ul { font-size: var(--text-sm); padding-left: 2.5rem; margin-bottom: 1rem; }
.results li { margin-bottom: .4rem; }
.results .small { font-size: var(--text-sm); }

/* ---------- Mobil ---------- */

@media (max-width: 60rem) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3__note { grid-column: 1 / -1; }
}

@media (max-width: 47.9375rem) {       /* originalets brytpunkt 767 px */
  .hero { margin-top: -9rem; padding-top: 12rem; }
  .split, .org, .contact { grid-template-columns: minmax(0, 1fr); }
  .org__logo { justify-self: start; }
  .orgs-title { margin-left: 0; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { max-width: 22rem; margin-inline: 0; }
  .card__logo { max-width: 13.2rem; }
  .host { display: flex; flex-direction: column; gap: 1rem; }
  .grid3 { grid-template-columns: minmax(0, 1fr); }
  .people .spacer { display: none; }
  .carousel__btn { top: 4rem; }
  .site-footer { flex-direction: column; }
}
