/*
 * Fonts
 * Early Sans Variable and Univers Next Pro are commercial fonts. They are used
 * here if installed on the visitor's computer; otherwise the fallbacks apply.
 * To ship them to every visitor, put licensed .woff2 webfont files in
 * site/fonts/ and add them to the `src:` lists below, e.g.
 *   src: local("Early Sans Variable"), url("fonts/EarlySansVariable.woff2") format("woff2");
 */
@font-face {
  font-family: "Early Sans";
  src: local("Early Sans Variable"), local("EarlySansVariable"), local("Early Sans");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Univers Next";
  src: local("Univers Next Pro Light"), local("UniversNextPro-Light");
  font-weight: 300;
  font-display: swap;
}

:root {
  --bg: #f9f3db;          /* R249 G243 B219 */
  --ink: #1d1d1b;
  --early: "Early Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --univers: "Univers Next", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* The mock-up is a 1280 × 720 artboard; 1u = 1 artboard pixel, scaled to
     fit the screen (never smaller than 0.8px so text stays readable). */
  --u: max(0.8px, min(100vw / 1280, 100dvh / 720));
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--univers);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 0.2em; }

/* Jip Geven: Early Sans Variable Regular, 66pt, reading bottom to top */
.name {
  position: fixed;
  left: calc(48 * var(--u));
  top: calc(76 * var(--u));
  margin: 0;
  font-family: var(--early);
  font-weight: 400;
  font-size: calc(66 * var(--u));
  line-height: 1;
  letter-spacing: -0.01em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.name a:hover { text-decoration: none; }

/* NL | EN: Early Sans 21pt — inactive Light, divider Medium, active Bold */
.lang {
  position: fixed;
  top: calc(22 * var(--u));
  right: calc(30 * var(--u));
  display: flex;
  align-items: baseline;
  gap: calc(4 * var(--u));
  font-family: var(--early);
  font-size: calc(21 * var(--u));
  line-height: 1;
}
.lang button {
  font: inherit;
  font-weight: 300;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { font-weight: 700; cursor: default; }
.lang .sep { font-weight: 500; }

/* Work / About / Contact: Univers Next Pro Light, 15pt */
.menu {
  position: fixed;
  left: calc(50 * var(--u));
  top: calc(462 * var(--u));
  font-size: calc(15 * var(--u));
}
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li { line-height: calc(34 * var(--u)); }

.logo {
  position: fixed;
  left: calc(26 * var(--u));
  top: calc(556 * var(--u));
  width: calc(146 * var(--u));
}
.logo img { display: block; width: 100%; height: auto; }

/* Centre column: tagline + table (centred on the table, as in the mock-up) */
.stage {
  position: fixed;
  left: 50%;
  top: calc(262 * var(--u));
  width: calc(840 * var(--u));
  transform: translateX(-50%);
  margin: 0;
  text-align: center;
}

/* This table will be filled soon: Univers Next Pro Light, 25pt */
.tagline {
  margin: 0 0 calc(70 * var(--u));
  font-size: calc(25 * var(--u));
  line-height: 1.2;
}

.table { display: block; width: 100%; height: auto; }

/* Phones and narrow portrait screens: stack everything instead */
@media (max-width: 700px), (max-aspect-ratio: 4/5) {
  :root { --u: 1px; }

  body {
    overflow: auto;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "name lang"
      "stage stage"
      "menu logo";
    padding: 20px 16px;
    gap: 24px 16px;
  }

  .name, .lang, .menu, .logo, .stage { position: static; }

  .name {
    grid-area: name;
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 40px;
  }
  .lang  { grid-area: lang; justify-self: end; align-self: start; font-size: 18px; }
  .stage { grid-area: stage; width: 100%; align-self: center; transform: none; }
  .tagline { font-size: 20px; margin-bottom: 32px; }
  .menu  { grid-area: menu; align-self: end; font-size: 16px; }
  .menu li { line-height: 2; }
  .logo  { grid-area: logo; justify-self: end; align-self: end; width: 80px; }
}
