:root {
  --bg: #12100d;
  --bg-2: #1a1713;
  --surface: #221e19;
  --text: #f2ece2;
  --text-80: rgba(242, 236, 226, .8);
  --text-65: rgba(242, 236, 226, .66);
  --line: rgba(242, 236, 226, .12);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Geist', system-ui, sans-serif;
  --pad: clamp(16px, 4.5vw, 64px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; background: var(--bg); }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
}
/* film grain over everything, very faint */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 200; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-head {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 16px var(--pad);
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.logo-mark { position: relative; flex: none; width: 52px; height: 52px; margin: -4px -6px -4px -4px; }
.logo-mark img { display: block; width: 100%; height: 100%; transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), filter .5s ease; }
/* hover: copied from neatautomate.com (.brand:hover .neat-mark) */
.logo:hover .logo-mark img { animation: neat-spin 1.1s cubic-bezier(.34, 1.56, .64, 1); filter: drop-shadow(0 0 10px rgba(255, 120, 20, .7)); }
@keyframes neat-spin { 0% { transform: rotate(0) scale(1); } 55% { transform: rotate(200deg) scale(1.18); } 100% { transform: rotate(360deg) scale(1); } }
/* our beret, worn on the NEAT cube */
.logo-mark .beret { position: absolute; left: 14%; top: -4%; width: 70%; height: auto; overflow: visible; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .45)); }
/* the beret hops off while the cube spins, then lands back */
.logo:hover .logo-mark .beret { animation: beret-hop 1.1s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes beret-hop { 0% { transform: none; } 45% { transform: translateY(-55%) rotate(-14deg); } 100% { transform: none; } }
.logo-word { font-size: 22px; line-height: 1; white-space: nowrap; }
.logo-word b {
  font-weight: 600; letter-spacing: .14em;
  background: linear-gradient(180deg, #ffffff 0%, #d9d4cc 45%, #8f8a83 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-word i { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--text-80); margin-left: 2px; }
.site-nav { display: flex; align-items: center; gap: 32px; font-size: 15px; font-weight: 500; }
.site-nav a { text-decoration: none; color: var(--text-80); transition: color .15s; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
.site-nav .nav-cta { color: var(--bg); background: var(--text); padding: 8px 18px; border-radius: 999px; transition: transform .15s var(--ease); }
.site-nav .nav-cta:hover { color: var(--bg); transform: translateY(-1px); }
.site-nav .nav-cta[aria-current="page"] { color: var(--bg); text-decoration: none; }

/* ---------- type ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--text-65);
}
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; line-height: 1.04; }
h1 { font-size: clamp(40px, 5.4vw, 76px); }
h1 em, h2 em { font-style: italic; color: var(--text-65); }
h2 { font-size: clamp(32px, 3.6vw, 48px); }
.lede { font-size: clamp(17px, 1.4vw, 20px); color: var(--text-80); max-width: 34ch; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--text)); flex: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); }

.btn {
  display: inline-flex; align-items: center; gap: 12px; justify-self: start;
  padding: 16px 28px; border-radius: 999px;
  background: var(--btn, var(--text)); color: var(--btn-on, var(--bg));
  font: 600 16px/1 var(--sans); text-decoration: none;
  box-shadow: 0 10px 30px -10px var(--btn-glow, rgba(242, 236, 226, .35));
  transition: transform .14s var(--ease), box-shadow .14s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px var(--btn-glow, rgba(242, 236, 226, .45)); }
.btn:active { transform: translateY(1px); }

/* ---------- hero / 3D stage ---------- */
.hero {
  position: relative;
  min-height: clamp(620px, calc(100vh - 88px), 980px);
  display: flex; align-items: center;
  padding: 0 var(--pad) 96px;
  background: radial-gradient(ellipse 60% 70% at 66% 46%, #3b2e22 0%, #221b15 42%, var(--bg) 78%);
}
.hero-text { position: relative; z-index: 2; display: grid; gap: 24px; max-width: 460px; pointer-events: none; }
.hero-text a, .hero-text button { pointer-events: auto; }
.hint { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--text-65); }

.hero-text { transition: opacity .25s var(--ease), transform .25s var(--ease); }
.hero.is-previewing .hero-text { opacity: 0; transform: translateX(-12px); }

/* hovering a paint: what that work looks like once opened */
.preview {
  position: absolute; z-index: 2; left: var(--pad); top: calc(50% - 48px); width: min(38vw, 540px);
  transform: translateY(-50%); opacity: 0; pointer-events: none; perspective: 1400px;
  transition: opacity .25s var(--ease);
}
.hero.is-previewing .preview { opacity: 1; }
.caption { transition: opacity .25s var(--ease); }
.hero.is-previewing .caption { opacity: 0; }
.pv-window {
  border-radius: 12px; overflow: hidden; background: #0c0a08; transform-origin: left center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 80px -30px rgba(0, 0, 0, .85), 0 30px 110px -40px var(--c, transparent);
  transform: rotateY(12deg) rotateX(3deg) scale(.94); transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.hero.is-previewing .pv-window { transform: rotateY(8deg) rotateX(2deg) scale(1); }
.pv-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: #1d1915; font-size: 12px; color: var(--text-65); }
.pv-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.pv-url { margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-window img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.pv-meta { display: flex; gap: 12px; align-items: baseline; margin-top: 24px; }
.pv-meta b { display: block; font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.2; }
.pv-meta span:not(.sw) { display: block; color: var(--text-80); font-size: 16px; margin-top: 4px; }
.pv-cta { margin-top: 12px; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--text-65); }

.stage { position: absolute; inset: 0; z-index: 1; outline: none; }
.stage canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .8s var(--ease); touch-action: pan-y; }
.stage.is-ready canvas { opacity: 1; }
@media (pointer: fine) { .stage.is-holding canvas { cursor: none; } }
.stage .still { display: none; position: absolute; right: 4%; top: 50%; width: min(58%, 820px); transform: translateY(-50%); }
.stage.is-fallback .still { display: block; }
.stage.is-fallback canvas { display: none; }
.stage:focus-visible { outline: 2px solid var(--text-65); outline-offset: -12px; border-radius: 16px; }

.caption {
  position: absolute; z-index: 2; left: 50%; right: var(--pad); bottom: 40px;
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  min-height: 2em; font-size: 15px; color: var(--text-65); text-align: center; pointer-events: none;
}
.caption b { font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--text); }

/* page wipe layer */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
.wipe { position: absolute; border-radius: 50%; transform: translate(-50%, -50%) scale(0); }
.cover { position: fixed; inset: 0; z-index: 100; pointer-events: none; }

/* ---------- sections ---------- */
.section { padding: 96px var(--pad); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head p { color: var(--text-65); max-width: 40ch; }

.for-strip {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 24px 0; overflow: hidden; white-space: nowrap;
  font-family: var(--serif); font-style: italic; font-size: clamp(24px, 3vw, 40px); color: var(--text-80);
}
.for-track { display: inline-flex; gap: 48px; animation: slide 46s linear infinite; padding-left: 48px; }
.for-track span::after { content: "✦"; font-style: normal; font-size: .45em; margin-left: 48px; vertical-align: middle; color: var(--text-65); }
@keyframes slide { to { transform: translateX(-50%); } }

.works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 48px 32px; list-style: none; }
.card { display: grid; gap: 16px; text-decoration: none; }
.card-img {
  position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -24px rgba(0, 0, 0, .8);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card-img::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: var(--c); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-img { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(242, 236, 226, .2), 0 32px 60px -24px var(--glow, rgba(0, 0, 0, .9)); }
.card:hover .card-img::after { transform: scaleX(1); }
.card:hover .card-img img { transform: scale(1.03); }
.card-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; }
.card-meta .sw { grid-row: span 2; align-self: start; margin-top: 10px; }
.card-meta h3 { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.2; letter-spacing: -.01em; }
.card-meta p { color: var(--text-65); font-size: 15px; }

.stack { display: grid; gap: 24px; max-width: 520px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split .text { display: grid; gap: 24px; max-width: 520px; }
.split .art { justify-self: center; width: 100%; max-width: 640px; filter: drop-shadow(0 40px 50px rgba(0, 0, 0, .55)); }

/* ---------- work page ---------- */
.work-hero {
  display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.4fr);
  gap: 48px 64px; align-items: center; padding: 32px var(--pad) 96px;
}
.work-text { display: grid; gap: 24px; }
.meta { display: grid; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; }
.meta div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; }
.meta dt { color: var(--text-65); }
.canvas { position: relative; margin: 0; }
.canvas::before {
  content: ""; position: absolute; inset: -10% -6%; z-index: 0; border-radius: 50%;
  background: radial-gradient(closest-side, var(--c), transparent); opacity: .38; filter: blur(30px);
}
.canvas .shot {
  position: relative; z-index: 1; border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(242, 236, 226, .14), 0 40px 80px -30px rgba(0, 0, 0, .9);
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  transition: transform .6s var(--ease);
}
.canvas .shot { display: block; cursor: pointer; }
.canvas:hover .shot, .canvas .shot:focus-visible { transform: perspective(1400px) rotateY(-2deg) rotateX(1deg); }
.canvas .shot img { display: block; width: 100%; height: auto; transition: filter .3s var(--ease); }
.canvas .shot:hover img { filter: brightness(.82); }
/* the screenshot is a link to the live site: say so on hover */
.shot-go {
  position: absolute; right: 16px; bottom: 16px; padding: 8px 16px; border-radius: 999px;
  background: var(--btn, var(--text)); color: var(--btn-on, var(--bg)); font-size: 15px; font-weight: 500;
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .7);
  opacity: 0; transform: translateY(6px); transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.canvas .shot:hover .shot-go, .canvas .shot:focus-visible .shot-go { opacity: 1; transform: none; }
@media (hover: none) { .shot-go { opacity: 1; transform: none; } }
.canvas figcaption { position: relative; z-index: 1; margin-top: 24px; font-family: var(--serif); font-style: italic; color: var(--text-65); text-align: right; }

.notes { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.4fr); gap: 32px 64px; }
.notes ol { list-style: none; counter-reset: n; display: grid; }
.notes li { counter-increment: n; display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); font-size: 19px; }
.notes li:last-child { border-bottom: 1px solid var(--line); }
.notes li::before { content: counter(n, decimal-leading-zero); font-family: var(--serif); font-style: italic; color: var(--text-65); }

