/* c-o-c-o-a — white gallery, Oxman-scale typography
   Layout: 12px page margin; two halves (labels left, text from 50%); hairline uppercase
   display titles; studio renders as the only colour on the page.
   Type scale is measured from oxman.com at 1440px and expressed in vw so it scales the same way.
   Typeface: Switzer (self-hosted, see fonts.css). */

:root {
  --paper: #FFFFFF;
  --ink: #000000;
  --graphite: #6E6E6E;
  --mist: #F4F4F2;
  --line: rgba(0, 0, 0, 0.16);

  --display: "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --text: "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* oxman.com at 1440px: 256 / 136.8 / 64 / 26.4 / 20.16 / 18 / 12.48 px */
  --fs-mega: clamp(72px, 17.8vw, 320px);
  --fs-mega-s: clamp(50px, 13vw, 240px);
  --fs-xxl: clamp(46px, 9.5vw, 180px);
  --fs-xl: clamp(30px, 4.45vw, 84px);
  --fs-m: clamp(20px, 1.83vw, 32px);
  --fs-body: clamp(17px, 1.4vw, 22px);
  --fs-link: clamp(17px, 1.4vw, 24px);
  --fs-nav: clamp(16px, 1.25vw, 20px);
  --fs-xs: clamp(11px, .87vw, 14px);
  --fs-logo: clamp(40px, 4.45vw, 80px);

  --gutter: 12px;
  --space: clamp(80px, 12vw, 200px);
  --rule: 2px solid var(--ink);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--text); font-weight: 400; font-size: var(--fs-body); line-height: 1.25;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3 { font-weight: inherit; text-wrap: balance; }
p, li, dd, figcaption { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, video, canvas, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 12px; font-size: var(--fs-xs); }
.skip:focus { top: 12px; }

/* ---------- Type roles ---------- */
.mega, .xxl, .xl, .wordmark, .m, .link, .xs, .menu a { font-family: var(--display); }
.mega   { font-size: var(--fs-mega); font-weight: 100; line-height: .8; letter-spacing: -.01em; text-transform: uppercase; }
.mega.s { font-size: var(--fs-mega-s); }
.xxl    { font-size: var(--fs-xxl); font-weight: 100; line-height: 1.05; letter-spacing: -.006em; text-transform: uppercase; }
.xl     { font-size: var(--fs-xl); font-weight: 200; line-height: 1.2; }
.m      { font-size: var(--fs-m); font-weight: 500; line-height: 1.2; letter-spacing: .012em; }
.xs     { font-size: var(--fs-xs); font-weight: 500; line-height: 1.2; letter-spacing: .04em; text-transform: uppercase; }
.muted  { color: var(--graphite); }
.body   { max-width: 44em; }
.body p + p { margin-top: .9em; }

.link {
  display: inline-block; font-size: var(--fs-link); font-weight: 500; letter-spacing: .035em; line-height: 1.2;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em;
  transition: opacity .3s;
}
.link:hover { opacity: .55; }
.arrow { display: inline-block; width: .9em; height: .9em; vertical-align: -.05em; }

/* ---------- Header ---------- */
.header {
  position: absolute; inset: 0 0 auto 0; z-index: 30;
  padding: var(--gutter);
  display: flex; align-items: flex-start; justify-content: space-between;
}
.wordmark {
  position: relative; z-index: 2;
  font-size: var(--fs-logo); font-weight: 100; line-height: .8; letter-spacing: -.02em;
}
.menu {
  position: absolute; left: 75%; top: calc(var(--gutter) - 4px);
  display: flex; flex-direction: column;
}
.menu a { font-size: var(--fs-nav); font-weight: 400; letter-spacing: .04em; line-height: 1.33; }
.menu a:hover { opacity: .55; }
.menu a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.menu-toggle {
  display: none; position: relative; z-index: 2; background: none; border: 0; cursor: pointer; color: inherit;
  font-family: var(--display); font-size: var(--fs-nav); font-weight: 400; letter-spacing: .04em; padding: 4px 0;
}
@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .menu {
    position: fixed; inset: 0; z-index: 1; left: 0; top: 0;
    justify-content: flex-end; gap: 4px; padding: var(--gutter) var(--gutter) 48px;
    background: var(--paper);
    transform: translateY(-100%); visibility: hidden;
    transition: transform .5s cubic-bezier(.7, 0, .2, 1), visibility 0s linear .5s;
  }
  .menu a { font-size: 44px; font-weight: 100; letter-spacing: -.01em; line-height: 1.05; text-transform: uppercase; }
  body.menu-open { overflow: hidden; }
  body.menu-open .menu { transform: none; visibility: visible; transition-delay: 0s; }
  body.menu-open .header { position: fixed; }
}

