/* dfaraway.com
   Layout concept: house lights down. The page is a black room and the work is the only light.
   Film and stills run edge to edge with no frames; type stays quiet beside them.
   One family, Mona Sans: wide and light for display, normal width for reading. */

@font-face {
  font-family: "Mona Sans";
  src: url("fonts/mona-sans-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000000;  /* the black of the footage, so film has no edge */
  --ink: #f3f3ef;    /* headings and primary text */
  --text: #b9bab4;   /* reading text */
  --mute: #858681;   /* labels and facts */
  --line: #242523;   /* hairlines */
  --brass: #c9a35f;  /* OROS only */
  --focus: #ffffff;

  --sans: "Mona Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 4.2vw, 72px);
  --maxw: 1760px;
  --space: clamp(112px, 15vw, 232px);
  --gap: clamp(16px, 1.8vw, 28px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--black); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { display: block; max-width: 100%; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 400; text-wrap: balance; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: #3a3b38; color: var(--ink); }
[id] { scroll-margin-top: 88px; }

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 40;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--black);
  text-decoration: none;
}
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* Small type */
.label {
  font-size: 0.875rem;
  line-height: 1.4;
  font-weight: 450;
  letter-spacing: 0.01em;
  color: var(--mute);
}
.small { font-size: 0.875rem; line-height: 1.55; color: var(--mute); }
.scale { margin-top: 12px; font-size: 0.875rem; line-height: 1.4; color: var(--mute); }

/* Pill controls */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 480;
  line-height: 1;
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(243, 243, 239, 0.4);
  border-radius: 999px;
  padding: 0.74em 1.15em;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.pill:hover { background: var(--ink); color: var(--black); border-color: var(--ink); }
.pill small { font-size: 0.8125rem; font-weight: 400; opacity: 0.68; font-variant-numeric: tabular-nums; }
.pill.quiet { border-color: rgba(243, 243, 239, 0.22); }
.play::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 0.62em solid currentColor;
  border-top: 0.4em solid transparent;
  border-bottom: 0.4em solid transparent;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Top bar */
.bar {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: calc(18px + env(safe-area-inset-top, 0px));
  padding-bottom: 18px;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  font-size: 0.9375rem;
  line-height: 1.2;
  transition: background-color 0.35s;
}
.bar.is-solid {
  background: rgba(0, 0, 0, 0.84);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
}
.bar a { color: var(--ink); text-decoration: none; }
.bar nav a { opacity: 0.86; }
.bar nav a:hover { opacity: 1; text-decoration: underline; }
.bar-name { font-stretch: 112%; font-weight: 500; transition: opacity 0.35s; }
.js .bar:not(.is-named) .bar-name { opacity: 0; pointer-events: none; }
.bar ul { display: flex; gap: clamp(16px, 2.4vw, 36px); list-style: none; margin: 0; padding: 0; }

/* Hero: the film runs clean, edge to edge, with nothing laid over it. It fades into the page only at its foot,
   and the name sits there, on black. */
.hero { position: relative; display: flex; flex-direction: column; height: 100vh; height: 100svh; min-height: 560px; background: var(--black); }
.hero > .wrap { width: 100%; }
.hero-film {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--black) url("../media/hero-1080.jpg") center / cover no-repeat;
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-film::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.44) 0, rgba(0, 0, 0, 0.14) 8%, rgba(0, 0, 0, 0) 15%),
    linear-gradient(to top, #000 0, rgba(0, 0, 0, 0.84) 4%, rgba(0, 0, 0, 0.5) 9%, rgba(0, 0, 0, 0.18) 14%, rgba(0, 0, 0, 0) 19%);
}
.hero-copy { position: relative; z-index: 1; }
.name {
  font-size: clamp(3.25rem, 8.2vw, 9.75rem);
  font-size: clamp(3.25rem, min(8.2vw, 15.5svh), 9.75rem);
  font-stretch: 118%;
  font-weight: 380;
  letter-spacing: -0.035em;
  line-height: 0.94;
  margin-top: -0.36em;
  margin-left: -0.05em;
}
.role {
  margin-top: 0.85em;
  font-size: clamp(1.0625rem, 1.5vw, 1.5rem);
  font-stretch: 106%;
  font-weight: 420;
  line-height: 1.2;
  color: var(--ink);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .name { animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both; }
  .role { animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.35s both; }
}

