/* AL+ · alplustech.com
   One ink on one white sheet. Typography is the identity. */

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/schibsted-grotesk-latin.woff2") format("woff2");
  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;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/schibsted-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/schibsted-grotesk-italic-latin.woff2") format("woff2");
  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;
}

/* ---------- Tokens ---------- */
:root {
  --white: #ffffff;
  --ink: #111111;
  --ink-2: #4d4d4d;      /* secondary text, 8.9:1 on white */
  --ink-3: #6f6f6f;      /* metadata, 5.2:1 on white */
  --rule: #dcdcdc;
  --accent: #c0df16;

  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  /* Type scale. Tuned against Schibsted Grotesk. */
  --t-statement: clamp(2.75rem, 1.1rem + 6.4vw, 5.5rem);   /* 44–88px */
  --t-title: clamp(2.5rem, 1.4rem + 4.4vw, 4.25rem);        /* 40–68px */
  --t-section-statement: clamp(1.875rem, 1.1rem + 2.9vw, 3.25rem); /* 30–52px */
  --t-heading: clamp(1.625rem, 1.3rem + 1.1vw, 2.125rem);   /* 26–34px */
  --t-row-title: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);  /* 22–28px */
  --t-lead: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);        /* 18–22px */
  --t-body: 1.25rem;                                        /* 20px */
  --t-small: 1.0625rem;                                     /* 17px */
  --t-meta: 0.9375rem;                                      /* 15px */

  /* Rhythm. One scale drives gutters, the axis gap and section spacing. */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --axis-gap: clamp(1.5rem, -1rem + 4vw, 3.5rem);
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --section: clamp(4rem, 3rem + 6vw, 8.5rem);

  --shell: 82rem;      /* 1312px */
  --measure: 34em;     /* standfirsts and explanations */
  --article: 47.5rem;  /* 760px reading column */

  --radius: 3px;
}

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

html {
  font-family: var(--font);
  font-size: 100%;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-feature-settings: "kern" 1, "liga" 1;
  scroll-padding-top: var(--space-4);
}

body {
  margin: 0;
  font-size: var(--t-body);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1em; }

ul, ol { margin: 0; padding: 0; }

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

::selection { background: var(--accent); color: var(--ink); }

/* Links: ink text, lime underline. Hover thickens the underline. */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.11em;
  text-underline-offset: 0.16em;
  transition: text-decoration-thickness 120ms ease-out;
}
a:hover { text-decoration-thickness: 0.28em; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--accent);
  border-radius: 2px;
}

/* ---------- Skip link ---------- */
.skip {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  padding: var(--space-1) var(--space-2);
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  z-index: 10;
}
.skip:focus { top: var(--space-2); }

/* ---------- Shell ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  padding-block: var(--space-3);
}

/* The AL+ wordmark. Reused wherever the brand appears; the plus turns lime on hover. */
.wordmark {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}
.wordmark__plus { transition: color 120ms ease-out; }
.lockup {
  display: inline-block;
  text-decoration: none;
  font-size: 1.5rem;
  line-height: 1;
}
.lockup:hover .wordmark__plus,
.lockup:focus-visible .wordmark__plus { color: var(--accent); }

.nav { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-left: auto; }
.nav a {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  font-weight: 600;
  font-size: var(--t-small);
  text-decoration: none;
  border-radius: var(--radius);
  line-height: 1.2;
}
.nav a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 0.18em; text-underline-offset: 0.18em; }
.nav a[aria-current] {
  background: var(--ink);
  color: var(--white);
}
.nav a[aria-current]:hover { text-decoration: none; }
@media (max-width: 30rem) {
  .nav { margin-left: -0.5rem; width: calc(100% + 0.5rem); gap: 0; }
  .nav a { padding-inline: 0.5rem; font-size: 1rem; }
}

/* ---------- Main and the axis ---------- */
main {
  flex: 1;
  border-left: 1px solid var(--rule);
  padding-left: var(--axis-gap);
}
@media (max-width: 47.99rem) {
  :root { --axis-gap: 0rem; }
  main { border-left: 0; padding-left: 0; }
}

.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }
.section--tight { padding-block: var(--space-5); }

/* ---------- Type roles ---------- */
.statement {
  font-size: var(--t-statement);
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 12.75em;
}
.statement .plus { color: var(--accent); font-weight: 800; }

.title { font-size: var(--t-title); letter-spacing: -0.03em; max-width: 14em; }
.section-statement { font-size: var(--t-section-statement); max-width: 15em; }
.heading { font-size: var(--t-heading); }

.lead {
  font-size: var(--t-lead);
  line-height: 1.45;
  max-width: var(--measure);
}
.copy { max-width: var(--measure); }
.copy p + p { margin-top: 1em; }

.meta {
  font-size: var(--t-meta);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.005em;
}

