/* =========================================================
   Studio Noir: tokens pulled from the Figma file
   ========================================================= */
:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --field: #1e1e1e;
  --line: #2a2a2d;
  --text: #f9f9f8;
  --muted: #b4b4ba;
  --faint: #7c7c82;

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 80px;
  --header-h: 100px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 1px solid var(--text); outline-offset: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 8px 12px; font-size: 13px;
}
.skip-link:focus { top: 16px; }

.section-border { border-bottom: 1px solid var(--line); }

/* ---------- shared type ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--muted);
}
.eyebrow--light { color: var(--text); }
.eyebrow__rule { width: 12px; height: 1px; background: var(--text); }

.section-title {
  font-family: var(--serif); font-weight: 400;
  font-size: 56px; line-height: 1.05; max-width: 733px;
}

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text);
}
.text-link--underline { text-decoration: underline; text-underline-offset: 3px; gap: 16px; }
.text-link .chev { transition: transform .3s var(--ease); }
.text-link:hover .chev { transform: translateX(4px); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: background-color .35s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(10, 10, 11, .78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { display: block; height: 20px; width: auto; }
.brand__divider { width: 1px; height: 16px; background: var(--line); }
.brand__role { font-size: 11px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav__list { display: flex; gap: 32px; }
.site-nav__list a {
  position: relative; font-size: 13px; color: var(--muted);
  transition: color .2s;
}
.site-nav__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--text); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.site-nav__list a:hover,
.site-nav__list a.is-active { color: var(--text); }
.site-nav__list a.is-active::after { transform: scaleX(1); }

/* glass circle button from the design */
.glass-btn {
  position: relative; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 999px;
  color: #f5f5f5;
  background: rgba(153, 153, 153, .17);
  box-shadow:
    1.25px 0 0 -0.75px #a6a6a6,
    -1.25px 0 0 -0.75px #a6a6a6,
    0 0 0 .5px #a6a6a6,
    inset 0 40px 10px -40px #1a1a1a,
    inset 0 -40px 10px -40px #1a1a1a,
    0 8px 15px rgba(0, 0, 0, .04);
  transition: background-color .2s, transform .2s;
}
.glass-btn:hover { background: rgba(153, 153, 153, .28); }
.glass-btn:active { transform: scale(.94); }
.glass-btn[aria-expanded="true"] svg rect { stroke-dasharray: none; }

