/* ==================================================================
   KITE FIGHT — case study page
   Builds on css/styles.css (header, colors, base type).
   ================================================================== */

/* ------------------------------------------------------------------
   Project palette & type — change the Kite Fight colors here
   ------------------------------------------------------------------ */
:root {
  --kf-green:  #1E9A4C;
  --kf-green-deep: #137A3A;
  --kf-yellow: #F6F02C;
  --kf-white:  #FAFAF5;
  --kf-blue:   #1F2F63;
  --kf-ink:    #161616;
  --kf-paper:  #E9E9E4;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;

  --kf-wrap: 1240px;
  --kf-pad: clamp(16px, 5vw, 64px);
  --kf-space: clamp(96px, 13vw, 200px);
}

/* the homepage constrains <main>; this page needs full bleed */
main.kf {
  position: relative;
  max-width: none;
  padding: 0;
  overflow-x: clip;
}

.kf-wrap {
  max-width: var(--kf-wrap);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--kf-pad);
  padding-right: var(--kf-pad);
}

.kf img { display: block; max-width: 100%; height: auto; }
.kf ol, .kf-index ol { list-style: none; margin: 0; padding: 0; }
.kf ol.kf-wrap { padding-left: var(--kf-pad); padding-right: var(--kf-pad); margin-left: auto; margin-right: auto; }

/* ------------------------------------------------------------------
   Shared type
   ------------------------------------------------------------------ */
.kf-eyebrow,
.kf-label {
  margin: 0;
  font-size: 0.6875rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.kf-label--center { text-align: center; margin-top: 48px; }
.kf-label--light { color: rgba(255, 255, 255, 0.6); margin: 72px 0 20px; }

.kf-lead {
  margin: 0 0 28px;
  font-size: clamp(1.375rem, 2.4vw, 2rem);
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.kf-body {
  max-width: 38em;
  margin: 0 0 24px;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
  color: #3a3a38;
}
.kf-body--lg { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); }
.kf-body--light { color: rgba(255, 255, 255, 0.82); }

/* label on the left, content on the right */
.kf-split {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 2.4fr;
  gap: 24px clamp(24px, 5vw, 80px);
  margin-bottom: clamp(48px, 6vw, 88px);
}
.kf-split > .kf-label { padding-top: 0.6em; margin: 0; }

.kf-tags,
.kf-tone {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.kf-tags li,
.kf-tone li {
  padding: 8px 14px;
  border: 1px solid var(--color-line);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.kf-tone li { border-color: var(--kf-green); color: var(--kf-green-deep); }

/* ------------------------------------------------------------------
   Sections, bands, chapter headers
   ------------------------------------------------------------------ */
.kf-section { padding: var(--kf-space) 0; position: relative; }

.kf-band--green { background: var(--kf-green-deep); color: var(--kf-white); }
.kf-band--navy  { background: var(--kf-blue);  color: var(--kf-white); }
.kf-band--paper { background: var(--kf-paper); }

/* "STORY ............ 01" style header */
/* small number top-left, big title left, big number right */
.kf-chapter {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "tag tag" "title num" "sub sub";
  align-items: end;
  gap: 10px 24px;
  margin-bottom: clamp(56px, 8vw, 120px);
  padding: 12px 0 14px;
  border-top: 1px solid rgba(128, 128, 128, 0.35);
  border-bottom: 1px solid rgba(128, 128, 128, 0.35);
  font-family: var(--font-display);
  text-transform: uppercase;
}
.kf-chapter h2,
.kf-chapter span:last-of-type {
  margin: 0;
  font-size: clamp(2.75rem, 8.5vw, 7.5rem);
  line-height: 0.85;
}
.kf-chapter h2 { grid-area: title; font-weight: 500; letter-spacing: 0.01em; }
.kf-chapter span:last-of-type { grid-area: num; font-weight: 300; }
.kf-chapter span:first-of-type {
  grid-area: tag;
  font-family: var(--font-sans);
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  opacity: 0.55;
}
.kf-chapter span:first-of-type::before { content: "Chapter "; }
.kf-chapter__sub {
  grid-area: sub;
  margin: 6px 0 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  text-transform: none;
  opacity: 0.7;
}

/* ------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------ */
.kf-hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(calc(100svh - var(--header-h)), 56.25vw);
  overflow: hidden;
  background: var(--kf-green);
  color: var(--kf-white);
}
.kf-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  object-position: 50% 40%;
  transform: scale(1.06);
  animation: kf-hero-in 2.4s var(--ease) forwards;
}
.kf-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(8, 40, 20, 0.35));
}
@keyframes kf-hero-in { to { transform: scale(1); } }

