/* Season (Displaay) — licence for this domain still to be arranged before release.
   Without the licence, leave the two font files out when publishing: the page then uses Inter Tight and
   Hedvig Letters Serif, which are free (SIL Open Font License), with no other change needed. */
@font-face {
  font-family: "Season Sans";
  src: url("assets/fonts/SeasonSansUprightsVF.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Season Mix";
  src: url("assets/fonts/SeasonMixUprightsVF.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0b141a;
  --fg: #eef3f5;
  --soft: rgba(238, 243, 245, 0.8);
  --muted: rgba(238, 243, 245, 0.58);
  --line: rgba(238, 243, 245, 0.2);
  /* If the Season fonts cannot be loaded, the free stand-ins named second are fetched and used (see main.js) */
  --display: "Season Sans", "Inter Tight", "Inter", -apple-system, "Helvetica Neue", sans-serif;
  --accent: "Season Mix", "Hedvig Letters Serif", "Season Sans", "Inter Tight", Georgia, serif;
  --sans: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 4.5vw, 72px);
  --dim: 0;
}

* { box-sizing: border-box; }

html {
  background: var(--ink);
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--fg);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* soft halo keeps copy readable over bright patches of footage */
main { text-shadow: 0 0 22px rgba(11, 20, 26, 0.55), 0 1px 2px rgba(11, 20, 26, 0.35); }

h1, h2, h3, h4, p, ul, ol, dl, dd, address { margin: 0; padding: 0; }
ul, ol { list-style: none; }
address { font-style: normal; }
a { color: inherit; }

/* ── Background ─────────────────────────────────────────── */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  /* Three layers. On top, a still from the footage, shown until the first clip plays. Under it, a pattern of
     contour lines drawn by the browser itself, which needs no file: it is what shows if the footage and
     the still cannot be loaded. */
  background:
    url(assets/video/poster-fjord.jpg) center / cover no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='1000' preserveAspectRatio='xMidYMid slice'%3E%3Cfilter id='c' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.003 0.0046' numOctaves='1' seed='11'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='discrete' tableValues='0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1'/%3E%3C/feComponentTransfer%3E%3CfeGaussianBlur stdDeviation='1.6'/%3E%3CfeColorMatrix values='0 0 0 0 0.78  0 0 0 0 0.86  0 0 0 0 0.9  0.34 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E") center / cover no-repeat,
    linear-gradient(160deg, #3d525d, #1a2a33 55%, #0f1a21);
}
/* main.js adds this when the first clip fails to load: the pattern alone, no still, no video */
.bg.no-footage {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='1000' preserveAspectRatio='xMidYMid slice'%3E%3Cfilter id='c' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.003 0.0046' numOctaves='1' seed='11'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='discrete' tableValues='0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1'/%3E%3C/feComponentTransfer%3E%3CfeGaussianBlur stdDeviation='1.6'/%3E%3CfeColorMatrix values='0 0 0 0 0.78  0 0 0 0 0.86  0 0 0 0 0.9  0.34 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E") center / cover no-repeat,
    linear-gradient(160deg, #3d525d, #1a2a33 55%, #0f1a21);
}
.bg.no-footage .bg-video { visibility: hidden; }

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* slight overscan hides edge softness and gives the blur room */
  transform: scale(1.04);
  opacity: 0;
}
.bg-video:first-child { opacity: 1; }

.scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(180deg, rgba(11, 20, 26, 0.5) 0%, rgba(11, 20, 26, 0.1) 30%, rgba(11, 20, 26, 0.48) 100%),
    rgba(11, 20, 26, calc(0.18 + var(--dim) * 0.14 + var(--clip-dim)));
  transition: --clip-dim 1.8s linear; /* in step with the crossfade between clips */
  -webkit-backdrop-filter: blur(calc(var(--dim) * 1.5px));
  backdrop-filter: blur(calc(var(--dim) * 1.5px));
}

.grain {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Header ─────────────────────────────────────────────── */

.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 26px var(--gutter) 18px;
}

/* fades in with scroll so body copy never collides with the nav */
.top::before {
  content: "";
  position: absolute;
  inset: 0 0 -28px 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(11, 20, 26, 0.96) 68%, rgba(11, 20, 26, 0));
  opacity: min(1, calc(var(--dim) * 2)); /* fully dark after scrolling ~43% of a screen */
  pointer-events: none;
}

