/* Archivo, variable, latin subset only. Served from this origin rather than
 * fonts.gstatic.com: the h1 is the LCP element, and a third-party font put a
 * DNS lookup and a TLS handshake in front of first paint.
 *
 * Latin alone is enough — every character on the page falls inside its range,
 * and Norwegian æ, ø and å live in U+0000-00FF, so future copy is covered too.
 *
 * swap, not block: the page renders immediately in the fallback and reflows
 * once the face arrives, which is the right trade when the text IS the content.
 *
 * Archivo is licensed under the SIL Open Font License 1.1. See fonts/OFL.txt.
 */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-var.woff2") format("woff2-variations");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* awsm.work
 *
 * The identity is an excavator and the parent company is called "motorvei" —
 * Norwegian for motorway. So the page is built as a road section: everything
 * above the grade line is what you see, everything below it is the groundwork,
 * stacked in the order the work actually happens. The strata are the one bold
 * device; everything else stays quiet.
 *
 * Palette is taken from the existing mark rather than invented: #d07e38,
 * #8f9698 and #554436 are all lifted straight out of images/logo.svg.
 */

:root {
  --tjaere: #1c1e1c; /* tar. the ground everything sits on */
  --asfalt: #2a2c29; /* wearing course. raised surfaces */
  --grus: #99a0a2; /* gravel. the mark's #8f9698, lifted to clear AA on the strata */
  --kalk: #e8e6e0; /* chalk. primary ink */
  --oker: #d07e38; /* the accent, from the mark. used once or twice, never more */
  --hairline: #3c3f3a;

  /* Strata run cool asphalt at the surface to warm earth at depth, so the
   * stack reads as a section through ground rather than four stacked cards. */
  --lag-1: #2f312b;
  --lag-2: #302e28;
  --lag-3: #2c2721;
  --lag-4: #2a211a;

  --measure: 58ch;
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --datum: 1px;
}

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

html {
  background: var(--tjaere);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--tjaere);
  color: var(--kalk);
  font-family: Archivo, system-ui, sans-serif;
  font-variation-settings: "wdth" 100;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  font-synthesis-weight: none;
}

/* The datum: a survey baseline down the left that everything hangs off.
 * Left-aligned rather than centred, because a centred logo on a dark field is
 * exactly the holding page this is trying not to be. */
.sheet {
  max-width: 64rem;
  margin: 0 auto;
  padding-inline: var(--gutter);
  /* The datum is the sheet's own left edge, so it runs unbroken past the grade
   * line and the strata rather than restarting at each section. */
  border-inline-start: var(--datum) solid var(--hairline);
}

/* The grade line and the strata run the full width of the sheet, out to the
 * datum on one side and the paper edge on the other. Ground does not sit in a
 * text column. */
.bleed {
  margin-inline: calc(-1 * var(--gutter));
}

@media (max-width: 40rem) {
  .sheet {
    border-inline-start: 0;
  }
}

/* ---- above grade ---------------------------------------------------- */

.masthead {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 2.25rem 0;
}

.mark {
  width: auto;
  height: 2.75rem;
  display: block;
  flex: none;
}

/* The two knockout paths inside the mark are painted in the old background
 * colour, so they have to follow the ground instead of staying #353535. */
.mark .cut {
  fill: var(--tjaere);
}

.wordmark {
  font-size: 1.0625rem;
  font-variation-settings: "wdth" 88;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
}

.status {
  margin: 0 0 0 auto;
  color: var(--grus);
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status::before {
  content: "";
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: var(--oker);
  flex: none;
}

.hero {
  padding-block: clamp(3rem, 8vh, 5rem) clamp(2.5rem, 7vh, 4rem);
}

/* Condensed and heavy: the mark's own vernacular is roadside signage and
 * plant machinery, so the display face is set narrow and structural rather
 * than as a high-contrast serif. One family, worked across its width axis. */
.title {
  margin: 0;
  font-size: clamp(2.25rem, 11.5vw, 7rem);
  font-variation-settings: "wdth" 76;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.015em;
  max-width: 14ch;
}

.lede {
  margin: clamp(1.75rem, 4vh, 2.5rem) 0 0;
  max-width: var(--measure);
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  line-height: 1.5;
}

.cred {
  margin: 1.5rem 0 0;
  max-width: var(--measure);
  color: var(--grus);
}

/* ---- the grade line ------------------------------------------------- */

/* The single piece of motion on the page: one surveyor's stroke drawn across
 * the ground on load. Nothing else moves, by design — per-section entrances
 * and hover transitions on every card are the generic default. */
.grade {
  position: relative;
  height: var(--datum);
  background: var(--hairline);
  overflow: hidden;
}

.grade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--oker);
  transform-origin: left center;
  animation: survey 1100ms cubic-bezier(0.16, 0.84, 0.44, 1) both;
}

@keyframes survey {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .grade::after {
    animation: none;
  }
}

/* ---- below grade ---------------------------------------------------- */

.ground {
  padding-block: clamp(2.25rem, 5vh, 3rem) clamp(2.5rem, 6vh, 3.5rem);
}

.ground-note {
  margin: 0 0 clamp(1.5rem, 4vh, 2.25rem);
  color: var(--grus);
  max-width: var(--measure);
}

/* Build order is the DOM order, so it is also the reading order for a screen
 * reader and for the keyboard. column-reverse puts the foundation at the
 * bottom where a section drawing expects it, without lying about the sequence. */
.strata {
  display: flex;
  flex-direction: column-reverse;
  /* margin-block only: a `margin` shorthand here would reset .bleed's
   * margin-inline, which is set earlier in this file and so loses on order. */
  margin-block: 0;
  padding: 0;
  list-style: none;
  border-block: var(--datum) solid var(--hairline);
}

.layer {
  padding: clamp(1.5rem, 3vw, 2rem) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 46ch);
  gap: 0.5rem clamp(1.5rem, 4vw, 3rem);
  align-items: baseline;
}

/* Bands share edges instead of floating as separate cards, so the stack reads
 * as continuous ground. The rule goes between layers, not around each one. */
.layer + .layer {
  border-block-end: var(--datum) solid var(--hairline);
}

.layer:nth-child(1) {
  background: var(--lag-4);
}
.layer:nth-child(2) {
  background: var(--lag-3);
}
.layer:nth-child(3) {
  background: var(--lag-2);
}
.layer:nth-child(4) {
  background: var(--lag-1);
}

.layer h2 {
  margin: 0;
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
  font-variation-settings: "wdth" 84;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.005em;
}

.layer p {
  margin: 0;
  color: var(--grus);
}

@media (max-width: 46rem) {
  .layer {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.625rem;
  }
}

/* ---- foot ------------------------------------------------------------ */

.foot {
  border-top: var(--datum) solid var(--hairline);
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  padding-block: 1.75rem 2.25rem;
  color: var(--grus);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  align-items: baseline;
}

.foot p {
  margin: 0;
  max-width: var(--measure);
}

a {
  color: var(--kalk);
  text-decoration-color: var(--oker);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--oker);
}

a:focus-visible {
  outline: 2px solid var(--oker);
  outline-offset: 3px;
  border-radius: 1px;
}