/* The reel index: what is on screen now, and a way to jump */
.reel { position: relative; margin-top: clamp(22px, 3.6svh, 44px); padding-bottom: clamp(18px, 3.2svh, 38px); }
.reel-row { display: flex; align-items: flex-end; gap: clamp(16px, 2.4vw, 40px); }
.reel-index { flex: 1; min-width: 0; display: flex; gap: clamp(8px, 1.2vw, 20px); list-style: none; margin: 0; padding: 0; }
.reel-index li { flex: 1 1 0; min-width: 0; }
.reel-index button {
  position: relative;
  display: block;
  width: 100%;
  padding: 12px 0 2px;
  font: inherit;
  font-size: 0.8125rem;
  line-height: 1.3;
  text-align: left;
  color: rgba(243, 243, 239, 0.58);
  background: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s;
}
.reel-index button::before,
.reel-index button::after { content: ""; position: absolute; left: 0; top: 0; height: 1px; }
.reel-index button::before { right: 0; background: rgba(243, 243, 239, 0.3); }
.reel-index button::after { width: calc(var(--p, 0) * 100%); background: var(--ink); }
.reel-index button:hover, .reel-index .is-on button { color: var(--ink); }
.reel-index .is-done button::after { width: 100%; }
.reel-index button:focus-visible { outline: none; color: var(--ink); }
.reel-index button:focus-visible::before { top: -1px; height: 3px; background: var(--ink); }
.reel-toggle { font-size: 0.8125rem; padding: 0.6em 1em; flex: none; }
.reel-now { display: none; }

/* Lead statement */
.lead { padding-top: clamp(72px, 10vw, 168px); }
.lead-text {
  max-width: 24.5em;
  font-size: clamp(1.625rem, 3.1vw, 3.375rem);
  font-stretch: 108%;
  font-weight: 370;
  line-height: 1.14;
  letter-spacing: -0.022em;
  color: var(--ink);
  text-wrap: balance;
}
.lead-text + .lead-text { margin-top: 0.7em; }

/* Worked with: the names carry the weight a wall of logos would, in the site's own type */
.credits { margin-top: clamp(72px, 9vw, 136px); }
.credits .label { margin-bottom: 14px; }
.credits-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--gap);
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.credits-list li {
  padding: clamp(16px, 1.6vw, 26px) 12px clamp(18px, 1.8vw, 30px) 0;
  border-top: 1px solid var(--line);
  font-size: clamp(1.125rem, 1.7vw, 1.875rem);
  font-stretch: 108%;
  font-weight: 420;
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}
.credits-list .credits-note {
  font-size: 0.875rem;
  font-stretch: 100%;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--mute);
  align-self: stretch;
  display: flex;
  align-items: flex-end;
}

/* Chapters */
.chapter { padding-top: var(--space); }
.chapter-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 20px;
  align-items: end;
  margin-bottom: clamp(40px, 5.5vw, 88px);
}
.chapter-head h2 {
  grid-column: 1 / span 8;
  font-size: clamp(2.125rem, 5vw, 5rem);
  font-stretch: 116%;
  font-weight: 380;
  letter-spacing: -0.032em;
  line-height: 1;
}
.chapter-head p { grid-column: 9 / -1; max-width: 34em; }

/* Media */
.bleed, .frame { position: relative; margin: 0; overflow: hidden; background: var(--black); aspect-ratio: var(--ar, 16 / 9); }
.bleed { width: 100%; max-height: 92svh; }
/* footage that is not black at its edges fades into the page instead of ending on a line */
.bleed.strip {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 84%, transparent 100%);
}
.frame { width: 100%; max-width: 100%; }
.bleed > img, .bleed > video, .frame > img, .frame > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
}