/* Title band under the hero */
.kf-intro { padding-top: clamp(48px, 7vw, 104px); }
.kf-intro__row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 24px clamp(32px, 6vw, 96px);
  margin-top: 18px;
}
.kf-intro__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(4rem, 13vw, 12rem);
  font-weight: 600;
  line-height: 0.8;
  text-transform: uppercase;
  color: var(--kf-green-deep);
  white-space: nowrap;
}
.kf-intro__lede {
  max-width: 30em;
  margin: 0 0 0.4em;
  font-size: clamp(0.9375rem, 1.25vw, 1.0625rem);
  font-weight: 300;
  line-height: 1.7;
  color: #3a3a38;
}
@media (max-width: 900px) {
  .kf-intro__row { grid-template-columns: 1fr; }
}
/* "Play teaser with sound" — under the title, same small caps as the eyebrow */
.kf-intro__play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: clamp(20px, 3vw, 32px);
  padding: 0 18px;
  border: 1px solid var(--kf-green-deep);
  border-radius: 999px;
  background: transparent;
  color: var(--kf-green-deep);
  font: inherit;
  font-size: 0.6875rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.kf-intro__play:hover,
.kf-intro__play[aria-pressed="true"] { background: var(--kf-green-deep); color: var(--kf-white); }
@media (max-width: 640px) { .kf-intro__play { letter-spacing: 0.16em; } }   /* stays on one line on phones */

/* Sound on / off — bottom-left of the hero, same small caps as the Scroll cue */
.kf-hero__sound {
  position: absolute;
  z-index: 2;
  left: var(--kf-pad);
  bottom: clamp(24px, 4vw, 56px);
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: rgba(8, 40, 20, 0.3);
  color: var(--kf-white);
  font: inherit;
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.kf-hero__sound:hover { background: var(--color-accent); border-color: var(--color-accent); }
.kf-hero__sound[aria-pressed="true"] { border-color: var(--kf-yellow); }

.kf-hero__cue {
  position: absolute;
  z-index: 2;
  right: var(--kf-pad);
  bottom: clamp(24px, 4vw, 56px);
  display: flex;
  color: var(--kf-white);
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.kf-hero__cue::after {
  content: "";
  width: 1px;
  height: 64px;
  background: var(--kf-yellow);
  transform-origin: top;
  animation: kf-cue 2.2s var(--ease) infinite;
}
@keyframes kf-cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Credits row */
.kf-credits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: var(--kf-wrap);
  margin: 0 auto;
  padding: 0 var(--kf-pad);
}
.kf-credits div {
  padding: 28px 20px 30px 0;
  border-bottom: 1px solid var(--color-line);
}
.kf-credits div + div { padding-left: 20px; border-left: 1px solid var(--color-line); }
.kf-credits dt {
  margin-bottom: 8px;
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.kf-credits dd { margin: 0; font-size: 0.875rem; line-height: 1.5; }

/* ------------------------------------------------------------------
   Figures, quotes, statements
   ------------------------------------------------------------------ */
.kf-figure { margin: 0 auto; }
.kf-figure img { width: 100%; }
.kf-figure figcaption {
  margin-top: 14px;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.kf-quote {
  margin: clamp(80px, 10vw, 140px) auto 0;
  text-align: center;
}
.kf-quote p {
  margin: 0 auto 20px;
  max-width: 14em;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 5rem);
  font-weight: 500;
  line-height: 0.95;
  text-transform: uppercase;
}
.kf-quote cite {
  font-style: normal;
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.kf-statement {
  max-width: 18em;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6.2vw, 5.25rem);
  font-weight: 400;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}
.kf-statement em { font-style: normal; color: var(--kf-yellow); }
.kf-band--green .kf-label { color: rgba(255, 255, 255, 0.7); }
.kf-statement--dark em { color: var(--kf-green); }

/* ------------------------------------------------------------------
   03 Concept
   ------------------------------------------------------------------ */
.kf-metaphor {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: clamp(64px, 8vw, 120px) 0 clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--color-line);
}
.kf-metaphor > div { padding: 32px 28px 8px 0; }
.kf-metaphor > div + div { padding-left: 28px; border-left: 1px solid var(--color-line); }
.kf-metaphor h3 {
  margin: 0 0 12px;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--kf-green-deep);
}
.kf-metaphor p { margin: 0; font-size: 0.9375rem; font-weight: 300; line-height: 1.7; }

