/* Home page: one object at a time in the dark, driven by the scroll. */

.h3, .h3 *, .h3 *::before, .h3 *::after { box-sizing: border-box; }

.h3 {
  --void: #050506;
  --void-2: #0b0b0e;
  --ink: #f6f7fa;
  --dim: rgba(232, 236, 245, .52);
  --line: rgba(255, 255, 255, .1);
  --hot: #ffd6a0;
  position: relative;
  background: var(--void);
  color: var(--ink);
  overflow: clip;
}

.h3::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(60% 45% at 50% 8%, rgba(255, 214, 160, .07), transparent 70%),
    radial-gradient(70% 50% at 50% 100%, rgba(120, 150, 255, .05), transparent 72%),
    var(--void);
  pointer-events: none;
}

/* ---------- type ---------- */

.h3-kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 18px;
}

.h3-display {
  font-size: clamp(40px, 6.6vw, 92px);
  line-height: .92;
  letter-spacing: -.045em;
  font-weight: 800;
  margin: 0 0 22px;
}

.h3-display em {
  font-style: normal;
  background: linear-gradient(180deg, #ffffff, #8e94a3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.h3-lede {
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.5;
  color: var(--dim);
  max-width: 34ch;
  margin: 0 auto 28px;
}

.h3-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.h3-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  color: #06070a;
  background: #f6f7fa;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.h3-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(255, 255, 255, .16); }

.h3-btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(255, 255, 255, .26);
}

.h3-btn.ghost:hover { background: rgba(255, 255, 255, .08); box-shadow: none; }

/* ---------- cubes ---------- */

.h3-cube {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}

.h3-cube i {
  position: absolute;
  inset: 0;
  display: block;
  background-size: 100% 100%;
  image-rendering: pixelated;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35);
}

.h3-cube i.up { filter: brightness(1.34) contrast(1.02); }
.h3-cube i.dn { filter: brightness(.38); }
.h3-cube i.lf { filter: brightness(.7); }
.h3-cube i.rt { filter: brightness(.86); }
.h3-cube i.bk { filter: brightness(.58); }

/* the light that sits behind whatever is on screen */
.h3-bloom {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 620px;
  height: 620px;
  margin: -310px 0 0 -310px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 160, .13), rgba(255, 214, 160, .04) 42%, transparent 68%);
  pointer-events: none;
}

/* ---------- hero ---------- */

.h3-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 10px;
  padding: 100px 24px 56px;
  perspective: 1600px;
}

.h3-hero-inner { position: relative; z-index: 2; }

.h3-hero-stage {
  position: relative;
  width: 100%;
  min-height: 27vh;
  display: grid;
  place-items: center;
  perspective: 1400px;
  z-index: 1;
}

.h3-hero-stage .h3-cube { pointer-events: auto; cursor: grab; }
.h3-hero-stage .h3-cube:active { cursor: grabbing; }

.h3-chips {
  display: flex;
  gap: 26px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
  color: var(--dim);
  font-size: 13px;
}

.h3-chips > div > b { display: block; color: var(--ink); font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 2px; }

.h3-scroll {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(232, 236, 245, .3);
}

/* ---------- a product beat ---------- */

.h3-beat { position: relative; height: 260vh; }

.h3-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  overflow: hidden;
}

.h3-copy { position: relative; z-index: 3; }

.h3-copy h2 {
  font-size: clamp(34px, 4.6vw, 62px);
  line-height: 1;
  letter-spacing: -.04em;
  margin: 0 0 16px;
  font-weight: 800;
}

.h3-copy p {
  font-size: clamp(15px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--dim);
  max-width: 34ch;
  margin: 0 0 26px;
}

.h3-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 26px;
}

.h3-price b { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.h3-price span { font-size: 13px; color: var(--dim); }

/* each line arrives on its own, but only once the page is actually animating */
.h3-fade { opacity: 1; }
body.h3-anim .h3-fade { opacity: 0; transform: translateY(26px); }

.h3-scene {
  position: relative;
  height: 100%;
  display: grid;
  place-items: center;
  perspective: 1500px;
  transform-style: preserve-3d;
}

.h3-scene .h3-cube { cursor: grab; }
.h3-scene .h3-cube:active { cursor: grabbing; }

/* what is revealed when the block comes apart */
.h3-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 400px;
  max-width: 74vw;
  transform: translate(-50%, -50%) scale(.6);
  opacity: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08);
  pointer-events: none;
}

.h3-core img { display: block; width: 100%; }
.h3-core.pixel { width: 240px; box-shadow: none; border-radius: 0; }
.h3-core.pixel img { image-rendering: pixelated; }

/* ---------- the wall of packs ---------- */

.h3-sec { padding: 130px 0 20px; }

.h3-sec h2 {
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: -.04em;
  margin: 0 0 14px;
  font-weight: 800;
}

.h3-sec .h3-sub { color: var(--dim); font-size: 17px; line-height: 1.55; max-width: 46ch; margin: 0 0 42px; }

.h3-wall {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 300px;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 24px 30px;
  max-width: 1200px;
  margin: 0 auto;
  perspective: 1400px;
  scroll-snap-type: x mandatory;
}

.h3-wall::-webkit-scrollbar { height: 5px; }
.h3-wall::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); border-radius: 3px; }

.h3-pack {
  scroll-snap-align: center;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--void-2);
  border: 1px solid var(--line);
  transform: rotateY(var(--turn, 0deg)) translateZ(var(--push, 0px));
  transition: transform .3s ease, border-color .3s ease;
}

