/* Arnveld — v2 pre-launch ("Signal").

   Kept beside v1, not in place of it: v1 is still teaser.html + style.css.
   This file carries the v2 system only.

   What changed from v1, and why:
     · The page is still one column at the 38rem measure, but the measure now
       sits inside a wider structural grid so the machine layer (mono metadata,
       hairlines, a live field) has room to breathe. Prose stays 38rem.
     · Serif still carries the statement, mono now carries *state* — build
       status, spec row, section numbers. Sans is demoted to the two sentences
       you actually read.
     · One signature motion: a page of text lines assembling itself, drawn on a
       canvas at ~12% ink. It is the product's own idea (assembly, then a human
       decides) rendered without a single word. Nothing else moves.
     · The accent keeps one job per screen. In v1 it was three; here it is the
       live dot, the one signature line in the field, and links. Same value,
       fewer places.

   Constraints unchanged and non-negotiable: self-hosted open-source fonts only,
   no third-party request, no framework, no build step, works without JS. */

@font-face {
  font-family: Inter;
  src: url(/fonts/Inter-var.woff2) format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url(/fonts/SourceSerif4-var.woff2) format('woff2');
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url(/fonts/IBMPlexMono-Regular.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #fbfbfa;
  --fg: #1c1917;
  --muted: #57534e;
  --faint: #7c7570;
  --rule: #e7e5e4;
  --accent: #9a3412;          /* 7.06:1 on --bg — AAA */
  --field: 28, 25, 23;        /* canvas ink, used at low alpha */

  --measure: 38rem;
  --wide: 54rem;
  --gutter: 1.25rem;

  --body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --label: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0e;
    --fg: #f2f0ee;
    --muted: #a8a29e;
    --faint: #8a8480;
    --rule: #262425;
    --accent: #f0a37e;        /* 9.35:1 on --bg */
    --field: 242, 240, 238;
  }
}

/* No JavaScript: the panel is an empty frame, so it is not shown at all. */
.no-js .field { display: none; }
.no-js .hero-row { grid-template-columns: 1fr; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: .06em; }

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- the machine layer ---------- */

.mono {
  font-family: var(--label);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- top bar ---------- */

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem 0 1.1rem;
  border-bottom: 1px solid var(--rule);
}

.mark {
  position: relative;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  display: inline-block;
}

/* Each letter is its own object: it arrives out of focus, then the wordmark
   draws its own baseline. Under the cursor it re-decodes, left to right. */
.mark .ch {
  display: inline-block;
  animation: charIn .55s cubic-bezier(.16, .84, .28, 1) var(--d, 0ms) both;
}

@keyframes charIn {
  from { transform: translateY(.34em); filter: blur(5px); }
  to   { transform: none; filter: blur(0); }
}

.mark::after {
  content: "";
  position: absolute;
  left: 0;
  right: .2em;          /* the letter-spacing tail is not part of the word */
  bottom: -.34rem;
  height: 1px;
  background: var(--rule);
  transform: scaleX(0);
  transform-origin: left center;
  /* the rule is not drawn by default — the header already has one. It appears
     with the decode sweep, so hover has one gesture rather than two. */
  transition: transform .34s cubic-bezier(.16, .84, .28, 1), background .3s ease;
}

.mark:hover::after,
.mark:focus-visible::after {
  transform: scaleX(1);
  background: var(--accent);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.state {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--label);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(154, 52, 18, .45);
  animation: pulse 2.8s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(154, 52, 18, .40); }
  70%  { box-shadow: 0 0 0 7px rgba(154, 52, 18, 0); }
  100% { box-shadow: 0 0 0 0 rgba(154, 52, 18, 0); }
}

.clock {
  font-family: var(--label);
  font-size: .66rem;
  letter-spacing: .1em;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 46rem) { .clock { display: none; } }

.lang { font-family: var(--label); font-size: .68rem; letter-spacing: .1em; }
.lang b { font-weight: 400; color: var(--fg); }
.lang span { color: var(--faint); }
.lang a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--rule); }

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

.hero { padding: 3.6rem 0 0; }

/* Statement across the top; body copy and the live document side by side.
   The field is a layout element, not a background wash — that is what stops it
   colliding with the type at any window width. */
