/*
 * The sales page for Ringvirke. Same typeface and greens as the app (mysite/theme/DESIGN.md), on a
 * deep forest hero. The one moving element is the ring diagram in the hero, which shows what the
 * product does: an item is shared outwards, one ring at a time, until someone reserves it.
 * Everything else is still. With reduced motion the diagram shows its end state.
 */

@font-face {
  font-family: "Figtree";
  src: url("fonter/figtree-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  src: url("fonter/figtree-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --skog: #0e3b2c;
  --skog-2: #13493a;
  --granskog: #16674a;
  --granskog-sterk: #0e5139;
  --lysgronn: #6fd0a2;
  --mose: #f2f3ef;
  --flate: #ffffff;
  --ink: #1a1d1b;
  --ink-2: #5f6661;
  --lys-tekst: #c9dbd0;
  --rav: #e9a23b;
  --linje: rgb(26 29 27 / 0.1);
  --skygge: 0 40px 80px -30px rgb(14 59 44 / 0.45), 0 0 0 1px rgb(26 29 27 / 0.06);
}

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

html {
  font-family: "Figtree", system-ui, sans-serif;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--mose);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "tnum" 0;
}
@media (min-width: 48rem) {
  body { font-size: 1.125rem; }
}

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

h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

a { color: var(--granskog); text-underline-offset: 0.2em; }

:focus-visible {
  outline: 3px solid var(--granskog);
  outline-offset: 3px;
  border-radius: 6px;
}
.topp :focus-visible, .mork :focus-visible { outline-color: var(--lysgronn); }

.hopp {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--mose);
  color: var(--skog);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-weight: 600;
}
.hopp:focus { top: 1rem; }

.bredde {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}

/* Header and hero, on the dark forest green */

.topp, .mork {
  background: var(--skog);
  color: var(--mose);
}
.mork {
  background:
    radial-gradient(60rem 40rem at 80% 30%, var(--skog-2), transparent 70%),
    var(--skog);
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}

.hode {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: 1.25rem;
}
.merke {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--mose);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.merke .kjerne { fill: var(--lysgronn); }
.merke .naadd { fill: none; stroke: var(--lysgronn); stroke-width: 2.2; }
.merke .ytre { fill: none; stroke: var(--lysgronn); stroke-opacity: 0.35; stroke-width: 2.2; }

.meny {
  display: none;
  gap: 1.75rem;
  margin-left: auto;
  font-weight: 500;
}
.meny a { color: var(--lys-tekst); text-decoration: none; }
.meny a:hover { color: var(--mose); }
.hode > .knapp { margin-left: auto; }
@media (min-width: 52rem) {
  .meny { display: flex; }
  .hode > .knapp { margin-left: 0; }
}

.helt {
  display: grid;
  gap: 3rem;
  align-items: center;
  padding-top: clamp(2rem, 6vw, 4.5rem);
}
@media (min-width: 60rem) {
  .helt { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 4rem; }
}

h1 {
  font-size: clamp(2.5rem, 4.2vw + 1.2rem, 4.4rem);
  line-height: 1.03;
  font-weight: 750;
  letter-spacing: -0.038em;
}
.ingress {
  margin-top: 1.5rem;
  max-width: 34em;
  font-size: clamp(1.125rem, 0.5vw + 1rem, 1.3rem);
  color: var(--lys-tekst);
}
.handlinger {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.fotnote-lys {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--lys-tekst);
}

/* Buttons: 48px tall pills that say what happens */

.knapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.4rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.knapp-liten { min-height: 2.75rem; padding: 0 1.1rem; font-size: 0.9375rem; }
.knapp-lys { background: var(--mose); color: var(--skog); }
.knapp-lys:hover { background: #ffffff; }
.knapp-lys-kant { color: var(--mose); box-shadow: inset 0 0 0 1.5px rgb(242 243 239 / 0.55); }
.knapp-lys-kant:hover { box-shadow: inset 0 0 0 1.5px var(--mose); background: rgb(242 243 239 / 0.06); }
.knapp-mork { background: var(--granskog); color: #ffffff; }
.knapp-mork:hover { background: var(--granskog-sterk); }

/* The ring diagram */

.ringer { margin: 0; }
.ringer svg {
  display: block;
  width: min(100%, 30rem);
  margin-inline: auto;
  overflow: visible;
  font-family: inherit;
}
.ring { fill: none; stroke: rgb(242 243 239 / 0.16); stroke-width: 1.5; }
.boelge { fill: none; stroke: var(--lysgronn); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.kommuner circle { fill: rgb(242 243 239 / 0.3); }
.kommuner text, .stol-tekst { fill: var(--lys-tekst); font-size: 15px; font-weight: 550; }
.andre circle { fill: rgb(242 243 239 / 0.22); }
.stol-kant { fill: var(--mose); }
.stol-ikon { fill: none; stroke: var(--granskog); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.andre text { fill: var(--lys-tekst); font-size: 15px; font-weight: 550; }
.stol { transform-box: fill-box; transform-origin: center; }
.reise { fill: var(--rav); opacity: 0; }
.reservert rect { fill: var(--rav); }
.reservert text { fill: #2c1d04; font-size: 13px; font-weight: 700; }
.reservert { opacity: 0; }

.trinn-ringer {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.35;
}
.trinn-ringer li {
  border-top: 2px solid rgb(242 243 239 / 0.2);
  padding-top: 0.6rem;
  color: var(--lys-tekst);
}
.trinn-ringer strong { display: block; color: var(--mose); font-weight: 650; }

@media (prefers-reduced-motion: no-preference) {
  .stol { animation: stol 12s infinite; }
  .ring-1 { animation: ring-1 12s infinite; }
  .ring-2 { animation: ring-2 12s infinite; }
  .ring-3 { animation: ring-3 12s infinite; }
  .boelge-1 { animation: boelge-1 12s infinite; }
  .boelge-2 { animation: boelge-2 12s infinite; }
  .boelge-3 { animation: boelge-3 12s infinite; }
  .kommuner circle { animation: kommuner 12s infinite; }
  .andre circle { animation: andre 12s infinite; }
  .reise { animation: reise 12s infinite cubic-bezier(.5, 0, .3, 1); }
  .reservert { animation: reservert 12s infinite; }
  .trinn-1 { animation: trinn-1 12s infinite; }
  .trinn-2 { animation: trinn-2 12s infinite; }
  .trinn-3 { animation: trinn-3 12s infinite; }
}

/* With reduced motion, the end state: every ring reached and the chair reserved. */
@media (prefers-reduced-motion: reduce) {
  .ring { stroke: var(--lysgronn); stroke-opacity: 0.7; }
  .kommuner circle { fill: var(--lysgronn); }
  .andre circle { fill: var(--lysgronn); fill-opacity: 0.7; }
  .reservert { opacity: 1; }
  .trinn-ringer li { border-top-color: var(--lysgronn); }
}

@keyframes stol {
  0% { transform: scale(0.6); opacity: 0; }
  6%, 92% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}
@keyframes boelge-1 {
  0%, 6% { transform: scale(0.6); opacity: 0; }
  8% { opacity: 0.9; }
  16% { transform: scale(1); opacity: 0; }
  100% { opacity: 0; }
}
@keyframes ring-1 {
  0%, 12% { stroke: rgb(242 243 239 / 0.16); }
  16%, 92% { stroke: var(--lysgronn); }
  100% { stroke: rgb(242 243 239 / 0.16); }
}
@keyframes boelge-2 {
  0%, 28% { transform: scale(0.52); opacity: 0; }
  30% { opacity: 0.9; }
  40% { transform: scale(1); opacity: 0; }
  100% { opacity: 0; }
}
@keyframes ring-2 {
  0%, 36% { stroke: rgb(242 243 239 / 0.16); }
  40%, 92% { stroke: var(--lysgronn); }
  100% { stroke: rgb(242 243 239 / 0.16); }
}
@keyframes kommuner {
  0%, 36% { fill: rgb(242 243 239 / 0.3); }
  40%, 92% { fill: var(--lysgronn); }
  100% { fill: rgb(242 243 239 / 0.3); }
}
@keyframes boelge-3 {
  0%, 50% { transform: scale(0.68); opacity: 0; }
  52% { opacity: 0.8; }
  62% { transform: scale(1); opacity: 0; }
  100% { opacity: 0; }
}
@keyframes ring-3 {
  0%, 58% { stroke: rgb(242 243 239 / 0.16); }
  62%, 92% { stroke: rgb(111 208 162 / 0.6); }
  100% { stroke: rgb(242 243 239 / 0.16); }
}
@keyframes andre {
  0%, 58% { fill: rgb(242 243 239 / 0.22); }
  62%, 92% { fill: rgb(111 208 162 / 0.7); }
  100% { fill: rgb(242 243 239 / 0.22); }
}
@keyframes reise {
  0%, 66% { transform: translate(0, 0); opacity: 0; }
  67% { opacity: 1; }
  76% { transform: translate(141px, 51px); opacity: 1; }
  92% { transform: translate(141px, 51px); opacity: 1; }
  100% { transform: translate(141px, 51px); opacity: 0; }
}
@keyframes reservert {
  0%, 76% { opacity: 0; transform: translateY(6px); }
  80%, 92% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; }
}
@keyframes trinn-1 {
  0%, 12% { border-top-color: rgb(242 243 239 / 0.2); }
  16%, 92% { border-top-color: var(--lysgronn); }
  100% { border-top-color: rgb(242 243 239 / 0.2); }
}
@keyframes trinn-2 {
  0%, 36% { border-top-color: rgb(242 243 239 / 0.2); }
  40%, 92% { border-top-color: var(--lysgronn); }
  100% { border-top-color: rgb(242 243 239 / 0.2); }
}
@keyframes trinn-3 {
  0%, 58% { border-top-color: rgb(242 243 239 / 0.2); }
  62%, 92% { border-top-color: var(--lysgronn); }
  100% { border-top-color: rgb(242 243 239 / 0.2); }
}

/* Light sections */

.seksjon { padding-block: clamp(4rem, 9vw, 7rem) 0; }

h2 {
  font-size: clamp(1.9rem, 2.4vw + 1rem, 2.85rem);
  line-height: 1.08;
  font-weight: 720;
  letter-spacing: -0.03em;
  max-width: 20em;
}
h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
  font-weight: 680;
  letter-spacing: -0.01em;
}
.seksjon-ingress {
  margin-top: 1rem;
  max-width: 38em;
  color: var(--ink-2);
  font-size: 1.1875rem;
}

/* The four steps are a real sequence: a line runs through numbered points. */
.reise-steg {
  list-style: none;
  counter-reset: steg;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  gap: 2rem;
}
.reise-steg li {
  counter-increment: steg;
  position: relative;
  padding-left: 3.5rem;
}
.reise-steg li::before {
  content: counter(steg);
  position: absolute;
  left: 0;
  top: -0.15rem;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--flate);
  box-shadow: inset 0 0 0 2px var(--granskog);
  color: var(--granskog);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.reise-steg li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1.2rem;
  top: 2.5rem;
  bottom: -2rem;
  width: 2px;
  background: linear-gradient(var(--granskog), rgb(22 103 74 / 0.15));
}
.reise-steg p { margin-top: 0.4rem; color: var(--ink-2); max-width: 30em; }
@media (min-width: 60rem) {
  .reise-steg { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
  .reise-steg li { padding-left: 0; padding-top: 3.75rem; }
  .reise-steg li::before { top: 0; }
  .reise-steg li:not(:last-child)::after { left: 2.9rem; right: -1.6rem; top: 1.15rem; bottom: auto; width: auto; height: 2px; background: linear-gradient(90deg, var(--granskog), rgb(22 103 74 / 0.15)); }
}

/* A feature with a phone screenshot beside it */
.funksjon, .rapport {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-top: clamp(5rem, 10vw, 8rem);
}
.funksjon-tekst p { margin-top: 1rem; color: var(--ink-2); max-width: 32em; }
.funksjon-tekst h2 { max-width: 14em; }
@media (min-width: 52rem) {
  .funksjon { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: 5rem; }
  .funksjon.snudd { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); }
  .funksjon.snudd .telefon { order: -1; }
}

.telefon {
  margin: 0 auto;
  width: min(100%, 20rem);
  border: 10px solid var(--ink);
  border-radius: 3rem;
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--skygge);
}
.telefon img { border-radius: 2.4rem; }

.rapport .funksjon-tekst { max-width: 46rem; }
.nettleser { margin: 0; }
.nettleser img {
  border-radius: 1.25rem;
  box-shadow: var(--skygge);
  background: var(--flate);
}
.nettleser figcaption {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--ink-2);
}

