/* Nettbørsen landing. Print-shop vocabulary: a proof sheet with crop marks,
   a registration mark and one process-colour control strip. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --paper: #eef1f4;      /* cool coated stock */
  --sheet: #ffffff;
  --ink: #172033;        /* rich black, cool */
  --ink-soft: #4f5a6e;
  --rule: #c9d0da;
  --cyan: #009fe3;       /* process cyan, decorative only */
  --cyan-ink: #006a99;   /* cyan dark enough for white text (AA) */
  --cyan-tint: #dcf1fb;
  --magenta: #e6007e;
  --yellow: #ffed00;
  --measure: 62ch;
  --gap: clamp(1rem, 2.5vw, 2rem);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--cyan-ink);
  outline-offset: 3px;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--sheet);
  padding: .5rem 1rem;
  z-index: 10;
}
.skip:focus { top: 1rem; }

/* ---------- header ---------- */

.top { padding-block: 1.25rem; }

.top__row {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  font-weight: 800;
  font-stretch: 125%;
  font-size: 1.35rem;
  letter-spacing: -.01em;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
}
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: .7rem 1.2rem;
  border: 2px solid var(--ink);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
}

.btn--primary {
  background: var(--cyan-ink);
  border-color: var(--cyan-ink);
  color: #fff;
}
.btn--primary:hover { background: var(--ink); border-color: var(--ink); }

.btn--ghost:hover { background: var(--ink); color: var(--sheet); }

/* ---------- hero ---------- */

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

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

h1,
h2 {
  font-weight: 800;
  font-stretch: 118%;
  letter-spacing: -.02em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6.2vw, 5.1rem); }

h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); }

.lead {
  max-width: 34rem;
  font-size: 1.25rem;
  color: var(--ink-soft);
  margin: 1.5rem 0 2rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* ---------- the proof sheet ---------- */

.proof {
  position: relative;
  margin: 0;
  padding: 1.75rem;      /* room for the crop marks */
  color: var(--ink);
}

/* crop marks: four L-shapes just outside the sheet's corners */
.proof::before,
.proof::after,
.proof__sheet::before,
.proof__sheet::after {
  content: "";
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border-color: var(--ink);
  border-style: solid;
  border-width: 0;
}
.proof::before { top: 0; left: 0; border-right-width: 1px; border-bottom-width: 1px; }
.proof::after { top: 0; right: 0; border-left-width: 1px; border-bottom-width: 1px; }
.proof__sheet::before { bottom: -1.75rem; left: -1.75rem; border-right-width: 1px; border-top-width: 1px; }
.proof__sheet::after { bottom: -1.75rem; right: -1.75rem; border-left-width: 1px; border-top-width: 1px; }

.proof__sheet {
  position: relative;
  background: var(--sheet);
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 1px 0 var(--rule);
}

.proof__reg {
  position: absolute;
  width: 1.1rem;
  right: 50%;
  bottom: .3rem;
  transform: translateX(50%);
  color: var(--ink);
}

.proof__tag {
  margin: 0 0 1rem;
  font-size: .85rem;
  color: var(--ink-soft);
}

.proof__job {
  margin: 0;
  font-weight: 700;
  font-size: 1.2rem;
}

.proof__deadline {
  margin: .15rem 0 1.25rem;
  color: var(--ink-soft);
}

.bids {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.bids li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem .5rem;
  border-bottom: 1px solid var(--rule);
}

.amount {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* every bid but the last is undercut later: strike it out once the next arrives */
.bids li:not(.bids__low) .amount {
  text-decoration: line-through;
  text-decoration-color: var(--ink-soft);
  color: var(--ink-soft);
  font-weight: 400;
}

.bids__low {
  background: var(--cyan-tint);
  box-shadow: inset 4px 0 0 var(--cyan);
}

.proof__result {
  margin: 1rem 0 0;
  font-size: 1.05rem;
}

.proof__result strong {
  font-stretch: 112%;
  font-weight: 800;
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  margin-left: .25rem;
}

/* The one moment of motion: bids arrive in order and the lowest settles. */
@media (prefers-reduced-motion: no-preference) {
  .bids li {
    animation: bid-in .45s ease-out both;
  }
  .bids li:nth-child(1) { animation-delay: .2s; }
  .bids li:nth-child(2) { animation-delay: .65s; }
  .bids li:nth-child(3) { animation-delay: 1.1s; }
  .bids li:nth-child(4) { animation-delay: 1.55s; }
  .bids li:nth-child(5) { animation-delay: 2s; }

  .bids li:not(.bids__low) .amount {
    animation: undercut .3s ease-out both;
  }
  .bids li:nth-child(1) .amount { animation-delay: .65s; }
  .bids li:nth-child(2) .amount { animation-delay: 1.1s; }
  .bids li:nth-child(3) .amount { animation-delay: 1.55s; }
  .bids li:nth-child(4) .amount { animation-delay: 2s; }

  .proof__result { animation: bid-in .45s ease-out 2.5s both; }
}

@keyframes bid-in {
  from { opacity: 0; transform: translateY(-.4rem); }
  to { opacity: 1; transform: none; }
}

@keyframes undercut {
  from { text-decoration-color: transparent; color: var(--ink); font-weight: 600; }
}

/* ---------- process colour strip ---------- */

.colourbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 10px;
}
.colourbar span:nth-child(1) { background: var(--cyan); }
.colourbar span:nth-child(2) { background: var(--magenta); }
.colourbar span:nth-child(3) { background: var(--yellow); }
.colourbar span:nth-child(4) { background: var(--ink); }

/* ---------- steps (a real sequence, so numbered) ---------- */

.steps {
  background: var(--sheet);
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.steps__list {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  margin: 2.5rem 0 0;
  padding: 0;
}

.steps__list li {
  counter-increment: step;
  border-top: 2px solid var(--ink);
  padding-top: 1rem;
}

.steps__list li::before {
  content: counter(step);
  display: block;
  font-weight: 800;
  font-stretch: 125%;
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: .75rem;
  font-variant-numeric: tabular-nums;
}

.steps__list li:last-child { border-top-color: var(--cyan); }

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 .4rem;
  line-height: 1.25;
}

.steps__list p { margin: 0; color: var(--ink-soft); }

/* ---------- buyers / suppliers ---------- */

.sides { padding-block: clamp(3rem, 7vw, 5.5rem); }

.sides__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.side { padding-right: clamp(1.5rem, 4vw, 3.5rem); scroll-margin-top: 1.5rem; }

.side + .side {
  border-left: 1px solid var(--rule);
  padding-left: clamp(1.5rem, 4vw, 3.5rem);
  padding-right: 0;
}

.side dl { margin: 2rem 0 0; max-width: var(--measure); }

.side dt {
  font-weight: 700;
  font-size: 1.15rem;
}

.side dd {
  margin: .3rem 0 1.5rem;
  color: var(--ink-soft);
}

/* ---------- contact ---------- */

.contact {
  background: var(--ink);
  color: var(--sheet);
  padding-block: clamp(3rem, 7vw, 5rem);
  scroll-margin-top: 0;
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--gap) 4rem;
  align-items: end;
}