.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: 2.75rem;
  align-items: end;   /* the panel sits low, clear of the statement above it */
}

.field {
  position: relative;
  height: 12.5rem;
  pointer-events: none;
  z-index: 0;
}

.field canvas { display: block; width: 100%; height: 100%; }

/* crop marks: the panel reads as a viewport onto something running, not a picture */
.field::before, .field::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-color: var(--rule);
  border-style: solid;
  border-width: 0;
}
.field::before { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.field::after  { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.hero-copy { position: relative; z-index: 1; }

h1 {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.05rem, 5vw, 2.95rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 0 0 1.7rem;
  max-width: 46rem;
  text-wrap: balance;
}

h1 .ln { display: block; }

/* The hero carries exactly one thing: the word "tijd" / "time" changes colour,
   and nothing else about the statement moves. No lift, no blur, no opacity —
   colour is the whole gesture, so it can run forever without wearing out. */
.js h1 .ln { display: block; }

h1 .hl {
  animation: tint 8s ease-in-out 1.1s infinite;
}

@keyframes tint {
  0%, 56%   { color: var(--fg); }
  68%, 78%  { color: var(--accent); }
  90%, 100% { color: var(--fg); }
}

/* Belt and braces. An animation can stall — a throttled tab, a compositor that
   never starts, a browser that does not animate filters. The page must not be
   left blurred, so once the wordmark choreography has played it is switched off
   by class and pinned to its final state. The hero's colour cycle is not pinned:
   it rests on the body colour, so a stall leaves it readable. */
html.settled .mark .ch {
  animation: none;
  filter: none;
  transform: none;
}

.lede {
  font-size: 1.06rem;
  line-height: 1.62;
  color: var(--muted);
  max-width: 33rem;
  margin: 0 0 2.2rem;
}

.js .lede, .js .spec { animation: rise .8s cubic-bezier(.16, .84, .28, 1) .18s both; }

/* ---------- spec row: three principles, no offer ---------- */

.spec {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.6rem;
  padding: .2rem 0 0;
  margin: 0;
}

.spec span { position: relative; }

.spec span + span::before {
  content: "";
  position: absolute;
  left: -.85rem;
  top: .42em;
  width: 3px;
  height: 3px;
  background: var(--accent);
  border-radius: 50%;
  opacity: .55;
}

/* ---------- the three beats ---------- */

.beats {
  padding: 3.2rem 0 0;
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
}

.beats h2 {
  font-family: var(--label);
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.9rem;
}

.beat {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 1rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--rule);
}

.beat:last-of-type { border-bottom: 1px solid var(--rule); }

.beat .n {
  font-family: var(--label);
  font-size: .68rem;
  letter-spacing: .1em;
  color: var(--faint);
  padding-top: .28rem;
}

.beat p {
  margin: 0;
  max-width: 42rem;
  font-family: var(--display);
  font-size: 1.14rem;
  line-height: 1.5;
  letter-spacing: -.008em;
}

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

.close {
  padding: 4rem 0 5rem;
}

.close p {
  margin: 0 0 1.1rem;
  max-width: var(--measure);
  color: var(--muted);
}

.mail {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.6vw, 1.85rem);
  letter-spacing: -.01em;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: .1rem;
  transition: border-color .25s ease, color .25s ease;
}

.mail:hover, .mail:focus-visible { color: var(--accent); border-color: var(--accent); }

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

.foot {
  border-top: 1px solid var(--rule);
  padding: 1.4rem 0 3rem;
}

.foot p {
  font-family: var(--label);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 0 0 .45rem;
  text-transform: none;
}

.foot a { color: var(--muted); }

/* ---------- motion, or the absence of it ---------- */

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
  .mark .ch, h1 .hl { animation: none; }
  .js h1 .ln, .js .lede, .js .spec {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .mail { transition: none; }
}

/* ---------- small screens ---------- */

@media (max-width: 34rem) {
  .hero { padding-top: 2.6rem; }
  .hero-row { grid-template-columns: 1fr; gap: 2rem; }
  .field { height: 10rem; margin-top: .5rem; }
  .beats { padding-top: 3rem; margin-top: 3rem; }
  .beat { grid-template-columns: 2rem 1fr; gap: .7rem; }
  .close { padding: 3.5rem 0 4rem; }
}
