@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #FAFAF8;
  --ink: #14161A;
  --muted: #4F545C;
  --accent: #2A4B7C;
  --stage: #0E1014;
  --on-stage: #F2F2EE;
  --light: 111, 148, 222;
  --gut: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

/* Lenis (smooth scroll) base rules */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }

.wrap {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 var(--gut);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}
a:hover { color: #1B3560; }
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Header ---------- */
header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.mark {
  display: inline-block;
  padding: 0.6rem 0;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.mark:hover { color: var(--ink); }
header ul, footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
header ul a {
  display: inline-block;
  padding: 0.6rem 0;
  color: var(--ink);
  text-decoration: none;
}
header ul a:hover { text-decoration: underline; text-underline-offset: 0.3em; }
[aria-current="page"]:not(.mark) {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.3em;
}

main { flex: 1 0 auto; width: 100%; }

/* ---------- Words that rise (hero and page titles run on load, section titles on view) ---------- */
.split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.1em 0 0.16em;
  margin: -0.1em 0 -0.16em;
}
.split .w > span {
  display: inline-block;
  transform: translateY(115%);
  animation: rise 1.05s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 45ms + 90ms);
}
@keyframes rise { to { transform: translateY(0); } }
.js .split.on-view .w > span {
  animation: none;
  transition: transform 1.05s var(--ease);
  transition-delay: calc(var(--i, 0) * 45ms);
}
.js .split.on-view.in .w > span { transform: translateY(0); }
.split .w:nth-child(1)  { --i: 0; }
.split .w:nth-child(2)  { --i: 1; }
.split .w:nth-child(3)  { --i: 2; }
.split .w:nth-child(4)  { --i: 3; }
.split .w:nth-child(5)  { --i: 4; }
.split .w:nth-child(6)  { --i: 5; }
.split .w:nth-child(7)  { --i: 6; }
.split .w:nth-child(8)  { --i: 7; }
.split .w:nth-child(9)  { --i: 8; }
.split .w:nth-child(10) { --i: 9; }
.split .w:nth-child(11) { --i: 10; }
.split .w:nth-child(12) { --i: 11; }
.split .w:nth-child(13) { --i: 12; }
.split .w:nth-child(14) { --i: 13; }
.split .w:nth-child(15) { --i: 14; }
.split .w:nth-child(16) { --i: 15; }

.fadeup {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeup 1s var(--ease) 0.75s forwards;
}
@keyframes fadeup { to { opacity: 1; transform: translateY(0); } }

.js .rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.95s var(--ease), transform 0.95s var(--ease);
}
.js .rv.in { opacity: 1; transform: none; }

/* ---------- The one action ---------- */
.action {
  display: inline-block;
  padding: 0.95rem 1.5rem;
  border-radius: 0.625rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.action:hover { background: var(--accent); color: var(--paper); }
.action:focus-visible { border-radius: 0.625rem; }

/* ---------- Home: hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: calc(86vh - 4.5rem);
  min-height: calc(86svh - 4.5rem);
  padding-bottom: clamp(2.25rem, 7vh, 4.5rem);
}
.hero h1 {
  margin: 0;
  max-width: 15em;
  font-size: clamp(2.25rem, 0.9rem + 6.3vw, 6rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.hero .cta { margin: clamp(1.75rem, 4vh, 2.75rem) 0 0; }

/* ---------- Home: the pinned stage ---------- */
.stage { background: var(--stage); color: var(--on-stage); }
.pin {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
  gap: 2rem;
  padding-left: max(var(--gut), calc(50% - 40rem + var(--gut)));
  padding-right: max(var(--gut), calc(50% - 40rem + var(--gut)));
}
.js .stage { height: 430vh; height: 430svh; }
.js .pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.beam {
  position: absolute;
  inset: -8%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 46% at 70% 50%, rgba(var(--light), 0.26), transparent 100%),
    linear-gradient(145deg, transparent 20%, rgba(42, 75, 124, 0.34) 43%, rgba(var(--light), 0.3) 51%, rgba(42, 75, 124, 0.34) 58%, transparent 80%);
}

