:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #161616;
  background: #f4f4f2;
  font-synthesis: none;
  --body: #494949;
  --quiet: #656565;
  --divider: #d8d8d5;
  --dark: #131313;
  --light: #fafaf8;
  --accent: #66d9f5;
  --dark-muted: #c9c9c6;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul, figure { margin: 0; }
a { color: inherit; }
img { display: block; width: 100%; }
a:focus-visible { outline: 3px solid #1685ae; outline-offset: 4px; }

.wrap { width: min(100% - 96px, 1320px); margin-inline: auto; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.masthead {
  background: #111;
  color: var(--light);
  border-bottom: 1px solid #363636;
}

.masthead-inner, .masthead nav, .brand { display: flex; align-items: center; }
.masthead-inner { min-height: 72px; justify-content: space-between; gap: 20px; }
.masthead nav { gap: clamp(14px, 2.4vw, 34px); }
.brand { gap: 12px; font-size: .95rem; font-weight: 700; text-decoration: none; }
.brand img { width: 52px; height: 32px; object-fit: contain; }
.nav-link { font-size: .94rem; text-underline-offset: 5px; white-space: nowrap; }

.button {
  display: inline-block;
  border-radius: 99px;
  padding: .72rem 1.12rem .8rem;
  background: var(--light);
  color: var(--dark);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.25;
  transition: background-color .18s, color .18s;
}

.button:hover { background: var(--accent); }
.button-outline { background: transparent; border: 1px solid #626262; color: inherit; }
.button-outline:hover { background: var(--light); color: var(--dark); }
.button-demo { background: var(--accent); }
.button-demo:hover { background: var(--light); }
.case-lead .button-demo { margin-top: .95rem; }

.portfolio-catalog, .case-hero, .closing { background: var(--dark); color: var(--light); }
.catalog-intro { padding: clamp(34px, 4vw, 55px) 0 clamp(26px, 3.3vw, 40px); }
.catalog-heading, .hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(18px, 4.3vw, 72px);
}

.category {
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .055em;
  text-transform: uppercase;
}

h1 {
  margin-top: .5rem;
  font-size: clamp(2.25rem, 5.05vw, 4.6rem);
  font-weight: 720;
  letter-spacing: -.065em;
  line-height: .99;
  overflow-wrap: break-word;
}

.intro-lead {
  max-width: 37rem;
  padding-bottom: .18rem;
  color: var(--dark-muted);
  font-size: clamp(1rem, 1.45vw, 1.26rem);
  line-height: 1.52;
  text-wrap: pretty;
}

.catalog-heading { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.catalog-heading h1 { margin-top: 0; font-size: clamp(3.3rem, 7.3vw, 6.6rem); }
.catalog-positioning { margin-bottom: .31rem; font-size: clamp(1.04rem, 1.52vw, 1.37rem); font-weight: 650; line-height: 1.3; }

.catalog-grid { padding-bottom: clamp(48px, 7vw, 98px); scroll-margin-top: 16px; }
.project-list {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 22px 18px;
  padding: 0;
  list-style: none;
}

.project { grid-column: span 4; min-width: 0; }
.project:first-child { grid-column: span 7; }
.project:nth-child(2) { grid-column: span 5; }
.project:nth-child(n+6) { grid-column: span 6; }

.project-link {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  overflow: hidden;
  border: 1px solid #363636;
  border-radius: var(--radius);
  background: #1d1d1d;
  text-decoration: none;
  transition: border-color .2s, background-color .2s;
}

.project-link:hover { background: #232323; border-color: #777; }
.project-copy { padding: 20px clamp(17px, 2vw, 30px) 24px; }
.project-copy h3 {
  margin-top: .42rem;
  font-size: clamp(1.6rem, 2.7vw, 2.75rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.049em;
}

.card-summary {
  max-width: 43rem;
  margin-top: .62rem;
  color: var(--dark-muted);
  font-size: 1rem;
  line-height: 1.48;
  text-wrap: pretty;
}

.visual {
  position: relative;
  display: grid;
  width: 100%;
  height: clamp(205px, 22vw, 308px);
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background: #202020;
}

.project:nth-child(-n+2) .visual { height: clamp(260px, 28vw, 390px); }
.project:nth-child(n+6) .visual { height: clamp(235px, 25vw, 350px); }
.visual img { height: 100%; object-fit: cover; object-position: center; }
.visual-photo img { transition: transform .35s ease-out; }
.project-link:hover .visual-photo img { transform: scale(1.025); }

.visual-device, .visual-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-device {
  padding: clamp(16px, 2.5vw, 36px) clamp(10px, 2.2vw, 30px);
  background: radial-gradient(ellipse at 65% 41%, #5a5a5a, #252525 61%, #161616);
}

.visual-device img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  border: clamp(4px, .6vw, 9px) solid #0a0a0a;
  border-radius: clamp(9px, 1.2vw, 17px);
  object-fit: contain;
  box-shadow: 0 0 0 1px #ffffff52, 0 18px 28px #000b;
  transform: perspective(1200px) rotateY(-7deg) rotateX(5deg) rotate(-2deg);
}

.visual-diagram { padding: clamp(9px, 1.25vw, 18px); }
.visual-diagram img { max-height: 100%; object-fit: contain; }
.project-text-only .project-link { min-height: 270px; align-items: end; }

.case-hero { background: linear-gradient(149deg, #131313 30%, #2e2e2e 100%); }
.hero-layout { padding-block: clamp(32px, 4vw, 60px) clamp(20px, 3.2vw, 44px); }
.hero-copy { margin-bottom: clamp(23px, 3.3vw, 43px); }
.case-hero h1 { font-size: clamp(2.5rem, 5.8vw, 5.5rem); }
.case-hero-text-only .hero-copy { margin-bottom: 0; }
.cover-link {
  display: block;
  overflow: hidden;
  border: 1px solid #4a4a4a;
  border-radius: var(--radius);
  cursor: zoom-in;
}

.case-hero .visual { height: clamp(335px, 41vw, 534px); }
.case-hero .visual-device { padding: clamp(18px, 3.2vw, 45px) 5%; }
.case-hero .visual-diagram { padding: clamp(10px, 2vw, 25px); }

.editorial {
  display: grid;
  gap: clamp(44px, 6.7vw, 93px);
  padding-block: clamp(35px, 5vw, 67px) clamp(62px, 8vw, 110px);
}

.screens h2, .prose h2, .facts h2 {
  font-size: clamp(1.6rem, 3.1vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -.05em;
}

.screens h2 { margin-bottom: clamp(16px, 2.4vw, 28px); }
.screen-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 24px 18px;
}

.screen-grid > :only-child { grid-column: 1 / -1; width: min(100%, 950px); }
.screen-grid > :last-child:nth-child(odd):not(:first-child) { grid-column: 1 / -1; width: min(100%, 950px); }
.gallery-link {
  display: block;
  overflow: hidden;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: #e7e7e4;
  cursor: zoom-in;
}

.gallery-link img { height: auto; }
.screens figcaption, .presentation-chapter figcaption {
  margin-top: .68rem;
  color: var(--quiet);
  font-size: .92rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.story {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 41px);
}

.prose { border-top: 2px solid #222; padding-top: clamp(.8rem, 1.6vw, 1.3rem); }
.prose p {
  margin-top: .8rem;
  color: var(--body);
  font-size: 1.02rem;
  line-height: 1.63;
  text-wrap: pretty;
}

.presentation { gap: clamp(32px, 5vw, 70px); }
.presentation-intro {
  max-width: 60rem;
  color: #242424;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  line-height: 1.45;
  letter-spacing: -.025em;
  text-wrap: pretty;
}

.presentation-chapter {
  display: grid;
  gap: clamp(23px, 4vw, 56px);
  align-items: center;
  padding-block: clamp(24px, 4.5vw, 62px);
  border-top: 1px solid var(--divider);
}

.presentation-copy { max-width: 50rem; }
.presentation-copy h2 {
  font-size: clamp(1.8rem, 3.5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -.05em;
  text-wrap: balance;
}

.presentation-copy p, .presentation-copy ul {
  margin-top: .9rem;
  color: var(--body);
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  line-height: 1.62;
  text-wrap: pretty;
}

.presentation-copy ul { padding-left: 1.2rem; }
.presentation-copy li + li { margin-top: .3rem; }

.presentation-demo {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding: clamp(22px, 3.6vw, 48px);
  border-radius: var(--radius);
  background: var(--dark);
  color: var(--light);
}

.presentation-demo p {
  max-width: 38rem;
  font-size: clamp(1.12rem, 2.15vw, 1.68rem);
  line-height: 1.35;
  text-wrap: pretty;
}

.presentation-demo .button-demo { flex: none; }

@media (min-width: 860px) {
  .presentation-chapter-with-image { grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); }
  .presentation-chapter-with-image:nth-child(even) { grid-template-columns: minmax(0, 1.4fr) minmax(0, .85fr); }
  .presentation-chapter-with-image:nth-child(even) figure { grid-area: 1 / 1; }
  .presentation-chapter-with-image:nth-child(even) .presentation-copy { grid-area: 1 / 2; }
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 25px 68px;
  border-top: 1px solid var(--divider);
  padding-top: 1.45rem;
}

.facts h2 { font-size: 1.28rem; letter-spacing: -.025em; }
.stack, .sources { list-style: none; padding: 0; margin-top: .7rem; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; }
.stack li { border: 1px solid var(--divider); padding: .42rem .73rem; border-radius: 99px; font-size: .9rem; }
.sources li + li { margin-top: .38rem; }
.sources a { text-underline-offset: 4px; }

.closing { padding: 45px 0 24px; border-top: 1px solid #393939; }
.closing-inner { display: flex; justify-content: space-between; align-items: center; gap: 33px; }
.closing h2 {
  margin-bottom: 14px;
  font-size: clamp(1.7rem, 3.9vw, 3.25rem);
  letter-spacing: -.05em;
  line-height: 1.1;
}

.closing-brand { margin-top: 42px; padding-top: 16px; border-top: 1px solid #464646; color: var(--dark-muted); font-size: .88rem; }
.closing-brand a { text-decoration: none; }
.next-case { display: grid; gap: .35rem; min-width: 11rem; text-decoration: none; }
.next-case span { color: var(--dark-muted); font-size: .88rem; }
.next-case strong { color: var(--accent); font-size: 1.35rem; }
.next-case:hover strong { text-decoration: underline; text-underline-offset: 5px; }

@media (max-width: 990px) {
  .wrap { width: calc(100% - 58px); }
  .project-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-list .project { grid-column: auto; }
  .project-list .project .visual { height: clamp(190px, 27vw, 270px); }
  .catalog-heading, .hero-copy { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
}

@media (max-width: 650px) {
  .wrap { width: calc(100% - 32px); }
  .masthead-inner { min-height: 61px; gap: 12px; }
  .masthead nav { gap: 12px; }
  .brand span { display: none; }
  .brand img { width: 44px; }
  .nav-link { font-size: .85rem; }
  .button-outline { font-size: .84rem; padding: .59rem .72rem; }
  .catalog-intro { padding-block: 27px 20px; }
  .catalog-heading, .hero-copy { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  h1 { font-size: clamp(2.05rem, 9vw, 3.3rem); letter-spacing: -.055em; }
  .catalog-heading h1 { font-size: clamp(3.05rem, 12.4vw, 4.65rem); }
  .intro-lead { line-height: 1.45; }
  .project-list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .project-list .project .visual { height: clamp(190px, 61vw, 315px); }
  .project-copy { padding: 14px 15px 19px; }
  .project-copy .category { font-size: .72rem; }
  .hero-layout { padding-block: 26px 19px; }
  .hero-copy { margin-bottom: 19px; }
  .case-hero h1 { font-size: clamp(2.4rem, 11vw, 4rem); }
  .case-hero .visual { height: clamp(225px, 75vw, 435px); }
  .visual-device img { transform: perspective(1000px) rotateY(-4deg) rotateX(3deg) rotate(-1deg); }
  .screen-grid, .story { grid-template-columns: minmax(0, 1fr); }
  .screen-grid > :only-child, .screen-grid > :last-child:nth-child(odd):not(:first-child) { width: 100%; }
  .closing-inner { display: grid; }
  .closing-brand { margin-top: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .visual-photo img, .project-link, .button { transition: none; }
  .project-link:hover .visual-photo img { transform: none; }
}
