/* Xcode-inspired, illustrative workspace. Colors follow the browser appearance. */
:root {
  --ide-background: #ffffff;
  --ide-panel: #f2f2f5;
  --ide-toolbar: #ededf0;
  --ide-border: #d7d7dd;
  --ide-text: #2c2c31;
  --ide-muted: #74747f;
  --ide-selected: #dbe6fc;
  --ide-keyword: #a02c87;
  --ide-type: #2f6985;
  --ide-string: #ac382f;
  --ide-number: #7448a6;
}
.xcode-figure {
  margin: 65px 0 0;
}
.xcode-scene {
  position: relative;
  width: min(1060px, calc(100% - 60px));
  margin-inline: auto;
  padding-bottom: 24px;
  --package-scale: 1;
  isolation: isolate;
}
.ide-window {
  border: 1px solid var(--ide-border);
  border-radius: 13px;
  background: var(--ide-background);
  box-shadow:
    0 32px 85px #00000012,
    0 4px 12px #00000009;
  overflow: hidden;
  color: var(--ide-text);
  filter: blur(1.6px);
  opacity: 0.76;
  animation: ide-arrive 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
.ide-toolbar {
  height: 47px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 17px;
  background: var(--ide-toolbar);
  border-bottom: 1px solid var(--ide-border);
  font-size: 11px;
}
.window-controls {
  display: flex;
  gap: 7px;
}
.window-controls i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ed6b5e;
  box-shadow: inset 0 0 0 1px #00000012;
}
.window-controls i:nth-child(2) {
  background: #f4be4f;
}
.window-controls i:nth-child(3) {
  background: #62c454;
}
.ide-sidebar-symbol,
.ide-inspector-symbol {
  color: var(--ide-muted);
  font-size: 19px;
  line-height: 1;
}
.ide-run {
  font-size: 14px;
  color: var(--ide-muted);
}
.ide-project-title {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ide-project-title > span {
  color: var(--ide-muted);
}
.ide-project-title small {
  font-size: 10px;
  font-weight: 400;
}
.ide-app-title {
  margin-left: auto;
  color: var(--ide-muted);
  font-size: 10px;
}
.ide-workspace {
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr);
  height: 495px;
}
.ide-navigator {
  background: var(--ide-panel);
  border-right: 1px solid var(--ide-border);
  min-width: 0;
}
.navigator-tools {
  height: 33px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  border-bottom: 1px solid var(--ide-border);
  color: var(--ide-muted);
  font-size: 13px;
}
.navigator-tools > :first-child {
  color: #387fe2;
}
.project-tree {
  padding: 15px 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 9px;
}
.project-tree > span {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  white-space: nowrap;
}
.project-tree svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: #6596d6;
}
.tree-root {
  font-weight: 600;
}
.tree-root b {
  color: #4288e2;
  font-size: 17px;
  font-weight: 400;
}
.tree-group {
  padding-left: 9px;
}
.tree-file {
  padding-left: 27px;
}
.tree-group.tree-indent {
  padding-left: 18px;
}
.tree-selected {
  border-radius: 4px;
  background: var(--ide-selected);
  padding-left: 34px;
}
.tree-selected img {
  flex-shrink: 0;
  object-fit: contain;
}
.ide-editor {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--ide-background);
}
.ide-tabs {
  display: flex;
  min-height: 33px;
  border-bottom: 1px solid var(--ide-border);
  background: var(--ide-panel);
  font-size: 10px;
}
.ide-tabs > span {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 13px;
  background: var(--ide-background);
  border-right: 1px solid var(--ide-border);
}
.ide-tabs img {
  object-fit: contain;
}
.ide-tabs i {
  font-style: normal;
  color: var(--ide-muted);
  margin-left: 14px;
}
.ide-breadcrumb {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border-bottom: 1px solid var(--ide-border);
  color: var(--ide-muted);
  font-size: 8px;
}
.ide-breadcrumb > span {
  font-size: 14px;
}
.ide-editor pre {
  margin: 0;
  padding: 18px 12px 16px 8px;
  flex: 1;
  font: 10.5px/1.58 var(--mono);
  overflow: hidden;
  counter-reset: ide-line;
}
.ide-code-line {
  counter-increment: ide-line;
}
.ide-code-line:before {
  content: counter(ide-line);
  display: inline-block;
  width: 19px;
  margin-right: 18px;
  text-align: right;
  color: var(--ide-muted);
  opacity: 0.7;
}
.ide-keyword {
  color: var(--ide-keyword);
}
.ide-type {
  color: var(--ide-type);
}
.ide-string {
  color: var(--ide-string);
}
.ide-number {
  color: var(--ide-number);
}
.ide-editor-status {
  display: flex;
  justify-content: space-between;
  min-height: 24px;
  align-items: center;
  padding: 0 14px;
  border-top: 1px solid var(--ide-border);
  font: 8px var(--mono);
  color: var(--ide-muted);
}

