/* Phone mockup shared by the TrackLab landing (tracklab.css) and the home page banner (site.css). */
/* Phone mockup. Everything is in em, so the font-size of .phone scales the whole device
   (width = 28em). Status and gesture bars use the app's own background (#11161d), so the
   rounded screen corners only ever cut into those bars, never into the app UI. */
.phone {
  --scr: #11161d;
  /* Body shadows. All three have the same number of layers so hover tilts animate smoothly.
     The stacked layers extrude the rounded body sideways: light metal at the front, dark at
     the back — that is the visible side of a tilted phone. */
  --flat:
    inset 0 0 0 .1em rgba(255, 255, 255, .14),
    inset 0 0 0 .3em #07090d,
    0.0em 0.000em 0 #5b6678,
    0.0em 0.000em 0 #535e6e,
    0.0em 0.000em 0 #4b5565,
    0.0em 0.000em 0 #444d5b,
    0.0em 0.000em 0 #3c4452,
    0.0em 0.000em 0 #343c48,
    0.0em 0.000em 0 #2c333f,
    0.0em 0.000em 0 #252b35,
    0.0em 0.000em 0 #1d222c,
    0.0em 0.000em 0 #151a22,
    0.0em 0.0em 2em -.4em rgba(0, 0, 0, 0),
    0 4em 8em -2em rgba(0, 0, 0, .8),
    0 0 6em -1em rgba(59, 130, 246, .25);
  --side-r:
    inset 0 0 0 .1em rgba(255, 255, 255, .14),
    inset 0 0 0 .3em #07090d,
    0.1em 0.012em 0 #5b6678,
    0.2em 0.024em 0 #535e6e,
    0.3em 0.036em 0 #4b5565,
    0.4em 0.048em 0 #444d5b,
    0.5em 0.060em 0 #3c4452,
    0.6em 0.072em 0 #343c48,
    0.7em 0.084em 0 #2c333f,
    0.8em 0.096em 0 #252b35,
    0.9em 0.108em 0 #1d222c,
    1.0em 0.120em 0 #151a22,
    1.1em 0.2em 2em -.4em rgba(0, 0, 0, 0.6),
    0 4em 8em -2em rgba(0, 0, 0, .8),
    0 0 6em -1em rgba(59, 130, 246, .25);
  --side-l:
    inset 0 0 0 .1em rgba(255, 255, 255, .14),
    inset 0 0 0 .3em #07090d,
    -0.1em 0.012em 0 #5b6678,
    -0.2em 0.024em 0 #535e6e,
    -0.3em 0.036em 0 #4b5565,
    -0.4em 0.048em 0 #444d5b,
    -0.5em 0.060em 0 #3c4452,
    -0.6em 0.072em 0 #343c48,
    -0.7em 0.084em 0 #2c333f,
    -0.8em 0.096em 0 #252b35,
    -0.9em 0.108em 0 #1d222c,
    -1.0em 0.120em 0 #151a22,
    -1.1em 0.2em 2em -.4em rgba(0, 0, 0, 0.6),
    0 4em 8em -2em rgba(0, 0, 0, .8),
    0 0 6em -1em rgba(59, 130, 246, .25);
  position: relative; width: 28em; font-size: 10px; padding: .55em;
  border-radius: 3.6em;
  background: linear-gradient(160deg, #3a4352, #151a22 22%, #0b0e13 60%, #2a313c);
  box-shadow: var(--flat);
}
/* Side buttons */
.phone::before, .phone::after { content: ""; position: absolute; width: .32em; border-radius: .2em; background: linear-gradient(90deg, #1b2029, #3a4352); transition: left .6s, right .6s; }
.phone::before { right: -.28em; top: 15em; height: 7.5em; }
.phone::after { left: -.28em; top: 12em; height: 4.5em; background: linear-gradient(90deg, #3a4352, #1b2029); }
.phone-screen { position: relative; overflow: hidden; border-radius: 3.05em; background: var(--scr); }
.phone-screen > img, .phone-screen .lb-img { display: block; width: 100%; height: auto; aspect-ratio: 461 / 1024; -webkit-user-drag: none; user-select: none; }
.sb { position: relative; display: flex; align-items: center; justify-content: space-between; height: 3.3em; padding: .3em 2.4em 0 2.7em; color: #e8edf4; }
.sb-time { font: 600 1.3em/1 var(--sans, system-ui, -apple-system, "Segoe UI", sans-serif); letter-spacing: .01em; }
.sb-icons { width: 5.2em; height: 1.15em; }
.sb-cam {
  position: absolute; left: 50%; top: 50%; width: 1.45em; height: 1.45em; margin: -.58em 0 0 -.725em; border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 .12em #05070a;
}
.gb { display: flex; align-items: center; justify-content: center; height: 2.3em; }
.gb i { display: block; width: 9.5em; height: .42em; border-radius: .3em; background: #e8edf4; opacity: .55; }

/* Glass glare: a light sheet over the upper part of the screen with a hard diagonal edge.
   Hidden on flat phones, shown on tilted ones. Light comes from the left, so the sheet is
   strongest there and fades across the screen. */
.phone-screen::after {
  content: ""; position: absolute; inset: 0 0 38% 0; pointer-events: none; z-index: 2;
  background: linear-gradient(162deg, rgba(255, 255, 255, .26) 0%, rgba(255, 255, 255, .1) 45%, rgba(255, 255, 255, .05) 72%, transparent 72.3%);
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .75) 40%, rgba(0, 0, 0, .35) 100%);
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .75) 40%, rgba(0, 0, 0, .35) 100%);
  /* Parked above the screen (clipped by it) and slides down when the phone tilts,
     like a reflection travelling across glass. */
  opacity: 0; transform: translateY(-100%);
  transition: transform .7s cubic-bezier(.3, .6, .2, 1), opacity .5s;
}
/* Phones turned with their left side to the viewer get the mirrored diagonal. */
.tilt-l .phone-screen::after { background: linear-gradient(200deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .09) 45%, rgba(255, 255, 255, .05) 72%, transparent 72.3%); }

/* Tilted states. tilt-r: right edge towards the viewer (visible side on the right);
   tilt-l: the other way round. */
.is-tilted.tilt-r { box-shadow: var(--side-r); }
.is-tilted.tilt-l { box-shadow: var(--side-l); }
.is-tilted .phone-screen::after { opacity: 1; transform: none; }
.is-tilted.tilt-r::before { right: -1.15em; }
.is-tilted.tilt-l::after { left: -1.15em; }
