/* Bygglund: Vurderinger. The reviews on a strip that drifts right to left (the strip from the Janis site, 24.10.2026, the one
   Sverre asked for on every customer site 25.10.2026: «lag heller en lik som det vi gjorde for janis akkurat. med alle på en
   rekke og pil som lar deg spole»). The Janis tokens are named here and pointed at Bygglund's own (css/tokens.css). */
.s03a {
  --grunn-eik: var(--betong);
  --tekst-demp: var(--tekst-dempet);
  --tekst-liten: 0.9375rem;
  --tekst-merke: var(--str-merke);
  --tekst-h3: var(--str-h2);
  --tekst-brod: var(--str-tekst);
  --font-display: var(--font);
  --bredde-tittel: 100%;
  --bredde-merke: 100%;
  --knapp: var(--grafitt);
  --knapp-hover: var(--grafitt-2);
  --knapp-tekst: var(--tekst-lys);
  --ease-ut: var(--mykt);
  --s03a-luft: var(--seksjon-luft);
  --s03a-gap: clamp(0.875rem, 0.6rem + 1vw, 1.375rem);
  --s03a-kort-b: clamp(17rem, 12rem + 14vw, 23rem);
  --s03a-kort-lang-b: clamp(19.5rem, 13rem + 20vw, 31rem);
  --s03a-fart: 40;
  --s03a-neste-skygge: var(--kort-skygge);
  --s03a-tid: 70s;
  --s03a-kant: 7%;
  --s03a-kort: var(--kort-kald);
  --s03a-bokstav: var(--grafitt);
  --s03a-gull: #9c7432;
  --s03a-gull-topp: #fcf0cc;
  --s03a-gull-midt: #e0bd70;
  --s03a-gull-bunn: #a57a33;
  --s03a-gull-refleks: #dcb76d;
  --s03a-gull-glans: #f7e8bd;
  --s03a-gull-linje: linear-gradient(90deg, var(--s03a-gull-bunn), var(--s03a-gull-midt) 20%, var(--s03a-gull-glans) 33%, var(--s03a-gull-midt) 46%, var(--s03a-gull-bunn) 62%, var(--s03a-gull-refleks) 80%, var(--s03a-gull-bunn));
  --s03a-gull-tekst: linear-gradient(180deg, var(--s03a-gull-topp), var(--s03a-gull-midt) 48%, var(--s03a-gull-bunn) 72%, var(--s03a-gull-refleks));
  --s03a-gull-lys: #efdfb4;
  --s03a-bokstav-tekst: var(--s03a-gull-lys);
}

.s03a {
  padding: var(--s03a-luft) 0;
  background: var(--grunn-eik);
  overflow: hidden;
}

.s03a-hode {
  display: grid;
  gap: 1.25rem;
  padding: 0 var(--marg);
  margin: 0 0 clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem);
}

.s03a-merke {
  margin: 0 0 0.85rem;
  color: var(--tekst-demp);
  font-size: var(--tekst-merke);
  font-weight: 600;
  font-stretch: var(--bredde-merke);
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-transform: uppercase;
}

.s03a-tittel {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--tekst-h3);
  font-weight: 500;
  font-stretch: var(--bredde-tittel);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.s03a-snitt { display: grid; gap: 0.6rem; }

/* the rating is one clean line: the number, and the stars over two short lines of text (Sverre 05.11.2026: «gjør det på bilde
   3 cleanere»); the average and the pause button left the head, the button stands by the arrow */
.s03a-tall {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0;
}
.s03a-tall-side { display: grid; justify-items: start; gap: 0.35rem; text-align: left; }

.s03a-tall-verdi {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.8rem + 1.6vw, 3.25rem);
  font-weight: 400;
  font-stretch: var(--bredde-tittel);
  line-height: 1;
  letter-spacing: -0.03em;
}

