/* Imota Labs. One page: a pinned scene with four chapters, then flat sections.
   Type: Instrument Serif (uppercase display, italic for one lowercase word),
   IBM Plex Mono (small uppercase), Inter (buttons, lists). One accent. */

@font-face { font-family: "Instrument Serif"; src: url(/fonts/InstrumentSerif-Regular.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(/fonts/InstrumentSerif-Italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/fonts/IBMPlexMono-Medium.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/Inter-Regular.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/Inter-Medium.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --bg: #eef1fa;
  --ink: #0f1a3d;
  --ink-2: #2b3760;
  --muted: #6b7596;
  --faint: rgba(15, 26, 61, 0.22);
  --line: rgba(15, 26, 61, 0.16);
  --accent: #2d4bff;
  --accent-deep: #1a2fb8;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 3.333vw, 48px);
  --display: clamp(46px, 6.667vw, 112px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 1.25rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: clamp(14px, 1.111vw, 20px); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { display: inline-block; vertical-align: middle; }
::selection { background: var(--accent); color: #fff; }

.wrap { padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-weight: 500; font-size: max(12px, 0.75rem); line-height: 1.25; text-transform: uppercase; letter-spacing: 0.01em; }
.turn { width: 0.6em; height: 0.6em; stroke-width: 1.6; }

/* Display type: uppercase serif, tight leading, one italic lowercase word. */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--display);
  line-height: 0.86;
  letter-spacing: -0.008em;
  text-transform: uppercase;
  text-wrap: balance;
}
.display em { font-style: italic; text-transform: none; }
.l { display: block; overflow: hidden; padding: 0.04em 0.06em 0.08em 0; margin: -0.04em -0.06em -0.08em 0; position: relative; }
.l > span { display: block; transform: translateY(112%); transition: transform 1.1s var(--ease); }
.l--arrow { padding-left: 1.45em; }
.l--arrow .turn { position: absolute; left: 0.04em; top: 50%; width: 0.52em; height: 0.52em; transform: translateY(-40%); stroke-width: 1.5; }
.l--arrow > span:not(.turn) { }
.is-on .l > span, .in .l > span, .rv.in .l > span { transform: none; }
.is-on .l:nth-child(2) > span, .in .l:nth-child(2) > span { transition-delay: 0.07s; }
.is-on .l:nth-child(3) > span, .in .l:nth-child(3) > span { transition-delay: 0.14s; }
.is-on .l:nth-child(4) > span, .in .l:nth-child(4) > span { transition-delay: 0.21s; }
@media (min-width: 900px) { .l--ind { margin-left: 24%; } }

/* Label pill and glass button. */
.tag {
  display: inline-block;
  padding: 0.42em 0.75em 0.36em;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 500 11px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  height: 2.75rem;
  padding: 0 1.3rem;
  border-radius: 999px;
  font: 500 14px/1 var(--sans);
  color: var(--accent-deep);
  text-decoration: none;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.42);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: color 0.3s;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(90deg, var(--accent) 0%, #fff 30%, #fff 58%, #c3cdff 84%, var(--accent) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.btn::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -40% 40% -40% -10%;
  border-radius: 999px;
  background: radial-gradient(closest-side, rgba(45, 75, 255, 0.38), rgba(45, 75, 255, 0) 100%);
  transition: transform 0.7s var(--ease);
}
.btn:hover::after { transform: translateX(45%); }
.btn svg { width: 1.05em; height: 1.05em; transition: transform 0.45s var(--ease); }
.btn:hover svg { transform: translate(2px, 1px); }
.btn--light { color: #fff; background: rgba(255, 255, 255, 0.14); }
.btn--light::before { background: linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.35) 40%, rgba(255, 255, 255, 0.35) 60%, rgba(255, 255, 255, 0.9) 100%); }
.btn--light::after { background: radial-gradient(closest-side, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 100%); }

/* Reveal on entering the viewport. */
.rv { opacity: 0; transform: translateY(1.2rem); transition: opacity 1s var(--ease) var(--d, 0s), transform 1s var(--ease) var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }

/* Loader: covers the page until fonts and the scene are ready. */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  transition: opacity 0.7s ease 0.1s, visibility 0s 0.9s;
  animation: loader-auto 0.5s 4s forwards;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__line { position: absolute; left: var(--gutter); right: var(--gutter); bottom: var(--gutter); display: flex; justify-content: space-between; color: var(--muted); }
.brand--loader { font-size: 2rem; }
@keyframes loader-auto { to { opacity: 0; visibility: hidden; } }

/* Top bar: white over the scene, ink once the page is flat. */
.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gutter);
  color: #fff;
  transition: color 0.4s, transform 0.5s var(--ease);
}
body.is-flat .top { color: var(--ink); }
body.nav-hidden .top { transform: translateY(-115%); }
body.is-flat .top .btn { color: var(--accent-deep); background: rgba(255, 255, 255, 0.42); }
body.is-flat .top .btn::before { background: linear-gradient(90deg, var(--accent) 0%, #fff 30%, #fff 58%, #c3cdff 84%, var(--accent) 100%); }
body.is-flat .top .btn::after { background: radial-gradient(closest-side, rgba(45, 75, 255, 0.38), rgba(45, 75, 255, 0) 100%); }
.top__nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 2.2rem; }
.top__nav a { text-decoration: none; position: relative; padding: 0.3em 0; }
.top__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease); }
.top__nav a:hover::after { transform: scaleX(1); transform-origin: left; }
/* The wordmark uses the site's own signature: uppercase serif with one italic word. */
.brand { display: inline-flex; align-items: center; gap: 0.5em; font: 400 1.5rem/1 var(--serif); letter-spacing: 0.01em; text-transform: uppercase; text-decoration: none; }
.brand em { font-style: italic; text-transform: none; }
.brand__mark { width: 1.1em; height: 1.1em; flex: none; }
@media (max-width: 899px) { .top__nav { display: none; } .top { padding: 0.9rem var(--gutter); } .brand { font-size: 1.45rem; } }