.mark {
  font: 500 13px/1 var(--sans);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-decoration: none;
}
/* Hand kerning for the wordmark: each value is the space after that letter (even tracking would be 0.28em). */
.mark i { font-style: normal; }
.mark i:nth-child(1) { letter-spacing: 0.23em; } /* F·O  tighter: F is open on its right */
.mark i:nth-child(2) { letter-spacing: 0.30em; } /* O·O  looser: two rounds */
.mark i:nth-child(3) { letter-spacing: 0.31em; } /* O·B  looser: round against straight */
.mark i:nth-child(4) { letter-spacing: 0.26em; } /* B·A  slightly tighter: A slopes away */
.mark i:nth-child(5) { letter-spacing: 0.26em; } /* A·R  slightly tighter */
.mark i:nth-child(6) { letter-spacing: 0.21em; } /* R·.  a near-normal gap: the dimmed dot starts the suffix, it no longer hangs off the R */
.mark i:nth-child(7) { letter-spacing: 0.11em; } /* .·V  tight: the dot belongs to VC, and V leans away at the baseline */
.mark i:nth-child(8) { letter-spacing: 0.24em; } /* V·C  tighter: V opens towards the C */
.mark i:nth-child(9) { letter-spacing: 0; }      /* no trailing space after C */
.mark i:nth-child(n+7) { color: var(--muted); font-size: 0.88em; }  /* .VC dimmed: FOOBAR is the name, .VC the address */

.top nav {
  display: flex;
  gap: clamp(16px, 2.6vw, 38px);
}