.s03a-tall-stjerner, .s03a-stjerner { display: inline-flex; gap: 2px; color: var(--s03a-gull); }
/* gold leaf: one gradient for every star (#s03a-gull-flate in index.html), with a deep gold edge */
.s03a-tall-stjerner path, .s03a-stjerner path { fill: url(#s03a-gull-flate); stroke: var(--s03a-gull); stroke-width: 0.6; stroke-linejoin: round; }
.s03a-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.s03a-defs stop:nth-child(1) { stop-color: var(--s03a-gull-topp); }
.s03a-defs stop:nth-child(2) { stop-color: var(--s03a-gull-midt); }
.s03a-defs stop:nth-child(3) { stop-color: var(--s03a-gull-bunn); }
.s03a-defs stop:nth-child(4) { stop-color: var(--s03a-gull-refleks); }
.s03a-tall-stjerner svg { width: 1.05rem; height: 1.05rem; }
.s03a-stjerner svg { width: 0.85rem; height: 0.85rem; }

.s03a-tall-tekst { max-width: 11.5em; color: var(--tekst-demp); font-size: var(--tekst-liten); line-height: 1.35; }

.s03a-merknad { margin: 0; color: var(--tekst-demp); font-size: var(--tekst-liten); }
.s03a-merknad:empty { display: none; }

.s03a-lenker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin: 0;
  font-size: var(--tekst-liten);
}

/* the pause button only exists while the strip moves: a round button in the controls by the arrow */
.s03a-pause {
  display: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--linje-sterk);
  border-radius: 50%;
  background: var(--grunn-eik);
  color: var(--tekst);
  font: inherit;
  cursor: pointer;
}
.s03a-pause-av, .s03a-pause-pa {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
/* the button shows once js/seksjon-03-anm.js runs the strip; 44 px for a thumb */
.s03a-klar .s03a-pause { display: grid; }
@media (pointer: coarse) {
  .s03a-pause { width: 2.75rem; height: 2.75rem; }
}
.s03a-pause:hover { border-color: var(--tekst); }
.s03a-pause:focus-visible { outline: 2px solid var(--tekst); outline-offset: 2px; }
.s03a-pause-ikon {
  width: 0.6rem;
  height: 0.7rem;
  border-left: 0.2rem solid currentColor;
  border-right: 0.2rem solid currentColor;
}
.s03a.pauset .s03a-pause-ikon {
  width: 0;
  height: 0;
  border-right: 0;
  border-left: 0.6rem solid currentColor;
  border-top: 0.36rem solid transparent;
  border-bottom: 0.36rem solid transparent;
}
.s03a-pause-pa { display: none; }
.s03a.pauset .s03a-pause-av { display: none; }
.s03a.pauset .s03a-pause-pa { display: inline; }

/* the strip: still and swipeable by default */
.s03a-spor {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--marg);
  scrollbar-width: none;
}
.s03a-spor::-webkit-scrollbar { display: none; }
.s03a-spor:focus-visible { outline: 2px solid var(--tekst); outline-offset: -2px; }

.s03a-bane {
  display: flex;
  width: max-content;
  padding-left: var(--marg);
}

.s03a-rad {
  display: flex;
  align-items: stretch;
  gap: var(--s03a-gap);
  margin: 0;
  padding: 0 var(--s03a-gap) 0 0;
  list-style: none;
}

.s03a-kopi { display: none; }

.s03a-kort {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  width: var(--s03a-kort-b);
  padding: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
  border: 1px solid var(--linje);
  border-top: 2px solid var(--s03a-gull);
  background: var(--s03a-kort);
  scroll-snap-align: start;
  position: relative;
}
/* the sheen on the gold top edge, over the border */
.s03a-kort::before { content: ""; position: absolute; top: -2px; left: -1px; right: -1px; height: 2px; background: var(--s03a-gull-linje); pointer-events: none; }
.s03a-kort-lang { width: var(--s03a-kort-lang-b); }

.s03a-topp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
}

.s03a-kilde {
  color: var(--tekst-demp);
  font-size: var(--tekst-merke);
  font-weight: 600;
  font-stretch: var(--bredde-merke);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.s03a-sitat { flex: 1; margin: 0; }
.s03a-sitat p {
  margin: 0;
  font-size: var(--tekst-brod);
  line-height: 1.5;
}
/* a short review is set large, like a headline */
.s03a-kort:not(.s03a-kort-lang) .s03a-sitat p {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.75rem);
  font-weight: 450;
  font-stretch: var(--bredde-tittel);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.s03a-navn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--linje);
  font-size: var(--tekst-liten);
  font-weight: 600;
  line-height: 1.3;
}

.s03a-bokstav {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--s03a-bokstav);
  color: var(--s03a-bokstav-tekst);
  font-weight: 600;
}

/* the initial in polished gold where the browser can paint text with a gradient; elsewhere the flat --s03a-gull-lys */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .s03a-bokstav > span { background: var(--s03a-gull-tekst); -webkit-background-clip: text; background-clip: text; color: transparent; }
}

.s03a-om { display: block; color: var(--tekst-demp); font-weight: 400; }

/* moving (js/seksjon-03-anm.js sets .s03a-klar): the copies it makes close the loop, as many as the screen needs,
   and the lane slides one row to the left (--s03a-w, measured), then starts over */
