/* Isebe Productions: one-page site. No framework, no build step. */

@font-face {
  font-family: "Rubik";
  src: url("assets/fonts/rubik-latin.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/nunito-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/plexmono-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --indigo: #3C3AA8;
  --indigo-deep: #2E2C8A;
  --pill: #4846B5;
  --orange: #FF6B4A;        /* numbers on indigo, large sizes only */
  --orange-deep: #D2552B;   /* numbers on cream, large sizes only (3.6:1) */
  --cream: #F3EEE4;
  --muted: #DAD9F5;         /* secondary text on indigo (6.4:1) */
  --ink: #1C2130;
  --ink-2: #555B6E;         /* secondary text on cream (5.8:1) */
  --rule: #CDC5B4;
  --mark: #E3E0F3;          /* footnote target tint */

  --display: "Rubik", "Segoe UI", system-ui, sans-serif;
  --text: "Nunito", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 76rem;
  --sec-space: clamp(4rem, 2.5rem + 6vw, 8rem);
  --cols: minmax(0, 1fr) minmax(0, 2.25fr);
  --col-gap: clamp(2rem, 4vw, 4.5rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(1.125rem, 1.06rem + 0.25vw, 1.25rem);
  line-height: 1.6;
  font-variant-numeric: lining-nums tabular-nums;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
p, ul, ol, dl, dd, figure, blockquote, h1, h2, h3 { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
code { font-family: var(--mono); font-size: 1em; }
::selection { background: var(--muted); color: var(--ink); }

a { color: var(--indigo); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.nowrap { white-space: nowrap; }
.vh {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: var(--gutter); top: -10rem; z-index: 10;
  padding: 0.6rem 1rem; background: var(--cream); color: var(--ink);
  font: 600 1rem/1.2 var(--display); text-decoration: none;
}
.skip:focus { top: 0.75rem; outline-color: var(--cream); outline-offset: 2px; }

/* ---------- Indigo band: masthead and opening ---------- */

.masthead, .hero, .colophon { background: var(--indigo); color: var(--cream); }
.masthead :focus-visible, .hero :focus-visible, .colophon :focus-visible { outline-color: var(--cream); }

.masthead__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding-block: clamp(0.75rem, 2vw, 1.5rem);
}
.masthead__logo { display: block; margin-left: -0.35rem; }
.masthead__logo img { width: clamp(120px, 6vw + 96px, 176px); }
.masthead__email {
  margin-left: auto;
  color: var(--cream);
  font: 500 clamp(0.875rem, 0.8rem + 0.3vw, 1rem)/1.3 var(--display);
  text-decoration-color: var(--muted);
}

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2rem, 1rem + 5vw, 5rem) clamp(4rem, 2.5rem + 6vw, 7.5rem);
}
@supports (overflow: clip) { .hero { overflow: clip; } }

.hero__grid { position: relative; z-index: 1; display: grid; gap: 2rem; }

.hero h1 {
  font-weight: 700;
  font-size: clamp(2.5rem, 1.15rem + 5.6vw, 6rem);
  line-height: 1;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.hero__lede {
  font-size: clamp(1.25rem, 1.12rem + 0.55vw, 1.625rem);
  line-height: 1.4;
  max-width: 28ch;
}
.hero__ask { margin-top: clamp(1.5rem, 3vw, 2.5rem); color: var(--muted); }
.hero__cta { margin-top: 0.25rem; }
.hero__cta a {
  color: var(--cream);
  font: 600 min(1.75rem, calc((100vw - 2 * var(--gutter)) / 14.8)) / 1.25 var(--display);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
  overflow-wrap: anywhere;
}
.hero__cta a:hover { text-decoration-thickness: 3px; }

/* The studio's thumbnail grammar: cream keyline, offset block in deep indigo. */
.hero__still { margin-right: 10px; }
.keycard { position: relative; }
.keycard::before {
  content: ""; position: absolute; inset: 0;
  transform: translate(10px, 10px);
  background: var(--indigo-deep);
  border-radius: 14px;
}
.keycard img {
  position: relative;
  width: 100%;
  border: 4px solid var(--cream);
  border-radius: 14px;
  background: var(--cream);
}
.hero__still figcaption { margin-top: 1.25rem; color: var(--muted); font-size: 1rem; line-height: 1.5; }

/* Drifting pills from the films' end card. Indigo band only. */
.pills { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.pills span {
  position: absolute; display: block;
  height: clamp(16px, 0.7rem + 0.7vw, 28px);
  border-radius: 999px;
  background: var(--pill);
}
.pills .p1 { top: 0.6rem; right: -3rem; width: clamp(8rem, 18vw, 17rem); }
.pills .p2, .pills .p3 { display: none; }
.pills .p4 { bottom: 1.25rem; left: -2.5rem; width: clamp(9rem, 22vw, 19rem); }
.pills .p5 { bottom: 2.75rem; right: -3.5rem; width: clamp(6rem, 16vw, 15rem); }

@media (prefers-reduced-motion: no-preference) {
  .pills span { animation: drift 70s ease-in-out infinite alternate; }
  .pills .p3 { animation-duration: 90s; animation-delay: -30s; }
  .pills .p4 { animation-duration: 80s; animation-delay: -12s; }
  .pills .p5 { animation-duration: 95s; animation-delay: -50s; }
}
@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-3rem); }
}

@media (min-width: 60rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: var(--col-gap);
    row-gap: clamp(2.5rem, 4vw, 3.5rem);
  }
  .hero h1 { grid-column: 1 / -1; }
  .hero__line { display: block; }
  .hero__copy { padding-top: 0.25rem; }
  .hero__still { margin-right: 14px; }
  .keycard::before { transform: translate(14px, 14px); border-radius: 18px; }
  .keycard img { border-width: 5px; border-radius: 18px; }
  .pills .p1 { top: 2.5rem; right: -4rem; }
  .pills .p2 { display: block; top: 5.25rem; right: -6rem; width: clamp(8rem, 13vw, 13rem); }
  .pills .p4 { bottom: 2rem; }
  .pills .p5 { bottom: 4.5rem; }
}

