/* Smoothless Studios. Compact and calm: warm paper, ink, one green. Newsreader for the few big words, Archivo
   for the rest. Real screenshots everywhere. Motion is small and only with html.motion (js/boot.js). */

:root {
  --bg: #f7f5f0;
  --bg-2: #efece5;
  --text: #1b1b1a;
  --text-2: #6b6862;
  --line: #dedad1;
  --accent: #1f5c43;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Archivo", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --g: clamp(20px, 5vw, 48px);
  --ease: cubic-bezier(.65, 0, .25, 1);
  --out: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, video { display: block; }
::selection { background: #d6e6dc; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
section[id], .stage[id] { scroll-margin-top: 24px; }

.page { max-width: 1120px; margin: 0 auto; padding: 0 var(--g); }
.label { margin: 0 0 8px; font: 600 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }

/* top */
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 28px 0; }
.brand { text-decoration: none; font-weight: 650; font-size: 17px; letter-spacing: -.01em; }
.brand span { font-weight: 400; color: var(--text-2); }
.top nav { display: flex; align-items: center; gap: 24px; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--text-2); transition: color .2s; }
.top nav a:hover { color: var(--text); }
.top nav .mail { color: var(--text); border: 1px solid var(--text); border-radius: 99px; padding: 5px 14px; transition: background .2s, color .2s; }
.top nav .mail:hover { background: var(--text); color: var(--bg); }
@media (max-width: 480px) { .top nav a:not(.mail) { display: none; } }

