@font-face {
  font-family: 'Doto';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(fonts/doto-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;
  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: 500;
  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: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/source-serif-4-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/source-serif-4-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 {
  --bg: #0d0e0e;
  --ink: #e9e9e4;
  --ink-2: #a9a9a2;
  --ink-3: #85867f;
  --rule: rgba(233, 233, 228, 0.14);
  --gutter: clamp(16px, 4.5vw, 64px);
  --col: 640px;
  --max: 1320px;
  --sans: 'Schibsted Grotesk', ui-sans-serif, system-ui, sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --dots: 'Doto', ui-monospace, monospace;
  --step--1: clamp(13px, 0.78rem + 0.1vw, 14px);
  --step-0: clamp(15.5px, 0.92rem + 0.18vw, 17.5px);
  --step-1: clamp(19px, 1.05rem + 0.6vw, 26px);
  --step-h: clamp(30px, min(6vw, 10dvh), 64px);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-wrap: break-word;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
h1, h2, h3, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
::selection { background: var(--ink); color: var(--bg); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.col { max-width: var(--col); }

.status, .label {
  font-family: var(--dots);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---------- nav ---------- */
.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 32px;
  padding-top: max(clamp(18px, 3vw, 32px), env(safe-area-inset-top));
}
.wordmark { display: inline-flex; flex-direction: column; min-width: 0; padding-block: 6px; }
.wm-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(16px, 1rem + 0.35vw, 21px);
  line-height: 1;
  letter-spacing: 0.3em;
}
.wm-sub { font-size: 11px; letter-spacing: 0.03em; color: var(--ink-2); margin-top: 6px; }
.nav nav { display: flex; gap: clamp(18px, 2.4vw, 36px); font-size: var(--step--1); }
.nav nav a {
  display: inline-flex; align-items: center;
  min-height: 44px;
  color: var(--ink-2);
  transition: color .2s;
}
.nav nav a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }
.hero-inner { padding-top: 140px; padding-bottom: clamp(56px, 14dvh, 160px); }
.hero h1 {
  font-size: var(--step-h);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.022em;
  margin: 18px 0 clamp(16px, 2.4dvh, 28px);
  max-width: 14ch;
  text-wrap: balance;
}
.lede { color: var(--ink-2); max-width: 46ch; }

/* ---------- sections ---------- */
.section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-top: clamp(64px, 11vw, 150px);
}
.section .label { padding-top: 18px; border-top: 1px solid var(--rule); }
.section .body { border-top: 1px solid var(--rule); padding-top: 18px; min-width: 0; }
@media (max-width: 899px) {
  .section .body { border-top: 0; padding-top: 0; }
}
@media (min-width: 900px) {
  .section { grid-template-columns: minmax(150px, 0.26fr) 1fr; gap: 0 clamp(24px, 4vw, 64px); }
}

h3 { font-size: var(--step-1); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 10px; }
.item + .item { margin-top: clamp(36px, 5vw, 56px); }
.item p:not(.status) { color: var(--ink-2); }
.item .status { margin-top: 14px; }
.aside { margin-top: clamp(40px, 6vw, 64px); color: var(--ink-3); }

.research { display: grid; grid-template-columns: 1fr; gap: 48px; }
.matrix { width: 100%; max-width: min(520px, 85svh); }
.matrix canvas { display: block; width: 100%; aspect-ratio: 1; }
.matrix figcaption { margin-top: 10px; }
@media (min-width: 900px) and (orientation: landscape), (min-width: 1100px) {
  .research { grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr); align-items: start; gap: clamp(32px, 5vw, 80px); }
  .matrix { justify-self: end; }
}

.note { color: var(--ink-3); }

/* experiments rail: three cards plus a peeking "next" card */
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: clamp(20px, 3vw, 32px); }
.rail-nav { display: flex; gap: 8px; flex: none; }
.arrow {
  width: 44px; height: 44px;
  display: inline-grid; place-items: center;
  font: inherit; font-size: 18px; line-height: 1;
  color: var(--ink); background: transparent;
  border: 1px solid var(--rule); border-radius: 50%;
  cursor: pointer; transition: border-color .2s, opacity .2s;
}
.arrow:hover:not(:disabled) { border-color: var(--ink); }
.arrow:disabled { opacity: .3; cursor: default; }
.arrow:focus-visible, .copy:focus-visible, .rail:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

.rail {
  --gap: clamp(12px, 1.6vw, 20px);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 82%;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.rail::-webkit-scrollbar { display: none; }
@media (min-width: 600px) { .rail { grid-auto-columns: calc((100% - var(--gap)) / 1.7); } }
@media (min-width: 1000px) { .rail { grid-auto-columns: calc((100% - 2 * var(--gap)) / 3.25); } }

.card {
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  min-height: clamp(190px, 17vw, 230px);
  padding: clamp(18px, 2vw, 26px);
  border: 1px solid var(--rule);
  transition: border-color .25s;
}
.card:hover { border-color: rgba(233, 233, 228, 0.4); }
.card .idx { font-family: var(--dots); font-weight: 800; font-size: 12px; letter-spacing: .08em; color: var(--ink-3); margin-bottom: clamp(18px, 2.4vw, 28px); }
.card h3 { margin-bottom: 8px; }
.card p:not(.status) { color: var(--ink-2); }
.card .status { margin-top: auto; padding-top: 20px; }
.card-next { border-style: dashed; }
.card-next h3, .card-next p:not(.status) { color: var(--ink-3); }

/* contact: closing block over a quiet reprise of the field */
.contact { position: relative; isolation: isolate; padding-bottom: clamp(48px, 8vw, 110px); }
.contact canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }
.mail {
  display: inline-block;
  font-size: clamp(22px, 1rem + 2.6vw, 44px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding-block: 8px;
  border-bottom: 1px solid var(--rule);
  transition: border-color .2s;
}
.mail:hover { border-color: var(--ink); }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.copy {
  min-height: 44px; padding: 0 16px;
  background: transparent; color: var(--ink-2);
  border: 1px solid var(--rule); border-radius: 22px;
  cursor: pointer; transition: border-color .2s, color .2s;
}
.copy:hover { border-color: var(--ink); color: var(--ink); }
.contact-meta { margin-top: clamp(28px, 4vw, 44px); max-width: var(--col); font-size: var(--step--1); color: var(--ink-3); }
.contact-meta p + p { margin-top: 4px; }

/* ---------- footer ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(80px, 12vw, 160px);
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  font-size: var(--step--1);
  color: var(--ink-3);
}
.foot-in {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  width: 100%; padding-top: 24px; border-top: 1px solid var(--rule);
}

/* ---------- small screens ---------- */
@media (max-width: 479px) {
  .nav { flex-direction: column; gap: 4px; }
  .nav nav { gap: 22px; }
  .hero-inner { padding-top: 168px; }
}
/* short landscape phones: keep the headline above the fold */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-inner { padding-top: 96px; padding-bottom: 32px; }
  .hero h1 { max-width: 22ch; margin-block: 10px 12px; }
  .lede { font-size: var(--step--1); }
}
