/* =====================================================================
   MOTION.CSS  -  the scroll storytelling layer for the INNER pages (with assets/js/motion.js).
   ---------------------------------------------------------------------
   Every page gets its own treatment:
     DESIGN   pinned case-study cards, notes pop in beside them        (.scene)
     VIDEO    social strip that slides sideways as you scroll          (.social)
     ARTWORK  a picture wall, images drift inside their frames         (.wall)
     ABOUT    pinned photo, sentence lights up word by word, stacked testimonials (.story, .tst)
     RESUME   a timeline that draws itself                             (.tl, .comp)
     CONTACT  one giant email that reacts to the cursor                (.hello)
   Two switches, set on <html> by motion.js:
     html.anim  animations are on (off when the visitor asks for reduced motion)
     html.pin   wide screen: the pinned / sideways layouts are on (phones get simple stacked versions)
   With neither class everything is plainly visible, so nothing depends on the script to be readable.
   ===================================================================== */

/* ---------- scroll progress bar (top edge) ---------- */
#progress { position: fixed; left: 0; top: 0; z-index: 60; width: 100%; height: 4px; background: var(--hot); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
@media print { #progress { display: none; } }

/* ---------- REVEALS: add data-rv="up|left|right|pop|flip|rise" to anything ----------
   It animates in when it enters the screen and back out when it leaves. --d = delay (stagger). */
html.anim [data-rv] { opacity: 0; transition: opacity .55s ease var(--d, 0s), transform .75s cubic-bezier(.2,.8,.2,1) var(--d, 0s); }
html.anim [data-rv="up"]    { transform: translateY(46px); }
html.anim [data-rv="left"]  { transform: translateX(-70px); }
html.anim [data-rv="right"] { transform: translateX(70px); }
html.anim [data-rv="pop"]   { transform: scale(.82) rotate(-3deg); }
html.anim [data-rv="flip"]  { transform: perspective(900px) rotateX(-75deg); transform-origin: 50% 0; }
html.anim [data-rv="rise"]  { transform: translateY(90px) scale(.94); }
html.anim [data-rv].is-in   { opacity: 1; transform: none; }

/* big page title slides up from behind its own baseline when the page opens */
html.anim .page-title { animation: titleIn .9s cubic-bezier(.2,.8,.2,1) .25s both; }
@keyframes titleIn { from { clip-path: inset(0 0 100% 0); transform: translateY(18%); } to { clip-path: inset(0 0 0 0); transform: none; } }

/* small-screen footer nav: 3 even columns instead of 4 + 2 */
@media (max-width: 900px) and (min-width: 641px) { .page-nav { grid-template-columns: repeat(3, 1fr); } }

/* =====================================================================
   DESIGN  -  case-study scenes (built by motion.js from the case: {} notes in work.js)
   A homepage-style card pins to the screen; brief / role / process / result pop in beside it one at
   a time; then it all slides away and the gallery for that project follows.
   ===================================================================== */
body[data-page="design"] .case { display: none; }          /* the scene replaces the strip under each gallery */
.scene { margin-top: 70px; scroll-margin-top: 70px; }
.scene__pin { display: grid; grid-template-columns: 1fr; gap: 26px; }
.scene__card {
  position: relative; z-index: 45; container-type: inline-size; width: 100%; max-width: 640px;
  background: var(--hot); border: var(--edge) solid var(--ink); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.scene__meta { display: flex; justify-content: space-between; gap: 1em; padding: 3cqw 3.4cqw; font-size: max(10px, 2.4cqw); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.scene__img { aspect-ratio: 16 / 10; overflow: hidden; border-block: var(--edge) solid var(--ink); background: var(--ink); }
.scene__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.scene__title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 11.5cqw; line-height: .9; padding: 3cqw 3.4cqw 3.6cqw; }
.scene__notes { list-style: none; display: grid; gap: 12px; align-content: center; }
.scene__note { background: var(--paper); border: 2px solid var(--ink); box-shadow: 5px 6px 0 rgba(29,28,26,.16); padding: 14px 16px 16px; max-width: 520px; }
.scene__note b { display: flex; gap: 10px; margin-bottom: 6px; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.scene__note b i { font-style: normal; color: var(--hot); }
.scene__note p { font-size: clamp(13px, 1.05vw, 15.5px); line-height: 1.55; }
.scene__note--result { background: var(--ink); color: var(--paper); }
.scene__note--result p { font-family: var(--display); text-transform: uppercase; font-size: clamp(18px, 1.7vw, 26px); line-height: 1.12; }
.scene__hint { display: none; }

html.pin .scene { height: calc(100vh + var(--steps, 4) * 52vh); margin-top: 40px; }
html.pin .scene__pin {
  position: sticky; top: 0; z-index: 45; height: 100vh; padding: 76px 0 34px;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 5vw; align-items: center;
}
html.pin .scene__card { justify-self: center; width: min(100%, 640px, 78vh); will-change: transform; }
html.pin .scene--flip .scene__card { order: 2; }
html.pin .scene__note { opacity: 0; transform: translateX(60px) scale(.8) rotate(4deg); transition: opacity .35s ease, transform .55s cubic-bezier(.2,1.2,.3,1); }
html.pin .scene--flip .scene__note { transform: translateX(-60px) scale(.8) rotate(-4deg); justify-self: end; }
html.pin .scene__note.is-on { opacity: 1; transform: rotate(var(--tilt, 0deg)); }
html.pin .scene__note:nth-child(odd)  { --tilt: -1.2deg; }
html.pin .scene__note:nth-child(even) { --tilt: 1deg; margin-left: 28px; }
html.pin .scene--flip .scene__note:nth-child(even) { margin-left: 0; margin-right: 28px; }
html.pin .scene.is-out .scene__note { opacity: 0; transform: translateY(-80px) rotate(-6deg); }
html.pin .scene__hint {
  display: block; position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; transition: opacity .3s;
}
html.pin .scene__hint::after { content: " \2193"; color: var(--hot); }
html.pin .scene.is-read .scene__hint { opacity: 0; }
@media (max-height: 620px) { html.pin .scene__note p { font-size: 12.5px; line-height: 1.4; } html.pin .scene__note { padding: 9px 12px 10px; } html.pin .scene__notes { gap: 8px; } }

/* =====================================================================
   VIDEO  -  social media strip (built by motion.js from WORK.video.social in work.js)
   ===================================================================== */
.social { margin-top: 46px; scroll-margin-top: 70px; }
.social__head { display: grid; grid-template-columns: auto 1fr; gap: 6px 28px; align-items: end; padding-bottom: 18px; border-bottom: var(--edge) solid var(--ink); }
.social__no { grid-column: 1 / -1; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.social__title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(40px, 6vw, 96px); line-height: .88; }
.social__head .prose { justify-self: end; max-width: 44ch; font-size: 14px; }
@media (max-width: 700px) { .social__head { grid-template-columns: 1fr; } .social__head .prose { justify-self: start; } }
.social__vp { overflow-x: auto; scroll-snap-type: x mandatory; padding: 30px 0 26px; -webkit-overflow-scrolling: touch; }
.social__strip { display: flex; gap: clamp(18px, 2.4vw, 40px); width: max-content; padding: 0 6px 0 2px; }
.phone { flex: none; margin: 0; scroll-snap-align: start; }
.phone:nth-child(odd)  { transform: rotate(-1.6deg); }
.phone:nth-child(even) { transform: rotate(1.4deg) translateY(18px); }
.phone__screen {
  position: relative; z-index: 45; display: block; height: min(58vh, 540px); aspect-ratio: 9 / 16; overflow: hidden;
  background: var(--ink); color: var(--paper); border: var(--edge) solid var(--ink); box-shadow: var(--shadow);
  text-decoration: none; padding: 0; font: inherit; cursor: pointer; width: auto;
}
.phone__screen img, .phone__screen video, .phone__screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.phone__play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--paper); color: var(--ink); border: var(--edge) solid var(--ink);
  font-size: 20px; padding-left: 4px; transition: background .2s, transform .2s;
}
.phone__screen:hover .phone__play, .phone__screen:focus-visible .phone__play { background: var(--hot); transform: translate(-50%, -50%) scale(1.1); }
.phone__screen:focus-visible { outline: 3px solid var(--hot); outline-offset: 3px; }
.phone--empty .phone__screen { background: var(--hot); color: var(--ink); cursor: default; display: flex; flex-direction: column; justify-content: space-between; padding: 14px; }
.phone--empty .phone__n { font-family: var(--display); font-size: clamp(70px, 9vw, 130px); line-height: .8; }
.phone--empty .phone__soon { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; display: flex; justify-content: space-between; }
.phone figcaption { margin-top: 12px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; display: flex; justify-content: space-between; gap: 10px; }
.phone figcaption span + span { opacity: .55; }

html.pin .social.is-wide { height: calc(100vh + var(--travel, 0px)); }
html.pin .social.is-wide .social__pin { position: sticky; top: 0; z-index: 45; height: 100vh; padding-top: 74px; display: flex; flex-direction: column; justify-content: center; }
html.pin .social.is-wide .social__vp { overflow: visible; scroll-snap-type: none; }
html.pin .social.is-wide .social__strip { will-change: transform; }
html.pin .social.is-wide .phone__screen { height: min(52vh, 540px); }

/* =====================================================================
   ARTWORK  -  the picture wall (frames.js builds it when work.js says layout: "wall")
   ===================================================================== */
.wall { margin-top: 70px; scroll-margin-top: 70px; padding-top: 22px; border-top: var(--edge) solid var(--ink); display: grid; grid-template-columns: 1fr; gap: 26px 4vw; }
.wall__no, .wall__count { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.wall__count { margin-top: 18px; opacity: .6; }
.wall__title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(34px, 3.9vw, 64px); line-height: .9; margin: 10px 0 16px; overflow-wrap: break-word; }
.wall__head .prose { font-size: 14.5px; white-space: pre-line; }
.wall__grid { columns: 2; column-gap: clamp(14px, 2vw, 30px); }
.wall__item {
  position: relative; z-index: 45; margin: 0 0 clamp(14px, 2vw, 30px); break-inside: avoid; aspect-ratio: var(--ratio); overflow: hidden; cursor: zoom-in;
  background: var(--hot); border: var(--edge) solid var(--ink); box-shadow: var(--shadow);
}
.wall__item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale .5s cubic-bezier(.2,.8,.2,1); }
.wall__item:hover img, .wall__item:focus-visible img { scale: 1.05; }
.wall__item:focus-visible { outline: 3px solid var(--hot); outline-offset: 3px; }
html.pin .wall__item img { height: 114%; margin-top: -7%; will-change: transform; }
@media (min-width: 900px) {
  .wall { grid-template-columns: minmax(240px, 1fr) 3fr; }
  .wall__head { position: sticky; top: 84px; align-self: start; }
  .wall:nth-of-type(even) { grid-template-columns: 3fr minmax(240px, 1fr); }
  .wall:nth-of-type(even) .wall__head { order: 2; }
  .wall__grid .wall__item:nth-child(3n + 2) { margin-left: 7%; }      /* slightly uneven hang, like a real wall */
  .wall__grid .wall__item:nth-child(4n + 3) { margin-right: 9%; }
}
@media (min-width: 1500px) { .wall__grid { columns: 3; } }
@media (max-width: 520px) { .wall__grid { columns: 1; } }

