/* kvds.media: darkroom paper, navy glow, prints on the table. One theme: dark. */

@font-face { font-family: "Jost"; src: url(../fonts/Jost.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(../fonts/Newsreader.woff2) format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url(../fonts/Newsreader-Italic.woff2) format("woff2"); font-weight: 400 500; font-style: italic; font-display: swap; }

:root {
  color-scheme: dark;
  --paper: #22201D;          /* warm charcoal darkroom paper */
  --paper-2: #2E2B27;
  --ink: #F1EADF;
  --text: #E2DBD0;
  --muted: #A8A196;
  --rule: #3A3631;
  --navy: #0A2D43;
  --navy-hi: #245A80;
  --navy-lo: #051A28;
  --yellow: #FEC20E;
  --purple: #971F4D;
  --print: #F7F2E8;
  --film: #121316;
  --display: "Jost", Futura, "Avenir Next", sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1296px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
/* nothing may widen the page on phones: iOS ignores the clip on the root, so each part clips its own overflow
   (rotated prints near the edge, the window-wide strip) */
.hero, main, .footer { overflow-x: hidden; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  overflow-x: clip;
  color: var(--text);
  font: 400 1.125rem/1.55 var(--serif);
  background: url(../img/grain.png) repeat, var(--paper);
  background-size: 200px 200px, auto;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 2px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--yellow); color: var(--navy); padding: 10px 16px; font-family: var(--display); font-weight: 600; text-decoration: none; }
.skip:focus { top: 16px; }

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

.hero {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(60% 70% at 88% 78%, rgb(151 31 77 / 0.35), transparent 70%),
    radial-gradient(75% 90% at 30% 35%, var(--navy-hi), var(--navy) 50%, var(--navy-lo));
  padding-bottom: clamp(110px, 16vw, 230px);
}
/* the paper grain sits over the waves too, so the front wave runs seamlessly into the page */
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: url(../img/grain.png) repeat; background-size: 200px 200px; }
.nav, .hero-inner { position: relative; z-index: 2; }
/* touch devices: a thin yellow edge down the right of the whole page, where Safari on the iPhone Duo can't carry the background on */
@media (hover: none) {
  /* runs well past both ends: iOS sizes fixed elements between its toolbars, so 0/0 stops short under them */
  body::after { content: ""; position: fixed; top: -50vh; right: 0; bottom: -50vh; width: 1px; background: var(--yellow); z-index: 20; pointer-events: none; }
}
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 0;
}
.nav-logo img { width: 104px; }
.nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 30px; margin: 0; padding: 0; list-style: none; }
.nav a { font: 500 0.8125rem/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; padding: 6px 0; }
.nav a:hover { color: var(--yellow); }

.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px;
  max-width: var(--max); margin: 0 auto; padding: clamp(40px, 8vw, 96px) var(--gutter) 0;
}
.hero h1 { margin: 0; }
.hero h1 img { width: min(500px, 100%); }
.tagline { font: italic 400 clamp(1.6rem, 3vw, 2.4rem)/1.2 var(--serif); color: var(--ink); margin: 1.2em 0 0.8em; max-width: 16em; }
.where { font: 500 0.8125rem/1.4 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: #B4C0CC; margin: 0; }
.hero-scan { margin: 0; transform: rotate(2.5deg); }
.hero-scan img { width: 100%; box-shadow: 0 18px 40px rgb(0 0 0 / 0.45); }

.waves { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(120px, 18vw, 260px); }
.waves .w1 { fill: var(--purple); }
.waves .w2 { fill: var(--yellow); }
.waves .w3 { fill: var(--paper); }

/* ---------------------------------------------------------------- sections */

.section { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 9vw, 120px) var(--gutter) 0; }
.label { display: flex; align-items: baseline; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); }
.label .num { font: 600 0.8125rem/1 var(--display); letter-spacing: 0.14em; color: var(--yellow); }
.label h2 { font: 500 0.8125rem/1 var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin: 0; }
.label .aside { margin: 0 0 0 auto; font-style: italic; font-size: 1rem; color: var(--muted); }