/* Keywords — compact 3-column grid (same rhythm as Research) */
.kf-words {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(32px, 4vw, 56px) clamp(8px, 1.2vw, 16px);
}
.kf-keyword { margin: 0; }
.kf-keyword img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.kf-keyword figcaption {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 4px 12px;
  margin-top: 14px;
}
.kf-keyword__n {
  font-size: 0.625rem;
  letter-spacing: 0.24em;
  color: var(--color-muted);
}
.kf-keyword__w {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  color: var(--kf-green-deep);
}
.kf-keyword__note {
  grid-column: 2;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.kf-purpose {
  max-width: 30em;
  margin: clamp(96px, 12vw, 180px) auto 0;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 300;
  line-height: 1.45;
  text-align: center;
}
.kf-purpose em { font-style: normal; color: var(--kf-green-deep); font-weight: 400; }

/* ------------------------------------------------------------------
   Grids
   ------------------------------------------------------------------ */
.kf-grid { display: grid; gap: clamp(8px, 1.2vw, 16px); }
.kf-grid--2 { grid-template-columns: repeat(2, 1fr); }
.kf-grid--4 { grid-template-columns: repeat(4, 1fr); }
.kf-grid img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.kf-grid--2 img { aspect-ratio: 16 / 9; object-fit: contain; border: 1px solid var(--color-line); }
.kf-grid--4:not(.kf-grid--wide) img { aspect-ratio: 3 / 4; object-fit: contain; border: 1px solid var(--color-line); }
.kf-grid--wide img { aspect-ratio: 16 / 9; }

/* Research: every image the same size (3 columns, same crop) */
.kf-research,
.kf-studies {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1.2vw, 16px);
}
.kf-research img,
.kf-studies img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.kf-research__label { margin: clamp(48px, 6vw, 80px) 0 18px; }

.kf-mood {
  columns: 3 220px;
  column-gap: clamp(8px, 1.2vw, 16px);
}
.kf-mood img { width: 100%; margin-bottom: clamp(8px, 1.2vw, 16px); break-inside: avoid; }

.kf-outcome {
  margin: clamp(56px, 7vw, 96px) 0 0;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.kf-outcome span {
  display: inline-block;
  margin: 18px 0.4em 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--kf-green-deep);
}

/* ------------------------------------------------------------------
   07 Storyboard tabs
   ------------------------------------------------------------------ */
