/* A working copy of the Bonsai window, drawn at its real size in points and
   scaled to fit its frame. Colors come from the app's Day and Night themes. */

.app {
  --a-bg: #f5f5f7;
  --a-surface: #fff;
  --a-surface2: #fafafc;
  --a-well: #efeff3;
  --a-text: #1d1d1f;
  --a-text2: #6e6e76;
  --a-text3: #a0a0ab;
  --a-border: rgba(0, 0, 0, .07);
  --a-border-strong: rgba(0, 0, 0, .14);
  --a-shadow: rgba(0, 0, 0, .10);
  --a-accent: #6366f1;
  --a-accent2: #8b5cf6;
  --a-accent-soft: rgba(99, 102, 241, .10);
  --a-success: #059669;
  --a-success-soft: rgba(5, 150, 105, .12);
  --a-chrome: #e9e9ee;

  position: relative;
  width: 1000px;
  height: 640px;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 344px;
  background: var(--a-bg);
  color: var(--a-text);
  font: 13px/1.25 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .18), 0 30px 70px -30px rgba(0, 0, 0, .3), 0 10px 24px -14px rgba(0, 0, 0, .2);
  text-align: left;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}

:root[data-theme="dark"] .app {
  --a-bg: #101014;
  --a-surface: #1a1a20;
  --a-surface2: #212129;
  --a-well: #16161b;
  --a-text: #f2f2f5;
  --a-text2: #9c9ca8;
  --a-text3: #62626e;
  --a-border: rgba(255, 255, 255, .08);
  --a-border-strong: rgba(255, 255, 255, .16);
  --a-shadow: rgba(0, 0, 0, .5);
  --a-accent: #818cf8;
  --a-accent2: #a78bfa;
  --a-accent-soft: rgba(129, 140, 248, .16);
  --a-success: #34d399;
  --a-success-soft: rgba(52, 211, 153, .16);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 80px -30px rgba(0, 0, 0, .8);
}

.app svg { display: block; fill: currentColor; }

.app-lights {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  gap: 8px;
  z-index: 3;
}
.app-lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12); }
.app-lights i:nth-child(2) { background: #febc2e; }
.app-lights i:nth-child(3) { background: #28c840; }

/* Files */

.app-files { position: relative; display: flex; flex-direction: column; min-width: 0; }

.app-head {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  margin: 46px 24px 4px;
  opacity: 0;
  transition: opacity .35s ease;
}
.app.has-files .app-head { opacity: 1; }
.app-head b { font-weight: 600; }
.app-head span { color: var(--a-text2); font-variant-numeric: tabular-nums; }
.app-clear {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--a-border);
  color: var(--a-text2);
  font-size: 12px;
  font-weight: 500;
}
.app-clear svg { width: 12px; height: 12px; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 12px 24px 24px;
}

.app-drop {
  position: absolute;
  inset: 70px 24px 24px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  border: 1.5px dashed var(--a-border-strong);
  border-radius: 20px;
  text-align: center;
  transition: opacity .3s ease, transform .5s cubic-bezier(.2, .8, .2, 1), border-color .2s ease, background-color .2s ease;
}
.app-drop svg { width: 40px; height: 40px; color: var(--a-accent); margin-bottom: 8px; }
.app-drop b { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.app-drop span { color: var(--a-text2); }
.app-drop small { margin-top: 18px; color: var(--a-text3); font-size: 11px; }
.app.is-hovering .app-drop { border-color: var(--a-accent); background: var(--a-accent-soft); transform: scale(.985); }
.app.has-files .app-drop { opacity: 0; transform: scale(.96); pointer-events: none; }

.card {
  position: relative;
  border-radius: 16px;
  background: var(--a-surface);
  box-shadow: 0 0 0 1px var(--a-border), 0 3px 8px var(--a-shadow);
  opacity: 0;
  transform: translateY(14px) scale(.94);
  transition: opacity .35s ease, transform .55s cubic-bezier(.3, 1.4, .5, 1);
}
.card.is-in { opacity: 1; transform: none; }

.card-thumb {
  position: relative;
  height: 132px;
  margin: 8px;
  border-radius: 12px;
  background: var(--a-well);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.card-thumb .doc { box-shadow: 0 2px 4px rgba(0, 0, 0, .18); border-radius: 4px; overflow: hidden; }

.chip {
  position: absolute;
  left: 50%;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--a-surface) 94%, transparent);
  box-shadow: 0 0 0 1px var(--a-border), 0 2px 5px rgba(0, 0, 0, .12);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 4px) scale(.9);
  transition: opacity .25s ease, transform .35s cubic-bezier(.3, 1.3, .5, 1);
}
.chip.is-on { opacity: 1; transform: translate(-50%, 0); }
.chip svg { width: 13px; height: 13px; }
.chip .spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--a-border-strong); border-top-color: var(--a-accent); animation: app-spin .7s linear infinite; }
.chip.is-done { color: var(--a-success); }
.chip.is-wait { color: var(--a-text2); }