/* ---------- Sections ---------- */
.wrap { padding-inline: var(--gutter); }
.section { padding: var(--space) var(--gutter) 0; }
.ruled { border-top: var(--rule); margin-inline: var(--gutter); padding: var(--gutter) 0 0; }
.ruled + .ruled, .section + .ruled { margin-top: var(--space); }
.split { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gutter); row-gap: 24px; }
.split > * { min-width: 0; }
.split + .split { margin-top: clamp(64px, 8vw, 140px); }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } }

/* ---------- Media (studio renders) ---------- */
.media { position: relative; overflow: hidden; background: var(--paper); }
.media > img, .media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media > video { opacity: 0; transition: opacity .8s ease; pointer-events: none; }
.media > video.live { opacity: 1; }
.r-16-9 { aspect-ratio: 16 / 9; }
.r-21-9 { aspect-ratio: 21 / 9; }
.r-4-5  { aspect-ratio: 4 / 5; }
.r-4-3  { aspect-ratio: 4 / 3; }
.r-1-1  { aspect-ratio: 1 / 1; }
@media (max-width: 720px) { .r-16-9.tall-mobile, .r-21-9.tall-mobile { aspect-ratio: 1 / 1; } }

/* ---------- Home ---------- */
.hero-home { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 80px var(--gutter) 40px; }
.specimen {
  width: min(88vh, 88svh, calc(100vw - 2 * var(--gutter))); aspect-ratio: 1 / 1;
  border-radius: 50%; border: 1.5px solid var(--ink);
  isolation: isolate; -webkit-mask-image: radial-gradient(circle, #000 99%, transparent 100%);
}
.chapter .xxl { margin-top: clamp(16px, 2vw, 32px); }
.chapter .media { margin-top: clamp(24px, 3vw, 48px); }
.chapter .xl { margin-top: clamp(32px, 4vw, 64px); max-width: 15em; }
.chapter .link { margin-top: clamp(20px, 2vw, 32px); }
.statement { max-width: 22em; }

/* ---------- Page hero (title at the foot of the first screen) ---------- */
.page-hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; padding: calc(var(--fs-logo) + 48px) var(--gutter) var(--gutter);
}
.page-hero .media { flex: 1 1 auto; min-height: 36vh; margin-inline: calc(var(--gutter) * -1); }
.page-hero .media > img, .page-hero .media > video { object-fit: contain; }
@media (max-width: 720px) {
  .page-hero .media { flex: 0 0 auto; aspect-ratio: 1 / 1; min-height: 0; margin-top: auto; }
  .page-hero .media > img, .page-hero .media > video { object-fit: cover; }
}
.page-hero .eyebrow { margin-top: var(--gutter); }
.page-hero .mega { margin-top: 8px; }
.page-hero.bare { justify-content: flex-end; }

/* ---------- Work list ---------- */
.work-item {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gutter);
  border-top: var(--rule); padding-top: var(--gutter); padding-bottom: clamp(56px, 6vw, 96px);
}
.work-item:last-of-type { padding-bottom: 0; }
.work-item .name { display: grid; grid-template-columns: auto 1fr; column-gap: var(--gutter); align-items: start; min-width: 0; }
.work-item .name .xs { padding-top: .5em; }
.work-item .xxl { line-height: .86; overflow-wrap: anywhere; }
.work-item .meta { grid-column: 2; margin-top: 18px; color: var(--graphite); }
.work-item .right { display: flex; flex-direction: column; gap: var(--gutter); min-width: 0; }
.work-item .arrow { width: 21px; height: 21px; }
.work-item a.right:hover .media img { transform: scale(1.02); }
.work-item .media img { transition: transform .8s var(--ease); }
@media (max-width: 720px) {
  .work-item { grid-template-columns: 1fr; row-gap: 16px; }
}