/* The story: a sticky scene with chapters laid over it. */
.story { position: relative; height: 440vh; }
.story__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #8fa5ef; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.chapter {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(28px, 6vh, 64px);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0s 0.5s;
  pointer-events: none;
}
.chapter.is-on { opacity: 1; visibility: visible; transition: opacity 0.5s, visibility 0s; }
.chapter .tag { margin-bottom: 1.2rem; opacity: 0; transform: translateY(8px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.chapter.is-on .tag { opacity: 1; transform: none; }
.chapter__kicker { margin-bottom: 1.6rem; max-width: 24rem; opacity: 0; transition: opacity 0.8s var(--ease) 0.1s; }
.chapter.is-on .chapter__kicker { opacity: 0.92; }
.chapter__text { margin-top: 1.8rem; max-width: 24rem; opacity: 0; transform: translateY(8px); transition: opacity 0.8s var(--ease) 0.35s, transform 0.8s var(--ease) 0.35s; }
.chapter.is-on .chapter__text { opacity: 0.92; transform: none; }
.chapter--hero .display { font-size: calc(var(--display) * 1.04); }
.story__hint {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(28px, 6vh, 64px);
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  opacity: 0;
  transition: opacity 0.6s 0.9s;
}
.story__hint svg { width: 1.2em; height: 1.2em; }
body.is-ready .story__hint { opacity: 1; }
body.is-scrolled .story__hint { opacity: 0; transition-delay: 0s; }
@media (max-width: 899px) { .story__hint { display: none; } }

/* What we do: a pinned paragraph that reads itself in, and a list that lights up as it passes.
   It starts while the scene is still fading, so the page hands over without an empty screen. */
.what { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr; gap: 3rem; margin-top: -35vh; padding-top: 2rem; padding-bottom: 4rem; }
.what__head { align-self: start; }
.what__head .btn { margin-top: 2.4rem; }
.lede {
  margin-top: 1.3rem;
  font: 400 clamp(30px, 3.4vw, 52px) / 1.04 var(--serif);
  letter-spacing: -0.012em;
  max-width: 15.5em;
  color: var(--ink);
}
.lede .turn--lede { width: 0.5em; height: 0.5em; margin: 0 0.5em 0 0.9em; vertical-align: baseline; stroke-width: 1.4; }
.lede .w { color: var(--faint); transition: color 0.35s; }
.lede .w.is-on { color: var(--ink); }
.list { list-style: none; }
.list li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.42rem 0; opacity: 0.2; transition: opacity 0.25s; }
.list__n { display: inline-grid; place-items: start; width: 3.2em; color: var(--muted); }
.list__n > * { grid-area: 1 / 1; transition: opacity 0.25s; }
.list__n .turn { width: 1.1rem; height: 1.1rem; opacity: 0; color: var(--ink); transform: translateY(0.15rem); }
.list li.is-on .list__n .mono { opacity: 0; }
.list li.is-on .list__n .turn { opacity: 1; }
.list__t { font: 500 clamp(19px, 1.55rem, 30px) / 1.2 var(--sans); letter-spacing: -0.015em; text-align: right; }
@media (max-width: 899px) { .list__n { width: 2.7em; } }
@media (min-width: 900px) {
  .what { grid-template-columns: 7fr 5fr; gap: 4rem; padding-top: 3rem; padding-bottom: 2rem; }
  .what__head { position: sticky; top: 7rem; }
  .list { padding: 40vh 0 30vh; }
}

/* Products: a spread title, one product, its screens in a loose grid. */
.products { padding-top: 7rem; }
.spread { display: grid; grid-template-columns: 3fr 4fr 2fr 3fr; column-gap: 1rem; align-items: start; }
.spread__title { display: contents; }
.spread__a { grid-column: 1; }
.spread__b { grid-column: 2; }
.spread__arrow { grid-column: 3; justify-self: center; width: calc(var(--display) * 0.42); height: calc(var(--display) * 0.42); margin-top: calc(var(--display) * 0.2); stroke-width: 1.4; }
.spread__c { grid-column: 4; text-align: right; }
.spread__sub { grid-column: 2; grid-row: 2; margin-top: 1rem; max-width: 24rem; }
@media (max-width: 899px) {
  .spread { grid-template-columns: 1fr auto; }
  .spread__a { grid-column: 1; grid-row: 1; }
  .spread__b { grid-column: 2; grid-row: 1; }
  .spread__arrow { display: none; }
  .spread__c { grid-column: 1 / -1; grid-row: 2; text-align: center; margin-top: -0.12em; }
  .spread__sub { grid-column: 1 / -1; grid-row: 3; margin-top: 1.4rem; }
}
.product { margin-top: 4rem; }
.product__head .btn { margin-top: 1.7rem; }
.product__meta { color: var(--muted); }
.product__name { margin-top: 0.9rem; font: 400 clamp(40px, 4vw, 64px) / 1 var(--serif); letter-spacing: -0.01em; }
.product__name--muted { color: var(--muted); }
.product__text { margin-top: 0.9rem; max-width: 34rem; font-size: 1.05rem; color: var(--ink-2); text-wrap: pretty; }
.shots { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; margin-top: 3rem; }
.shot { grid-column: var(--c); margin-top: var(--mt, 0); will-change: transform; }
.shot img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: var(--radius); outline: 1px solid rgba(15, 26, 61, 0.08); outline-offset: -1px; box-shadow: 0 30px 60px -40px rgba(15, 26, 61, 0.45); }
.shot figcaption { margin-top: 1rem; }
.shot figcaption .mono { display: block; color: var(--muted); font-size: 11px; letter-spacing: 0.04em; }
.shot__name { display: block; margin-top: 0.45rem; font: 400 1.6rem/1.1 var(--serif); }
.product--next { display: grid; gap: 0.6rem; margin-top: 5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.product--next .product__name { margin-top: 0; }
@media (max-width: 899px) {
  .shots { grid-template-columns: 1fr 1fr; gap: 1.2rem 1rem; margin-top: 2.2rem; }
  .shot { grid-column: auto; margin-top: 0; }
  .shot:nth-child(2n) { margin-top: 2.6rem; }
  .shot__name { font-size: 1.5rem; }
}

/* The studio: a two-line title, then hairline rows. */
.facts { padding-top: 8rem; }
.facts__head { display: grid; grid-template-columns: 1fr; gap: 1.2rem; align-items: end; }
.facts__text { max-width: 20rem; }
@media (min-width: 900px) {
  .facts__head { grid-template-columns: 7fr 5fr; gap: 1rem; }
  .facts__text { margin-bottom: 0.3rem; }
}
.table { margin-top: 2.2rem; border-top: 1px solid var(--ink); }
.table__group { display: grid; grid-template-columns: 1fr; gap: 0.6rem 2rem; padding-top: 1.1rem; }
.table__group + .table__group { border-top: 1px solid var(--line); margin-top: 1rem; }
.table__label { font: 500 1.15rem/1.2 var(--sans); letter-spacing: -0.01em; }
.table__label sup { font-size: 10px; margin-left: 0.4em; color: var(--muted); vertical-align: top; }
.table__rows { list-style: none; }
.table__rows li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.95rem 0; border-bottom: 1px solid var(--line); font: 400 1.5rem/1.1 var(--serif); }
.table__rows li:last-child { border-bottom: 0; }
.table__rows li .mono { text-align: right; color: var(--ink-2); }
@media (min-width: 900px) {
  .table__group { grid-template-columns: 5fr 7fr; }
  .table__group + .table__group { margin-top: 0; }
  .table__rows li:last-child { border-bottom: 0; }
}

