/* The landing's fonts and colors, dark and light as the system says. */
:root {
  color-scheme: dark light;
  --font: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-d: 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --page: #0e0e11;
  --text: #f2f2f0;
  --quiet: rgba(242, 242, 240, 0.7);
  --line: rgba(255, 255, 255, 0.09);
  --card: #16161a;
  --chip: #2a2a30;
  --track: var(--track);
  --link: #a9b6ff;
  font-family: var(--font);
  background: var(--page);
  color: var(--text);
}

@media (prefers-color-scheme: light) {
  :root {
    --page: #f6f6f4;
    --text: #141416;
    --quiet: rgba(20, 20, 22, 0.72);
    --line: rgba(0, 0, 0, 0.09);
    --card: #ffffff;
    --chip: #e6e6ea;
    --track: #d4d4d8;
    --link: #2f45d6;
  }
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.brand {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--text);
  font: 700 22px/1 var(--font-d);
  letter-spacing: -0.035em;
  text-decoration: none;
}

.needs {
  margin-top: 12px;
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px;
}

.intro {
  max-width: 2000px;
  margin: 0 auto 20px;
}

.intro h1 {
  margin: 0 0 4px;
  font: 700 28px/1.2 var(--font-d);
  letter-spacing: -0.02em;
}

.intro p {
  margin: 0;
  color: var(--quiet);
  font-size: 15px;
}

.stage {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: 2000px;
  margin: 0 auto;
}

.pc {
  flex: 1 1 auto;
  min-width: 0;
}

/* The simulated screen, in its own pixels, scaled to the box it shows in. */
.desktop {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--line), 0 12px 40px #0008;
  aspect-ratio: 16 / 9;
}

