/* ===========================================================================
   Home page, layered on style.css.

   Measurements come from the approved 1440px composition and are expressed as
   proportions of their stage, so the picture scales rather than rearranges
   between a laptop and a wide monitor. Below 1000px the scenes stack.
   =========================================================================== */

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

.hero {
  position: relative;
}

.hero__copy {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 262px;
  column-gap: 24px;
  align-items: start;
  padding-top: 34px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7.15vw, 103px);
  line-height: 0.93;
  letter-spacing: -0.044em;
  font-weight: 560;
}

/* Two set lines on a wide screen; free to wrap on a narrow one. */
.hero__line {
  display: block;
}

@media (min-width: 900px) {
  .hero__line {
    white-space: nowrap;
  }
}

.hero__side {
  padding-top: 16px;
}

.hero__side p {
  margin: 0;
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.5;
}

.hero__side .actions {
  margin-top: 22px;
  gap: 14px 18px;
}

/* The room: full bleed, lit from above, a pool of light on the floor. */
.hero__room {
  position: relative;
  margin-top: -12px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(700px 300px at 50% 104%, rgba(140, 172, 166, 0.5) 0%, rgba(84, 116, 110, 0.26) 42%, rgba(40, 64, 60, 0) 80%),
    radial-gradient(1100px 620px at 55% 32%, #163431 0%, #11282a 38%, #0d1a1c 64%, #0a1012 84%, var(--ground) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 130px, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 130px, #000 100%);
}

.hero__room::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 9;
  background-image: var(--noise);
  opacity: 0.28;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero__stage {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  aspect-ratio: 1440 / 708;
}

.hero__back {
  left: 29.17%;
  top: 18.08%;
  width: 68.06%;
  opacity: 0.9;
  filter: brightness(0.62) saturate(0.8);
}

.hero__front {
  left: 7.78%;
  top: 33.33%;
  width: 75%;
}

.hero__cap {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: -68px;
  margin-bottom: 0;
  color: #9aa3a6;
  font-size: 13.5px;
  line-height: 1.4;
}

.hero__cap svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--teal);
}

.hero__cap b {
  margin-right: 6px;
  color: #e4e8e9;
  font-weight: 560;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__back {
    animation: hero-rise 1000ms var(--ease) both;
  }
  .hero__front {
    animation: hero-rise 1000ms var(--ease) 140ms both;
  }
  @keyframes hero-rise {
    from {
      opacity: 0;
      transform: translateY(28px);
    }
  }
}

/* ------------------------------------------------------------ the apps */

.apps {
  padding-top: clamp(88px, 9vw, 130px);
}

.apps__title {
  max-width: 1180px;
  margin: 0;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.034em;
}

.apps__rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 56px 0 0;
  border-top: 1px solid var(--line);
}

.apps__rail li {
  margin: 0;
  padding: 0;
}

.apps__rail li::before {
  content: none;
}

.apps__rail a {
  display: block;
  height: 100%;
  margin-right: 28px;
  padding: 24px 28px 26px 0;
  border-right: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.apps__rail li:last-child a {
  margin-right: 0;
  border-right: 0;
}

.apps__rail a:focus-visible {
  border-radius: 0;
}

.apps__name {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.35;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.apps__name svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--teal);
}

.apps__desc {
  display: block;
  max-width: 360px;
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
  transition: color 0.18s var(--ease);
}

.apps__rail a:hover .apps__desc {
  color: var(--ink);
}

.apps__status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.4;
}

/* Sits on the first line of the status, even when it wraps. */
.apps__status .dot {
  margin-top: 0.45em;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  flex: none;
}

.dot--soon {
  background: none;
  box-shadow: inset 0 0 0 1.2px #8e959c;
}

/* ------------------------------------------------------ product scenes */

.scene {
  display: grid;
  grid-template-columns: minmax(0, 470px) minmax(0, 1fr);
  column-gap: 58px;
  align-items: center;
  padding-top: clamp(96px, 9vw, 128px);
}

.scene--left {
  grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
}

.appname {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #a7afb3;
  font-size: 15px;
  line-height: 1.4;
}

.appname svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--teal);
}

.appname b {
  font-weight: 600;
}

/* The app's name is the way to its page. */
.appname a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.appname a b {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.16s var(--ease);
}

.appname a:hover b {
  text-decoration-color: var(--ink-3);
}