.line { margin: 0; color: var(--text); font-size: 1.3rem; line-height: 1.45; max-width: 26em; }
.out {
  font: 500 1.25rem/1.3 var(--display); color: var(--ink); text-decoration: none;
  border-bottom: 2px solid currentColor; padding-bottom: 2px; display: inline-flex; gap: 0.4em; align-items: baseline;
}
.out:hover { color: var(--yellow); }
.arrow { width: 0.7em; height: 0.7em; flex: none; }
.footer .top { display: inline-flex; gap: 0.4em; align-items: center; }
.dom { margin: 18px 0 0; }

/* ---------------------------------------------------------------- prints on the table */

/* positions come from the build as numbers; --u turns them into lengths (1cqw in a spread, px on the BTS table) */
.spread { --u: 1cqw; position: relative; container-type: inline-size; height: calc(var(--h) * var(--u)); }
.print {
  --b: calc(var(--w) * var(--u) * 0.045);   /* border: 4.5% of the print's own width */
  position: absolute; margin: 0;
  left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); width: calc(var(--w) * var(--u));
  padding: var(--b) var(--b) 0; background: var(--print);
  transform: rotate(var(--r));
  box-shadow: 2px 8px 18px rgb(0 0 0 / 0.42);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.print img { width: 100%; height: auto; }
.print figcaption { font: italic 400 0.6875rem/1 var(--serif); color: #6B6457; padding: 0.6em 0 0.75em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.print.bts { background: var(--film); }
.print.bts figcaption { color: #B9B2A6; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .print:hover { transform: rotate(0deg) scale(1.06); z-index: 5 !important; box-shadow: 4px 16px 30px rgb(0 0 0 / 0.5); }
}

/* the loop keeps its own proportions (viewBox in spread units), so it never stretches and draws whole */
.wax { position: absolute; left: 0; top: 0; width: 100%; height: auto; pointer-events: none; z-index: 3; overflow: visible; }
.wax path { fill: none; stroke: var(--yellow); stroke-width: 0.95; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  .js .wax path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s cubic-bezier(.6, 0, .3, 1) 0.2s; }
  .js .wax.drawn path { stroke-dashoffset: 0; }
}

/* ---------------------------------------------------------------- photography */

.leads { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 7vw, 96px); align-items: start; }
.lead { position: relative; container-type: inline-size; }
.lead .line { min-height: 2.9em; }      /* two lines of room, so both links sit on one line */
.logo-band { margin: 0 0 18px; height: 55cqw; display: flex; align-items: center; justify-content: center; }
/* VAN DE SANDE lines up with FROM on the Kris From Belgium badge (measured from both logos) */
.lead-kvds .logo-band { align-items: flex-start; }
.lead-kvds .logo { width: 96%; margin-top: 2.18cqw; }
.lead-kfb .logo { height: 100%; width: auto; }
.lead .spread { margin-bottom: 36px; }

