/* Window chrome: our own CSS in the spirit of the early-2000s desktop. No borrowed art. */
.windows { position: absolute; inset: 0; pointer-events: none; }

.window {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  padding: 0 3px 3px;
  background: #0831d9;
  border-radius: 8px 7px 0 0;
  box-shadow: inset -1px -1px #00138c, inset 1px 1px #0831d9, inset -2px -2px #001ea0, inset 2px 2px #166aee,
    inset -3px -3px #003bda, inset 3px 3px #0855dd, 2px 4px 12px rgb(0 0 0 / 0.35);
  font-family: var(--ui-font);
  pointer-events: auto;
}
.window:not(.is-active) { background: #7a96df; box-shadow: inset -1px -1px #6a7fc8, inset 1px 1px #8fa8ea,
  inset -2px -2px #7189d4, inset 2px 2px #9fb5ee, inset -3px -3px #7d97e0, inset 3px 3px #93abeb, 2px 4px 12px rgb(0 0 0 / 0.3); }
.window.is-maximized { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; }

.window__titlebar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--titlebar-h);
  margin: 0 -3px;
  padding: 0 5px 0 6px;
  background: linear-gradient(180deg, #0997ff, #0053ee 8%, #0050ee 40%, #06f 88%, #06f 93%, #005bff 95%, #003dd7 96%, #003dd7);
  border-radius: 8px 7px 0 0;
  border-top: 1px solid #0831d9;
  color: var(--white);
  cursor: default;
  touch-action: none;
  user-select: none;
}
.window:not(.is-active) .window__titlebar { background: linear-gradient(180deg, #8ea8e8, #5674c8 12%, #5674c8 88%, #4a6fd6); color: var(--white); }
.window.is-maximized .window__titlebar { border-radius: 0; margin: 0; }

.window__title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin: 0;
  font: 700 13px/1 var(--title-font);
  letter-spacing: 0.2px;
  text-shadow: 1px 1px #0f1089;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.window:not(.is-active) .window__title { text-shadow: none; }

.window__buttons { display: flex; gap: 2px; }
.window__btn {
  position: relative;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 1px solid var(--white);
  border-radius: 3px;
  background: radial-gradient(circle at 90% 90%, #0054e9 0%, #2263d5 55%, #4479e4 70%, #a3bbec 90%, #fff 100%);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
  cursor: pointer;
}
.window__btn:hover { filter: brightness(1.12); }
.window__btn:active { filter: brightness(0.85); }
.window:not(.is-active) .window__btn { opacity: 0.75; }
.window__btn--close { background: radial-gradient(circle at 90% 90%, #cc4600 0%, #dc6527 55%, #cd7546 70%, #ffccb2 90%, #fff 100%); }
.window__btn::before, .window__btn::after { content: ""; position: absolute; background: var(--white); }
/* Glyphs are drawn from the centre, so they stay in place when phones make the buttons bigger (s7). */
.window__btn--min::before { left: 50%; top: 50%; width: 7px; height: 3px; margin: 2px 0 0 -6px; }
.window__btn--max::before { left: 50%; top: 50%; width: 11px; height: 11px; margin: -6px 0 0 -6px; box-sizing: border-box; background: none; border: 1px solid var(--white); border-top-width: 3px; }
.window__btn--close::before, .window__btn--close::after { left: 50%; top: 50%; width: 2px; height: 13px; margin: -6.5px 0 0 -1px; }
.window__btn--close::before { transform: rotate(45deg); }
.window__btn--close::after { transform: rotate(-45deg); }
.window__body { flex: 1; min-height: 0; overflow: auto; background: var(--white); font-size: var(--ui-size); }
.window__status {
  flex: 0 0 auto; margin: 0; padding: 2px 6px;
  background: var(--face); box-shadow: inset 0 1px 2px grey; color: var(--ink);
  font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.window--amp .window__status { display: none; }
.window--amp .window__body { background: var(--amp-face-lo); } /* no white strip under the player when the window is taller than it */

/* Scrollbars in the Luna style, where the browser allows it. */
.window__body { scrollbar-color: #c8d6fb #f3f1ec; }
.window__body::-webkit-scrollbar { width: 17px; height: 17px; background: #f3f1ec; }
.window__body::-webkit-scrollbar-thumb { background: #c8d6fb; border: 1px solid var(--white); border-radius: 2px; box-shadow: inset -3px 0 #bad1fc, inset 1px 1px #b7caf5; }

@media (max-width: 720px), (pointer: coarse) and (max-height: 500px) {
  .window { min-width: 0; }
  .window__buttons { gap: 8px; } /* a thumb that misses Maximise must not hit Close */
  .window__btn { width: 30px; height: 30px; }
  .window__btn::before, .window__btn::after { transform: scale(1.35); } /* glyphs grow with the button */
  .window__btn--close::before { transform: scale(1.35) rotate(45deg); }
  .window__btn--close::after { transform: scale(1.35) rotate(-45deg); }
  .window--amp .window__btn::before, .window--amp .window__btn::after { transform: none; }
  .window--amp .window__btn--close::before { transform: rotate(45deg); }
  .window--amp .window__btn--close::after { transform: rotate(-45deg); }
  .window--amp .window__body { overflow-y: auto; } /* short phones: the video stays reachable */
}

/* App content */
.window__body--flush { display: flex; flex-direction: column; }
.notepad { flex: 1; width: 100%; border: 0; padding: 4px 6px; resize: none; font: 13px/1.35 "Lucida Console", "Courier New", ui-monospace, monospace; }
.notepad:focus-visible { outline: 1px dotted #000; outline-offset: -3px; }
.notepad__status { margin: 0; padding: 4px 8px; background: var(--face); font-size: 12px; }
.file-list { list-style: none; margin: 0; padding: 8px; }
.file-list li { display: flex; flex-direction: column; padding: 6px 8px; border-bottom: 1px solid #eee; }
.file-list small { color: #555; }
.file-list__footer { margin: 0; padding: 6px 12px; background: var(--face); font-size: 12px; }
.coming-soon { padding: 24px; color: #444; }
.button {
  min-width: 75px; min-height: 23px; padding: 0 12px;
  border: 1px solid #003c74; border-radius: 3px;
  background: linear-gradient(180deg, #fff, #ecebe5 86%, #d8d0c4);
  color: var(--ink); font: 11px var(--ui-font); cursor: pointer;
}
.button:hover { box-shadow: inset -1px 1px #fff0cf, inset 1px 2px #fdd889, inset -2px 2px #fbc761, inset 2px -2px #e5a01a; }
.button:active { background: linear-gradient(180deg, #cdcac3, #e3e3db 8%, #e5e5de 94%, #f2f2f1); box-shadow: none; }
.button:focus-visible { outline: 1px dotted #000; outline-offset: -4px; box-shadow: inset -1px 1px #cee7ff, inset 1px 2px #98b8ea, inset -2px 2px #bcd4f6, inset 1px -1px #89ade4, inset 2px -2px #89ade4; }
.dp { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--face); }
.dp__tabs { display: flex; gap: 0; padding-left: 4px; border-bottom: 1px solid #919b9c; }
.dp__tab { margin-bottom: -1px; padding: 3px 10px; background: linear-gradient(180deg, #fff, #ecebe5 86%, #d8d0c4); border: 1px solid #91a7b4; border-bottom: 0; border-radius: 3px 3px 0 0; font: 11px var(--ui-font); cursor: pointer; }
.dp__tab[aria-selected="true"] { padding-bottom: 5px; background: #fcfcfe; box-shadow: inset 0 2px #ffc73c; border-top-color: #e68b2c; }
.dp__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; max-height: 300px; overflow: auto; padding: 4px; background: var(--white); border: 1px solid var(--face-dark); }
.dp__thumb { display: flex; flex-direction: column; gap: 4px; padding: 4px; background: none; border: 2px solid transparent; cursor: pointer; font-size: 11px; }
.dp__thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.dp__thumb[aria-selected="true"] { border-color: var(--blue-700); background: var(--pane); }
.dp__credit { margin: 0; font-size: 12px; color: #444; }
.dp__actions { display: flex; justify-content: flex-end; }

/* Project and About windows */
.project { display: flex; min-height: 100%; }
.pane { flex: 0 0 180px; padding: 12px 10px; background: linear-gradient(180deg, #7ba2e7, #6375d6); }
.pane__group { margin-bottom: 12px; background: #d6dff7; border: 1px solid var(--white); border-top: 0; border-radius: 3px 3px 0 0; overflow: hidden; }
.pane__title {
  position: relative; margin: 0 -1px; padding: 5px 28px 5px 10px;
  background: linear-gradient(90deg, #fff, #c6d3f7); border-radius: 3px 3px 0 0;
  color: #215dc6; font: 700 11px var(--ui-font);
}
.pane__title::after {
  content: "\00BB"; position: absolute; right: 4px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  border-radius: 50%; background: var(--white); border: 1px solid #b5c7f0; color: #215dc6;
  font-size: 11px; line-height: 13px; text-align: center; transform: rotate(-90deg);
}
.pane__list { list-style: none; margin: 0; padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; }
.pane__link { padding: 0; background: none; border: 0; color: #0c32a5; font: 11px var(--ui-font); text-align: left; text-decoration: none; cursor: pointer; }
.pane__link:hover { text-decoration: underline; }
.project__main { flex: 1; min-width: 0; padding: 16px 20px 20px; }
.project__title { margin: 0; font: 700 18px var(--title-font); color: #000; }
.project__tagline { margin: 2px 0 12px; font-style: italic; color: #4a4a4a; }
.project__status { display: inline-block; margin: 0 0 12px; padding: 3px 10px; border: 1px solid #e0b84d; border-radius: 3px; background: #fff7d6; }
.project__para { margin: 0 0 10px; max-width: 62ch; }
.project__shots { display: flex; gap: 8px; margin: 12px 0; overflow-x: auto; }
.project__shots img { height: 220px; width: auto; max-width: none; border: 1px solid var(--face-dark); border-radius: 4px; }
.project__facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 12px 0; }
.project__facts dt { font-weight: 700; color: #555; }
.project__facts dd { margin: 0; }
.project__live { display: inline-block; margin-top: 4px; color: var(--ink); text-decoration: none; }
.project__disclaimer { margin: 16px 0 0; font-size: 11px; color: #595959; }
.project__legal { margin: 6px 0 0; font-size: 11px; color: #595959; }
.project__legal a { color: #0c32a5; }
@media (max-width: 720px), (pointer: coarse) and (max-height: 500px) {
  .project { flex-direction: column; }
  .pane { flex: none; order: 2; }
  .project__shots img { height: 180px; }
}

@media (max-width: 720px), (pointer: coarse) and (max-height: 500px) {
  .notepad { font-size: 16px; }
  .window__btn, .task-button, .menu__item { touch-action: manipulation; }
}

.start-project { padding: 16px 20px; }
.start-project__mail { color: #0c32a5; font-weight: 700; }
.lead { display: grid; gap: 8px; margin: 0 0 10px; }
.lead__field { display: grid; gap: 3px; font-size: 12px; }
.lead__field input, .lead__field textarea {
  font: 12px/1.4 Tahoma, "Segoe UI", sans-serif; padding: 3px 4px; border: 1px solid #7f9db9; background: var(--white); color: #000;
}
.lead__field textarea { resize: vertical; min-height: 64px; }
.lead__field input:focus-visible, .lead__field textarea:focus-visible { outline: 1px dotted #000; outline-offset: 1px; }
.lead .button { justify-self: start; }
.lead__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lead__status { margin: 0; min-height: 1.4em; font-size: 12px; }
.lead__status[data-kind="error"] { color: #a00; font-weight: 700; }
.lead__done { font-weight: 700; }
.start-project__alt { font-size: 12px; }