/* ---------- intro: words + a deck of real screens ---------- */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px clamp(32px, 5vw, 72px); align-items: center; padding: clamp(32px, 7vh, 80px) 0 clamp(56px, 10vh, 104px); }
.intro h1 { margin: 0; font: 400 clamp(2.4rem, 4.5vw, 3.9rem)/1.04 var(--serif); letter-spacing: -.028em; }
.ln { display: block; white-space: nowrap; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.ln > span { display: inline-block; }
.lede { margin: 22px 0 0; max-width: 40ch; font-size: clamp(1.05rem, 1.4vw, 1.18rem); line-height: 1.5; color: var(--text-2); }
.tally { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 0; font-size: 15px; }
.tally li { display: flex; align-items: center; }
.tally li + li::before { content: "→"; margin: 0 12px; color: #b5b0a6; }
@media (max-width: 560px) { .tally { gap: 8px 20px; } .tally li + li::before { display: none; } }
.tally a { text-decoration: none; color: var(--text-2); transition: color .2s; }
.tally a:hover { color: var(--text); }
.tally b { color: var(--text); font-weight: 600; margin-right: 3px; font-variant-numeric: tabular-nums; }

.deck { position: relative; aspect-ratio: 1.55 / 1; }
.scr { position: absolute; left: 0; top: 0; width: 80%; margin: 0; transform-origin: 0 0;
  transition: transform 1.1s var(--ease), opacity 1.1s var(--ease), filter 1.1s var(--ease); }
.scr img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 10px;
  background: #fff; box-shadow: 0 0 0 1px rgba(27,27,26,.08), 0 18px 40px -16px rgba(60,50,30,.35); }
.scr figcaption { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(247,245,240,.94);
  font-size: 12px; font-weight: 600; opacity: 0; transition: opacity .5s; }
/* resting spots: front, back right, back left, waiting */
.scr[data-pos="0"], html:not(.js) .scr:nth-child(1) { transform: translate(25%, 34%); z-index: 3; }
.scr[data-pos="1"], html:not(.js) .scr:nth-child(2) { transform: translate(36%, 0) scale(.78); z-index: 2; filter: saturate(.85); }
.scr[data-pos="2"], html:not(.js) .scr:nth-child(3) { transform: translate(0, 12%) scale(.66); z-index: 1; filter: saturate(.7); opacity: .85; }
.scr[data-pos="3"], html:not(.js) .scr:nth-child(n+4) { transform: translate(52%, -4%) scale(.6); z-index: 0; opacity: 0; }
.scr[data-pos="0"] figcaption { opacity: 1; transition-delay: .5s; }
html.js .scr:not([data-pos]) { opacity: 0; transform: translate(28%, 70%); }

@media (max-width: 820px) {
  .intro { grid-template-columns: 1fr; }
  .deck { margin: 0 -4px; }
}

/* ---------- the work, by Martin's stages ---------- */
.work { padding-top: 28px; }
.stage { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px clamp(28px, 4vw, 56px); padding: 36px 0; border-bottom: 1px solid var(--line); }
.stage:last-of-type { border-bottom: 0; padding-bottom: 0; }
.st-h { align-self: start; position: sticky; top: 24px; }
.meter { display: flex; gap: 4px; }
.meter i { width: 22px; height: 4px; border-radius: 2px; background: var(--line); position: relative; overflow: hidden; }
.meter i::after { content: ""; position: absolute; inset: 0; background: var(--text); transform: scaleX(0); transform-origin: 0 50%; }
#made .meter i:nth-child(-n+1)::after, #released .meter i:nth-child(-n+2)::after,
#touched .meter i:nth-child(-n+3)::after { transform: scaleX(1); }
.st-h h3 { margin: 14px 0 0; font: 400 34px/1.05 var(--serif); letter-spacing: -.02em; }
.st-h p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.4; color: var(--text-2); max-width: 24ch; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
.shot { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #fff; text-decoration: none;
  box-shadow: 0 0 0 1px rgba(27,27,26,.08), 0 10px 26px -14px rgba(60,50,30,.3); transition: transform .5s var(--out), box-shadow .5s var(--out); }
.shot img, .shot video { position: absolute; inset: 0; width: 100%; height: 100%; transform: translateY(var(--sy, 0)) scale(var(--ss, 1)); object-fit: cover; object-position: top; transition: transform .8s var(--out), opacity .4s; }
.shot video { opacity: 0; }
.shot.playing video { opacity: 1; }
a.shot:hover, .card:hover .shot { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(27,27,26,.1), 0 22px 40px -18px rgba(60,50,30,.4); }
.card:hover .shot img { --ss: 1.13; }
.shot.soon { display: grid; place-content: center; text-align: center; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.shot.soon span { font: italic 400 28px/1 var(--serif); letter-spacing: -.02em; }
.shot.soon small { margin-top: 8px; font-size: 12px; color: var(--text-2); }
.card h4 { margin: 16px 0 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.card p { margin: 3px 0 0; font-size: 14.5px; line-height: 1.45; color: var(--text-2); }
.go { display: inline-block; margin-top: 8px; font-size: 14px; color: var(--accent); text-decoration: none; }
a.go:hover { text-decoration: underline; }
.go.off { color: var(--text-2); }

@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .stage { grid-template-columns: 1fr; padding: 32px 0; }
  .st-h { position: static; }
  .st-h p { max-width: none; }
}
@media (max-width: 480px) { .cards { grid-template-columns: 1fr; } }

/* ---------- values: a picker wheel turned by scrolling (js/site.js) ---------- */
.values { margin-top: clamp(56px, 10vh, 96px); padding-top: 28px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wheel-wrap { height: 300vh; }
.wheel-stick { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); align-items: center; gap: 40px; }
.wheel { position: relative; height: 70vh; perspective: 900px; overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); }
.wheel span { position: absolute; left: 0; top: 50%; white-space: nowrap; transform-origin: 0 50%; transform: translateY(-50%);
  font: 400 clamp(1.6rem, 3.9vw, 3.5rem)/1 var(--serif); letter-spacing: -.025em; will-change: transform, opacity; }
.wheel-side { border-left: 1px solid var(--line); padding-left: 28px; }
.wheel-n { margin: 0; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.wheel-note { margin: 10px 0 0; font-size: clamp(1.1rem, 1.8vw, 1.4rem); line-height: 1.35; }
.wheel-note.swap { animation: wswap .5s var(--out); }
@keyframes wswap { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 760px) {
  .wheel-stick { grid-template-columns: 1fr; align-content: center; gap: 24px; }
  .wheel { height: 44vh; }
  .wheel span { font-size: 1.85rem; }
  .wheel-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 16px; }
}
/* no JS: just list them */
html:not(.js) .wheel-wrap { height: auto; }
html:not(.js) .wheel-stick { position: static; height: auto; display: block; }
html:not(.js) .wheel { height: auto; display: grid; gap: 10px; }
html:not(.js) .wheel span { position: static; transform: none; }
html:not(.js) .wheel-side { display: none; }

/* ---------- people ---------- */
.people { margin-top: clamp(56px, 10vh, 96px); padding-top: 28px; }
.people ul { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px 24px; }
.people img { width: 76px; height: 76px; margin-bottom: 14px; border-radius: 50%; object-fit: cover; filter: grayscale(1); transition: filter .4s, transform .5s var(--out); }
.people li:hover img { filter: none; transform: scale(1.06); }
.people a { display: block; font-weight: 600; font-size: 16px; text-decoration: none; letter-spacing: -.01em; }
.people a:hover { color: var(--accent); }
.people span { display: block; margin-top: 2px; font-size: 14px; line-height: 1.35; color: var(--text-2); }
@media (max-width: 900px) { .people ul { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .people ul { grid-template-columns: 1fr 1fr; gap: 24px 20px; } }

/* ---------- foot ---------- */
.foot { position: relative; margin-top: clamp(64px, 12vh, 120px); padding: 36px 0 40px; }
.foot p { margin: 0; }
.foot-big { font: 400 clamp(1.9rem, 3.6vw, 2.8rem)/1.1 var(--serif); letter-spacing: -.02em; }
.foot a { display: inline-block; margin-top: 8px; font-size: 17px; color: var(--accent); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.legal { margin-top: 36px !important; font-size: 13.5px; color: var(--text-2); }

/* ---------- motion ---------- */
html.motion .ln > span { animation: rise 1s var(--out) both; }
html.motion .ln + .ln > span { animation-delay: .1s; }
@keyframes rise { from { transform: translateY(105%); } }
html.motion .lede, html.motion .tally { animation: fade .9s var(--out) both; }
html.motion .lede { animation-delay: .3s; }
html.motion .tally { animation-delay: .42s; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } }

html.motion .rv { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--out), transform .9s var(--out); transition-delay: var(--d, 0s); }
html.motion .rv.in { opacity: 1; transform: none; }
html.motion .meter i::after { transition: transform .6s var(--ease); }
html.motion .st-h:not(.in) .meter i::after { transform: scaleX(0); }
html.motion .st-h.in .meter i:nth-child(2)::after { transition-delay: .15s; }
html.motion .st-h.in .meter i:nth-child(3)::after { transition-delay: .3s; }
html.motion .st-h.in .meter i:nth-child(4)::after { transition-delay: .45s; }

/* section rules: drawn lines that grow in from the left */
.ruled, .ruled-soft { position: relative; }
.ruled::before, .ruled-soft::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--text); transform-origin: 0 50%; }
.ruled-soft::before { background: var(--line); }