.label.sub { margin-top: clamp(96px, 12vw, 160px); }
.more { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(40px, 5vw, 64px); align-items: stretch; }
.more-item { container-type: inline-size; display: flex; flex-direction: column; height: 100%; }
.more-item .line { margin-top: auto; }
.more-item:not(:has(.dom))::after { content: ""; height: 3.1rem; }
.logo-band.small { height: 42cqw; margin-bottom: 8px; align-items: center; justify-content: center; }   /* the three logos share one centre line */
.logo-band.small .logo { height: 100%; width: auto; max-width: 70%; object-fit: contain; object-position: center; }
.more .spread { margin-bottom: 28px; }
/* Tales from My Mind: the logo as a mask over a slowly drifting gold gradient */
.gold-logo {
  display: block; height: 100%; aspect-ratio: var(--ar);
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
  background: linear-gradient(110deg, #8A6526 0%, #C9A55C 28%, #F7E7B0 42%, #D9B76A 50%, #A57B33 66%, #E9CF86 82%, #8A6526 100%);
  background-size: 300% 100%; background-position: 0% 0;
}
@media (prefers-reduced-motion: no-preference) {
  .gold-logo { animation: shimmer 7s ease-in-out infinite alternate; }
}
@keyframes shimmer { to { background-position: 100% 0; } }
@media (forced-colors: active) { .gold-logo { forced-color-adjust: none; } }
.more .line { font-size: 1.2rem; min-height: 2.9em; }   /* two lines of room: descriptions and links line up */
.more .out { font-size: 1.1rem; }

/* ---------------------------------------------------------------- film */

.films { display: flex; justify-content: safe center; gap: clamp(28px, 4vw, 48px); margin: 0; padding: 8px 0 28px; list-style: none; overflow-x: auto;
         contain: paint;   /* without it the posters behind the scroll still widen the page on phones (Safari then zooms out) */ scroll-snap-type: x mandatory; scrollbar-width: thin; }
/* shown by site.js only when the posters don't all fit: one dot per film, and an arrow to the next one */
.films-nav { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 4px; }
.films-nav[hidden] { display: none; }
.films-nav .dots { display: flex; gap: 8px; }
.films-nav i { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--muted); }
.films-nav i.on { background: var(--yellow); border-color: var(--yellow); }
.films-nav .next { width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); background: none;
                   border: 1.5px solid var(--rule); border-radius: 50%; cursor: pointer; }
.films-nav .next svg { width: 16px; height: 16px; transition: transform 0.25s ease; }
.films-nav .next.back svg { transform: rotate(180deg); }
.film { flex: 0 0 min(360px, 78vw); scroll-snap-align: start; display: flex; flex-direction: column; }
.film .desc { flex: 1; }      /* the links of every film sit on one line */
.film img { width: 100%; height: auto; aspect-ratio: 27 / 40; object-fit: cover; box-shadow: 0 14px 30px rgb(0 0 0 / 0.45); }
.film h3 { font: 600 1.9rem/1.1 var(--display); color: var(--ink); margin: 28px 0 6px; }
.film .meta { font: 400 0.875rem/1 var(--display); color: var(--muted); margin: 0 0 14px; }
.film .desc { font-style: italic; margin: 0 0 18px; }
.film .links, .app .links { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin: 0; }
.film .out, .app .out { font-size: 1.05rem; }

/* ---------------------------------------------------------------- software */