/* Pieces */
.piece + .piece, .piece + .pair { margin-top: clamp(96px, 11vw, 184px); }
.piece h3 {
  font-size: clamp(1.5rem, 2.3vw, 2.375rem);
  font-stretch: 112%;
  font-weight: 400;
  letter-spacing: -0.022em;
  line-height: 1.08;
}
.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 3px 18px;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.45;
}
.facts dt { color: var(--mute); }
.facts dd { margin: 0; color: var(--ink); }

.piece-text {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 24px;
  margin-top: clamp(28px, 3.2vw, 52px);
}
.piece-head { grid-column: 1 / span 5; display: grid; gap: 18px; align-content: start; }
.piece-body { grid-column: 7 / span 6; display: grid; gap: 18px; align-content: start; max-width: 40em; }

.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(36px, 4vw, 56px) var(--gap);
  margin-top: clamp(56px, 6.5vw, 104px);
}
.scene { display: grid; gap: 10px; align-content: start; justify-items: start; }
.scene .frame { margin-bottom: 8px; }
.scene h4 { font-size: 1.125rem; font-stretch: 108%; font-weight: 480; line-height: 1.25; }
.scene p { font-size: 0.9375rem; line-height: 1.5; max-width: 34em; }
.scene .pill { margin-top: 6px; font-size: 0.875rem; padding: 0.62em 1.05em; }

.mosaic {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: clamp(56px, 6.5vw, 104px);
}
/* the two small stills set the row height at their own 3:2; the large one fills both rows */
.mosaic figure { position: relative; margin: 0; overflow: hidden; background: var(--black); grid-column: 9 / -1; aspect-ratio: 3 / 2; }
.mosaic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mosaic .m-large { grid-column: 1 / span 8; grid-row: 1 / span 2; aspect-ratio: auto; }

.split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 28px;
  align-items: center;
}
.split > * { min-width: 0; }
.split .media { grid-column: 1 / span 8; grid-row: 1; }
.split .text { grid-column: 9 / -1; grid-row: 1; display: grid; gap: 18px; align-content: start; }
.split.flip .media { grid-column: 5 / -1; }
.split.flip .text { grid-column: 1 / span 4; }
.split.tall .media { grid-column: 8 / span 4; }
.split.tall .text { grid-column: 2 / span 5; }

.pair {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: clamp(96px, 11vw, 184px);
  align-items: start;
}
.pair .piece { display: grid; gap: 18px; align-content: start; margin-top: 0; min-width: 0; }
.pair .piece .frame { margin-bottom: 8px; }
.pair .piece:first-child { grid-column: 1 / span 6; }
.pair .piece:last-child { grid-column: 8 / -1; }
.pair .piece p { max-width: 36em; }

/* Now: three strands at the same weight. Client work first, OROS alongside. */
.now-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 24px;
  padding-block: clamp(36px, 4.6vw, 76px);
  border-top: 1px solid var(--line);
}
.now-row:last-child { padding-bottom: 0; }
.now-head { grid-column: 1 / span 5; display: grid; gap: 14px; align-content: start; min-width: 0; }
.now-head h3 { font-size: clamp(2.125rem, 4vw, 4rem); font-stretch: 116%; font-weight: 380; letter-spacing: -0.03em; line-height: 1; }
.now-text { grid-column: 7 / span 6; display: grid; gap: 1.2em; align-content: start; min-width: 0; }
.now-text p { max-width: 34em; }
.now-text .now-lead {
  max-width: 26em;
  font-size: clamp(1.25rem, 1.95vw, 1.9375rem);
  font-stretch: 104%;
  font-weight: 380;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--ink);
}
/* OROS stands between its name and its description, at the height of the row. The picture fades to black in the file itself. */
.oros-row .now-head { grid-column: 1 / span 3; }
.oros-figure { grid-column: 4 / span 3; align-self: start; justify-self: center; margin: 0; width: 100%; max-width: 390px; aspect-ratio: 780 / 1440; max-height: 84svh; background: var(--black); }
.oros-figure img { width: 100%; height: 100%; object-fit: contain; }
.oros-link { color: var(--brass); font-size: 1.125rem; }

