/* PileUp Digital v2: white, one font, big type */

:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #4a4a4a;
  --ink-3: #8a8a8a;
  --line: #e6e6e6;
  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(20px, 5vw, 72px);
  --max: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(16px, 1.1vw, 19px);
  line-height: 1.5;
  font-variation-settings: "opsz" 14, "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
img, canvas { max-width: 100%; display: block; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 8px 12px;
}
.skip:focus { left: 12px; top: 12px; z-index: 100; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.wordmark {
  font-weight: 800;
  font-variation-settings: "opsz" 96, "wdth" 110, "wght" 800;
  letter-spacing: -0.02em;
  font-size: 22px;
}
.wordmark:hover { text-decoration: none; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.wordmark .logo { width: 34px; height: auto; }
.hero-logo { width: clamp(64px, 7vw, 110px); height: auto; margin: 0 0 clamp(20px, 3vw, 40px); }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.footer-brand img { width: 22px; height: auto; opacity: 0.8; }
.nav-right { display: flex; gap: 28px; align-items: center; font-weight: 500; }
.nav-right a { font-size: 15px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 15px; line-height: 1;
  border: 1.5px solid var(--ink);
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }

/* Hero */
.hero {
  min-height: calc(100svh - 64px);
  display: grid;
  align-content: center;
  padding: 8vh var(--pad) 10vh;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  position: relative;
  isolation: isolate;
}
.hero > *:not(.hero-marquee) { position: relative; z-index: 1; }

/* Hero marquee: what we actually shipped, drifting behind the type */
.hero-marquee {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  /* clear the left side so the headline stays the loudest thing on the page */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 34%, rgba(0,0,0,0.10) 48%, rgba(0,0,0,0.45) 64%, #000 86%);
  mask-image: linear-gradient(to right, transparent 0%, transparent 34%, rgba(0,0,0,0.10) 48%, rgba(0,0,0,0.45) 64%, #000 86%);
}
.hero-marquee-inner {
  position: absolute;
  top: 50%; left: 0;
  width: 100%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.6vw, 26px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%);
}
.hero-row { display: flex; }
.hero-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: heroDrift var(--dur, 78s) linear infinite;
}
.hero-row.to-right .hero-track { --dur: 96s; animation-direction: reverse; }
.hero-tile {
  flex: 0 0 auto;
  width: clamp(260px, 24vw, 440px);
  margin-right: clamp(14px, 1.6vw, 26px);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(10, 10, 10, 0.08);
  box-shadow: 0 26px 55px -32px rgba(10, 10, 10, 0.5);
}
.hero-tile img,
.hero-tile video { width: 100%; height: auto; display: block; }
@keyframes heroDrift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
/* Phone: behind the type it is just a smear, so the rows drop below the buttons
   and run edge to edge instead */
@media (max-width: 900px) {
  .hero-marquee {
    position: static;
    order: 5;
    width: 100vw;
    margin: clamp(30px, 7vw, 48px) 0 0 calc(50% - 50vw);
    transform: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 8%, #000 92%, transparent 100%);
  }
  .hero-marquee-inner {
    position: static;
    transform: none;
    gap: 10px;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .hero-tile {
    width: clamp(158px, 44vw, 232px);
    margin-right: 10px;
    border-radius: 10px;
    box-shadow: 0 10px 24px -16px rgba(10, 10, 10, 0.5);
  }
  .scroll-hint { order: 6; margin-top: clamp(20px, 2.6vh, 34px); }
  /* the rows need the room, so the hero breathes a little less on a phone */
  .hero { padding-top: 4vh; padding-bottom: 5vh; }
  .hero-logo { margin-bottom: clamp(14px, 2.4vw, 24px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-track { animation: none; }
}
.eyebrow {
  font-weight: 600;
  font-size: clamp(14px, 1.2vw, 18px);
  letter-spacing: 0.02em;
  color: var(--ink-3);
  margin: 0 0 clamp(16px, 2vw, 28px);
}
h1 {
  margin: 0;
  font-weight: 800;
  font-variation-settings: "opsz" 96, "wdth" 112, "wght" 800;
  font-size: clamp(52px, 10.5vw, 176px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 12ch;
}
h1 em { font-style: normal; font-variation-settings: "opsz" 96, "wdth" 125, "wght" 800; }
.hero-sub {
  margin: clamp(24px, 3vw, 44px) 0 0;
  max-width: 44ch;
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.4;
  color: var(--ink-2);
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: clamp(28px, 3vw, 44px); }
.scroll-hint {
  margin-top: clamp(40px, 8vh, 96px);
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 14px; font-weight: 500; color: var(--ink-3);
}
.scroll-hint svg { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* Vertical sections */
.vertical {
  border-top: 1.5px solid var(--ink);
  padding: clamp(48px, 7vw, 120px) var(--pad);
}
.vertical-inner { max-width: var(--max); margin: 0 auto; }
.vertical-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 3vw, 48px);
  align-items: end;
}
@media (min-width: 900px) {
  .vertical-head { grid-template-columns: 1.4fr 1fr; }
}
.vertical-num { font-size: 14px; font-weight: 600; color: var(--ink-3); margin: 0 0 12px; }
h2 {
  margin: 0;
  font-weight: 800;
  font-variation-settings: "opsz" 96, "wdth" 112, "wght" 800;
  font-size: clamp(44px, 7.5vw, 124px);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.vertical-copy { font-size: clamp(17px, 1.35vw, 22px); color: var(--ink-2); max-width: 40ch; margin: 0; }
.vertical-copy strong { color: var(--ink); font-weight: 600; }
.vertical-tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none;
}
.vertical-tags li {
  font-size: 14px; font-weight: 500; padding: 8px 14px;
  border: 1.5px solid var(--line); border-radius: 999px;
}

/* Scenes */
.stage {
  margin-top: clamp(32px, 4vw, 64px);
  display: grid;
  gap: clamp(12px, 2vw, 24px);
}
.stage.three { grid-template-columns: 1fr; }
@media (min-width: 720px) { .stage.three { grid-template-columns: repeat(3, 1fr); } }
.stage.one { grid-template-columns: 1fr; }
.stage.two { grid-template-columns: 1fr; }
@media (min-width: 720px) { .stage.two { grid-template-columns: 1fr 1fr; } }
.tile {
  position: relative; border-radius: 24px; overflow: hidden; background: #111;
  aspect-ratio: 4 / 5;
}
@media (min-width: 720px) { .stage.one .tile { aspect-ratio: 21 / 9; } .stage.two .tile, .stage.two .scene { aspect-ratio: 4 / 3; } }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene-label.light { color: rgba(255,255,255,0.7); }
.scene-label.light b { color: #fff; }
.scene {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #fafafa;
  border-radius: 24px;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
}
.scene:active { cursor: grabbing; }
.stage.one .scene { aspect-ratio: 16 / 9; }
@media (max-width: 719px) { .stage.one .scene { aspect-ratio: 4 / 5; } }
.scene canvas { width: 100%; height: 100%; }
.scene-label {
  position: absolute; left: 18px; bottom: 16px;
  font-size: 13px; font-weight: 600; color: var(--ink-3);
  pointer-events: none;
}
.scene-label b { color: var(--ink); font-weight: 600; }
.scene-badge {
  position: absolute; right: 14px; top: 14px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px;
  background: #fff; color: var(--ink-3); border: 1px solid var(--line);
  pointer-events: none;
}

/* Proof */
.proof { border-top: 1.5px solid var(--ink); padding: clamp(48px, 7vw, 120px) var(--pad); }
.proof-inner { max-width: var(--max); margin: 0 auto; }
.proof-list { list-style: none; margin: clamp(24px, 3vw, 48px) 0 0; padding: 0; }
.proof-list li {
  display: grid; grid-template-columns: 1fr; gap: 6px 32px;
  padding: 22px 0; border-top: 1px solid var(--line);
}
.proof-list li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .proof-list li { grid-template-columns: 1fr 2fr auto; align-items: baseline; } }
.proof-name { font-size: clamp(22px, 2.4vw, 34px); font-weight: 700; letter-spacing: -0.02em; }
.proof-what { color: var(--ink-2); }
.proof-link { font-weight: 600; font-size: 15px; white-space: nowrap; }

/* Contact */
.contact { border-top: 1.5px solid var(--ink); padding: clamp(48px, 7vw, 120px) var(--pad); }
.contact-inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; gap: clamp(28px, 4vw, 64px);
}
@media (min-width: 900px) { .contact-inner { grid-template-columns: 1.2fr 1fr; } }
.contact-email { font-size: clamp(18px, 1.6vw, 24px); font-weight: 600; margin-top: 20px; display: inline-block; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field textarea {
  font: inherit; color: var(--ink);
  padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field textarea { resize: vertical; min-height: 140px; }
.form-status { min-height: 1.4em; font-size: 15px; margin: 0; }
.form-status.ok { color: #0a7a3c; }
.form-status.err { color: #b3261e; }

/* Footer */
footer { padding: 32px var(--pad) 48px; border-top: 1px solid var(--line); }
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between;
  font-size: 14px; color: var(--ink-3);
}
.footer-inner a { color: var(--ink-2); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint svg { animation: none; }
  .scene { cursor: default; }
}

/* Small screens */
.wordmark { white-space: nowrap; }
@media (max-width: 640px) {
  .nav-right a:not(.btn) { display: none; }
  .nav-right { gap: 12px; }
}

/* Inner pages */
.page-hero {
  max-width: var(--max); margin: 0 auto; width: 100%;
  padding: clamp(40px, 8vh, 120px) var(--pad) clamp(32px, 5vw, 72px);
}
.page-h1 {
  margin: 0; font-weight: 800;
  font-variation-settings: "opsz" 96, "wdth" 112, "wght" 800;
  font-size: clamp(44px, 8vw, 132px); line-height: 0.95; letter-spacing: -0.035em;
  max-width: 14ch; text-wrap: balance;
}
.block { padding: clamp(32px, 5vw, 80px) var(--pad); }
.block > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.block.bordered { border-top: 1.5px solid var(--ink); padding-top: clamp(48px, 7vw, 120px); padding-bottom: clamp(48px, 7vw, 120px); }
.split { display: grid; gap: clamp(20px, 3vw, 48px); align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.2fr; } }
.cards { display: grid; gap: clamp(12px, 2vw, 24px); grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  border: 1.5px solid var(--line); border-radius: 24px; padding: clamp(20px, 2.4vw, 32px);
  display: flex; flex-direction: column; gap: 12px;
}
.card h3 { margin: 0; font-size: clamp(22px, 2vw, 28px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.card p { margin: 0; color: var(--ink-2); flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.tags li { font-size: 13px; font-weight: 500; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 999px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; padding: 20px 0 20px 56px; position: relative; border-top: 1px solid var(--line); color: var(--ink-2); font-size: clamp(16px, 1.2vw, 19px); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: "0" counter(s); position: absolute; left: 0; top: 22px; font-weight: 700; color: var(--ink-3); font-size: 14px; }
.steps li b { display: block; color: var(--ink); font-size: clamp(20px, 1.6vw, 24px); margin-bottom: 4px; }
.work-list { list-style: none; margin: 0; padding: 0; }
.work-list { margin: 0 auto; }
.work-list > li { padding: clamp(28px, 3vw, 44px) 0; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.work-list > li:last-child { border-bottom: 1px solid var(--line); }
.work-head { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between; }
.work-head h3 { margin: 0; font-size: clamp(28px, 3.4vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.work-list p { margin: 0; color: var(--ink-2); max-width: 70ch; font-size: clamp(16px, 1.25vw, 20px); }
.demo-list { list-style: none; margin: 0; padding: 0; }
.demo-list li { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); }
.demo-list li:last-child { border-bottom: 1px solid var(--line); }
.demo-list a { font-weight: 700; font-size: 18px; }
.demo-list span { color: var(--ink-3); font-size: 15px; }
.prose p { margin: 0 0 1em; font-size: clamp(17px, 1.35vw, 22px); color: var(--ink-2); max-width: 55ch; }
.prose a { text-decoration: underline; text-underline-offset: 0.18em; color: var(--ink); }
.stack { list-style: none; margin: 0; padding: 0; }
.stack li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.stack li:last-child { border-bottom: 1px solid var(--line); }
.stack b { font-weight: 600; }
.stack span { color: var(--ink-3); font-size: 15px; }
.cta { text-align: left; }
.cta .hero-actions { margin-top: 24px; }
.channels { list-style: none; margin: 0; padding: 0; }
.channels li { display: grid; grid-template-columns: 90px 1fr; gap: 16px; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--line); }
.channels li:last-child { border-bottom: 1px solid var(--line); }
.channels span { color: var(--ink-3); font-size: 14px; font-weight: 600; }
.channels a, .linkish { font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.linkish:hover { text-decoration: underline; text-underline-offset: 0.18em; }
.nav-right a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.footer-nav a { color: var(--ink-2); }

/* FAQ */
.faq h3 {
  margin: 0; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: clamp(19px, 1.7vw, 24px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.25;
}
.faq p { margin: 8px 0 22px; color: var(--ink-2); max-width: 62ch; font-size: clamp(16px, 1.2vw, 19px); }
.faq p:last-child { margin-bottom: 0; padding-bottom: 22px; border-bottom: 1px solid var(--line); }

/* Animated pile mark: sheets land bottom first, the folded page drops last.
   Inlined rather than <img> because Chrome will not run CSS animations inside an
   img-loaded SVG. overflow:visible lets the drop start above the box without clipping. */
.pile { overflow: visible; }
.pile .sheet, .pile .top {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  opacity: 0;
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(.22, .9, .3, 1.12);
}
.pile .sheet { animation-name: land; animation-duration: .42s; }
.pile .s3 { animation-delay: .05s; }
.pile .s2 { animation-delay: .19s; }
.pile .s1 { animation-delay: .33s; }
.pile .top {
  animation-name: drop; animation-duration: .6s; animation-delay: .58s;
  transform-origin: 10% 100%;
}
@keyframes land {
  from { opacity: 0; transform: translateY(-34px); }
  60%  { opacity: 1; }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes drop {
  0%   { opacity: 0; transform: translateY(-70px) rotate(-6deg); }
  55%  { opacity: 1; transform: translateY(4px) rotate(.8deg); }
  78%  { transform: translateY(-2px) rotate(-.3deg); }
  100% { opacity: 1; transform: translateY(0) rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
  .pile .sheet, .pile .top { animation: none; opacity: 1; }
}