/* Footer: a full screen, like a last chapter. */
.foot { min-height: 92svh; display: flex; flex-direction: column; justify-content: space-between; padding-top: 9rem; padding-bottom: 1.2rem; }
.foot__grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
.foot__left .tag { margin-bottom: 1.2rem; }
.foot__left .btn { margin-top: 2.2rem; }
.foot__text { max-width: 22rem; }
.foot__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem 1.5rem; margin-top: 2.6rem; }
.foot__cols > div:last-child { grid-column: 1 / -1; }
.foot__h { display: flex; align-items: center; gap: 0.3em; font: 500 1rem/1 var(--sans); color: var(--muted); text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 0.9rem; }
.foot__h svg { width: 0.9em; height: 0.9em; }
.foot__links { list-style: none; display: grid; gap: 0.35rem; }
.foot__links li { display: flex; align-items: center; gap: 0.5em; }
.foot__links .idx { color: var(--muted); font-size: 10px; }
.foot__links a { text-decoration: none; display: inline-flex; align-items: center; gap: 0.3em; position: relative; padding: 0.15em 0; }
.foot__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease); }
.foot__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.foot__links a svg { width: 0.9em; height: 0.9em; }
.foot__small { color: var(--ink-2); }
.copy { display: grid; text-align: left; padding: 0.15em 0; position: relative; }
.copy > span { grid-area: 1 / 1; transition: opacity 0.25s, transform 0.25s; }
.copy__done { opacity: 0; transform: translateY(4px); color: var(--accent); }
.copy.is-copied .copy__text { opacity: 0; transform: translateY(-4px); }
.copy.is-copied .copy__done { opacity: 1; transform: none; }
.copy::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; opacity: 0.35; }
.foot__bar { margin-top: 5rem; padding-top: 1rem; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.foot__legal { display: flex; gap: 1.2rem; }
.foot__legal a { text-decoration: none; }
.foot__legal a:hover { color: var(--ink); }
@media (min-width: 900px) {
  .foot__grid { grid-template-columns: 5fr 7fr; gap: 2rem; }
  .foot__right { padding-top: 0.2rem; }
  .foot__cols { grid-template-columns: 1fr 1fr 1fr; column-gap: 2rem; }
  .foot__cols > div:last-child { grid-column: auto; }
}
@media (max-width: 899px) {
  .foot { padding-top: 6rem; }
  .foot__bar { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .foot__bar-mid { order: 3; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .l > span, .rv, .chapter .tag, .chapter__kicker, .chapter__text, .lede .w, .list li { transition: none !important; }
  .rv { opacity: 1; transform: none; }
  .loader { animation-delay: 0.3s; }
}