/* ---------- scroll motion (only with html.motion; js/site.js sets --p, -1…1 as an element crosses the screen) ---------- */
html.motion .ruled::before, html.motion .ruled-soft::before { transform: scaleX(0); transition: transform 1.2s var(--ease); }
html.motion .ruled.in::before, html.motion .ruled-soft.in::before { transform: none; }
html.motion .ruled .label { opacity: 0; transform: translateY(8px); transition: opacity .8s .3s var(--out), transform .8s .3s var(--out); }
html.motion .ruled.in .label { opacity: 1; transform: none; }

/* the deck drifts up and settles as you leave the intro */
html.motion .deck { transform: translateY(calc(var(--p, 0) * -48px)) rotate(calc(var(--p, 0) * -1.2deg)); will-change: transform; }

/* screenshots wipe up into their frames, then float a little inside them */
html.motion .shot img, html.motion .shot video { --ss: 1.1; --sy: calc(var(--p, 0) * 4%); }
html.motion .card.rv .shot { opacity: 0; transform: scale(.95); filter: blur(10px);
  transition: opacity .9s var(--out) var(--d, 0s), transform 1.2s var(--out) var(--d, 0s), filter 1s var(--out) var(--d, 0s), box-shadow .5s var(--out); }
html.motion .card.rv.in .shot { opacity: 1; transform: none; filter: none; }
html.motion .card.rv.in:hover .shot { transform: translateY(-4px); transition-delay: 0s; }
html.motion .card.rv:not(.in) .shot img { --ss: 1.28; }
html.motion .card.rv .shot img { transition: transform 1.6s var(--out), opacity .4s; }
html.motion .st-h h3 { transform: translateX(calc(var(--p, 0) * -14px)); }

/* people: photos come up and turn as they land */
html.motion .people li.rv img { transform: translateY(16px) scale(.85); transition: transform 1s var(--out) var(--d, 0s), filter .4s; }
html.motion .people li.rv.in img { transform: none; }
html.motion .people li.rv.in:hover img { transform: scale(1.06); }

/* footer: the question rises in */
html.motion .foot:not(.in) .ln > span { transform: translateY(105%); }
html.motion .foot .ln > span { transition: transform 1s var(--out); }
html.motion .foot .ln + .ln > span { transition-delay: .1s; }