/* Facts for IT and administration */
.fakta {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 2rem 3rem;
}
@media (min-width: 40rem) { .fakta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .fakta { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fakta li {
  border-top: 2px solid var(--granskog);
  padding-top: 1rem;
}
.fakta p { margin-top: 0.4rem; color: var(--ink-2); }

.om > div { max-width: 40rem; }
.om p { margin-top: 1rem; color: var(--ink-2); }
.om a { font-weight: 600; }

.avslutning {
  margin-top: clamp(5rem, 10vw, 8rem);
  padding: clamp(2.5rem, 6vw, 4rem);
  border-radius: 2rem;
  background: var(--flate);
  box-shadow: 0 0 0 1px var(--linje);
}
.avslutning p { margin: 1rem 0 1.75rem; color: var(--ink-2); max-width: 34em; }

.bunn {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 3rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.bunn-meny { display: flex; gap: 1.5rem; }
.bunn-meny a { color: var(--ink-2); }

/* The privacy page */
.tekstside { max-width: 42rem; padding-block: 3rem 4rem; }
.tekstside h1 { font-size: clamp(2.2rem, 3vw + 1rem, 3rem); margin-bottom: 1.5rem; }
.tekstside h2 { font-size: 1.4rem; margin-top: 2.25rem; }
.tekstside p, .tekstside li { color: var(--ink-2); margin-top: 0.75rem; }