/* What I do */
.range { list-style: none; margin-block: 0; padding-block: 0; }
.range li {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 6px;
  padding-block: 20px;
  border-top: 1px solid var(--line);
}
.range li:last-child { border-bottom: 1px solid var(--line); }
.range h3 { grid-column: 1 / span 5; font-size: 1.25rem; font-stretch: 108%; font-weight: 450; line-height: 1.3; }
.range p { grid-column: 7 / span 6; max-width: 40em; }

/* About */
.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 32px;
  align-items: end;
}
.about-figure { grid-column: 1 / span 4; margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: #111; }
.about-figure img { width: 100%; height: 100%; object-fit: cover; object-position: 100% 50%; }
.about-text { grid-column: 7 / span 6; display: grid; gap: 1em; }
.about-text .label { margin-bottom: 0.4em; }
.about-text p {
  font-size: clamp(1.25rem, 1.95vw, 1.9375rem);
  font-stretch: 104%;
  font-weight: 380;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: 26em;
}

/* Contact */
.contact { padding-bottom: clamp(40px, 5vw, 72px); }
.mail {
  margin-top: 14px;
  font-size: clamp(1.5rem, 2.3vw, 2.375rem);
  font-stretch: 112%;
  font-weight: 400;
  letter-spacing: -0.022em;
  line-height: 1.15;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.mail a { text-decoration: none; }
.mail a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: clamp(18px, 2vw, 28px); color: var(--ink); }
.contact-row span { color: var(--mute); }
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(80px, 10vw, 144px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--mute);
}

/* Film viewer */
.viewer {
  width: min(1480px, 100vw - 32px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: var(--black);
  color: var(--ink);
}
.viewer::backdrop { background: rgba(0, 0, 0, 0.92); }
.viewer video { width: 100%; max-height: calc(100svh - 110px); background: var(--black); }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 2px; font-size: 0.9375rem; }

/* 404 */
.lost { min-height: 100vh; min-height: 100svh; display: grid; align-content: center; justify-items: start; gap: 22px; padding-block: 96px; }
.lost p { max-width: 34em; }
.lost a { color: var(--ink); }

/* Narrower screens */
@media (max-width: 1000px) {
  .credits-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .credits-list .credits-note { grid-column: 1 / -1; }
  .chapter-head h2, .chapter-head p { grid-column: 1 / -1; }
  .piece-head, .piece-body { grid-column: 1 / -1; }
  .trio { grid-template-columns: 1fr; }
  .split .media, .split .text,
  .split.flip .media, .split.flip .text,
  .split.tall .media, .split.tall .text { grid-column: 1 / -1; grid-row: auto; }
  .split.tall .media { max-width: 440px; }
  .pair .piece:first-child, .pair .piece:last-child { grid-column: 1 / -1; }
  .pair .piece:last-child .frame { max-width: 520px; }
  .now-head, .now-text, .oros-row .now-head { grid-column: 1 / -1; }
  .oros-figure { grid-column: 1 / -1; width: min(64%, 300px); max-height: none; }
  .range h3, .range p { grid-column: 1 / -1; }
  .about-figure { grid-column: 1 / span 7; }
  .about-text { grid-column: 1 / -1; }
  .mosaic {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px));
    padding-bottom: 12px;
    scrollbar-width: thin;
  }
  .mosaic figure, .mosaic .m-large { flex: 0 0 82%; aspect-ratio: 3 / 2; scroll-snap-align: start; }
}
@media (max-width: 720px) {
  .credits-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credits-list .credits-note { grid-column: auto; }
  .bar { font-size: 0.875rem; }
  .bar ul { gap: 14px; }
  .reel-index { gap: 5px; }
  .reel-index button { padding: 14px 0 0; height: 15px; }
  .reel-index button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .reel-now { display: block; margin-bottom: 10px; font-size: 0.8125rem; color: var(--ink); }
  .bleed.strip { aspect-ratio: 3 / 1; }
  .bleed.photo { aspect-ratio: 4 / 3; }
}
@media (max-width: 720px) and (orientation: portrait) {
  .hero { height: auto; min-height: 0; }
  .hero-film { flex: none; aspect-ratio: 4 / 5; background-image: url("../media/hero-m.jpg"); }
  .name { font-size: 15.2vw; line-height: 0.9; margin-top: -0.5em; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
