/* Jost, served from this site (not Google) and loaded before the page shows,
   so the words never swap fonts and shift when a page opens */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300;
  font-display: block;
  src: url("jost-300.woff2") format("woff2");
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f2f0ea;
  --fg: #111110;
  --dim: #6e6b65;
  --rule: #d6d3cb;
}

html, body {
  width: 100%;          /* page width never depends on what has loaded, so nothing shifts */
  min-height: 100vh;
  min-height: 100svh; /* visible screen height on phones, excluding browser bars */
  background: var(--bg);
  color: var(--fg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }

.inner {
  padding-bottom: 40px;
  /* The whole column scales with the screen HEIGHT as well as the width, so on a
     short laptop screen logo, photo and words all shrink together and fit, uncropped.
     Same rule on every page, so positions stay identical between pages. */
  width: 75%;
  width: min(75%, max(45%, calc((100vh - 200px) * 1.34)));
  width: min(75%, max(45%, calc((100svh - 200px) * 1.34)));
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Logo */
.logotype { display: block; width: 100%; padding: 40px 0 24px; }
.logotype img { width: 100%; height: auto; display: block; }

/* Main photo (home) */
.frame { position: relative; width: 100%; }
.photo { width: 100%; display: block; height: auto; }

.rule { width: 100%; height: 1px; background: var(--rule); margin-top: 24px; }

/* Cinema / Music / Image / About */
.statement {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: clamp(8px, 2.2vw, 13px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  width: 100%;
  /* four fixed columns — positions never shift, whichever word is enlarged */
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1fr); /* middle words centred at 1/3 and 2/3 */
  align-items: baseline;
  padding: 20px 0;
}
.statement > :nth-child(1) { justify-self: start; }
.statement > :nth-child(2),
.statement > :nth-child(3) { justify-self: center; }
.statement > :nth-child(4) { justify-self: end; }
.statement a { transition: color 0.15s; }
.statement a:hover { color: var(--dim); }

/* Section pages: the current section is dark, the others dimmed */
.statement.nav a { color: var(--dim); }
.statement.nav a:hover,
.statement.nav a[aria-current="page"] { color: var(--fg); }
.statement.nav a[aria-current="page"] { font-size: 2em; }
/* home page: all three words at the large size */

/* Page title for screen readers and search engines, not shown */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}


/* Footer */

/* Mobile */
@media (max-width: 600px) {
  .inner { width: 88%; padding-bottom: 16px; }
  .statement { grid-template-columns: repeat(4, minmax(0, 1fr)); } /* narrow screens: room for the enlarged word */
  .logotype { padding: 32px 0 20px; }
  .statement { font-size: clamp(9px, 3vw, 13px); letter-spacing: 0.06em; }
  }

/* Releases (music + cinema pages) */
.releases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-top: 24px;
}
.release img { width: 100%; height: auto; display: block; }
.release .caption {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.7;
  padding-top: 12px;
}
.release .caption span { display: block; }
/* Track list + playhead under a release */
.tracks { padding-top: 10px; font-family: 'Jost', sans-serif; font-weight: 300; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; }
.tracks ol { list-style: none; counter-reset: t; }
.tracks li { counter-increment: t; }
.tracks button {
  all: unset; box-sizing: border-box; cursor: pointer;
  width: 100%; display: grid; grid-template-columns: 2.2em 1fr auto;
  padding: 4px 0; color: var(--dim); transition: color 0.15s;
}
.tracks button::before { content: counter(t, decimal-leading-zero); }
.tracks button:hover, .tracks button[aria-pressed="true"] { color: var(--fg); }
.tracks button:focus-visible { outline: 1px solid var(--fg); outline-offset: 2px; }
.tracks .time { font-variant-numeric: tabular-nums; }
/* thin line; the played part fills in. Generous invisible touch area around it */
.playhead { position: relative; height: 17px; margin-top: 4px; cursor: pointer; touch-action: none; }
.playhead::before, .playhead .played {
  content: ""; position: absolute; left: 0; top: 8px; height: 1px; }
.playhead::before { right: 0; background: var(--rule); }
.playhead .played { width: 0; background: var(--fg); }
.playhead:focus-visible { outline: 1px solid var(--fg); outline-offset: 2px; }
.release .caption .title { color: var(--dim); }
.release a:hover .caption .title { color: var(--fg); }

@media (max-width: 600px) {
  .releases { grid-template-columns: 1fr; padding-top: 16px; }
}


/* FADE: leaving the home page, the screen fades to white in 4 frames (24 fps), then the next page opens */
.fade {
  position: fixed; inset: 0; z-index: 100;
  background: #fff; opacity: 0; pointer-events: none;
}
.fade.on { animation: to-white 167ms steps(4, end) forwards; }
@keyframes to-white { to { opacity: 1; } }

/* short phones (iPhone SE size): tighten a little so pages still fit without scrolling */
@media (max-width: 600px) and (max-height: 700px) {
  .logotype { padding: 24px 0 16px; }
  .releases { padding-top: 12px; }
  .tracks button { padding: 3px 0; }
}