@keyframes app-spin { to { transform: rotate(360deg); } }

.card-info { padding: 4px 14px 12px; }
.card-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { margin-top: 5px; font-size: 11px; color: var(--a-text2); font-variant-numeric: tabular-nums; }
.badge {
  display: inline-flex;
  margin-top: 8px;
  height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--a-success);
  background: var(--a-success-soft);
  white-space: pre;
  opacity: 0;
  transform: scale(.9);
  transform-origin: 0 50%;
  transition: opacity .3s ease, transform .4s cubic-bezier(.3, 1.4, .5, 1);
}
.badge.is-on { opacity: 1; transform: none; }

/* Side panel */

.app-side {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--a-surface);
  box-shadow: -1px 0 0 var(--a-border);
}
.app-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.app-brand img { width: 40px; height: 40px; filter: drop-shadow(0 2px 4px var(--a-shadow)); }
.app-brand b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.0125em; }
.app-brand small { font-size: 10.5px; color: var(--a-text3); }
.app-brand .moon { margin-left: auto; width: 16px; height: 16px; color: var(--a-text2); }

.app-label { font-size: 10.5px; font-weight: 600; letter-spacing: .07em; color: var(--a-text3); margin-bottom: 10px; }

.preset {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--a-border);
  transition: background-color .3s ease, box-shadow .3s ease;
}
.preset + .preset { margin-top: 10px; }
.preset i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--a-border-strong); transition: box-shadow .3s cubic-bezier(.3, 1.3, .5, 1); flex: none; }
.preset b { display: block; font-size: 13px; font-weight: 600; transition: color .3s ease; }
.preset small { display: block; margin-top: 2px; font-size: 11px; color: var(--a-text2); }
.preset svg { margin-left: auto; width: 16px; height: 16px; color: var(--a-text3); transition: color .3s ease, transform .3s ease; flex: none; }
.preset.is-on { background: var(--a-accent-soft); box-shadow: inset 0 0 0 1.5px var(--a-accent); }
.preset.is-on i { box-shadow: inset 0 0 0 6px var(--a-accent); }
.preset.is-on b, .preset.is-on svg { color: var(--a-accent); }
.preset.is-on svg { transform: scale(1.1); }

.app-note {
  display: flex;
  gap: 9px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: var(--a-surface2);
  box-shadow: inset 0 0 0 1px var(--a-border);
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--a-text2);
}
.app-note svg { width: 14px; height: 14px; flex: none; color: var(--a-accent); margin-top: 1px; }

.app-bottom { margin-top: auto; display: grid; gap: 14px; position: relative; }

.app-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 3px;
  border-radius: 10px;
  background: var(--a-well);
  font-size: 11.5px;
  text-align: center;
  color: var(--a-text2);
  transition: opacity .3s ease;
}
.app-mode span { padding: 7px 0; border-radius: 8px; }
.app-mode span:first-child { background: var(--a-surface); color: var(--a-text); font-weight: 600; box-shadow: 0 1px 3px var(--a-shadow); }

