/* Intrasi landing page. Wide screens: one SVG scene, 1200 x 772 units, scaled to the window.
   Narrow screens: HTML text, with the hand and the diagram cut out of the same scene. */
:root {
  --white: #f4f6ff;
  --pastel: #f1f5a3;
  --tint: #b9c5fb;
  --ink: #0d1b59;
  --fd: "Encode Sans Expanded", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: #e8ee8c; }
main { background: #1c3bc2; }
.m { display: none; }

.hs { display: block; width: 100%; height: auto; }
.hs text { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; fill: var(--white); }
.hs a { cursor: pointer; }
.hs a:focus-visible { outline: 2px solid var(--pastel); outline-offset: 3px; }
.hs .pa { fill: var(--pastel); }
.hs .b { font-weight: 500; }
.hs .lg { font: 700 22px var(--fd); }
.hs .h1 { font: 700 38.7px var(--fd); letter-spacing: -0.035em; }
.hs .h4 { font: 700 18.9px var(--fd); letter-spacing: -0.035em; }
.hs .ld { font: 400 15px "IBM Plex Sans", Arial, sans-serif; fill: var(--tint); }
.hs .bt { fill: var(--pastel); }
.hs .btt { font: 600 15px "IBM Plex Sans", Arial, sans-serif; fill: var(--ink); }
.hs .ml { font-size: 11px; font-weight: 500; letter-spacing: 0.1em; fill: var(--tint); }
.hs .ml.pa { fill: var(--pastel); }
.hs .nl { font: 500 14.5px "IBM Plex Sans", Arial, sans-serif; }
.hs .cm { font-size: 17px; font-weight: 500; }
.hs text.ci { fill: var(--ink); }
.hs .pb { fill: none; stroke: var(--white); stroke-width: 1.2; }
.hs .pp { stroke: var(--pastel); }
.hs .pt { font-size: 10px; font-weight: 500; letter-spacing: 0.08em; }

/* The control diagram. The rules start at .dg because the diagram is drawn through <use>. */
.dg text { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; fill: var(--white); }
.dg .bx { fill: rgba(28, 59, 194, 0.55); stroke: var(--white); stroke-width: 1.5; }
.dg .wr { fill: none; stroke: var(--white); stroke-width: 1.3; }
.dg .ds { stroke-dasharray: 3 3; }
.dg .ah, .dg .dt { fill: var(--white); }
.dg .lp { fill: none; stroke: var(--tint); stroke-width: 1; stroke-dasharray: 5 5; opacity: 0.7; }
.dg .bl { font-size: 10.5px; font-weight: 500; letter-spacing: 0.06em; }
.dg .bs { font-size: 9px; fill: var(--tint); }
.dg .sl { font-size: 10.5px; fill: var(--tint); }
.dg .sg { font-size: 11px; fill: var(--tint); }
.dg .fs { font-size: 9.5px; letter-spacing: 0.1em; fill: var(--tint); }
.dg .ac { fill: none; stroke: var(--pastel); stroke-width: 1.2; }
.dg .at { font-size: 10px; font-weight: 500; letter-spacing: 0.1em; fill: var(--pastel); }

/* The scene has three layers: the drawing (static), the fragments (animated), the grain (static).
   The layers are separate so that the animation does not repaint the filters of the drawing. */
.scene { position: relative; container-type: inline-size; --u: calc(100cqw / 1200); }
.fr, .gr { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fr { overflow: hidden; font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; color: var(--white); }

/* Fragments that drift away from the fingers. One scene unit is var(--u).
   Only transform and opacity change, so the browser animates them without a repaint. */
.fg { position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); font-size: calc(var(--z) * var(--u));
  font-style: normal; line-height: 1; white-space: nowrap; opacity: var(--o); animation: drift 8s linear infinite; will-change: transform, opacity; }
.fp { color: var(--pastel); }
@keyframes drift {
  0% { transform: translate(0, 0); opacity: 0; }
  18% { opacity: var(--o); }
  100% { transform: translate(calc(var(--dx) * var(--u)), calc(var(--dy) * var(--u))); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .fg { animation: none; will-change: auto; } }

/* Phone and narrow tablet. The scene is cut to x 360-1160, y 70-520, and the text is HTML. */
@media (max-width: 900px) {
  body { background: #e8ee8c; }
  .hs .lg, .hs .h1, .hs .ld, .hs .bt, .hs .btt, .hs .nl { display: none; }
  .m { display: block; color: var(--white); padding-inline: 20px; }
  .m a:focus-visible { outline: 2px solid var(--pastel); outline-offset: 3px; }

  .m-top { padding-top: 22px; padding-bottom: 8px; }
  .m-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .logo { font: 700 22px var(--fd); }
  .logo span { color: var(--pastel); }
  .top { font: 500 14.5px "IBM Plex Sans", Arial, sans-serif; color: var(--white); text-decoration: none; white-space: nowrap; }
  h1 { font: 700 clamp(30px, 9.4vw, 46px)/1.12 var(--fd); letter-spacing: -0.035em; margin: 44px 0 16px; max-width: 12em; text-wrap: balance; }
  h1 em { font-style: normal; color: var(--pastel); }
  .lead { font: 400 16px/1.5 "IBM Plex Sans", Arial, sans-serif; color: var(--tint); margin: 0 0 24px; max-width: 34ch; }
  .btn { display: inline-block; background: var(--pastel); color: var(--ink); font: 600 16px/1 "IBM Plex Sans", Arial, sans-serif; padding: 16px 22px; border-radius: 4px; text-decoration: none; }

  .art { overflow: hidden; aspect-ratio: 800 / 450; -webkit-mask-image: linear-gradient(transparent, #000 14%); mask-image: linear-gradient(transparent, #000 14%); }
  .art .scene { width: 150%; max-width: none; margin-left: -45%; margin-top: -8.75%; }

  .m-pipe { background: #1730a0; padding-top: 30px; padding-bottom: 36px; }
  h2 { font: 700 20px/1.2 var(--fd); letter-spacing: -0.035em; margin: 0 0 20px; }
  .pipe { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 26px; font: 500 12px/1 "IBM Plex Mono", ui-monospace, Menlo, monospace; letter-spacing: 0.08em; text-transform: uppercase; }
  .pipe li { position: relative; }
  .pipe > li:not(.in), .pipe span { display: inline-block; border: 1.2px solid var(--white); padding: 10px 14px; }
  .pipe li + li::before { content: "↓"; position: absolute; top: -21px; left: 18px; letter-spacing: 0; }
  .pipe .in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .pipe .in span { border-color: var(--pastel); color: var(--pastel); }
  .pipe i { font-style: normal; letter-spacing: 0; }
  .pipe small { flex-basis: 100%; font-size: 11px; letter-spacing: 0.1em; color: var(--pastel); margin-top: 4px; }

  .m-foot { background: linear-gradient(100deg, #f6f9be 0%, #f1f5a3 50%, #e8ee8c 100%); color: var(--ink); padding-top: 26px; padding-bottom: 30px; }
  .m-foot p { font: 700 19px/1.25 var(--fd); letter-spacing: -0.035em; margin: 0 0 14px; }
  .m-foot a { font: 500 17px/1 "IBM Plex Mono", ui-monospace, Menlo, monospace; color: var(--ink); text-underline-offset: 6px; }
}