.words {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
}
.beat {
  margin: 0 0 1rem;
  max-width: 6.2em;
  font-size: clamp(3.25rem, 1.2rem + 9.4vw, 10.5rem);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.05em;
}
.js .beat { grid-area: 1 / 1; margin: 0; opacity: 0; will-change: transform, opacity; }

.deck {
  --pw: min(74vw, 22rem, calc(46svh * 5 / 6));
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  perspective: 1600px;
  min-width: 0;
}
.rig {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  width: var(--pw);
  aspect-ratio: 5 / 6;
}
.js .stage .rig { will-change: transform, opacity; opacity: 0.35; }
.rig > * { grid-area: 1 / 1; }

.panel, .ghost {
  width: var(--pw);
  aspect-ratio: 5 / 6;
  border-radius: calc(var(--pw) * 0.07);
}
.panel {
  container-type: inline-size;
  position: relative;
  z-index: 2;
  background: var(--paper);
  box-shadow: 0 calc(var(--pw) * 0.08) calc(var(--pw) * 0.2) calc(var(--pw) * -0.06) rgba(0, 0, 0, 0.55);
}
.ghost { background: #F2F2EE; }
.ghost.g2 { z-index: 0; transform: translate3d(27%, -12%, 0) scale(0.88); opacity: 0.09; }
.ghost.g1 { z-index: 1; transform: translate3d(14%, -6%, 0) scale(0.94); opacity: 0.16; }
.js .stage .ghost { opacity: 0; will-change: transform, opacity; }
.halo {
  z-index: 0;
  width: 230%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--light), 0.34), transparent);
  opacity: 0;
  pointer-events: none;
}