.screen {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1080px;
  transform-origin: 0 0;
  background:
    radial-gradient(ellipse 60% 70% at 62% 58%, #3d7bd9 0%, #2457b8 28%, transparent 62%),
    radial-gradient(ellipse 45% 55% at 38% 40%, #6a4fc9 0%, transparent 60%),
    linear-gradient(160deg, #0b1f4a 0%, #102d6b 45%, #0a1838 100%);
  overflow: hidden;
}

.taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: rgb(28 28 30 / 0.92);
  border-top: 1px solid rgb(255 255 255 / 0.08);
}

/* Aligned left, as Windows 11 lets a taskbar be, which leaves its middle to the overlay. */
.apps {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  gap: 18px;
}

.start {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 48px;
  height: 48px;
  padding: 9px;
}

.start i {
  background: #4cc2ff;
  border-radius: 2px;
}

.app {
  width: 48px;
  height: 48px;
  border-radius: 9px;
  opacity: 0.55;
}

.app.one {
  background: linear-gradient(135deg, #f4c542, #e0901a);
}

.app.two {
  background: linear-gradient(135deg, #3c8cf0, #2056c4);
}

.app.three {
  background: linear-gradient(135deg, #2b2b2b, #555);
}

.clock {
  position: absolute;
  right: 24px;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

/* The overlay is dragged with a mouse or a finger, so the page neither scrolls, zooms nor selects under it. */
.desktop {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* The OS the PC runs: two segments, the one on filled. */
.os {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 3px;
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line);
}

.os button {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--quiet);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.os button[aria-checked='true'] {
  background: var(--chip);
  color: var(--text);
}

.os button:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 1px;
}

/* GNOME: its top bar along the top, the clock in its middle, the system menu at its right end, and no taskbar. */
.desktop[data-os='linux'] .screen {
  background:
    radial-gradient(ellipse 55% 65% at 30% 70%, #3f6fb3 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 75% 35%, #5b4a9e 0%, transparent 62%),
    linear-gradient(150deg, #1b2a4a 0%, #243b6b 50%, #182644 100%);
}

.desktop[data-os='linux'] .taskbar,
.desktop[data-os='windows'] .topbar {
  display: none;
}

.topbar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 48px;
  background: #000;
  color: #fff;
  font-family: Cantarell, 'Noto Sans', Ubuntu, system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.workspaces {
  position: absolute;
  left: 21px;
  top: 18px;
  display: flex;
  gap: 9px;
}

.workspaces i {
  width: 12px;
  height: 12px;
  border-radius: 6px;
  background: #fff8;
}

.workspaces i.on {
  width: 48px;
  background: #fff;
}

/* Where the screens say the clock and the system menu are: 1190 to 1370, and 2390 to 2548, of 2560. */
.top-clock {
  position: absolute;
  left: 1190px;
  width: 180px;
  top: 0;
  line-height: 48px;
  text-align: center;
  white-space: nowrap;
}

.system {
  position: absolute;
  left: 2390px;
  width: 158px;
  top: 0;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding-right: 15px;
}

.system i {
  width: 21px;
  height: 21px;
  background: #fff;
}

.system .net {
  clip-path: polygon(50% 100%, 0 30%, 18% 12%, 50% 0, 82% 12%, 100% 30%);
}

.system .sound {
  clip-path: polygon(0 35%, 30% 35%, 65% 5%, 65% 95%, 30% 65%, 0 65%);
}

.system .power {
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 3px #fff;
}

/* Says what the overlay reads is a recording, not the visitor's PC: quiet text, never a control. */
.sample {
  position: absolute;
  right: 12px;
  top: 8px;
  margin: 0;
  color: #ffffffb3;
  font-size: 12px;
  text-shadow: 0 1px 2px #000c;
  pointer-events: none;
}

.desktop[data-os='linux'] .sample {
  top: auto;
  bottom: 8px;
}

.overlay {
  position: absolute;
}

/* A drag's marks on an overlay: the empty slot a lifted pill leaves, and the ring and bar of where a drop joins. */
.drop {
  position: absolute;
  box-sizing: border-box;
  pointer-events: none;
}

.drop.slot {
  border: solid rgb(128 128 128 / 0.55);
  border-style: dashed;
  background: rgb(128 128 128 / 0.16);
}

.drop.ring {
  border: solid var(--accent);
}

.drop.bar {
  background: var(--accent);
}

/* The pill a hold lifted, carried above everything on the screen. */
.carried {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 6px 14px #000a);
}

.carried img {
  display: block;
}

.overlay.held {
  filter: drop-shadow(0 6px 14px #000a);
}

.overlay img {
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Where a drop now snaps the overlay: the taskbar or a corner of the work area. */
.snap {
  position: absolute;
  border-radius: 10px;
  border: 3px dashed #4cc2ffcc;
  background: #4cc2ff22;
  pointer-events: none;
}

.overlay .mark {
  position: absolute;
  border-radius: 8px;
  box-shadow: 0 0 0 3px #4cc2ff;
}

.load {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px 16px;
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line);
}

.load label {
  font-size: 16px;
  font-weight: 600;
}

.load output {
  min-width: 4.5ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
}

.load .hint {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--quiet);
  font-size: 13px;
}

.load input[type='range'] {
  --fill: 0%;
  appearance: none;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.load input[type='range']::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #6ccb5f, #fec84b 70%, #f05a50) 0 / var(--fill) 100% no-repeat, var(--track);
}

.load input[type='range']::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: var(--track);
}

.load input[type='range']::-moz-range-progress {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #6ccb5f, #fec84b 70%, #f05a50);
}

.load input[type='range']::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -8px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 1px 4px #0009;
}

.load input[type='range']::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 1px 4px #0009;
}

.load input[type='range']:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 4px;
  border-radius: 4px;
}

/* The settings window, as its own window beside the desktop: its page 860 px wide, where it shows its navigation pane,
   scaled down a little where the stage is narrower than both. */
:root {
  --window-scale: 1;
}

.window {
  position: relative;
  flex: 0 0 calc(860px * var(--window-scale));
  height: min(860px, calc(100vh - 140px));
  min-height: 620px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 0 0 1px #3a3a3a, 0 16px 48px #000a;
}

.window iframe {
  display: block;
  width: 860px;
  height: calc(100% / var(--window-scale));
  border: 0;
  transform: scale(var(--window-scale));
  transform-origin: 0 0;
}

.starting {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--quiet);
}

@media (max-width: 900px) {
  body {
    padding: 16px;
  }

  .stage {
    flex-direction: column;
    align-items: stretch;
  }

  .window {
    flex: none;
    height: 760px;
    min-height: 0;
  }

  .window iframe {
    width: 100%;
    height: 100%;
    transform: none;
  }
}