.h3-pack {
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--turn, 0deg) + var(--ty, 0deg))) rotateX(var(--tx, 0deg)) translateZ(var(--push, 0px));
}

.h3-pack:hover { border-color: rgba(255, 255, 255, .34); }
.h3-pack b, .h3-pack span { transform: translateZ(24px); }
.h3-pack img { transform: translateZ(10px); }
.h3-pack img { display: block; width: 100%; height: 176px; object-fit: cover; }
.h3-pack div { padding: 16px 18px; }
.h3-pack b { display: block; font-size: 15px; margin-bottom: 3px; }
.h3-pack span { font-size: 13px; color: var(--dim); }

/* ---------- numbers ---------- */

.h3-numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }

.h3-num b {
  display: block;
  font-size: clamp(32px, 4.4vw, 58px);
  font-weight: 800;
  letter-spacing: -.045em;
  margin-bottom: 6px;
}

.h3-num > span { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }

.h3-feed {
  margin-top: 32px;
  border-top: 1px solid var(--line);
}

.h3-feed-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.h3-feed-row span:first-child { color: var(--dim); }

/* ---------- quotes ---------- */

.h3-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }

.h3-quote {
  padding: 26px;
  border-radius: 16px;
  background: var(--void-2);
  border: 1px solid var(--line);
}

.h3-quote p { margin: 0 0 16px; font-size: 15px; line-height: 1.6; }
.h3-quote b { font-size: 13px; color: var(--dim); }

/* ---------- closing ---------- */

.h3-close { text-align: center; padding: 140px 24px 150px; position: relative; }
.h3-close .h3-display { font-size: clamp(36px, 6vw, 84px); }
.h3-close .h3-lede { margin-left: auto; margin-right: auto; }
.h3-cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .h3-hero { padding-top: 96px; }
  .h3-hero-stage { min-height: 26vh; }
  .h3-pin { grid-template-columns: 1fr; align-content: center; gap: 10px; }
  .h3-scene { height: 46vh; order: -1; }
  .h3-copy p { max-width: none; }
  .h3-beat { height: 240vh; }
}

@media (max-width: 620px) {
  .h3-wrap, .h3-pin { padding-left: 18px; padding-right: 18px; }
  .h3-wall { padding-left: 18px; padding-right: 18px; grid-auto-columns: 260px; }
  .h3-chips { gap: 18px; }
  .h3-core { width: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  .h3-fade { opacity: 1 !important; transform: none !important; }
  .h3-beat { height: auto; }
  .h3-pin { position: static; height: auto; padding-top: 80px; padding-bottom: 80px; }
  .h3-core { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}


/* ---------- 3d through the tail of the page ---------- */

.h3-numbers { perspective: 1200px; }

.h3-num {
  position: relative;
  padding: 26px 22px 24px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  border: 1px solid var(--line);
  transform-style: preserve-3d;
  transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
  transition: transform .25s cubic-bezier(.2, .8, .3, 1), border-color .25s ease;
}

.h3-num:hover { border-color: rgba(255, 255, 255, .3); }
.h3-num b { transform: translateZ(38px); padding-right: 58px; }
.h3-num > span { transform: translateZ(20px); }

.h3-num-cube {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 46px;
  height: 46px;
  perspective: 320px;
}

.h3-quotes { perspective: 1200px; }

.h3-quote {
  transform-style: preserve-3d;
  transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
  transition: transform .25s cubic-bezier(.2, .8, .3, 1), border-color .25s ease;
}

.h3-quote:hover { border-color: rgba(255, 255, 255, .3); }
.h3-quote p { transform: translateZ(26px); }
.h3-quote b { transform: translateZ(14px); display: inline-block; }

/* the closing scene */
.h3-final {
  position: relative;
  height: 340px;
  margin: 0 auto 26px;
  perspective: 1200px;
  transform-style: preserve-3d;
}

.h3-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-style: preserve-3d;
}

.h3-arm {
  position: absolute;
  transform-style: preserve-3d;
  cursor: grab;
}

.h3-arm:active { cursor: grabbing; }

@media (max-width: 1000px) {
  .h3-final { height: 260px; }
  .h3-num-cube { width: 38px; height: 38px; right: 14px; top: 14px; }
}

@media (max-width: 620px) {
  .h3-final { height: 210px; }
  .h3-beat { height: 200vh; }
  .h3-pin { gap: 4px; padding-top: 66px; padding-bottom: 24px; }
  .h3-scene { height: 40vh; min-height: 240px; }
  .h3-copy h2 { font-size: clamp(28px, 8.4vw, 40px); margin-bottom: 10px; }
  .h3-copy p { font-size: 15px; margin-bottom: 16px; }
  .h3-price { margin-bottom: 16px; }
  .h3-price b { font-size: 25px; }
  .h3-kicker { margin-bottom: 10px; font-size: 11px; }
  .h3-sec { padding-top: 90px; }
  .h3-core { width: 300px; }
  .h3-core.pixel { width: 190px; }
  .h3-hero { padding-top: 92px; padding-bottom: 40px; }
  .h3-hero-stage { min-height: 22vh; }
  .h3-lede { font-size: 15px; margin-bottom: 22px; }
  .h3-chips { gap: 14px; margin-top: 24px; }
  .h3-chips b { font-size: 19px; }
  .h3-num b { font-size: clamp(30px, 9vw, 40px); }
}