.contact p {
  max-width: 34rem;
  color: #c8d0dd;
  margin: 1rem 0 0;
}

.contact__ways {
  display: grid;
  justify-items: start;
  gap: .5rem;
}

.contact__line {
  font-weight: 700;
  font-stretch: 112%;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  text-decoration: none;
}
.contact__line:hover { text-decoration: underline; text-underline-offset: .2em; }

.contact .btn { border-color: var(--sheet); margin-top: .75rem; }
.contact .btn:hover { background: var(--sheet); color: var(--ink); }
.contact :focus-visible { outline-color: var(--cyan); }

/* ---------- footer ---------- */

.foot {
  padding-block: 2rem 2.5rem;
  font-size: .95rem;
  color: var(--ink-soft);
}

.foot__row {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.foot p { margin: 0; }

.foot__links { display: flex; gap: 1.25rem; align-items: flex-start; }

/* ---------- narrow screens ---------- */

@media (max-width: 60rem) {
  .hero__grid { grid-template-columns: 1fr; }
  .proof { max-width: 30rem; }
  .steps__list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
}

@media (max-width: 44rem) {
  .nav { display: none; }
  .top__login { margin-left: auto; }
  .sides__grid { grid-template-columns: 1fr; }
  .side { padding-right: 0; }
  .side + .side { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 2.5rem; margin-top: 1rem; }
  .contact__grid { grid-template-columns: 1fr; }
  .steps__list { grid-template-columns: 1fr; }
  .proof { padding: 1.25rem; }
  .proof__sheet::before { bottom: -1.25rem; left: -1.25rem; }
  .proof__sheet::after { bottom: -1.25rem; right: -1.25rem; }
}