.top nav a,
.label,
.sub,
.hero-foot,
.sound-toggle,
.facts dt,
.who span,
.out,
.foot {
  font: 500 11px/1.4 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.top nav a {
  color: var(--soft);
  text-decoration: none;
  padding: 6px 0; /* taller tap target */
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.top nav a:hover,
.top nav a.current { color: var(--fg); border-color: var(--fg); }

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 5px;
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 140px var(--gutter) 30px;
}

.hero h1 {
  max-width: 17ch;
  font: 430 clamp(2.4rem, 5.6vw, 5.2rem) / 1.06 var(--display);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero h1 em { font-family: var(--accent); font-style: normal; }

.lede {
  max-width: 54ch;
  margin-top: clamp(22px, 3vw, 36px);
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  color: var(--soft);
}

.hero-foot {
  display: flex;
  align-items: flex-start; /* Soundtrack lines up with the first (city) line */
  gap: 28px;
  margin-top: clamp(40px, 8vh, 96px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.hero-foot .place { display: flex; gap: 28px; }
.hero-foot .coords { font-variant-numeric: tabular-nums; }

/* ── Sections ───────────────────────────────────────────── */

.band {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 3.4fr);
  column-gap: var(--gutter);
  padding: clamp(80px, 15vh, 170px) var(--gutter);
  border-top: 1px solid var(--line);
}

.label {
  position: sticky;
  top: 119px; /* 96px + the height the 01–04 number used to occupy, so the name stays clear of the menu */
  align-self: start;
  color: var(--fg);
}
/* Section names carry the same underline as the current item in the menu bar */
.band .label {
  justify-self: start;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--fg);
}
.label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.body { max-width: 1040px; }
.body p { color: var(--soft); }
.body a { text-underline-offset: 4px; text-decoration-thickness: 1px; }

.statement {
  max-width: 30ch;
  font: 400 clamp(1.55rem, 2.7vw, 2.5rem) / 1.2 var(--display);
  letter-spacing: -0.015em;
  color: var(--fg) !important;
  text-wrap: pretty;
}
#investments .statement,
#engagements .statement,
#contact .statement { max-width: 34ch; }

.sub {
  display: block;
  margin-bottom: 16px;
  color: var(--muted);
}

/* Focus */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
}
.pillars h3 {
  margin-bottom: 18px;
  font: 400 clamp(1.8rem, 3vw, 2.7rem) / 1.05 var(--display);
  letter-spacing: -0.015em;
}

/* Investments */
.two {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  margin-top: clamp(48px, 8vh, 88px);
}

.facts {
  margin-top: clamp(48px, 8vh, 88px);
  border-bottom: 1px solid var(--line);
}
.facts > div {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 2.6fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.facts dt { padding-top: 9px; color: var(--muted); }
.facts dd { color: var(--soft); max-width: 60ch; }
.facts strong {
  display: block;
  margin-bottom: 6px;
  font: 400 1.4rem/1.25 var(--display);
  color: var(--fg);
}

/* Engagements */
.rows {
  margin-top: clamp(48px, 8vh, 88px);
  border-bottom: 1px solid var(--line);
}
.rows li {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 2.6fr 190px;
  align-items: baseline;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.rows h3 { font: 400 1.65rem/1.15 var(--display); }
.rows p { max-width: 56ch; }
.out {
  text-decoration: none;
  white-space: nowrap;
  justify-self: end;
  color: var(--soft);
}
.out::after { content: " ↗"; }
.out:hover { color: var(--fg); }

/* People */
/* People: a grid of cards, each a large portrait with the name and a few lines under it */
.people {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(40px, 6vh, 64px) 28px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.who { margin-bottom: 14px; }
.who img { display: block; width: 100%; height: auto; aspect-ratio: 1; margin-bottom: 20px; object-fit: cover; filter: grayscale(1); }
.who h4 { font: 400 1.65rem/1.15 var(--display); }
.who span { display: block; margin-top: 10px; color: var(--muted); }
@media (max-width: 1100px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .people { grid-template-columns: 1fr; } }
.people p { max-width: 62ch; font-size: 0.95rem; }
.people .quiet { color: var(--muted); }
.board-head { margin-top: clamp(64px, 10vh, 110px); }

/* Contact */
.aside {
  margin-top: 24px;
  font: 400 1.35rem/1.35 var(--accent);
  color: var(--soft);
}
#contact address {
  margin-top: clamp(48px, 8vh, 88px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font: 400 1.4rem/1.4 var(--display);
}
#contact address small {
  display: block;
  margin-top: 16px;
  font: 400 0.9rem/1.6 var(--sans);
  color: var(--muted);
}

/* Sound */
.sound { margin-left: auto; margin-top: -7px; } /* cancels the button's tap-target padding so its text sits on the city line */
.sound-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0; /* taller tap target */
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
}
.sound-toggle:hover,
.sound.on .sound-toggle { color: var(--fg); }
/* play triangle when off, level meter when on; same 10px box so the label never shifts */
.sound-icon { display: grid; place-items: center; width: 10px; height: 10px; }
.sound-icon > * { grid-area: 1 / 1; }
.play { width: 10px; height: 10px; fill: currentColor; }
.bars { display: none; align-items: flex-end; gap: 2px; height: 10px; }
.bars i { width: 2px; height: 10px; background: currentColor; transform-origin: bottom; }
.sound.on .play { display: none; }
.sound.on .bars { display: flex; }
.sound.on .bars i { animation: bar 1.1s ease-in-out infinite; }
.sound.on .bars i:nth-child(2) { animation-delay: -0.4s; }
.sound.on .bars i:nth-child(3) { animation-delay: -0.75s; }
/* While playing, the label gives way to the artist and title gliding past,
   like an old music player's display (main.js drives the motion). */
/* The label and the ticker share one grid cell that is sized by the word "Soundtrack",
   so the icon and the button's right edge stay put when one replaces the other. */
.sound-text { display: grid; }
.sound-label, .place span { white-space: nowrap; }
.sound-text > * { grid-area: 1 / 1; }
.sound-marquee {
  visibility: hidden;
  width: 0;
  min-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
  /* Each edge fades only while text runs past it: --edge-l / --edge-r are that edge's opacity
     (1 = no fade). main.js animates them, so the start and end of the text rest unfaded. */
  --edge-l: 1;
  --edge-r: 0;
  -webkit-mask-image: linear-gradient(90deg, rgb(0 0 0 / var(--edge-l)), #000 10%, #000 86%, rgb(0 0 0 / var(--edge-r)));
  mask-image: linear-gradient(90deg, rgb(0 0 0 / var(--edge-l)), #000 10%, #000 86%, rgb(0 0 0 / var(--edge-r)));
}
@property --clip-dim { syntax: "<number>"; inherits: true; initial-value: 0; } /* extra darkening for a bright clip, set by main.js */
@property --edge-l { syntax: "<number>"; inherits: false; initial-value: 1; }
@property --edge-r { syntax: "<number>"; inherits: false; initial-value: 1; }
.sound-marquee span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .sound.on .sound-label { visibility: hidden; }
  .sound.on .sound-marquee { visibility: visible; }
}
/* the music could not be loaded: the label says so (main.js), and nothing animates */
.sound.failed .sound-toggle { color: var(--muted); }
.sound.failed .sound-label { visibility: visible; }
.sound.failed .sound-marquee { visibility: hidden; }
@keyframes bar { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .sound.on .bars i { animation: none; } }

/* Footer */
.foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 22px var(--gutter) 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.credits a { text-decoration: none; transition: color 0.2s; }
.credits a:hover { color: var(--fg); }
.credits { display: flex; flex-direction: column; gap: 8px; text-align: right; }
@media (max-width: 640px) { .credits { text-align: left; } }

/* ── Easter egg: song visualiser ────────────────────────── */

/* Deliberately unmarked: looks and behaves like plain text until clicked */
.egg {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: inherit;
}

.viz {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #f5f4f0; /* paper; the canvas paints over it */
  opacity: 0;
  transition: opacity 0.9s ease;
}
.viz.open { opacity: 1; }
/* the chord names can be drawn on their own sheet above everything, outside the soft-focus filter, so the pen stays sharp */
.viz canvas.viz-names, .viz canvas.viz-fine { filter: none; pointer-events: none; }
/* when the lens is running it shows the finished picture; the two sheets beneath are only its sources */
.viz.lensed .viz-wash, .viz.lensed .viz-ink, .viz.lensed .viz-names { visibility: hidden; }
/* the drawing can be dragged sideways to scrub through the music */
.viz { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.viz.scrubbing { cursor: grabbing; }
.viz canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: blur(1.3px) saturate(1.45) contrast(1.08); } /* softness and richer colour, like ink soaking into paper */
.viz-close,
.viz-caption {
  position: absolute;
  margin: 0;
  font: 500 11px/1.4 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(20, 32, 26, 0.6);
}
.viz-close {
  top: 20px;
  right: var(--gutter);
  padding: 8px 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: color 0.2s;
}
.viz-close:hover { color: #14201a; }
.viz-caption {
  left: var(--gutter);
  right: var(--gutter);
  bottom: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
}
.viz-caption span:first-child { color: #14201a; }
.viz-time { margin-left: auto; font-variant-numeric: tabular-nums; }
/* Phones: the artist on a line of his own, the title under it on the left, the time on that line at the right */
@media (max-width: 540px) {
  .viz-caption span:first-child { flex-basis: 100%; }
}
.viz-open { overflow: hidden; }

/* ── Reveal─────────────────────────────────────────────── */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Small screens ──────────────────────────────────────── */

@media (max-width: 860px) {
  .top nav { gap: 16px; margin-left: auto; }
}

@media (max-width: 640px) {
  .top nav { gap: 12px; }
  .top nav a { letter-spacing: 0.12em; }
}

/* Phones: logo on its own row, the four links spread across the row below */
@media (max-width: 540px) {
  .top {
    flex-direction: column;
    gap: 8px;
    padding-top: 20px;
    padding-bottom: 8px;
  }
  .top nav {
    width: 100%;
    gap: 8px;
    justify-content: space-between;
  }
  .top nav a { font-size: 10px; letter-spacing: 0.1em; }
  html { scroll-padding-top: 96px; }
  .sound-verb { display: none; } /* just "Soundtrack": "Our soundtrack" does not fit beside the city on a phone */
}
/* "mini" layout (350px and narrower): no coordinates, tighter menu */
@media (max-width: 350px) {
  .hero-foot .coords { display: none; }
  .top nav a { letter-spacing: 0.04em; }
}

@media (max-width: 860px) {
  .band { grid-template-columns: 1fr; row-gap: 32px; }
  .label { position: static; }
  .label span { display: inline; margin-right: 12px; }

  .pillars,
  .two,
  .facts > div,
  .rows li { grid-template-columns: 1fr; }
  .facts > div, .rows li { gap: 10px; }
  .facts dt { padding-top: 0; }
  .out { justify-self: start; }
  .hero-foot .place { flex-direction: column; gap: 5px; } /* coordinates drop to their own line */
}