.lines { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gutter); }
.lines .head { grid-column: 2; margin-bottom: 18px; }
.line-row { display: contents; }
.line-row .tag { grid-column: 1; justify-self: end; text-align: right; padding-top: .55em; color: var(--graphite); }
.line-row .name { grid-column: 2; padding-block: .32em; }
.line-row .name a:hover { opacity: .55; }
.lines + .lines { margin-top: clamp(56px, 6vw, 96px); }
.line-row .name .xs { color: var(--graphite); margin-left: .6em; vertical-align: .25em; }
@media (max-width: 720px) {
  .lines { grid-template-columns: 1fr; }
  .lines .head, .line-row .name { grid-column: 1; }
  .line-row .tag { grid-column: 1; justify-self: start; text-align: left; padding-top: 18px; }
}

.preview {
  position: fixed; left: 0; top: 0; z-index: 40; width: 300px; aspect-ratio: 16 / 10;
  pointer-events: none; opacity: 0; transition: opacity .3s; background: var(--paper);
}
.preview.on { opacity: 1; }
.preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.preview img.on { display: block; }
@media (hover: none), (max-width: 720px) { .preview { display: none; } }

/* ---------- Facts, figures, rows ---------- */
.facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gutter); }
.facts div { display: grid; gap: 4px; padding-block: 14px; border-top: 1px solid var(--line); }
.facts dt { color: var(--graphite); }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }

.figure { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.figure figcaption { color: var(--graphite); font-size: var(--fs-xs); font-family: var(--display); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.figure figcaption b { color: var(--ink); font-weight: 500; margin-right: .6em; }
.figure .frame { background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.figure .frame svg { width: 100%; height: 100%; color: var(--ink); }
.bleed .media { margin-inline: calc(var(--gutter) * -1); }
.pair, .strip { display: grid; column-gap: var(--gutter); row-gap: 40px; }
.pair { grid-template-columns: 1fr 1fr; }
.strip { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) { .pair, .strip { grid-template-columns: 1fr; } }

.rows li { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gutter); padding-block: 18px; border-top: 1px solid var(--line); }
.rows li:last-child { border-bottom: 1px solid var(--line); }
.rows .num { color: var(--graphite); display: block; margin-bottom: 6px; }
@media (max-width: 720px) { .rows li { grid-template-columns: 1fr; row-gap: 8px; } }

.questions li { padding-block: 14px; border-top: 1px solid var(--line); }
.questions li:last-child { border-bottom: 1px solid var(--line); }

.portrait { aspect-ratio: 4 / 5; width: min(100%, 420px); background: var(--mist); display: flex; align-items: flex-end; padding: var(--gutter); }
.placeholder { color: var(--graphite); }

.next { display: block; border-top: var(--rule); margin: var(--space) var(--gutter) 0; padding-top: var(--gutter); }
.next .xxl { margin-top: 8px; transition: opacity .3s; }
.next:hover .xxl { opacity: .55; }

.email { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .14em; overflow-wrap: anywhere; }
.email:hover { opacity: .55; }

/* ---------- Footer ---------- */
.footer {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gutter); row-gap: 32px;
  border-top: var(--rule); margin: var(--space) var(--gutter) 0; padding: var(--gutter) 0 48px;
}
.footer nav { display: flex; flex-direction: column; }
.footer nav a { font-family: var(--display); font-size: var(--fs-nav); font-weight: 500; letter-spacing: .04em; line-height: 1.33; }
.footer nav a:hover { opacity: .55; }
.footer .motto { margin-top: 32px; }
@media (max-width: 720px) { .footer { grid-template-columns: 1fr; } }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js body { animation: page-in .3s ease backwards; }
@keyframes page-in { from { opacity: 0; } }
body.leaving { opacity: 0; transition: opacity .3s ease; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js body { animation: none; }
  body.leaving { opacity: 1; }
}

/* lowercase brand name inside uppercase labels; uppercase research names */
.xs.lc { text-transform: none; }
.line-row .name { text-transform: uppercase; }
.line-row .name .arrow { width: .7em; height: .7em; margin-left: .2em; }