.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; padding: 48px var(--pad) 96px; }
.pager a { text-decoration: none; display: flex; align-items: center; gap: 16px; }
.pager .next { justify-content: end; text-align: right; }
.pager small { display: block; font-size: 13px; color: var(--text-65); letter-spacing: .08em; text-transform: uppercase; }
.pager strong { font-family: var(--serif); font-weight: 600; font-size: 22px; }
.pager .all { font-size: 15px; font-weight: 500; color: var(--text-80); }
.pager .dot {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), transparent 40%), var(--c);
  box-shadow: inset 0 -6px 10px rgba(0, 0, 0, .35), 0 8px 18px -6px var(--c);
  transition: transform .2s var(--ease);
}
.pager a:hover .dot { transform: scale(1.12); }

/* ---------- about / contact ---------- */
.page-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px 64px; align-items: center; padding: 48px var(--pad) 96px; }
.page-hero .text { display: grid; gap: 24px; }
.prose { display: grid; gap: 16px; max-width: 580px; color: var(--text-80); }
.prose strong { color: var(--text); font-weight: 600; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.col { border-top: 1px solid var(--line); padding-top: 24px; display: grid; gap: 12px; align-content: start; }
.col h3 { font-family: var(--serif); font-weight: 600; font-size: 24px; }
.col p { color: var(--text-80); }

.contact-list { display: grid; max-width: 640px; }
.contact-row {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; align-items: center;
  padding: 24px 0; border-top: 1px solid var(--line); text-decoration: none;
}
.contact-row:last-child { border-bottom: 1px solid var(--line); }
.contact-row span { color: var(--text-65); font-size: 15px; }
.contact-row strong { font-family: var(--serif); font-weight: 400; font-size: clamp(20px, 2.4vw, 28px); }
.contact-row .arrow { font-size: 24px; transition: transform .2s var(--ease); }
a.contact-row:hover .arrow { transform: translate(4px, -4px); }

/* ---------- footer ---------- */
.site-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 32px var(--pad); border-top: 1px solid var(--line); font-size: 14px; color: var(--text-65);
}
.site-foot nav { display: flex; gap: 24px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--text); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero { display: block; min-height: 0; padding: 8px var(--pad) 24px; background: radial-gradient(ellipse 90% 50% at 50% 70%, #3b2e22 0%, #221b15 45%, var(--bg) 80%); }
  .hero-text { max-width: none; }
  .stage { position: relative; inset: auto; aspect-ratio: 1 / 0.92; margin: 8px calc(-1 * var(--pad)) 0; }
  .stage .still { position: static; width: 100%; transform: none; }
  .preview { display: none; }
  .hero.is-previewing .hero-text, .hero.is-previewing .caption { opacity: 1; transform: none; }
  .caption { position: static; margin-top: 4px; }
  .work-hero, .notes, .page-hero, .split { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr; }
  .section { padding: 64px var(--pad); }
  .canvas .shot { transform: none; }
}
@media (max-width: 640px) {
  .logo-mark { width: 42px; height: 42px; }
  .logo-word { font-size: 17px; }
  .site-nav { gap: 16px; font-size: 14px; }
  .site-nav .nav-cta { padding: 8px 14px; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager .all { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .pager strong { font-size: 18px; }
  .contact-row { grid-template-columns: 1fr auto; }
  .contact-row span { grid-column: 1 / -1; }
  .meta div { grid-template-columns: 88px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