.s03a-klar .s03a-spor {
  position: relative;
  /* clip, not just hidden: a text fragment link or scrollIntoView cannot shift the row and open a gap in the loop */
  overflow: hidden;
  overflow: clip;
  scroll-snap-type: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--s03a-kant), #000 calc(100% - var(--s03a-kant)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--s03a-kant), #000 calc(100% - var(--s03a-kant)), transparent);
}
.s03a-klar .s03a-bane {
  padding-left: 0;
  animation: s03a-rull var(--s03a-tid) linear infinite;
  will-change: transform;
}
.s03a-klar .s03a-kopi { display: block; }
.s03a-klar.pauset .s03a-bane { animation-play-state: paused; }
.s03a-klar .s03a-spor:focus-visible .s03a-bane { animation-play-state: paused; }   /* keyboard only: a tap must not freeze it */
/* the lane is its own layer and would cover an outline: the ring sits on top, and the edges stop fading while it shows */
.s03a-klar .s03a-spor:focus-visible { outline: none; -webkit-mask-image: none; mask-image: none; }
.s03a-klar .s03a-spor:focus-visible::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 2px solid var(--tekst);
  pointer-events: none;
}

/* the arrow on the right (Sverre 25.10: «en pil på høyre side som lar deg hoppe litt fremover hver gang du trykker»):
   over the strip's right edge in .s03a-ramme, outside the strip's fading mask, in the site's button colours; js runs
   it, so it only shows while the strip moves */
.s03a-ramme { position: relative; }
.s03a-neste {
  display: none;
  position: absolute;
  top: 50%;
  right: var(--marg);
  z-index: 2;
  width: 3rem;
  height: 3rem;
  margin-top: -1.5rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--knapp);
  border-radius: 50%;
  background: var(--knapp);
  color: var(--knapp-tekst);
  box-shadow: var(--s03a-neste-skygge);
  cursor: pointer;
  touch-action: manipulation;   /* two quick taps are two jumps, not a zoom */
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease-ut);
}
.s03a-klar .s03a-neste { display: grid; }
.s03a-neste svg { width: 1.25rem; height: 1.25rem; }
.s03a-neste:hover { border-color: var(--knapp-hover); background: var(--knapp-hover); }
.s03a-neste:active { transform: scale(0.94); }
.s03a-neste:focus-visible { outline: 2px solid var(--tekst); outline-offset: 3px; }
/* on a phone or a tablet the fade is narrower than the arrow, which would cover the cards' text as they pass under it:
   it stands under the strip, on the right (Sverre 25.10: «ja fiks det med telefon»; the tablets by the same reason) */
.s03a-styr .s03a-pause { position: absolute; top: calc(50% + 2.1rem); right: calc(var(--marg) + 0.25rem); z-index: 2; }
@media (max-width: 1023px) {
  .s03a-styr { display: flex; justify-content: flex-end; align-items: center; gap: 0.6rem; margin: 0.75rem var(--marg) 0; }
  .s03a-styr .s03a-pause { position: static; }
  .s03a-neste { position: static; margin: 0; }
}

/* from 1024 px the arrow and the pause button stand over the strip's right edge: there the cards fade out before the
   buttons begin (10.11.2026, pass 1: the old 7 % fade left the words under the arrow at half strength), so no text runs
   under them; the left edge keeps the 7 % fade, and a keyboard focus still lifts the mask (the rule above wins) */
@media not all and (max-width: 1023px) {   /* the exact opposite of the phone rule above, also at 1023.5 px (zoom) */
  .s03a-klar .s03a-spor {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--s03a-kant), #000 calc(100% - var(--marg) - 12rem), transparent calc(100% - var(--marg) - 3.75rem));
    mask-image: linear-gradient(to right, transparent, #000 var(--s03a-kant), #000 calc(100% - var(--marg) - 12rem), transparent calc(100% - var(--marg) - 3.75rem));
  }
}

@keyframes s03a-rull {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-1 * var(--s03a-w, 0px)), 0, 0); }
}

@media (min-width: 768px) {
  .s03a-hode {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 2rem;
  }
  .s03a-snitt { justify-items: end; text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  .s03a-bane { animation: none !important; }
  /* turned on after the page loaded: back to the still row you can swipe */
  .s03a-klar .s03a-spor { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-mask-image: none; mask-image: none; }
  .s03a-klar .s03a-spor:focus-visible { outline: 2px solid var(--tekst); }
  .s03a-klar .s03a-spor:focus-visible::after { content: none; }
  .s03a-klar .s03a-bane { padding-left: var(--marg); }
  .s03a-klar .s03a-kopi, .s03a-klar .s03a-pause, .s03a-klar .s03a-neste { display: none; }
}

/* phones (mobile pass 08.11.2026): the name and the job under each review, and the line beside the count, at a readable size */
@media (max-width: 767px) {
  .s03a-hvem, .s03a-om, .s03a-tall-tekst { font-size: 1rem; }
}