.kf-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 28px;
}
.kf-tabs button {
  padding: 12px 22px;
  border: 1px solid #c9c9c3;
  background: transparent;
  color: var(--kf-ink);
  font: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.kf-tabs button:hover { border-color: var(--kf-ink); }
.kf-tabs button[aria-selected="true"] { background: var(--kf-ink); color: var(--kf-white); border-color: var(--kf-ink); }
.kf-panel__note {
  margin: 0 0 24px;
  font-size: 0.9375rem;
  font-weight: 300;
  color: #3a3a38;
}
.kf-panel:not([hidden]) { animation: kf-fade 500ms var(--ease); }
@keyframes kf-fade { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------------------------
   08 Before / After compare
   ------------------------------------------------------------------ */
.kf-compare-list { display: grid; gap: clamp(40px, 6vw, 80px); }
.kf-compare {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #fff;
  user-select: none;
}
.kf-compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
}
.kf-compare__before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
  background: #fff;
}
/* the divider is a kite string */
.kf-compare::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--kf-yellow);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
  pointer-events: none;
}
.kf-compare__range {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.kf-compare__range:focus-visible + figcaption { outline: 1px solid var(--color-accent); }
.kf-compare figcaption {
  position: absolute;
  z-index: 1;
  left: 16px;
  bottom: 14px;
  padding: 6px 10px;
  background: rgba(22, 22, 22, 0.75);
  color: #fff;
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  pointer-events: none;
}
.kf-compare figcaption::before { content: "Sketch ⟷ Final — "; opacity: 0.6; }

/* ------------------------------------------------------------------
   09 Palette
   ------------------------------------------------------------------ */
.kf-palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 48px;
}
.kf-palette li {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(160px, 20vw, 280px);
  padding: 20px;
  background: var(--c);
  color: var(--kf-ink);
}
.kf-palette li:nth-child(1) { color: var(--kf-white); }
.kf-palette li:nth-child(4) { color: var(--kf-white); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); }
.kf-palette span {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1;
}
.kf-palette small { margin-top: 6px; font-size: 0.6875rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.75; }

/* ------------------------------------------------------------------
   10 Motion scrub
   ------------------------------------------------------------------ */
.kf-scrub { height: 320vh; position: relative; }
.kf-scrub__sticky {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h)); /* phones: stays steady as the browser bar hides */
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.kf-scrub__stage {
  position: relative;
  width: 100%;
}
.kf-scrub__stage::before { content: ""; display: block; aspect-ratio: 16 / 9; max-height: 72vh; }
.kf-scrub__stage img {
  position: absolute;
  top: 0;
  left: var(--kf-pad);
  right: var(--kf-pad);
  width: calc(100% - 2 * var(--kf-pad));
  height: 100% !important;
  object-fit: cover;
  opacity: 0;
}
.kf-scrub__stage img.is-active { opacity: 1; }
.kf-scrub__meta { display: flex; align-items: center; gap: 20px; width: 100%; }
.kf-scrub__count { font-size: 0.6875rem; letter-spacing: 0.3em; color: var(--color-muted); white-space: nowrap; }
.kf-scrub__bar, .kf-film__bar { flex: 1; height: 1px; background: var(--color-line); position: relative; }
.kf-scrub__bar i, .kf-film__bar i {
  position: absolute; left: 0; top: -0.5px; height: 2px; width: 100%;
  background: var(--kf-green); transform-origin: left; transform: scaleX(0);
}

.kf-pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 1.5vw, 20px);
  margin-top: clamp(80px, 10vw, 140px);
  counter-reset: step;
}
.kf-pipeline li { position: relative; }
.kf-pipeline img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #fff; border: 1px solid var(--color-line); }
.kf-pipeline span {
  display: block;
  margin-top: 12px;
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.kf-pipeline span::before { counter-increment: step; content: "0" counter(step) "  "; color: var(--color-muted); }
.kf-pipeline li + li::before {
  content: "→";
  position: absolute;
  left: calc(-1 * clamp(8px, 1.5vw, 20px) / 2);
  top: 28%;
  transform: translateX(-50%);
  color: var(--kf-green-deep);
  font-size: 0.875rem;
}

/* ------------------------------------------------------------------
   11 Final frames
   ------------------------------------------------------------------ */
.kf-frames {
  display: grid;
  gap: clamp(56px, 8vw, 120px);
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--kf-pad);
}
.kf-frames li { margin: 0; }
.kf-frames li:nth-child(even) { width: 88%; margin-left: auto; }
.kf-frames li:nth-child(odd):not(:first-child):not(:last-child) { width: 88%; }
.kf-frames img { width: 100%; box-shadow: 0 30px 60px -30px rgba(0,0,0,0.45); }
.kf-frames p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 500;
  text-transform: uppercase;
}
.kf-frames b { color: var(--kf-yellow); font-weight: 500; }
.kf-frames p span {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 300;
  text-transform: none;
  color: rgba(255, 255, 255, 0.8);
}