.stack > * + * { margin-top: var(--space-4); }
.stack-tight > * + * { margin-top: var(--space-3); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-size: var(--t-lead);
  font-weight: 600;
}

/* ---------- Ruled rows ----------
   Every list on the site is a hairline-ruled row system. Rules run back to the
   axis so headings hang from it. */
.rows { list-style: none; }
.rows > li {
  border-top: 1px solid var(--rule);
  padding-block: var(--space-3);
  margin-left: calc(-1 * var(--axis-gap));
  padding-left: var(--axis-gap);
}
.rows > li:last-child { border-bottom: 1px solid var(--rule); }

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-2) var(--space-4);
  align-items: start;
}
.row__title { font-size: var(--t-row-title); }
.row__body { font-size: var(--t-small); color: var(--ink-2); max-width: var(--measure); }
.row__body p + p { margin-top: 0.75em; }

@media (min-width: 48rem) {
  .row { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .row--wide { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .rows > li { padding-block: var(--space-4); }
}

/* Positions: the statement is the row. Linked titles underline only on hover. */
.position .row__title { font-size: var(--t-section-statement); letter-spacing: -0.03em; }
.position .row__title a { text-decoration-thickness: 0.05em; text-underline-offset: 0.12em; }
.position .row__title a:hover { text-decoration-thickness: 0.12em; }

/* Thoughts list: date holds a fixed column. */
.entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-1) var(--space-4);
}
.entry__date { font-size: var(--t-meta); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.entry__title { font-size: var(--t-row-title); }
.entry__title a { text-decoration-thickness: 0.1em; }
.entry__summary { font-size: var(--t-small); color: var(--ink-2); max-width: var(--measure); }
@media (min-width: 48rem) {
  .entry { grid-template-columns: 9.5rem minmax(0, 1fr); }
  .entry__date { padding-top: 0.45rem; }
  .entry__title { grid-column: 2; }
  .entry__summary { grid-column: 2; }
  .entry__date { grid-row: 1 / span 2; }
}

/* ---------- People ---------- */
.avatar {
  display: inline-block;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: -0.5rem;
  margin-right: 0.45rem;
  filter: grayscale(1);
}
.avatar--large { width: 3.5rem; height: 3.5rem; margin: 0; vertical-align: middle; }
.byline__author { text-decoration-thickness: 0.08em; color: var(--ink); }
.people { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); }
.person {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--t-small);
  font-weight: 600;
}
.person__text { display: flex; flex-direction: column; gap: 0.15rem; }
.person__text .meta { font-weight: 400; }

/* ---------- Article ---------- */
.article-head { max-width: 52rem; }
.article-head .lead { margin-top: var(--space-3); max-width: 30em; }
.article-head .meta { margin-top: var(--space-3); }

.prose {
  max-width: var(--article);
  font-size: var(--t-body);
  line-height: 1.55;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  font-size: var(--t-heading);
  margin-top: 2.2em;
  max-width: 20em;
}
.prose h3 { font-size: 1.375rem; margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { padding-left: 0.2em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.prose strong { font-weight: 700; }
.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: #f2f2f2;
  padding: 0.05em 0.3em;
  border-radius: var(--radius);
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 0;
  border: 0;
  font-size: var(--t-section-statement);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 16em;
  text-wrap: balance;
}
.prose blockquote p { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5em 0; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-small);
  line-height: 1.4;
  margin: 1.6em 0;
}
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.7em 0.9em 0.7em 0; border-top: 1px solid var(--rule); }
.prose th { font-weight: 700; }
.prose tr:last-child td { border-bottom: 1px solid var(--rule); }
.prose .table-scroll { overflow-x: auto; }
@media (max-width: 47.99rem) {
  .prose table { display: block; overflow-x: auto; white-space: normal; min-width: 0; }
  .prose th, .prose td { min-width: 9rem; }
}

.article-foot { margin-top: var(--section); }
.article-foot .rows > li { padding-block: var(--space-3); }

/* ---------- Footer ---------- */
.colophon {
  border-top: 1px solid var(--rule);
  padding-block: var(--space-4) var(--space-5);
  font-size: var(--t-meta);
  color: var(--ink-2);
}
.colophon__grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 48rem) {
  .colophon__grid { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .colophon__grid > ul { grid-column: 2; justify-content: flex-end; }
}
.colophon__nav a[aria-current] { text-decoration: underline; }
.colophon p + p { margin-top: 0.25em; }
.colophon__nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); font-weight: 600; list-style: none; }
.colophon__nav a { text-decoration: none; }
.colophon__nav a:hover { text-decoration: underline; }
.colophon__mark { margin-bottom: var(--space-2); color: var(--ink); }

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media print {
  .masthead, .colophon, .skip { display: none; }
  main { border: 0; padding: 0; }
  a { text-decoration: none; }
}