.apps { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.app {
  display: grid; grid-template-columns: 72px 220px minmax(0, 1fr) 210px 135px; gap: 8px 32px; align-items: center;   /* same columns in every row; the badge has its own */
  padding: 28px 0; border-bottom: 1px solid var(--rule);
}
.app .icon { width: 72px; height: 72px; border-radius: 22.5%; object-fit: cover; }
.app h3 { font: 500 2rem/1.1 var(--display); color: var(--ink); margin: 0; }
.app .plat { font: 400 0.875rem/1.4 var(--display); color: var(--muted); margin: 4px 0 0; }
.app .desc { margin: 0; color: var(--muted); font-size: 1.1rem; }
.app .links { display: contents; }
.app .out { grid-column: 4; justify-self: start; }
.app .store { grid-column: 5; }
.store img { width: 135px; height: auto; }

/* ---------------------------------------------------------------- behind the scenes */

.bts-head { display: flex; align-items: center; gap: 48px; margin-bottom: 32px; }
.bts-head img { width: min(260px, 50vw); }
.bts-head p { font-style: italic; color: var(--muted); margin: 0; max-width: 18em; }
/* window-wide and endless: three copies on one layer that site.js moves with transform only (no repaint while
   swiping); horizontal drags go to the script, vertical ones still scroll the page */
.table { width: 100vw; margin-left: calc(50% - 50vw); overflow: hidden; padding: 10px 0 40px; touch-action: pan-y; cursor: grab;
         user-select: none; -webkit-user-select: none; }
.table.dragging { cursor: grabbing; }
.table-inner { --u: 10px; position: relative; height: calc(60 * var(--u)); width: calc(var(--tw) * var(--u) * 3); will-change: transform; }
.table .loop { position: absolute; top: 0; left: calc(var(--tw) * var(--u) * var(--i)); width: calc(var(--tw) * var(--u)); height: 100%; }
.table img { -webkit-user-drag: none; pointer-events: none; }
@media (max-width: 720px) { .table-inner { --u: 6.5px; } }

/* ---------------------------------------------------------------- details: readable at a shop counter */

.details .company { font: 600 clamp(2.4rem, 6vw, 4rem)/1 var(--display); color: var(--ink); margin: 0 0 12px; }
.details > .aside { font-style: italic; color: var(--muted); margin: 0 0 48px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; margin: 0; }
.fact { border-top: 1px solid var(--rule); padding: 26px 0 40px; position: relative; }
.fact dt { font: 600 0.8125rem/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.fact dd { margin: 0; font: 500 clamp(1.5rem, 2.6vw, 2rem)/1.35 var(--display); color: var(--ink); }
.fact dd span { display: block; }
.fact dd a { text-decoration: none; }
.fact dd a:hover { color: var(--yellow); }
.copy {
  position: absolute; top: 22px; right: 0;
  font: 600 0.8125rem/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--yellow); background: none; border: 0; border-bottom: 2px solid currentColor; padding: 4px 0; cursor: pointer;
}
.social-h { font: 600 0.8125rem/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 24px 0 8px; }
.socials { width: 100%; border-collapse: collapse; }
.socials th, .socials td { vertical-align: baseline; }
.socials thead th { font: 600 0.75rem/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 16px 14px 0; }
.socials thead td { width: 220px; }
.socials tbody th { font: 600 1.15rem/1.3 var(--display); color: var(--ink); text-align: left; padding: 18px 16px 18px 0; }
.socials td { padding: 18px 16px 18px 0; white-space: nowrap; }
.socials tbody tr { border-top: 1px solid var(--rule); }
.socials a { font: 400 1.05rem/1.3 var(--display); color: var(--ink); text-decoration-color: var(--rule); text-underline-offset: 4px; }
.socials a:hover { color: var(--yellow); }
.copied { min-height: 1.5em; color: var(--yellow); font-family: var(--display); }

.footer {
  max-width: var(--max); margin: clamp(64px, 9vw, 120px) auto 0; padding: 28px var(--gutter) 48px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--rule); font: 400 0.875rem/1.4 var(--display); color: var(--muted);
}
.footer p { margin: 0; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--yellow); }

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

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-scan { order: -1; max-width: 520px; }
  .leads { grid-template-columns: 1fr; }
  .more { grid-template-columns: 1fr; }
  .more-item .line { margin-top: 0; }
  .more-item:not(:has(.dom))::after { display: none; }
  .more-item { max-width: 520px; }
  .app { grid-template-columns: 56px 1fr; }
  .app .icon { width: 56px; height: 56px; }
  .app .desc { grid-column: 1 / -1; }
  .app .links { display: flex; grid-column: 1 / -1; justify-content: flex-start; }
  .app .out, .app .store { grid-column: auto; }
  .facts { grid-template-columns: 1fr; }
  /* phones: one block per brand, each handle labelled with its network */
  .socials, .socials tbody, .socials tr, .socials th, .socials td { display: block; }
  .socials thead { display: none; }
  .socials tbody th { padding: 18px 0 6px; }
  .socials td { padding: 4px 0; display: flex; justify-content: space-between; gap: 16px; white-space: normal; overflow-wrap: anywhere; }
  .socials td:empty { display: none; }
  .socials td::before { content: attr(data-net); font: 600 0.75rem/1.6 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
}
@media (max-width: 640px) {
  .nav { flex-direction: column; align-items: flex-start; }
  .nav ul { justify-content: flex-start; gap: 4px 20px; }
  .label .aside { display: none; }
  .bts-head { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ---------------------------------------------------------------- high contrast */

@media (prefers-contrast: more) {
  :root { --muted: #D6CFC4; --rule: #6B655C; }
  .print { box-shadow: none; outline: 1px solid #000; }
}
@media (forced-colors: active) {
  .waves, .wax { display: none; }
  .out, .copy { border-bottom-color: CanvasText; }
}