.app-progress { display: flex; align-items: center; gap: 12px; height: 0; opacity: 0; overflow: hidden; transition: opacity .3s ease, height .35s cubic-bezier(.2, .8, .2, 1); }
.app.is-running .app-progress { height: 28px; opacity: 1; }
.app-bar { flex: 1; height: 4px; border-radius: 4px; background: var(--a-well); overflow: hidden; }
.app-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--a-accent), var(--a-accent2)); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.app-stop { padding: 6px 12px; border-radius: 8px; background: var(--a-well); font-size: 12px; font-weight: 500; color: var(--a-text2); }

.app-go {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--a-accent), var(--a-accent2));
  transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), opacity .3s ease, box-shadow .3s ease;
}
.app-go svg { width: 15px; height: 15px; }
.app-go .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: app-spin .7s linear infinite; }
.app-go.is-pressed { transform: scale(.975); }
.app:not(.has-files) .app-go { opacity: .45; box-shadow: none; }

.app-done {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 20px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--a-success) 8%, var(--a-surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a-success) 25%, transparent);
  text-align: center;
  opacity: 0;
  transform: scale(.92);
  transition: opacity .35s ease, transform .5s cubic-bezier(.3, 1.3, .5, 1);
  pointer-events: none;
}
.app.is-done .app-done { opacity: 1; transform: none; }
.app.is-done .app-mode, .app.is-done .app-go { opacity: 0; }
.app-done .check { width: 46px; height: 46px; }
.app-done b { font-size: 16px; font-weight: 700; letter-spacing: -.0125em; font-variant-numeric: tabular-nums; }
.app-done span { font-size: 12px; color: var(--a-text2); font-variant-numeric: tabular-nums; }

/* The pointer that plays the visitor's part. */
.app-cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3));
  transition: transform 1s cubic-bezier(.45, 0, .2, 1), opacity .3s ease;
}
.app-cursor.is-on { opacity: 1; }
.app-cursor.is-press svg { transform: scale(.86); }
.app-cursor svg { transition: transform .15s ease; transform-origin: 4px 2px; }

/* Files dragged from Finder. */
.app-flock {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: transform 1s cubic-bezier(.45, 0, .2, 1), opacity .3s ease;
}
.app-flock.is-on { opacity: 1; }
.app-flock .doc { position: absolute; left: 0; top: 0; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); border-radius: 4px; overflow: hidden; }
.app-flock em {
  position: absolute;
  left: 44px;
  top: 40px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #ff3b30;
  color: #fff;
  font: 600 12px/22px -apple-system, BlinkMacSystemFont, sans-serif;
  font-style: normal;
  text-align: center;
}

/* Compact: the side panel goes under the files, for phones. */
.app.is-compact {
  width: 420px;
  height: auto;
  grid-template-columns: 1fr;
}
.app.is-compact .app-files { min-height: 0; }
.app.is-compact .app-head { margin: 40px 16px 0; }
.app.is-compact .app-grid { grid-template-columns: 1fr 1fr; gap: 12px; padding: 10px 16px 16px; }
.app.is-compact .card:nth-child(n + 5) { display: none; }
.app.is-compact .app-drop { inset: 56px 16px 16px; }
.app.is-compact .app-drop small { display: none; }
.app.is-compact .app-side { padding: 16px; box-shadow: 0 -1px 0 var(--a-border); }
.app.is-compact .app-brand, .app.is-compact .app-label, .app.is-compact .app-note, .app.is-compact .preset:not(.is-on) { display: none; }
.app.is-compact .app-bottom { margin-top: 14px; min-height: 112px; align-content: end; }

@media (prefers-reduced-motion: reduce) {
  .app *, .app { transition-duration: .01s !important; animation-duration: .01s !important; }
}