/* full-screen menu */
.menu-overlay {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 48px) var(--gutter) 48px;
  background: var(--bg);
  opacity: 0; transition: opacity .35s var(--ease);
}
.menu-overlay[hidden] { display: none; }
.menu-overlay.is-open { opacity: 1; }
.menu-overlay ul { display: grid; gap: 8px; }
.menu-overlay a {
  display: flex; align-items: baseline; gap: 20px;
  font-family: var(--serif); font-size: clamp(44px, 8vw, 88px); line-height: 1.05;
  color: var(--muted); transition: color .2s;
}
.menu-overlay a span { font-family: var(--sans); font-size: 12px; color: var(--faint); }
.menu-overlay a:hover { color: var(--text); }
.menu-overlay__meta { font-size: 13px; color: var(--muted); }
body.menu-open { overflow: hidden; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 800px;
  padding: var(--gutter);
}
.hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
/* darker behind the headline (top) and the intro text (bottom), clear in the middle so the product reads */
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 7, 8, .72) 0%, rgba(7, 7, 8, .35) 34%, rgba(7, 7, 8, .08) 52%, rgba(7, 7, 8, .25) 72%, rgba(7, 7, 8, .85) 100%),
    linear-gradient(90deg, rgba(7, 7, 8, .35) 0%, rgba(7, 7, 8, 0) 55%);
}
.hero__title {
  max-width: 820px;
  font-family: var(--serif); font-weight: 400;
  font-size: 64px; line-height: 1.02;
}
.hero__bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.hero__intro { display: grid; gap: 14px; max-width: 520px; }
.hero__eyebrow { font-size: 18px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text); }
.hero__lede { font-size: 18px; line-height: 1.6; color: #d6d6da; text-shadow: 0 1px 12px rgba(0,0,0,.45); }

/* =========================================================
   ABOUT
   ========================================================= */
.about {
  display: grid; grid-template-columns: 515fr 733fr; gap: 32px; align-items: start;
  padding: 120px var(--gutter);
}
.about__image { aspect-ratio: 515 / 600; overflow: hidden; }
.about__image img { width: 100%; height: 100%; object-fit: cover; }
.about__body { display: grid; gap: 48px; }
.about__text { display: grid; gap: 24px; }
.about__title { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.2; }
.about__copy { font-size: 16px; line-height: 1.8; color: var(--muted); }

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.stat {
  display: flex; flex-direction: column-reverse; justify-content: flex-end; align-items: center; gap: 8px;
  padding: 16px 8px; border-radius: 12px; text-align: center;
  transition: background-color .3s var(--ease);
}
.stat:hover, .stat:focus-visible { background: rgba(249, 249, 248, .05); }
.stat__value { transition: transform .4s var(--ease); }
.stat:hover .stat__value { transform: translateY(-3px); }
.stat__value { font-family: var(--serif); font-size: 48px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat__label { font-size: 12px; text-transform: uppercase; color: var(--muted); }

/* =========================================================
   SECTION HEAD (work + journal)
   ========================================================= */
.section-head { display: grid; gap: 16px; padding-bottom: 48px; }
.section-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.section-head__aside { max-width: 405px; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* =========================================================
   WORK
   ========================================================= */
.work { display: grid; gap: 96px; padding: 120px var(--gutter); }
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px 32px; }
.project { display: grid; gap: 20px; align-content: start; }
.project__media { display: block; width: 100%; height: 320px; overflow: hidden; }
.project__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s var(--ease), filter .6s var(--ease);
  filter: saturate(.92);
}
.project:hover .project__media img { transform: scale(1.035); filter: saturate(1); }
.project__info { display: grid; gap: 24px; justify-items: start; }
.project__num { font-family: var(--serif); font-size: 18px; color: var(--muted); }
.project__title { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.2; }
.project__meta { font-size: 12px; text-transform: uppercase; color: var(--muted); }
.project__desc { font-size: 14px; line-height: 1.7; color: var(--muted); }
.project__cta { padding-top: 16px; }

/* =========================================================
   CLIENTS
   ========================================================= */
.clients { padding: 64px var(--gutter); }
.clients__list {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px;
  font-size: 13px; font-weight: 600; color: var(--faint); white-space: nowrap;
}
.clients__list li { transition: color .3s; }
.clients__list li:hover { color: var(--muted); }

/* =========================================================
   JOURNAL
   ========================================================= */
.journal { display: grid; gap: 64px; padding: 120px var(--gutter); }
.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.post__link { display: grid; gap: 24px; width: 100%; text-align: left; }
.post__media { display: block; height: 260px; overflow: hidden; }
.post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.post__link:hover .post__media img { transform: scale(1.035); }
.post__info { display: grid; gap: 12px; }
.post__meta { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.post__title { font-family: var(--serif); font-size: 28px; line-height: 1.2; }
.post__link:hover .post__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.post__desc { font-size: 13px; line-height: 1.6; color: var(--muted); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  display: grid; grid-template-columns: 515fr 733fr; gap: 32px; align-items: start;
  padding: 140px var(--gutter);
}
.contact__intro { display: grid; gap: 40px; }
.contact__text { display: grid; gap: 24px; }
.contact__title { font-family: var(--serif); font-weight: 400; font-size: 56px; line-height: 1; }
.contact__copy { font-size: 14px; line-height: 1.6; color: var(--muted); }
.contact__details { display: grid; gap: 12px; font-size: 13px; color: var(--muted); }
.contact__details a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

.brief {
  display: grid; gap: 24px;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.brief__title { font-family: var(--serif); font-weight: 400; font-size: 28px; }
.field { display: grid; gap: 6px; }
.field input,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  font: 13px/20px var(--sans);
  color: var(--text);
  background: var(--field);
  border: 1px solid rgba(255, 255, 255, .04);
  border-radius: 6px;
  outline: none;
  transition: border-color .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 42px; max-height: 280px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--faint); }
.field input:focus,
.field textarea:focus { border-color: var(--muted); background: #222224; }
.field.has-error input,
.field.has-error textarea { border-color: #8a4b4b; }
.field__error { min-height: 0; font-size: 12px; color: #d08a8a; }
.field__error:empty { display: none; }

.brief__submit {
  height: 42px; border-radius: 6px;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: var(--text);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  transition: background-color .25s, color .25s, border-color .25s;
}
.brief__submit:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.brief__submit:disabled { opacity: .5; cursor: progress; }
.brief__status { font-size: 13px; line-height: 1.6; color: var(--muted); }
.brief__status:empty { display: none; }
.brief__status.is-success { color: var(--text); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 40px var(--gutter);
  font-size: 12px;
}
.site-footer__legal { color: var(--faint); }
.site-footer__links { display: flex; gap: 24px; color: var(--muted); }
.site-footer__links a { transition: color .2s; }
.site-footer__links a:hover { color: var(--text); }

/* =========================================================
   DETAIL DIALOG
   ========================================================= */
.detail {
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0; overflow: auto;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--line);
}
.detail::backdrop { background: rgba(5, 5, 6, .82); backdrop-filter: blur(6px); }
.detail[open] { animation: detail-in .45s var(--ease); }
@keyframes detail-in { from { opacity: 0; transform: translateY(16px); } }
.detail__close {
  position: sticky; top: 16px; float: right; margin: 16px 16px -52px 0; z-index: 2;
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px;
  background: rgba(10, 10, 11, .7); border: 1px solid var(--line);
}
.detail__close:hover { background: var(--text); color: var(--bg); }
.detail__media { aspect-ratio: 16 / 7; overflow: hidden; background: var(--bg); }
.detail__media img { width: 100%; height: 100%; object-fit: cover; }
.detail__media:has(img:not([src])),
.detail__media.is-empty { display: none; }
.detail__body { display: grid; gap: 20px; padding: 40px; }
.detail__title { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1.05; }
.detail__content { display: grid; gap: 16px; max-width: 70ch; font-size: 15px; line-height: 1.8; color: var(--muted); }
.detail__content dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; padding: 20px 0; border-block: 1px solid var(--line); }
.detail__content dt { font-size: 11px; text-transform: uppercase; color: var(--faint); }
.detail__content dd { font-size: 14px; color: var(--text); }
.detail__cta { justify-self: start; }

/* =========================================================
   REVEAL ON SCROLL
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1200px) {
  :root { --gutter: 48px; }
  .hero__title { font-size: clamp(48px, 5.4vw, 64px); }
  .about__title { font-size: 34px; }
}

@media (max-width: 960px) {
  :root { --gutter: 32px; --header-h: 80px; }
  .site-nav__list { display: none; }
  .brand__role { display: none; }
  .brand__divider { display: none; }

  .hero { min-height: min(760px, calc(100svh - var(--header-h))); gap: 64px; }
  .hero__bottom { flex-direction: column; align-items: flex-start; }

  .about, .contact { grid-template-columns: 1fr; gap: 48px; padding-block: 96px; }
  .about__image { max-width: 560px; }
  .work, .journal { padding-block: 96px; gap: 56px; }
  .section-title, .contact__title { font-size: 44px; }
  .section-head { padding-bottom: 0; }
  .section-head__row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .journal-grid { grid-template-columns: 1fr 1fr; }
  .journal-grid .post:last-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 64px; }
  .brand__logo { height: 17px; }
  .hero { padding-block: 48px; }
  .hero__title { font-size: clamp(34px, 9.5vw, 42px); }
  .about__title { font-size: 28px; }
  .about__copy { font-size: 15px; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .stat__value { font-size: 36px; }
  .stat__label { font-size: 10px; }
  .section-title, .contact__title { font-size: 38px; }
  .work-grid, .journal-grid { grid-template-columns: 1fr; }
  .project__media { height: 240px; }
  .post__media { height: 220px; }
  .clients__list { justify-content: flex-start; gap: 16px 32px; font-size: 12px; }
  .brief { padding: 24px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .site-footer__links { flex-wrap: wrap; }
  .detail__body { padding: 24px; }
  .detail__title { font-size: 34px; }
}

/* =========================================================
   CASE STUDY PAGE (project.html)
   ========================================================= */
.cs-hero { display: grid; gap: 32px; padding: 80px var(--gutter) 0; }
.cs-hero__head { display: grid; gap: 24px; }
.cs-hero__title { font-family: var(--serif); font-weight: 400; font-size: 96px; line-height: .95; }

/* image frames with a floating tag */
.shot {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.shot-card:hover .shot img { transform: scale(1.025); }
.shot--hero { height: 720px; margin: 0; }
.shot--420 { height: 420px; }
.shot--320 { height: 320px; }
.shot--280 { height: 280px; }
.shot--260 { height: 260px; }
.shot__tag {
  position: absolute; top: 23px; left: 23px;
  padding: 8px 12px; border-radius: 8px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; white-space: nowrap;
  color: var(--text); background: rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.shot-card { display: grid; gap: 16px; align-content: start; margin: 0; }
.shot-card figcaption { font-size: 13px; line-height: 1.6; color: var(--muted); }

.cs-facts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cs-fact {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line);
}
.cs-fact dt { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.cs-fact dd { font-size: 14px; color: var(--text); }

/* sections */
.cs-section { display: grid; gap: 32px; padding: 120px var(--gutter); }
.cs-section--wide { gap: 64px; }
.cs-hero + .cs-section { margin-top: 0; }
.cs-head { display: grid; gap: 16px; }
.cs-label { font-size: 11px; text-transform: uppercase; color: var(--muted); }

.cs-prose { display: grid; gap: 16px; max-width: 733px; font-size: 16px; line-height: 1.8; color: var(--muted); }
.cs-prose strong { font-weight: 700; color: var(--text); }

/* problem */
.cs-split { display: grid; grid-template-columns: 515fr 733fr; gap: 32px; align-items: start; margin-top: -8px; }
.cs-split__text { display: grid; gap: 24px; }
.cs-pullquote { margin: 0; font-family: var(--serif); font-size: 32px; line-height: 1.3; color: var(--text); }
.cs-body { font-size: 15px; line-height: 1.8; color: var(--muted); }
.cs-goal { display: grid; gap: 4px; }
.cs-goal__text { font-size: 14px; line-height: 1.4; color: var(--text); }

/* grids */
.cs-grid { display: grid; gap: 32px; align-items: start; }
.cs-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cs-grid--2 { grid-template-columns: repeat(2, 1fr); }

/* decisions */
.cs-decisions { display: grid; gap: 40px; }
.cs-decision { display: grid; grid-template-columns: 1fr 1fr 280px; gap: 32px; align-items: start; }
.cs-decision__text { display: grid; gap: 12px; }
.cs-decision__text h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; }
.cs-decision__text p { font-size: 14px; line-height: 1.6; color: var(--muted); }

/* impact */
.cs-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.cs-metric { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; }
.cs-metric dd { font-family: var(--serif); font-size: 80px; line-height: 1.3; white-space: nowrap; }
.cs-metric dt { font-size: 12px; text-transform: uppercase; color: var(--muted); }
.cs-impact { display: grid; gap: 16px; max-width: 733px; }
.cs-impact__status { font-size: 14px; line-height: 1.6; color: var(--muted); }
.cs-testimonial { display: grid; gap: 16px; margin: 0; }
.cs-testimonial blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 28px; line-height: 1.4; color: var(--text); }
.cs-testimonial figcaption { display: grid; gap: 4px; }
.cs-testimonial__name { font-size: 13px; font-weight: 600; }
.cs-testimonial__role { font-size: 12px; color: var(--muted); }

@media (max-width: 1200px) {
  .cs-hero__title { font-size: clamp(56px, 7.4vw, 96px); }
  .shot--hero { height: auto; aspect-ratio: 16 / 9; }
  .cs-facts { grid-template-columns: repeat(3, 1fr); }
  .cs-decision { grid-template-columns: 1fr 1fr; }
  .cs-decision__text { grid-column: 1 / -1; grid-row: 1; max-width: 560px; }
  .cs-metric dd { font-size: 64px; }
}

@media (max-width: 960px) {
  .cs-section { padding-block: 96px; }
  .cs-section--wide { gap: 48px; }
  .cs-split { grid-template-columns: 1fr; margin-top: 0; }
  .cs-grid--3 { grid-template-columns: 1fr 1fr; }
  .cs-grid--3 .shot-card:last-child { grid-column: 1 / -1; }
  .shot--420 { height: 360px; }
}

@media (max-width: 640px) {
  .cs-hero { padding-top: 48px; gap: 24px; }
  .cs-hero__title { font-size: clamp(44px, 13vw, 56px); }
  .shot--hero { aspect-ratio: 4 / 5; }
  .cs-facts { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cs-facts .cs-fact:last-child { grid-column: 1 / -1; }
  .cs-pullquote { font-size: 26px; }
  .cs-grid--3, .cs-grid--2, .cs-decision { grid-template-columns: 1fr; }
  .cs-grid--3 .shot-card:last-child { grid-column: auto; }
  .shot--420, .shot--320, .shot--280, .shot--260 { height: 240px; }
  .cs-metrics { grid-template-columns: 1fr; gap: 28px; }
  .cs-metric dd { font-size: 56px; line-height: 1.1; }
  .cs-testimonial blockquote { font-size: 22px; }
  .shot__tag { top: 12px; left: 12px; }
}

/* =========================================================
   PAGE SLIDE: transition between home and case studies
   Leaving:  the current page slides out and fades.
   Arriving: the new page slides in from the side, like a page.
   ========================================================= */
html.is-leaving-forward,
html.is-leaving-back,
html.is-arriving { overflow-x: hidden; }

html.is-leaving-forward body { animation: page-out-left .5s cubic-bezier(.7, 0, .84, 0) both; }
html.is-leaving-back body    { animation: page-out-right .5s cubic-bezier(.7, 0, .84, 0) both; }
@keyframes page-out-left  { to { transform: translateX(-30%); opacity: 0; } }
@keyframes page-out-right { to { transform: translateX(30%); opacity: 0; } }

html.is-arriving body { opacity: 0; }
html.is-arriving.arrive-forward body { transform: translateX(100%); }
html.is-arriving.arrive-back body    { transform: translateX(-100%); }
html.is-sliding.arrive-forward body  { animation: page-in-right .8s cubic-bezier(.16, 1, .3, 1) both; }
html.is-sliding.arrive-back body     { animation: page-in-left .8s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes page-in-right {
  from { transform: translateX(100%); opacity: 1; box-shadow: -40px 0 80px rgba(0, 0, 0, .7); }
  to   { transform: none; opacity: 1; box-shadow: -40px 0 80px rgba(0, 0, 0, 0); }
}
@keyframes page-in-left {
  from { transform: translateX(-100%); opacity: 1; box-shadow: 40px 0 80px rgba(0, 0, 0, .7); }
  to   { transform: none; opacity: 1; box-shadow: 40px 0 80px rgba(0, 0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  html.is-arriving body { opacity: 1; transform: none !important; }
}

/* =========================================================
   PROJECT PAGES (imotions.html and later ones)
   Images keep their natural proportions so diagrams, boards
   and screens are never cropped.
   ========================================================= */
.cs-lockup { display: flex; align-items: center; gap: 28px; }
.cs-lockup__mark { width: auto; height: 84px; }
.cs-hero__lede { max-width: 640px; font-size: 16px; line-height: 1.7; color: var(--muted); }
.cs-facts--4 { grid-template-columns: repeat(4, 1fr); }

.media { display: grid; gap: 14px; margin: 0; align-content: start; min-width: 0; }
.media__frame {
  overflow: hidden; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface);
}
.media__frame img, .media__frame video { display: block; width: 100%; height: auto; }
.media__frame--black { background: #000; }
.media--paper .media__frame { background: #e9e7e2; }
.media--white .media__frame {
  display: grid; place-items: center; aspect-ratio: 1 / 1; padding: 20px; background: #fff;
}
.media--white .media__frame img { width: 100%; height: 100%; object-fit: contain; }
.media figcaption, .cs-caption { font-size: 13px; line-height: 1.6; color: var(--muted); }
.cs-caption { margin-top: -40px; }

.cs-row { display: grid; gap: 32px; align-items: start; }
.cs-row--2 { grid-template-columns: 1fr 1fr; }
.cs-row--text { grid-template-columns: 5fr 7fr; }
.cs-row--text-right { grid-template-columns: 7fr 5fr; align-items: center; }
.cs-row--intro { max-width: 733px; margin-top: -24px; }
.cs-row--mech { grid-template-columns: 6fr 5fr; align-items: center; }
.cs-row--ui { grid-template-columns: 5fr 6fr; align-items: center; }
.cs-row--identity { grid-template-columns: 280px 1fr; align-items: center; max-width: 900px; }
/* images side by side at equal height: each grows by its aspect ratio */
.cs-row--match { display: flex; gap: 32px; align-items: flex-start; }
.cs-row--match > .media { flex: var(--ar) 1 0; }

.cs-body--small { font-size: 13px; line-height: 1.7; }

.cs-identity {
  display: grid; place-items: center; aspect-ratio: 1 / 1; padding: 56px;
  background: #000; border: 1px solid var(--line); border-radius: 12px;
}
.cs-identity img { width: 100%; height: auto; }

.cs-parts { display: grid; gap: 0; list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.cs-parts li {
  display: grid; grid-template-columns: 36px 1fr; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: 14px; line-height: 1.55; color: var(--muted);
}
.cs-parts li > span { font-family: var(--serif); font-size: 18px; color: var(--faint); line-height: 1.2; }
.cs-parts strong { display: block; font-weight: 600; color: var(--text); margin-bottom: 2px; }

/* next project */
.cs-next {
  display: grid; grid-template-columns: 1fr minmax(0, 520px); align-items: center; gap: 32px;
  padding: 96px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.cs-next__text { display: grid; gap: 12px; }
.cs-next__title { font-family: var(--serif); font-size: 56px; line-height: 1; transition: transform .5s var(--ease); }
.cs-next__img { display: block; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); aspect-ratio: 624 / 320; }
.cs-next__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.cs-next:hover .cs-next__title { transform: translateX(8px); }
.cs-next:hover .cs-next__img img { transform: scale(1.04); }

@media (max-width: 960px) {
  .cs-row--text, .cs-row--text-right, .cs-row--mech, .cs-row--ui { grid-template-columns: 1fr; }
  .cs-row--intro { margin-top: 0; }
  .cs-facts--4 { grid-template-columns: 1fr 1fr; }
  .cs-next { grid-template-columns: 1fr; padding-block: 72px; }
  .cs-next__title { font-size: 44px; }
  .cs-caption { margin-top: -28px; }
}
@media (max-width: 640px) {
  .cs-lockup { gap: 16px; }
  .cs-lockup__mark { height: 52px; }
  .cs-hero__lede { font-size: 15px; }
  .cs-row--match { flex-direction: column; }
  .cs-row--match > .media { flex: none; width: 100%; }
  .cs-row--identity { grid-template-columns: 1fr; }
  .cs-identity { max-width: 220px; padding: 40px; }
  .cs-row--2 { gap: 12px; }
  .media--white .media__frame { padding: 12px; }
  .cs-caption { margin-top: -20px; }
}

/* additions for orthos-adapt.html */
.cs-lockup__mark--wide { height: 64px; }
.media--white-full .media__frame,
.media__frame--white { background: #fff; }
.media--white .media__frame--fill { padding: 0; }
.media--white .media__frame--fill img { object-fit: cover; }
.cs-row--film { grid-template-columns: 5fr 6fr; align-items: center; }
@media (max-width: 960px) {
  .cs-row--film { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cs-lockup__mark--wide { height: 38px; }
}

/* additions for trivera.html */
.cs-name {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0;
  border-top: 1px solid var(--line);
}
.cs-name > div { display: grid; gap: 8px; padding: 28px 24px 0 0; }
.cs-name > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.cs-name dt { font-family: var(--serif); font-size: 72px; line-height: 1; color: var(--text); }
.cs-name dd { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.media__frame--crop { aspect-ratio: 4 / 3; }
.media__frame--crop img { width: 100%; height: 100%; object-fit: cover; }
.cs-specs { gap: 48px; }
.cs-specs .cs-label { margin-bottom: 12px; }
@media (max-width: 640px) {
  .cs-name dt { font-size: 48px; }
  .cs-name > div { padding-right: 12px; }
  .cs-name > div + div { padding-left: 12px; }
  .cs-specs { grid-template-columns: 1fr; gap: 32px; }
}

/* additions for acoustic-extinguisher.html */
.cs-row--film-wide { grid-template-columns: 7fr 4fr; align-items: center; }
@media (max-width: 960px) { .cs-row--film-wide { grid-template-columns: 1fr; } }
.shot--contain { background: #fff; }
.shot--contain img { object-fit: contain; }

/* =========================================================
   ABOUT PHOTO + EXPERIENCE (homepage)
   ========================================================= */
.about__image { aspect-ratio: 3 / 4; }

.experience { display: grid; gap: 64px; padding: 120px var(--gutter); }
.experience .section-head { padding-bottom: 0; }
.xp-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.xp {
  display: grid; grid-template-columns: 220px 1fr; gap: 32px;
  padding: 32px 0; border-bottom: 1px solid var(--line);
}
.xp__when { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-top: 8px; }
.xp__what { display: grid; gap: 10px; max-width: 733px; }
.xp__title { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.2; }
.xp__desc { font-size: 14px; line-height: 1.7; color: var(--muted); }
.xp__tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 4px 0 0; padding: 0; }
.xp__tags li {
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 12px; color: var(--text); background: var(--surface);
}
@media (max-width: 960px) {
  .experience { padding-block: 96px; gap: 48px; }
}
@media (max-width: 640px) {
  .xp { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; }
  .xp__when { padding-top: 0; }
  .xp__title { font-size: 24px; }
}

/* =========================================================
   AWARD FEATURE (homepage) + award banner (Orthos page)
   ========================================================= */
.award {
  display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: center;
  padding: 120px var(--gutter);
}
.award__media { position: relative; display: block; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); aspect-ratio: 16 / 9; }
.award__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.award__media:hover img { transform: scale(1.03); }
.award__badge {
  position: absolute; top: 20px; left: 20px; padding: 10px 16px; border-radius: 999px;
  font-family: var(--serif); font-size: 22px; line-height: 1; color: #0a0a0b; background: var(--text);
}
.award__body { display: grid; gap: 24px; justify-items: start; }
.award__title { font-family: var(--serif); font-weight: 400; font-size: 48px; line-height: 1.05; }
.award__copy { font-size: 15px; line-height: 1.75; color: var(--muted); }
.award__copy strong { color: var(--text); font-weight: 600; }
.xp--award .xp__title { color: var(--text); }
.xp--award .xp__when { color: var(--text); }

.cs-award {
  display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center;
  padding: 72px var(--gutter);
}
.cs-award__place { font-family: var(--serif); font-size: 120px; line-height: .9; color: var(--text); }
.cs-award__title { font-family: var(--serif); font-size: 36px; line-height: 1.15; margin: 8px 0 12px; }
.cs-award__copy { max-width: 640px; font-size: 14px; line-height: 1.7; color: var(--muted); }

@media (max-width: 960px) {
  .award { grid-template-columns: 1fr; gap: 40px; padding-block: 96px; }
  .award__title { font-size: 40px; }
}
@media (max-width: 640px) {
  .award__title { font-size: 32px; }
  .award__badge { font-size: 18px; top: 12px; left: 12px; }
  .cs-award { grid-template-columns: 1fr; gap: 12px; padding-block: 56px; }
  .cs-award__place { font-size: 80px; }
  .cs-award__title { font-size: 28px; }
}

/* =========================================================
   Experience highlight (from the "7" stat)
   ========================================================= */
.xp { position: relative; isolation: isolate; }
.xp::before {
  content: ""; position: absolute; inset: 0 -20px; z-index: -1; border-radius: 12px;
  background: rgba(249, 249, 248, 0); box-shadow: 0 0 0 1px rgba(249, 249, 248, 0);
  pointer-events: none;
}
.xp.is-flash::before { animation: xp-flash 2.2s var(--ease) both; }
@keyframes xp-flash {
  0%   { background: rgba(249, 249, 248, 0);   box-shadow: 0 0 0 1px rgba(249, 249, 248, 0); }
  18%  { background: rgba(249, 249, 248, .09); box-shadow: 0 0 0 1px rgba(249, 249, 248, .35); }
  60%  { background: rgba(249, 249, 248, .06); box-shadow: 0 0 0 1px rgba(249, 249, 248, .2); }
  100% { background: rgba(249, 249, 248, 0);   box-shadow: 0 0 0 1px rgba(249, 249, 248, 0); }
}
@media (max-width: 640px) {
  .xp::before { inset: 0 -10px; }
  .hero__eyebrow { font-size: 15px; }
  .hero__lede { font-size: 16px; }
  .hero__scrim { background: linear-gradient(to top, rgba(10,10,11,.94) 0%, rgba(10,10,11,.75) 35%, rgba(10,10,11,.2) 65%, rgba(10,10,11,.35) 100%); }
}