.kf-poster {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: end;
  gap: clamp(32px, 6vw, 96px);
  margin-top: var(--kf-space);
}
.kf-poster figure { margin: 0; }
.kf-poster img { width: 100%; box-shadow: 0 40px 80px -40px rgba(0,0,0,0.5); }
.kf-poster__text .kf-label { margin-top: 0; }

/* ------------------------------------------------------------------
   Final film
   ------------------------------------------------------------------ */
.kf-film__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.kf-film__stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kf-film__stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 900ms var(--ease), transform 4.5s linear;
}
.kf-film__stage img.is-active { opacity: 1; transform: scale(1); }
.kf-film__toggle {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 0.6875rem;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease);
}
.kf-film__toggle:hover { background: var(--color-accent); border-color: var(--color-accent); }
/* sound button sits left of pause; shows waves when on, a cross when muted */
.kf-film__sound { right: 68px; display: grid; place-items: center; }
.kf-film__sound .kf-film__waves { display: none; }
.kf-film__sound[aria-pressed="true"] .kf-film__waves { display: inline; }
.kf-film__sound[aria-pressed="true"] .kf-film__mute { display: none; }
.kf-film__meta {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 18px;
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.kf-film__bar { background: rgba(255,255,255,0.2); }
.kf-film__bar i { background: var(--kf-yellow); }

/* ------------------------------------------------------------------
   Next project
   ------------------------------------------------------------------ */
.kf-next {
  max-width: var(--kf-wrap);
  margin: 0 auto;
  padding: var(--kf-space) var(--kf-pad) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.kf-next > a:first-child { display: inline-block; }
.kf-next__title {
  display: block;
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 600;
  line-height: 0.9;
  text-transform: uppercase;
  transition: color var(--dur) var(--ease);
}
.kf-next__title i { display: inline-block; font-style: normal; transition: transform var(--dur) var(--ease); }
.kf-next > a:first-child:hover .kf-next__title { color: var(--color-accent); }
.kf-next > a:first-child:hover .kf-next__title i { transform: translateX(12px); }
.kf-next__back {
  display: inline-block;
  margin-top: 32px;
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color var(--dur) var(--ease);
}
.kf-next__back:hover { color: var(--color-accent); }

/* ------------------------------------------------------------------
   Kite string (scroll-drawn SVG) + chapter index
   ------------------------------------------------------------------ */
.kf-string {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.kf-string__line {
  fill: none;
  stroke: var(--kf-yellow);
  stroke-width: 1.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 0.5px rgba(0,0,0,0.35));
}
/* the drawn kite: white outline only, swaying on the string, tail waving */
.kf-string__kite path { fill: none; stroke: var(--kf-white); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.kf-string__kite .kf-kite__spar { stroke-width: 0.8; }
.kf-string__kite .kf-kite__tail { stroke-width: 1; transform-box: fill-box; transform-origin: 50% 0; animation: kf-tail 1.1s ease-in-out infinite alternate; }
.kf-kite { transform-box: fill-box; transform-origin: 50% 0; animation: kf-sway 3.2s ease-in-out infinite; }
/* hidden over the video; when you scroll past it the kite launches in: it rises, spins and settles on the string */
.kf-string__kite { opacity: 0; transition: opacity 0.3s ease; }
.kf-string__kite.is-flying { opacity: 1; }
.kf-string__kite.is-flying .kf-kite { animation: kf-launch 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.3), kf-sway 3.2s ease-in-out 0.9s infinite; }
@keyframes kf-launch { 0% { translate: 40px -60px; scale: 0.3; rotate: -120deg; } 60% { scale: 1.15; } 100% { translate: 0 0; scale: 1; rotate: -7deg; } }
@keyframes kf-sway { 0%, 100% { rotate: -7deg; } 50% { rotate: 7deg; } }
@keyframes kf-tail { from { transform: skewX(-10deg); } to { transform: skewX(10deg); } }
@media (prefers-reduced-motion: reduce) { .kf-kite, .kf-string__kite .kf-kite__tail { animation: none; } }
.kf-string__node {
  fill: var(--kf-yellow);
  stroke: rgba(0,0,0,0.3);
  stroke-width: 1;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
  transition: transform 400ms var(--ease);
}
.kf-string__node.is-on { transform: scale(1); }

.kf-index {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 60;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 400ms var(--ease);
}
.kf-index.is-visible { opacity: 1; }
.kf-index ol { display: grid; gap: 9px; justify-items: end; }
.kf-index a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.5625rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: transparent;
  transition: color var(--dur) var(--ease);
}
.kf-index a::after {
  content: "";
  width: 12px;
  height: 1px;
  background: #9a9a96;
  transition: width var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.kf-index:hover a { color: #6b6b67; }
.kf-index a.is-active { color: var(--kf-ink); }
.kf-index a.is-active::after { width: 24px; background: var(--color-accent); }
.kf-index a:hover { color: var(--color-accent); }
.kf-index.on-dark a::after { background: rgba(255,255,255,0.55); }
.kf-index.on-dark a.is-active { color: #fff; }
.kf-index.on-dark:hover a { color: rgba(255,255,255,0.7); }

/* ------------------------------------------------------------------
   Scroll reveal
   ------------------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------
   07 Development — one chapter, four numbered steps
   ------------------------------------------------------------------ */
.kf-dev { padding-bottom: clamp(48px, 6vw, 96px); }
.kf-dev .kf-pipeline { margin: 0 0 clamp(72px, 9vw, 128px); }
.kf-dev .kf-pipeline img { border-color: rgba(255,255,255,0.15); }
.kf-dev .kf-pipeline span { color: var(--kf-white); }
.kf-dev .kf-pipeline span::before { color: var(--kf-yellow); }
.kf-dev .kf-pipeline li + li::before { color: var(--kf-yellow); }

.kf-step {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 2.4fr;
  gap: 20px clamp(24px, 5vw, 80px);
  padding: clamp(40px, 5vw, 64px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.kf-step--last { padding-bottom: 0; }
.kf-step__head {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
}
.kf-step__head b {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--kf-yellow);
}
.kf-step__note {
  margin: 16px 0 0;
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
}
.kf-step__note--top { margin: 0; max-width: 34em; font-size: 1rem; }

.kf-dev .kf-palette { margin: 0; }
.kf-dev .kf-palette li { min-height: clamp(110px, 12vw, 170px); padding: 16px; }
.kf-dev .kf-grid--wide img { background: transparent; }

/* before/after as a 2 × 2 grid */
.kf-dev .kf-compare-list {
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(8px, 1.2vw, 16px);
}
.kf-dev .kf-compare figcaption::before { content: ""; }

/* motion scrub on navy */
.kf-dev .kf-scrub { height: 260vh; }
.kf-dev .kf-scrub__count { color: rgba(255, 255, 255, 0.7); }
.kf-dev .kf-scrub__bar { background: rgba(255, 255, 255, 0.18); }
.kf-dev .kf-scrub__bar i { background: var(--kf-yellow); }

/* ------------------------------------------------------------------
   Overview — at a glance (Challenge → Idea → Result)
   ------------------------------------------------------------------ */
.kf-glance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(64px, 8vw, 112px) !important;
  counter-reset: glance;
}
.kf-glance li {
  position: relative;
  padding: 28px 28px 8px 0;
  border-top: 2px solid var(--kf-green);
}
.kf-glance li + li { padding-left: 28px; }
/* arrow between steps */
.kf-glance li + li::before {
  content: "→";
  position: absolute;
  left: -0.5em;
  top: -0.85em;
  padding: 0 6px;
  background: var(--color-bg);
  color: var(--kf-green-deep);
  font-size: 1rem;
}
.kf-glance span {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--kf-green-deep);
}
.kf-glance span::before { counter-increment: glance; content: "0" counter(glance) " "; color: var(--color-muted); font-weight: 400; }
.kf-glance p { margin: 0; font-size: 0.9375rem; font-weight: 300; line-height: 1.7; }
.kf-glance em { font-style: normal; font-weight: 500; color: var(--kf-green-deep); }

/* Reading progress */
.kf-progress {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 95;
  height: 2px;
  pointer-events: none;
}
.kf-progress i {
  display: block;
  height: 100%;
  background: var(--kf-yellow);
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.15);
  transform-origin: left;
  transform: scaleX(0);
}

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 1100px) {
  .kf-index { display: none; }
}

@media (max-width: 900px) {
  .kf-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .kf-words { grid-template-columns: repeat(2, 1fr); }
  .kf-metaphor { grid-template-columns: 1fr; }
  .kf-metaphor > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--color-line); }
  .kf-palette { grid-template-columns: repeat(2, 1fr); }
  .kf-poster { grid-template-columns: 1fr; }
  .kf-poster figure { max-width: 560px; }
}