/* First pages of the sample files, drawn in CSS so they stay sharp at any
   scale. Sizes are in em of the page width / 16. */

.doc { position: relative; overflow: hidden; color: #fff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.doc-land { width: 156px; height: 88px; font-size: 9.75px; }
.doc-port { width: 80px; height: 112px; font-size: 5px; }

.doc-brand { background: #0a0714 url(/assets/cover-photo.jpg) 70% 50% / cover; }
.doc-brand span { position: absolute; left: 1em; top: .9em; font-size: .62em; font-weight: 600; }
.doc-brand em { position: absolute; right: 1em; top: .9em; font-size: .62em; font-style: normal; opacity: .7; }
.doc-brand b { position: absolute; left: .55em; top: 1.1em; font-size: 1.7em; line-height: 1; font-weight: 650; letter-spacing: -.02em; }

.doc-investor { background: #fff; color: #16151c; }
.doc-investor span { position: absolute; left: 1em; top: .9em; font-size: .62em; color: #7a7a85; }
.doc-investor b { position: absolute; left: .65em; top: 1.25em; font-size: 1.3em; line-height: 1.05; font-weight: 650; letter-spacing: -.02em; }
.doc-investor .bars { position: absolute; left: 1em; right: 1em; bottom: .9em; height: 3.2em; display: flex; align-items: flex-end; gap: .5em; }
.doc-investor .bars i { flex: 1; background: #16151c; border-radius: .12em .12em 0 0; }
.doc-investor .bars i:nth-child(1) { height: 28%; } .doc-investor .bars i:nth-child(2) { height: 36%; }
.doc-investor .bars i:nth-child(3) { height: 47%; } .doc-investor .bars i:nth-child(4) { height: 58%; }
.doc-investor .bars i:nth-child(5) { height: 76%; } .doc-investor .bars i:nth-child(6) { height: 100%; background: #6366f1; }

.doc-portfolio { background: #111114; }
.doc-portfolio b { position: absolute; left: .6em; top: .55em; font-size: 1.6em; line-height: 1; font-weight: 500; letter-spacing: -.02em; }
.doc-portfolio span { position: absolute; left: 1em; top: 4.6em; font-size: .62em; opacity: .55; }

.doc-lookbook { background: #0a0714 url(/assets/cover-photo.jpg) 86% 60% / auto 180%; }
.doc-lookbook b { position: absolute; left: .75em; top: .7em; font-size: 2.6em; line-height: 1; font-weight: 650; letter-spacing: -.02em; }
.doc-lookbook span { position: absolute; left: 1.6em; top: 5.2em; font-size: 1.25em; opacity: .8; }

.doc-thesis { background: #fff; color: #1d1d1f; text-align: center; padding: 3em 1.6em; font-family: "New York", ui-serif, Georgia, serif; display: flex; flex-direction: column; align-items: center; }
.doc-thesis span { font-size: 1.05em; color: #6e6e76; }
.doc-thesis b { margin-top: 1.6em; font-size: 1.9em; line-height: 1.15; font-weight: 600; }
.doc-thesis em { margin: 1.2em 0 auto; font-size: 1.1em; }

.doc-lease { background: #fff; color: #1d1d1f; padding: 2.6em 2em; }
.doc-lease b { display: block; font-size: 1.5em; font-weight: 650; margin-bottom: 1.4em; }
.doc-lease i { display: block; height: .34em; margin-top: .85em; background: #c9c9d0; border-radius: .2em; }
.doc-lease i:nth-of-type(4n) { width: 62%; margin-bottom: 1.6em; }
.doc-lease em { position: absolute; left: 2em; bottom: 2.4em; width: 7em; border-bottom: .2em solid #1d1d1f; }
.app.is-compact .app-done { inset: 0; gap: 6px; padding: 10px 12px; align-content: center; }
.app.is-compact .app-done .check { width: 36px; height: 36px; }