/* =====================================================================
   ABOUT  -  story scroll + testimonials
   ===================================================================== */
.story { margin-top: 46px; display: grid; grid-template-columns: 1fr; gap: 30px 5vw; }
.story__photo { position: relative; z-index: 45; width: min(100%, 380px); aspect-ratio: 4 / 5; overflow: hidden; background: var(--hot); border: var(--edge) solid var(--ink); box-shadow: var(--shadow); transform: rotate(-2.5deg); }
.story__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.story__tag { margin-top: 22px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; display: flex; justify-content: space-between; max-width: 380px; }
.story__lede { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(34px, 5.4vw, 96px); line-height: .98; }
.story__lede .w { transition: opacity .35s ease, color .35s ease; }
html.anim .story__lede .w { opacity: .14; }
html.anim .story__lede .w.on { opacity: 1; }
html.anim .story__lede .w.new { color: var(--hot); }
.story__bio { margin-top: clamp(40px, 9vh, 110px); display: grid; gap: clamp(30px, 7vh, 80px); }
.story__bio .prose { font-size: clamp(16px, 1.45vw, 22px); line-height: 1.6; max-width: 46ch; }
.story__bio .prose:nth-child(even) { justify-self: end; }
.facts { list-style: none; margin-top: clamp(40px, 9vh, 110px); display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.facts li { background: var(--paper); border: 2px solid var(--ink); box-shadow: 5px 6px 0 rgba(29,28,26,.16); padding: 14px 16px 18px; font-size: 14px; line-height: 1.5; }
.facts li b { display: block; font-family: var(--display); font-weight: 400; font-size: 40px; line-height: .9; color: var(--hot); margin-bottom: 10px; }
.facts li:nth-child(odd) { transform: rotate(-1deg); } .facts li:nth-child(even) { transform: rotate(.8deg); }
html.anim .facts li[data-rv].is-in:nth-child(odd) { transform: rotate(-1deg); } html.anim .facts li[data-rv].is-in:nth-child(even) { transform: rotate(.8deg); }
@media (min-width: 900px) {
  .story { grid-template-columns: minmax(260px, 1fr) 2.1fr; }
  .story__side { position: sticky; top: 96px; align-self: start; z-index: 45; }
  .story__main { padding-top: 6vh; padding-bottom: 8vh; }
}
.services { margin-top: clamp(70px, 14vh, 150px); }

/* TESTIMONIALS: cards that stack on top of each other as you scroll */
.tst { margin-top: clamp(70px, 14vh, 150px); }
.tst__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 30px; padding-bottom: 18px; border-bottom: var(--edge) solid var(--ink); }
.tst__title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(40px, 6vw, 96px); line-height: .88; }
.tst__head p { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.tst__list { list-style: none; display: grid; gap: 22px; margin-top: 30px; }
.tst__card {
  background: var(--paper); border: var(--edge) solid var(--ink); box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr; gap: 20px 4vw; padding: clamp(18px, 2.6vw, 40px); max-width: 1100px; width: 100%;
}
.tst__card:nth-child(3n + 2) { background: var(--hot); }
.tst__card:nth-child(3n) { background: var(--ink); color: var(--paper); }
.tst__who { display: flex; align-items: center; gap: 16px; }
.tst__logo { flex: none; width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--paper); color: var(--ink); border: 2px dashed var(--ink); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.tst__logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tst__logo:has(img) { border-style: solid; }
.tst__co { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(24px, 2.6vw, 40px); line-height: .95; }
.tst__role { margin-top: 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.tst__quote { font-size: clamp(16px, 1.5vw, 23px); line-height: 1.5; }
.tst__quote::before { content: "\201C"; display: block; font-family: var(--display); font-size: 70px; line-height: .6; margin-bottom: 4px; }
.tst__card:nth-child(3n + 1) .tst__quote::before { color: var(--hot); }
@media (min-width: 900px) {
  .tst__card { grid-template-columns: minmax(220px, 1fr) 2fr; align-items: start; min-height: 300px; }
  .tst__who { flex-direction: column; align-items: flex-start; }
  .tst__list { gap: 16vh; padding-bottom: 6vh; }
  .tst__card { position: sticky; top: calc(96px + var(--i, 0) * 22px); }
  .tst__card:nth-child(odd)  { transform: rotate(-.8deg); justify-self: start; }
  .tst__card:nth-child(even) { transform: rotate(.9deg); justify-self: end; }
}

/* =====================================================================
   RESUME  -  timeline + competency cards. Job TITLES are the big text, employers the small text.
   ===================================================================== */
.job__head { font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .08em; line-height: 1.4; align-items: baseline; margin-bottom: 0; }
.job__head span + span { align-self: baseline; font-weight: 400; }
.job__role-head { align-items: baseline; margin-bottom: 10px; }
.job__head--title span:first-child, .job__role-head span:first-child {
  font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(22px, 2.3vw, 34px); line-height: 1.02; letter-spacing: .005em;
}
.job__role-head span + span { font-size: 11px; font-weight: 400; letter-spacing: .08em; }
.job__role { margin-top: 12px; }
.job__head--title { margin-bottom: 12px; }
.cv-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 30px; padding: 22px 0 6px; }
.cv-top p { font-size: clamp(15px, 1.3vw, 19px); line-height: 1.5; max-width: 52ch; }
.cv .block { padding: clamp(40px, 9vh, 100px) 0; }
@media (min-width: 900px) { .cv .block__label { position: sticky; top: 90px; align-self: start; } }
.tl { position: relative; padding-left: 34px; gap: clamp(26px, 6vh, 64px); }
.tl::before, .tl__fill { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: rgba(29,28,26,.16); }
.tl__fill { background: var(--hot); transform-origin: 50% 0; transform: scaleY(1); }
html.anim .tl__fill { transform: scaleY(0); }
.tl .job { position: relative; border-top: 0; padding: 0; }
.tl .job::before {
  content: ""; position: absolute; left: -34px; top: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--ink); transition: background .3s .2s, scale .5s cubic-bezier(.2,1.6,.3,1) .1s;
}
html.anim .tl .job::before { scale: 0; }
html.anim .tl .job.is-in::before { scale: 1; background: var(--hot); }
.comp { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.comp .job { border: 2px solid var(--ink); box-shadow: 5px 6px 0 rgba(29,28,26,.16); background: var(--paper); padding: 18px 20px 22px; }
.comp .job:first-child { padding-top: 18px; border-top: 2px solid var(--ink); }
.comp .job:nth-child(4n + 1) { background: var(--ink); color: var(--paper); }
.comp .job--wide { grid-column: 1 / -1; }
.job__list--chips { display: flex; flex-wrap: wrap; gap: 8px; max-width: none; }
.job__list--chips li { padding: 7px 11px; border: 1px solid currentColor; font-size: 12.5px; line-height: 1.3; }
.job__list--chips li + li { margin-top: 0; }
.job__list--chips li::before { content: none; }
@media print {
  [data-rv] { opacity: 1 !important; transform: none !important; }
  .tl { padding-left: 0; gap: 0; } .tl::before, .tl__fill, .tl .job::before { display: none !important; }
  .tl .job { padding: 10px 0; } .cv-top { display: none !important; }
  .comp { display: block; } .comp .job { border: 0; box-shadow: none; background: none !important; color: inherit !important; padding: 10px 0; }
  .job__list--chips { display: block; } .job__list--chips li { border: 0; padding: 0 0 0 20px; } .job__list--chips li::before { content: "\2014"; }
  .job__head { font-size: 10px; } .job__head--title span:first-child, .job__role-head span:first-child { font-size: 16px; }
}

/* =====================================================================
   CONTACT  -  one big moment
   ===================================================================== */
.hello { padding: clamp(30px, 8vh, 90px) 0 0; }
.hello__k { display: flex; justify-content: space-between; gap: 16px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.hello__mail {
  display: block; width: 100%; appearance: none; background: none; border: 0; padding: .08em 0; color: inherit; cursor: copy; text-align: left;
  font-family: var(--display); font-weight: 400; text-transform: uppercase; white-space: nowrap;
  font-size: min(calc((100vw - 40px) / 10.6), 166px); line-height: .9; letter-spacing: -.005em;
}
.hello__mail .ch { display: inline-block; transform-origin: 50% 100%; transition: transform .25s cubic-bezier(.2,.8,.2,1), color .2s; }
html.anim .hello__mail .ch { animation: chIn .7s cubic-bezier(.2,.9,.2,1) calc(.5s + var(--i) * 28ms) both; }
@keyframes chIn { from { transform: translateY(105%) rotate(8deg); opacity: 0; } }
.hello__mail:focus-visible { outline: 3px solid var(--hot); outline-offset: 6px; }
.hello__mail.is-copied { color: var(--hot); }
.hello__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.hello__status { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; min-height: 1.2em; }
.ticker { margin: clamp(50px, 11vh, 120px) -20px 0; overflow: hidden; border-block: var(--edge) solid var(--ink); background: var(--hot); }
.ticker__in { display: flex; width: max-content; animation: tick 26s linear infinite; }
.ticker span { display: flex; align-items: center; gap: .5em; padding: .22em .25em; font-family: var(--display); text-transform: uppercase; font-size: clamp(28px, 4.4vw, 70px); line-height: 1; white-space: nowrap; }
.ticker img { height: .62em; width: auto; }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__in { animation: none; } }
.hello__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; margin-top: clamp(50px, 11vh, 120px); }
.hello__cell { border: 2px solid var(--ink); box-shadow: 5px 6px 0 rgba(29,28,26,.16); background: var(--paper); padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 26px; justify-content: space-between; min-height: 170px; color: inherit; text-decoration: none; transition: background .2s, color .2s, transform .2s; }
a.hello__cell:hover, a.hello__cell:focus-visible { background: var(--ink); color: var(--paper); transform: translate(-3px, -3px); outline: none; }
.hello__cell small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.hello__cell strong { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(26px, 2.8vw, 44px); line-height: .95; }