/* ---------- Cream sections: report layout with side heads ---------- */

.sec { padding-top: var(--sec-space); }
.sec__grid { display: grid; gap: 1.5rem; }
.sec__grid::before {
  content: ""; grid-column: 1 / -1;
  border-top: 2px solid var(--ink);
  margin-bottom: 0.25rem;
}
.sec h2 {
  font-size: clamp(1.875rem, 1.35rem + 2vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.sec__lead p { max-width: 40ch; font-size: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem); line-height: 1.5; }
.sec__body { min-width: 0; }

@media (min-width: 60rem) {
  .sec__grid { grid-template-columns: var(--cols); column-gap: var(--col-gap); row-gap: 2rem; }
  .sec__head { grid-column: 1; }
  .sec__lead, .sec__body, .trail, .method, .notes { grid-column: 2; }
  .sec__lead { padding-top: 0.5rem; }
}

/* Footnote markers and source lines */
sup { line-height: 0; }
.ref { font: 600 0.62em/0 var(--display); vertical-align: super; margin-left: 0.12em; }
.ref a {
  display: inline-block; padding: 0.1em 0.15em; margin: -0.1em 0;
  color: var(--indigo); text-decoration: none;
  border-bottom: 1px solid currentColor;
  line-height: 1;
}
.ref a:hover { background: var(--mark); }

.notes {
  position: relative;
  margin-top: clamp(1rem, 3vw, 2rem);
  padding-top: 1.1rem;
  font: 400 0.875rem/1.6 var(--mono);
  color: var(--ink-2);
}
.notes::before { content: ""; position: absolute; top: 0; left: 0; width: 5rem; border-top: 1px solid var(--ink); }
.notes ol { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
.notes li {
  display: grid; grid-template-columns: 2ch minmax(0, 1fr); gap: 1ch;
  padding: 0.15rem 0.35rem; margin-inline: -0.35rem;
  scroll-margin-top: 2rem;
}
.notes li:target { background: var(--mark); }
.notes__n { color: var(--indigo); text-decoration: none; font-weight: 400; }
.notes__n:hover { text-decoration: underline; }
.notes p { max-width: 72ch; }
.notes .id { white-space: nowrap; }
.notes p a { color: var(--ink); }

/* ---------- The work ---------- */

.film {
  grid-column: 1 / -1;
  display: grid; gap: 1.25rem;
  padding-top: clamp(1.75rem, 4vw, 3rem);
  margin-top: clamp(0.5rem, 2vw, 1.5rem);
  border-top: 1px solid var(--rule);
}
.film h3 { font-weight: 600; font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem); line-height: 1.18; letter-spacing: -0.01em; }
.film__text p { margin-top: 0.85rem; max-width: 40ch; }
.film__text .film__label { margin-top: 1.1rem; color: var(--ink-2); font-size: 1rem; line-height: 1.5; font-weight: 600; }

@media (min-width: 60rem) {
  .film { grid-template-columns: var(--cols); column-gap: var(--col-gap); }
  .film__media { grid-column: 2; grid-row: 1; }
  .film__text { grid-column: 1; grid-row: 1; padding-top: 0.15rem; }
}

.player { position: relative; aspect-ratio: 16 / 9; background: var(--ink); outline: 1px solid var(--ink); }
.player img { width: 100%; height: 100%; object-fit: cover; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__btn {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: 0; margin: 0; border: 0; background: transparent;
  font: inherit; color: inherit; cursor: pointer;
}
.player__btn:focus-visible { outline: 3px solid var(--indigo); outline-offset: 4px; border-radius: 0; }
.player__tab {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 0.95rem 0.6rem 0.85rem;
  background: var(--cream); color: var(--ink);
  font: 600 1rem/1 var(--display);
  border-top: 1px solid var(--ink); border-right: 1px solid var(--ink);
}
.player__tri {
  width: 0; height: 0;
  border-style: solid; border-width: 0.4rem 0 0.4rem 0.68rem;
  border-color: transparent transparent transparent currentColor;
}
.player__btn:not(:disabled):hover .player__tab,
.player__btn:not(:disabled):focus-visible .player__tab { background: var(--indigo); color: var(--cream); }
.player__btn:disabled { cursor: default; }
.player__btn:disabled .player__tab { color: var(--ink-2); }
.player__btn:disabled .player__tri { display: none; }

/* ---------- The trace ---------- */

.trail { list-style: none; padding: 0; margin-top: 0.5rem; min-width: 0; }
.trail > li { position: relative; padding-left: clamp(1.75rem, 3vw, 2.5rem); padding-bottom: clamp(2.25rem, 4vw, 3.25rem); }
.trail > li::before {
  content: ""; position: absolute; left: 6px; top: 0.85rem; bottom: -0.55rem;
  border-left: 2px solid var(--indigo);
}
.trail > li:last-child { padding-bottom: 0; }
.trail > li:last-child::before { display: none; }
.trail > li::after {
  content: ""; position: absolute; left: -2px; top: 0.5rem;
  width: 18px; height: 8px; border-radius: 4px; background: var(--indigo);
}
.trail__label { font-weight: 600; font-size: 1rem; line-height: 1.3; color: var(--indigo); margin-bottom: 0.85rem; letter-spacing: 0.01em; }
.trail__body { min-width: 0; }
@media (min-width: 60rem) {
  .sec__grid > .trail { grid-column: 1 / -1; }
  .trail > li {
    display: grid; grid-template-columns: var(--cols); column-gap: var(--col-gap);
    padding-left: 0;
  }
  .trail > li::before { left: calc((100% - var(--col-gap)) / 3.25 + var(--col-gap) + 6px); }
  .trail > li::after { left: calc((100% - var(--col-gap)) / 3.25 + var(--col-gap) - 2px); top: 0.45rem; }
  .trail__label { grid-column: 1; margin: 0; font-size: 1.125rem; }
  .trail__body { grid-column: 2; padding-left: 2.5rem; }
}

.trail__quote p {
  font-family: var(--text); font-weight: 400;
  font-size: clamp(1.375rem, 1.1rem + 1.15vw, 2.125rem);
  line-height: 1.32;
  max-width: 34ch;
  text-indent: -0.42em;
}
.trail__quote .fig { color: var(--orange-deep); font-weight: 700; }
.trail__quote .ref { margin-left: 0.32em; }

.claims { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.5; }
.claims th {
  text-align: left; font: 600 0.875rem/1.3 var(--display); color: var(--ink-2);
  padding: 0 1rem 0.5rem 0; border-bottom: 2px solid var(--ink);
}
.claims td { vertical-align: top; padding: 0.85rem 1rem 0.85rem 0; border-bottom: 1px solid var(--rule); }
.claims td:first-child { width: 1%; }
.claims td:last-child, .claims th:last-child { padding-right: 0; }
.claims__id { display: block; font-size: 1rem; color: var(--ink); letter-spacing: -0.01em; white-space: nowrap; }
.claims__src { display: block; margin-top: 0.2rem; font: 400 0.8125rem/1.45 var(--mono); color: var(--ink-2); }
@media (min-width: 40rem) {
  .claims { font-size: 1.0625rem; }
  .claims td:first-child { width: 14rem; }
  .claims__id { font-size: 1.1875rem; }
}

.trail__frame img { width: 100%; outline: 1px solid var(--ink); }
.trail__frame figcaption { margin-top: 0.85rem; color: var(--ink-2); font-size: 1rem; line-height: 1.5; }

.method { margin-top: clamp(2.5rem, 5vw, 4rem); }
.method__title { font-weight: 600; font-size: 1rem; line-height: 1.3; color: var(--indigo); margin-bottom: 0.5rem; letter-spacing: 0.01em; }
.method ul { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.method li {
  padding: 0.8rem 0; border-bottom: 1px solid var(--rule);
  font: 600 clamp(1.1875rem, 1.05rem + 0.55vw, 1.5rem)/1.3 var(--display);
  letter-spacing: -0.01em;
}

/* ---------- What you get ---------- */

.spec { border-top: 1px solid var(--rule); }
.spec > div {
  display: grid; grid-template-columns: minmax(7.25rem, 1fr) minmax(0, 2.2fr); gap: 1rem;
  padding: 0.8rem 0; border-bottom: 1px solid var(--rule);
}
.spec dt { font: 600 1.0625rem/1.55 var(--display); padding-top: 0.05em; }
.spec dd { line-height: 1.5; }
.quote-ask {
  margin-top: clamp(2rem, 4vw, 3rem);
  font: 600 clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem)/1.3 var(--display);
  letter-spacing: -0.01em; max-width: 30ch;
}
.quote-email { margin-top: 0.5rem; }
.quote-email a { font: 600 1.1875rem/1.4 var(--display); overflow-wrap: anywhere; }

/* ---------- Who it's for ---------- */

.standfirst { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem); line-height: 1.45; max-width: 38ch; }

/* ---------- Colophon ---------- */

.colophon { margin-top: var(--sec-space); padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(2rem, 4vw, 3rem); }
.colophon__email a {
  color: var(--cream);
  font: 700 min(4.25rem, calc((100vw - 2 * var(--gutter)) / 14.8)) / 1.1 var(--display);
  letter-spacing: -0.02em;
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
}
.colophon__meta {
  display: grid; gap: 0.5rem;
  margin-top: clamp(2rem, 5vw, 3.5rem); padding-top: 1.25rem;
  border-top: 1px solid var(--pill);
  color: var(--muted); font-size: 1rem; line-height: 1.5;
}
.colophon__name { display: flex; align-items: center; gap: 0.6rem; color: var(--cream); font: 600 1.0625rem/1.4 var(--display); }
.colophon__tree { width: 32px; height: 32px; flex: none; }
.colophon__reg { font: 0.875rem/1.5 var(--mono); letter-spacing: 0.01em; }
@media (min-width: 48rem) {
  .colophon__meta { grid-template-columns: auto 1fr; align-items: center; column-gap: 2.5rem; }
  .colophon__privacy { justify-self: end; text-align: left; }
  .colophon__founder { grid-column: 1 / -1; grid-row: 2; }
  .colophon__reg { grid-column: 1 / -1; grid-row: 3; }
}

/* ---------- 404 ---------- */

.lost { padding-block: clamp(3rem, 2rem + 6vw, 7rem); }
.lost h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4.5rem); line-height: 1.02; letter-spacing: -0.025em; max-width: 14ch; }
.lost p { margin-top: 1.5rem; font-size: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem); }
.lost a { color: var(--cream); }

@media print {
  .pills, .player__btn, .skip { display: none; }
  .masthead, .hero, .colophon { background: none; color: var(--ink); }
}
.page-404 { background: var(--indigo); }
.page-404 .colophon { margin-top: 0; }
.lost .hero__grid > * { grid-column: 1 / -1; }
.lost p { max-width: 40ch; }