/* The blank screen. Sizes use the panel's own width (cqw) so it scales as one piece. */
.ui {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 7cqw;
}
.ui .row { display: flex; align-items: center; gap: 3cqw; margin-bottom: 7cqw; }
.b {
  display: block;
  position: relative;
  overflow: hidden;
  background: #E4E6EA;
  border-radius: 1.6cqw;
  transform-origin: left center;
}
.b > span { position: absolute; inset: 0; background: var(--ink); opacity: 0; }
.b.dot { width: 9cqw; height: 9cqw; border-radius: 50%; transform-origin: center; }
.b.top { width: 28cqw; height: 3.2cqw; }
.b.t1 { width: 70cqw; height: 6.5cqw; margin-bottom: 2.2cqw; }
.b.t2 { width: 46cqw; height: 6.5cqw; margin-bottom: 5cqw; }
.b.p1, .b.p2, .b.p3 { height: 2.8cqw; margin-bottom: 2.2cqw; }
.b.p1 { width: 78cqw; }
.b.p2 { width: 70cqw; }
.b.p3 { width: 52cqw; margin-bottom: 6cqw; }
.b.media { flex: 1 1 auto; width: 100%; margin-bottom: 6cqw; border-radius: 3cqw; transform-origin: center; }
.b.media > span { background: linear-gradient(140deg, #2A4B7C, #7E9ED6); }
.b.btn { width: 38cqw; height: 8cqw; border-radius: 99cqw; }
.js .stage .b { transform: scaleX(0); }
.js .stage .b.media { transform: scale(0.9); opacity: 0; }
.js .stage .b.dot { transform: scale(0); }
.js .stage .b > span { opacity: 0; }
.js .stage .b, .js .stage .b > span { will-change: transform, opacity; }

/* Without script the stage is a calm static layout: all three words, the finished screen */
html:not(.js) .stage .b > span { opacity: 1; }
html:not(.js) .beam { opacity: 0.8; }

@media (max-width: 55.99rem) {
  .hero { min-height: calc(74vh - 4.5rem); min-height: calc(74svh - 4.5rem); }
}
@media (min-width: 56rem) {
  .pin { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .stage .deck { --pw: min(34vw, 26rem, calc(56svh * 5 / 6)); }
}
@media (max-width: 55.99rem) {
  .pin { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; align-items: end; }
  .js .pin { padding-bottom: 7svh; padding-top: 5svh; }
  .stage .deck { grid-row: 1; align-self: center; }
  .words { grid-row: 2; }
}

/* ---------- Home: the close ---------- */
.close { padding: clamp(5rem, 18vh, 11rem) 0 clamp(5rem, 16vh, 9rem); }
.close h2 {
  margin: 0;
  max-width: 12em;
  font-size: clamp(2.25rem, 1rem + 5.6vw, 5.5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.close .cta { margin: clamp(1.75rem, 4vh, 2.75rem) 0 0; }
@media (max-width: 55.99rem) {
  .close h2 { max-width: 7.6em; }
}

/* ---------- Inner pages ---------- */
.page { padding: clamp(2rem, 8vh, 5rem) 0 clamp(4rem, 12vh, 8rem); }
.page h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 1rem + 4.6vw, 4.75rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
}
.lede {
  margin: 0;
  max-width: 30rem;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1.5;
}
.date {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.doc .wrap, .apps .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.25rem var(--gut);
}
.doc-body { max-width: 40rem; }
.doc-body p { margin: 0 0 1rem; }
.doc-body h2 {
  margin: 2.5rem 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.doc-body section:first-child h2 { margin-top: 0; }
/* Home: what the studio does */
.about .doc-head h2 {
  margin: 0;
  font-size: clamp(2rem, 1rem + 3.4vw, 3.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
}
.doc-body h3 {
  margin: 2.25rem 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.doc-body section:first-child h3 { margin-top: 0; }
.lede + .lede { margin-top: 1rem; }
dl { margin: 0; }
dt {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
dd {
  margin: 0 0 2rem;
  font-size: 1.1875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
address { font-style: normal; }

@media (min-width: 56rem) {
  .doc .wrap, .apps .wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .doc-head { position: sticky; top: 2rem; align-self: start; }
}

/* Apps: the blank screen, drawn once on load */
.apps .deck { --pw: min(62vw, 18rem); justify-self: start; padding-top: 0.5rem; }
.apps .rig { justify-self: start; margin: 0.5rem 0 0 8%; }
.apps .ghost.g1 { opacity: 0.1; background: #E4E6EA; }
.apps .ghost.g2 { opacity: 0.05; background: #E4E6EA; }
.apps .b { background: #E4E6EA; transform: scaleX(0); animation: draw 0.9s var(--ease) forwards; }
.apps .b.dot { transform: scale(0); animation-name: pop; }
.apps .b.media { transform: scale(0.9); opacity: 0; animation-name: settle; }
.apps .panel { background: #F1F2F4; box-shadow: none; }
.apps .b.d1 { animation-delay: 0.45s; }
.apps .b.d2 { animation-delay: 0.55s; }
.apps .b.d3 { animation-delay: 0.65s; }
.apps .b.d4 { animation-delay: 0.75s; }
.apps .b.d5 { animation-delay: 0.85s; }
.apps .b.d6 { animation-delay: 0.95s; }
.apps .b.d7 { animation-delay: 1.05s; }
.apps .b.d8 { animation-delay: 1.15s; }
.apps .b.d9 { animation-delay: 1.3s; }
@keyframes draw { to { transform: scaleX(1); } }
@keyframes pop { to { transform: scale(1); } }
@keyframes settle { to { transform: scale(1); opacity: 1; } }
@media (min-width: 56rem) {
  .apps .deck { --pw: min(26vw, 22rem); justify-self: center; padding-top: 0; }
  .apps .rig { justify-self: center; margin: 0; }
}

/* ---------- Footer ---------- */
footer {
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}
footer ul { gap: 0 1.25rem; }
footer p { margin: 0 0 0.5rem; }
footer ul a {
  display: inline-block;
  padding: 0.5rem 0;
  color: var(--muted);
}
footer ul a:hover { color: var(--ink); }