@media (max-width: 640px) {
  .kf-split, .kf-step { grid-template-columns: 1fr; gap: 16px; }
  .kf-dev .kf-compare-list { grid-template-columns: 1fr; }
  .kf-credits { grid-template-columns: 1fr; }
  .kf-credits div,
  .kf-credits div + div { padding: 18px 0; border-left: 0; }
  .kf-glance { grid-template-columns: 1fr; }
  .kf-glance li + li { border-left: 0; padding-left: 0; }
  .kf-glance li + li::before { display: none; }
  .kf-words { grid-template-columns: 1fr; }
  .kf-research, .kf-studies { grid-template-columns: repeat(2, 1fr); }
  .kf-mood { columns: 2; }
  .kf-pipeline { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .kf-pipeline li + li::before { display: none; }
  .kf-frames li:nth-child(n) { width: 100%; }
  .kf-scrub, .kf-dev .kf-scrub { height: 220vh; }
  .kf-hero__cue { display: none; }
  .kf-string { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .kf-hero__img { animation: none; transform: none; }
}

/* the teaser plays in the hero: no zoom-in on a moving picture */
video.kf-hero__img { transform: none; animation: none; }

/* chapter 10: the real teaser, then all seven key frames in a strip under it */
.kf-film__stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kf-film__bar i { transform-origin: 0 50%; }
.kf-film__frames { list-style: none; margin: clamp(24px, 3vw, 40px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: clamp(6px, .8vw, 12px); }
.kf-film__frames li { position: relative; }
.kf-film__frames img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.kf-film__frames span { display: block; margin-top: 8px; font-size: 0.625rem; letter-spacing: 0.3em; color: rgba(255, 255, 255, 0.6); }
@media (max-width: 700px) { .kf-film__frames { grid-template-columns: repeat(4, 1fr); } }

/* ------------------------------------------------------------------
   08 Final frames as a film-strip reel (on when js adds .is-on: wide
   screens, motion allowed). The section is tall; inside it the strip is
   pinned and slides sideways, the frame in the middle in full colour.
   ------------------------------------------------------------------ */
.kf-reel__meta { display: none; }
.kf-reel.is-on { position: relative; height: calc(var(--n, 7) * 60vh + 100svh); }
.kf-reel.is-on .kf-reel__pin {
  position: sticky; top: var(--header-h); height: calc(100svh - var(--header-h));
  display: flex; flex-direction: column; justify-content: center; overflow: hidden;
}
.kf-reel.is-on .kf-frames {
  display: flex; gap: clamp(32px, 4vw, 72px); width: max-content; max-width: none; margin: 0;
  padding: 0 calc((100vw - min(60vw, 100vh)) / 2);   /* the first and last frame can sit in the middle */
  will-change: transform;
}
.kf-reel.is-on .kf-frames li {
  flex: none; width: min(60vw, 100vh) !important; margin: 0 !important;
  opacity: .42; transform: scale(.94); transform-origin: 50% 50%;
  transition: opacity .6s var(--ease), transform .8s var(--ease);
}
.kf-reel.is-on .kf-frames li.is-current { opacity: 1; transform: none; }
.kf-reel.is-on .kf-frames li.reveal { opacity: .42; }          /* the reel does its own fade, not the scroll reveal */
.kf-reel.is-on .kf-frames li.reveal.is-current { opacity: 1; }
.kf-reel.is-on .kf-frames p { margin-top: 22px; }
.kf-reel.is-on .kf-reel__meta {
  display: flex; align-items: center; gap: 20px; margin: clamp(24px, 4vh, 44px) auto 0; width: min(60vw, 100vh);
  font-size: 0.6875rem; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75);
}
.kf-reel__bar { flex: 1; height: 1px; background: rgba(255, 255, 255, 0.25); position: relative; }
.kf-reel__bar i { position: absolute; inset: 0; background: var(--kf-yellow); transform: scaleX(0); transform-origin: 0 50%; }

/* ------------------------------------------------------------------
   Black site: the dark grey text and ink lines made for the light page
   turn light here; the green, navy and paper bands go black too.
   ------------------------------------------------------------------ */
.kf-body, .kf-intro__lede, .kf-panel__note { color: #c9c9c5; }
.kf-band--green, .kf-band--navy, .kf-band--paper { background: var(--color-bg); }   /* every band black, like the rest of the site */
.kf-tabs button { border-color: #3a3a38; color: var(--color-text); }
.kf-tabs button:hover { border-color: var(--color-text); }
.kf-tabs button[aria-selected="true"] { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }
.kf-index:hover a { color: #8a8a86; }
.kf-index a.is-active { color: var(--color-text); }

/* 05 Mood: every reference in the same square frame, three across */
.kf-mood { columns: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 16px); }
.kf-mood img { margin: 0; aspect-ratio: 1 / 1; object-fit: cover; }
@media (max-width: 760px) { .kf-mood { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 07.4 Motion: the eight test frames in a short 4 x 2 strip */
.kf-dev .kf-motion { list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1vw, 14px); }
.kf-motion li { position: relative; }
.kf-motion img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.kf-motion span { position: absolute; left: 8px; bottom: 6px; font-size: 0.625rem; letter-spacing: 0.2em; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
@media (max-width: 760px) { .kf-motion { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 08 Final Frames: all seven together, the first wide, then two rows of three */
.kf-frames--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(12px, 1.4vw, 20px); max-width: none; padding: 0; margin-top: clamp(40px, 5vw, 64px); }
.kf-frames--grid li:nth-child(n) { width: auto !important; margin: 0; }   /* beats the old staggered widths, so every frame is the same size */
.kf-frames--grid li:first-child { grid-column: 1 / -1; }
.kf-frames--grid img { aspect-ratio: 16 / 9; object-fit: cover; box-shadow: none; }
.kf-frames--grid p { margin-top: 12px; font-size: clamp(1rem, 1.3vw, 1.25rem); gap: 4px 12px; }
.kf-frames--grid p span { font-size: 0.8125rem; flex-basis: 100%; }
.kf-frames--grid li:first-child p span { flex-basis: auto; }
@media (max-width: 760px) { .kf-frames--grid { grid-template-columns: minmax(0, 1fr); } }

/* 10 Final Teaser: the timeline you can drag, with the drawn kite as the handle */
.kf-film__bar { --p: 0; height: 2px; cursor: pointer; touch-action: none; outline: none; }
.kf-film__bar::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; bottom: -16px; }   /* a bigger area to grab */
.kf-film__key { position: absolute; left: calc(var(--p) * 100%); bottom: 0; width: 22px; height: 40px; translate: -50% 0; cursor: grab; transition: scale 0.2s ease; }
.kf-film__key svg { display: block; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--kf-white); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.kf-film__key svg path:first-child { fill: var(--color-bg); }
.kf-film__bar:hover .kf-film__key, .kf-film__bar:focus-visible .kf-film__key { scale: 1.15; }
.kf-film__bar.is-dragging .kf-film__key { cursor: grabbing; scale: 1.25; }
.kf-film__bar.is-dragging .kf-film__key svg { stroke: var(--kf-yellow); }
.kf-film__bar:focus-visible { box-shadow: 0 0 0 4px rgba(246, 240, 44, 0.25); }
.kf-film__meta { margin-top: 34px; }   /* room for the kite above the line */