/* A desktop folder with its documents, app icon and tools floating above it. */
.project-package {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 400px;
  transform: translate(-50%, -50%) scale(var(--package-scale));
  pointer-events: none;
}
.package-halo {
  position: absolute;
  inset: 0 -60px -35px;
  border-radius: 50%;
  background: radial-gradient(ellipse, #68b7ff24, transparent 66%);
}
.package-folder-back {
  z-index: 1;
  position: absolute;
  left: 200px;
  top: 233px;
  width: 200px;
  height: 170px;
  border: 1px solid #68b7e9;
  border-radius: 0 13px 16px 16px;
  background: linear-gradient(160deg, #42a8e5, #2076bd 55%, #15558d);
  box-shadow:
    inset 0 2px 1px #b3e8ff80,
    0 18px 35px #05294920;
}
.package-folder-back > span {
  position: absolute;
  left: -1px;
  top: -22px;
  width: 82px;
  height: 24px;
  border: 1px solid #68b7e9;
  border-bottom: 0;
  border-radius: 9px 14px 0 0;
  background: #43a9e5;
  box-shadow: inset 0 2px 1px #b3e8ff60;
}
.package-document {
  z-index: 2;
  --fan-angle: 0deg;
  position: absolute;
  top: 0;
  width: 139px;
  height: 200px;
  padding: 19px 17px;
  border: 1px solid #e1e6ec;
  border-radius: 9px;
  background: linear-gradient(155deg, #fff 45%, #f0f4f9);
  color: #20364b;
  text-align: left;
  box-shadow:
    0 12px 22px #071b3821,
    0 1px 3px #071b3810;
  transform: rotate(var(--fan-angle));
  transform-origin: 50% 100%;
}
.document-license {
  left: 135px;
  --fan-angle: -13deg;
  --launch-x: 95.5px;
  --launch-y: 130px;
  --launch-delay: 0.1s;
}
.document-setup {
  left: 326px;
  top: -3px;
  --fan-angle: 13deg;
  --launch-x: -95.5px;
  --launch-y: 133px;
  --launch-delay: 0.21s;
}
.document-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #4281b2;
}
.document-header svg {
  width: 29px;
  height: 29px;
}
.document-header > span {
  padding: 3px 4px;
  border: 1px solid #d9e3eb;
  border-radius: 4px;
  font: 7px var(--mono);
  letter-spacing: 0.05em;
  color: #678296;
}
.package-document strong {
  display: block;
  min-height: 37px;
  margin-top: 19px;
  font-size: 15px;
  line-height: 1.22;
  letter-spacing: -0.025em;
  font-weight: 650;
}
.document-lines {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}
.document-lines i {
  height: 3px;
  border-radius: 2px;
  background: #dbe3eb;
}
.document-lines i:nth-child(2) {
  width: 86%;
}
.document-lines i:nth-child(4) {
  width: 62%;
}
.document-filename {
  display: block;
  margin-top: 17px;
  color: #8a9baa;
  font: 6px var(--mono);
  letter-spacing: 0.04em;
}
.package-app {
  z-index: 3;
  --launch-x: 0px;
  --launch-y: 174px;
  --launch-delay: 0.32s;
  --fan-angle: 0deg;
  position: absolute;
  top: 86px;
  left: 245px;
}
.package-app img {
  display: block;
  width: 110px;
  height: 110px;
  border-radius: 25px;
  filter: drop-shadow(0 12px 14px #082c4930);
}
.package-technology {
  z-index: 3;
  --fan-angle: 0deg;
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  transform: rotate(var(--fan-angle));
  transform-origin: 50% 150%;
}
.package-technology img {
  object-fit: contain;
  filter: drop-shadow(0 11px 11px #082c492e);
}
.package-technology > span {
  color: var(--ide-text);
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 8px var(--ide-background);
}
.package-swift {
  top: 178px;
  left: 76px;
  --fan-angle: -25deg;
  --launch-x: 172px;
  --launch-y: -45px;
  --launch-delay: 0.43s;
}
.package-xcode {
  top: 164px;
  right: 54px;
  --fan-angle: 24deg;
  --launch-x: -183px;
  --launch-y: -64px;
  --launch-delay: 0.54s;
}
.xcode-logo-dark {
  display: none;
}
.package-folder-front {
  z-index: 4;
  position: absolute;
  left: 182px;
  top: 255px;
  width: 236px;
  height: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #8edcff;
  border-bottom-color: #248fd9;
  border-radius: 11px 11px 16px 16px;
  transform: perspective(480px) rotateX(-23deg);
  transform-origin: 50% 100%;
  background: linear-gradient(165deg, #8ddafa 0%, #59baf0 36%, #2b99e5 100%);
  box-shadow:
    inset 0 2px 1px #ffffff78,
    inset 0 -2px 1px #127bcc40,
    0 21px 29px #07589633,
    0 4px 7px #062f5226;
  color: #074472;
}
.folder-code {
  margin-bottom: 8px;
  color: #1977ad;
  font: 23px/1 var(--mono);
  text-shadow: 0 1px 0 #bde9ff80;
}
.package-folder-front strong {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.045em;
  text-shadow: 0 1px 0 #c1ecff52;
}
.folder-caption {
  margin-top: 7px;
  color: #125781;
  font: 9px var(--mono);
  letter-spacing: 0.025em;
}
.xcode-figure figcaption {
  text-align: center;
  padding-top: 17px;
}
.xcode-figure figcaption strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.xcode-figure figcaption > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}
@keyframes ide-arrive {
  from {
    opacity: 0;
    translate: 0 25px;
  }
  to {
    opacity: 0.76;
    translate: 0 0;
  }
}
/* The launch vectors share a point behind the folder's front cover.
   JavaScript supplies a continuous 0–1 value for the entrance and scroll position. */
@media (prefers-reduced-motion: no-preference) {
  .motion-ready :is(.package-document, .package-app, .package-technology) {
    --item-open: 0;
    opacity: clamp(0, calc(var(--item-open) * 6), 1);
    transform: translate(
        calc(var(--launch-x) * (1 - var(--item-open))),
        calc(var(--launch-y) * (1 - var(--item-open)))
      )
      rotate(calc(var(--fan-angle) * var(--item-open)))
      scale(calc(0.22 + 0.78 * var(--item-open)));
  }
  .motion-ready .package-folder-front {
    transform: perspective(480px) rotateX(calc(-23deg * var(--folder-open, 0)));
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    --ide-background: #202024;
    --ide-panel: #27272d;
    --ide-toolbar: #323239;
    --ide-border: #424249;
    --ide-text: #e7e7ed;
    --ide-muted: #a4a4af;
    --ide-selected: #3c4e6c;
    --ide-keyword: #e798c9;
    --ide-type: #95cadf;
    --ide-string: #f18e7f;
    --ide-number: #c6adfa;
  }
  .xcode-logo-light {
    display: none;
  }
  .xcode-logo-dark {
    display: block;
  }
  .ide-window {
    box-shadow: 0 32px 85px #00000055;
  }
  .package-halo {
    background: radial-gradient(ellipse, #148fe72b, transparent 66%);
  }
  .package-document {
    background: linear-gradient(155deg, #f9fcff 45%, #e5edf6);
    box-shadow: 0 12px 22px #00000050;
  }
  .package-folder-front {
    box-shadow:
      inset 0 2px 1px #ffffff78,
      inset 0 -2px 1px #127bcc40,
      0 21px 35px #00000055,
      0 0 60px #147fcf1a;
  }
}
@media (max-width: 1100px) {
  .xcode-scene {
    --package-scale: 0.92;
  }
  .ide-workspace {
    grid-template-columns: 148px minmax(0, 1fr);
    height: 440px;
  }
  .ide-editor pre {
    font-size: 9px;
  }
  .ide-code-line:before {
    margin-right: 12px;
    width: 15px;
  }
  .project-tree {
    font-size: 8px;
  }
  .navigator-tools {
    gap: 18px;
  }
}
@media (max-width: 800px) {
  .xcode-scene {
    width: calc(100% - 20px);
    --package-scale: 0.85;
  }
  .ide-navigator {
    display: none;
  }
  .ide-workspace {
    grid-template-columns: minmax(0, 1fr);
    height: 420px;
  }
}
@media (max-width: 600px) {
  .xcode-figure {
    margin-top: 45px;
  }
  .xcode-scene {
    width: 100%;
    padding-bottom: 20px;
    --package-scale: 0.63;
  }
  .ide-window {
    border-radius: 8px;
    filter: blur(1.1px);
  }
  .ide-toolbar {
    height: 35px;
    padding: 0 9px;
    gap: 13px;
  }
  .window-controls {
    gap: 4px;
  }
  .window-controls i {
    width: 6px;
    height: 6px;
  }
  .ide-sidebar-symbol,
  .ide-inspector-symbol {
    display: none;
  }
  .ide-app-title {
    font-size: 8px;
  }
  .ide-run {
    font-size: 10px;
  }
  .ide-project-title {
    font-size: 8px;
    gap: 7px;
  }
  .ide-project-title small {
    font-size: 7px;
  }
  .ide-workspace {
    height: 330px;
  }
  .ide-tabs {
    min-height: 26px;
    font-size: 7px;
  }
  .ide-tabs > span {
    padding-inline: 8px;
    gap: 5px;
  }
  .ide-tabs img {
    width: 10px;
    height: 10px;
  }
  .ide-tabs i {
    margin-left: 2px;
  }
  .ide-breadcrumb {
    min-height: 23px;
    font-size: 6px;
    gap: 4px;
    padding-inline: 8px;
  }
  .ide-editor pre {
    font-size: 7.5px;
    line-height: 1.62;
    padding: 13px 5px 9px;
  }
  .ide-code-line:before {
    width: 9px;
    margin-right: 7px;
  }
  .ide-editor-status {
    min-height: 18px;
    padding-inline: 8px;
    font-size: 5px;
  }
  .xcode-figure figcaption {
    padding-top: 9px;
  }
  .xcode-figure figcaption strong {
    font-size: 11px;
  }
  .xcode-figure figcaption > span {
    font-size: 9px;
  }
}
@media (max-width: 430px) {
  .xcode-scene {
    --package-scale: 0.54;
  }
  .ide-workspace {
    height: 310px;
  }
}
@media (max-width: 360px) {
  .xcode-scene {
    --package-scale: 0.46;
  }
  .ide-workspace {
    height: 285px;
  }
  .ide-editor pre {
    font-size: 6.5px;
  }
  .ide-code-line:before {
    width: 8px;
    margin-right: 5px;
  }
  .ide-breadcrumb {
    font-size: 5px;
    gap: 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ide-window,
  .package-document,
  .package-app,
  .package-technology,
  .package-folder-back,
  .package-folder-front {
    animation: none !important;
  }
}