.scene h2 {
  margin: 26px 0 0;
  font-size: clamp(34px, 3.4vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.034em;
}

.scene .lede {
  margin: 22px 0 0;
  font-size: 18px;
  line-height: 1.55;
}

.scene .record__meta {
  margin-top: 22px;
}

.scene__actions {
  margin-top: 30px;
}

.scene__note {
  margin: 18px 0 0;
  color: var(--ink-3);
  font-size: 13.5px;
}

.scene__soon {
  color: #e6eaec;
  font-size: 15px;
  font-weight: 560;
}

/* The stage bleeds off the page edge on its own side, even past 1440px. */
.scene__stage {
  --bleed: calc(var(--gutter) + max(0px, (100vw - var(--max)) / 2));
}

.scene--right .scene__stage {
  margin-right: calc(-1 * var(--bleed));
  border-radius: 24px 0 0 24px;
}

.scene--left .scene__stage {
  margin-left: calc(-1 * var(--bleed));
  border-radius: 0 24px 24px 0;
}

.scene__stage--mermaid {
  aspect-ratio: 840 / 600;
}

.scene__stage--mermaid .win {
  left: 6.67%;
  top: 10.67%;
  width: 150%;
}

.scene__stage--rr {
  aspect-ratio: 840 / 700;
}

.scene__stage--rr .sheet {
  left: 20.25%;
  top: 7.7%;
  width: 59.5%;
}

.scene__stage--it {
  aspect-ratio: 840 / 640;
}

.it__back {
  position: absolute;
  left: 7.14%;
  top: 9.38%;
  width: 126.2%;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.it__back img {
  display: block;
  width: 100%;
  filter: brightness(0.58) saturate(0.85);
}

.it__dialog {
  left: 28.57%;
  top: 26.56%;
  width: 83.33%;
  height: 81.25%;
  border-radius: 14px 14px 0 0;
  container-type: inline-size;
}

.it__dialog::after {
  z-index: 1;
}

/*
  The app's own note on the Summary field, cut from the same capture and laid
  exactly over itself, outside the shading: the same pixels, lit.
*/
.it__dialog .it__note {
  position: absolute;
  z-index: 2;
  left: 11.8125cqi;
  top: 12.4375cqi;
  width: 47cqi;
  border-radius: 1.1cqi;
  box-shadow: 0 18px 40px -14px rgba(0, 20, 18, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* ------------------------------------------------------------ the trust band */

.trust {
  margin-top: clamp(104px, 10vw, 140px);
  padding: clamp(80px, 8vw, 110px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--band);
}

.trust__title {
  max-width: 800px;
  margin: 0;
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.034em;
}

.trust .lede {
  max-width: 620px;
  margin-top: 22px;
}

/* The thesis the old hero carried, stated where it can be checked. */
.trust .trust__thesis {
  color: var(--ink);
}

.trust .trust__thesis + .lede {
  margin-top: 12px;
}

.trust__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 56px 0 0;
  border-top: 1px solid var(--line);
}

.trust__facts > div {
  margin-right: 28px;
  padding: 24px 28px 0 0;
  border-right: 1px solid var(--line);
}

.trust__facts > div:last-child {
  margin-right: 0;
  border-right: 0;
}

.trust__facts dt {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.trust__facts dd {
  margin: 10px 0 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
}

.how {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 540px);
  column-gap: clamp(48px, 6vw, 96px);
  align-items: start;
  margin-top: clamp(72px, 8vw, 112px);
}

/* Side by side, the text sits level with the middle of the longer manifest. */
@media (min-width: 1101px) {
  .how {
    align-items: center;
  }
}

.how__text > :last-child {
  margin-bottom: 0;
}

.how__text {
  max-width: 62ch;
}

.how h3 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 560;
  letter-spacing: -0.018em;
}

.how p {
  color: var(--ink-2);
}

.how__turn {
  max-width: 30ch;
  margin: 30px 0 34px;
  color: var(--ink) !important;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -0.014em;
}

.manifest {
  margin: 0;
  padding: 26px 28px 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0e1215;
}

.manifest figcaption {
  margin: 0 0 16px;
  color: var(--ink-3);
  font-size: 14px;
}

.manifest figcaption code {
  color: var(--ink);
}

.manifest dl {
  margin: 0;
}

.manifest dl > div {
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.manifest dt code {
  padding: 0;
  background: none;
  box-shadow: none;
  color: #d5dbde;
  font-size: 13.5px;
}

.manifest dd {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.5;
}

.manifest__none dt {
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 600;
}

.manifest__none dd b {
  display: block;
  margin: 4px 0 8px;
  color: var(--teal);
  font-size: 26px;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.trust__more {
  margin: 48px 0 0;
}

/* ----------------------------------------------------------------- lab */

.lab {
  padding-top: clamp(104px, 10vw, 130px);
}

.lab__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
}

.lab__head h2 {
  max-width: 1000px;
  margin: 0;
  font-size: clamp(30px, 3.05vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.034em;
}

.lab__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.lab__card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 34px 36px 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow 0.2s var(--ease);
}

.lab__card:hover {
  box-shadow: inset 0 0 0 1px var(--line-lit);
}

.lab__text {
  display: block;
}

.lab__name {
  display: block;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lab__desc {
  display: block;
  margin-top: 10px;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.5;
}

.lab__cmd {
  display: block;
  margin-top: 10px;
  color: var(--ink-3);
  font-size: 14px;
}

.lab__cmd code {
  padding: 0;
  background: none;
  box-shadow: none;
  font-size: 13.5px;
}

.lab__shot {
  display: block;
  margin-top: auto;
  padding-top: 32px;
}

.lab__shot img {
  width: 100%;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.meters {
  display: block;
  margin-top: 64px;
}

.meter {
  display: block;
  margin-bottom: 28px;
}

.meter__k {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--ink-2);
  font-size: 14px;
}

.meter__k b {
  flex-shrink: 0;
  font-weight: 600;
  white-space: nowrap;
}

.meter__bar {
  display: block;
  height: 12px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.meter__bar i {
  display: block;
  min-width: 6px;
  height: 100%;
  border-radius: 6px;
  background: #dce2e5;
}

.meter--kept .meter__bar i {
  background: var(--teal);
}

.lab__note {
  display: block;
  margin-top: auto;
  padding: 32px 0 36px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
}

/* ------------------------------------------------------------- research */

.research-teaser {
  display: grid;
  grid-template-columns: minmax(0, 600px) minmax(0, 1fr);
  column-gap: 72px;
  align-items: center;
  padding-top: clamp(104px, 10vw, 130px);
}

.research-teaser__meta {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
}

.research-teaser__meta a {
  color: inherit;
  text-decoration: none;
}

.research-teaser__meta a:hover {
  color: var(--ink);
}

.research-teaser h2 {
  margin: 18px 0 0;
  font-size: clamp(28px, 2.5vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.028em;
}

.research-teaser h2 a {
  color: var(--ink);
  text-decoration: none;
}

.research-teaser h2 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--ink-4);
  text-decoration-thickness: 2px;
}

.research-teaser__text > p:not(.research-teaser__meta) {
  margin: 20px 0 0;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.55;
}

.research-teaser__fig {
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.research-teaser__fig img {
  width: 100%;
}

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

@media (max-width: 1180px) {
  .hero__copy {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero__side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 40px;
    max-width: 760px;
    padding-top: 28px;
  }
  .hero__side p {
    max-width: 380px;
  }
  .hero__side .actions {
    margin-top: 0;
  }
  .hero__room {
    margin-top: 8px;
  }
}

@media (max-width: 1000px) {
  .scene,
  .scene--left {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 40px;
  }
  .scene--left .scene__copy {
    order: -1;
  }
  .scene--right .scene__stage,
  .scene--left .scene__stage {
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
    border-radius: 0;
  }
  .scene__copy {
    max-width: 620px;
  }
  .trust__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .trust__facts > div:nth-child(2) {
    margin-right: 0;
    border-right: 0;
  }
  .trust__facts > div:nth-child(n + 3) {
    padding-top: 28px;
  }
  .how {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 48px;
  }
  .lab__grid,
  .research-teaser {
    grid-template-columns: minmax(0, 1fr);
  }
  .research-teaser {
    row-gap: 40px;
  }
}

/* One app per row before three columns get too narrow for the names. */
@media (max-width: 900px) {
  .apps__rail {
    grid-template-columns: minmax(0, 1fr);
  }
  .apps__rail a {
    margin-right: 0;
    padding: 22px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .apps__rail li:last-child a {
    border-bottom: 0;
  }
}

@media (max-width: 700px) {
  .hero__room {
    margin-top: 28px;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 56px, #000 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 56px, #000 100%);
  }
  .hero__stage {
    aspect-ratio: auto;
    height: calc(170vw * 440 / 1400 + 12px + 96px);
  }
  .hero__back {
    display: none;
  }
  .hero__front {
    left: var(--gutter);
    top: 48px;
    width: 170vw;
  }
  .hero__cap {
    align-items: flex-start;
    margin-top: 20px;
  }
  .hero__cap span {
    display: block;
  }
  .hero__cap b {
    display: block;
  }
  .scene__stage--mermaid {
    aspect-ratio: 4 / 3;
  }
  .scene__stage--mermaid .win {
    left: 6%;
    top: 12%;
    width: 190%;
  }
  .scene__stage--rr {
    aspect-ratio: 5 / 6;
  }
  .scene__stage--rr .sheet {
    left: 12%;
    top: 8%;
    width: 76%;
  }
  .scene__stage--it {
    aspect-ratio: 1 / 1;
  }
  .it__back {
    width: 160%;
  }
  .it__dialog {
    left: 14%;
    top: 22%;
    width: 110%;
    height: 78%;
  }
}

@media (max-width: 640px) {
  .trust__facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .trust__facts > div {
    margin-right: 0;
    padding: 20px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .trust__facts > div:nth-child(n + 3) {
    padding-top: 20px;
  }
  .lab__card {
    padding: 28px 24px 0;
  }
  .manifest {
    padding: 22px 20px 6px;
  }
}
