/* Windows 95 skin on top of vendor/98css/98.css (MIT, v0.1.21). */

:root {
  --cream: #f6f2ea;
  --silver: #c0c0c0;
  --ef-purple: #6a00e0;
  --taskbar-h: 32px;
  --pixel: "Pixelated MS Sans Serif", "MS Sans Serif", Tahoma, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--cream);
  color: #000;
  font-family: var(--pixel);
  font-size: 11px;
  -webkit-font-smoothing: none;
}

/* ---------- Maximised window: fills the screen above the taskbar ---------- */

.desktop {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: var(--taskbar-h);
  display: flex;
}

.main-window {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.title-bar-text {
  font-size: 11px;
}

.window-body {
  flex: 1;
  display: flex;
  margin: 3px 0;
}

/* Sunken cream "document" pane holding all the content */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  padding: 3rem 1.25rem;
  text-align: center;
}

/* Wordmark: light pixel font + robot icon, kept hard-edged */
.wordmark {
  margin: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 0.3em;
  font-family: "Pixelify Sans", var(--pixel);
  font-weight: 400;
  font-size: calc((clamp(2rem, 10vw, 5rem) + 4pt) * 1.25);
  line-height: 1;
  letter-spacing: -0.03em;
  color: #000;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  font-smooth: never;
  text-rendering: optimizeSpeed;
}

/* "Aurelian" and "Labs + robot" wrap as two units on narrow screens */
.wordmark span {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  white-space: nowrap;
}

.robot {
  /* matches the height of the capitals and ascenders */
  width: 0.8em;
  height: 0.8em;
  flex: none;
  image-rendering: pixelated;
}

h2 {
  margin: 0;
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(1.375rem, 4.5vw, 2.125rem); /* ~34px on desktop */
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: balance;
  -webkit-font-smoothing: antialiased;
}

h2 span {
  display: block;
}

h2 .accent {
  color: var(--ef-purple);
}

.subline {
  margin: 1rem auto 0;
  max-width: 38ch;
  /* Smooth sans for the body copy: the bitmap font only reads well at 11px multiples */
  font-family: Tahoma, "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
  text-wrap: balance;
}

.ef-badge {
  margin: 1rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.04em;
  color: var(--ef-purple);
  -webkit-font-smoothing: antialiased;
}

.ef-badge img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* ---------- Buttons (98.css only styles <button>, so mirror it for links) ---------- */

.win-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  min-width: 75px;
  padding: 0 12px;
  background: var(--silver);
  color: #000;
  text-decoration: none;
  font-family: var(--pixel);
  font-size: 11px;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
}

a.win-button:active {
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
  padding-top: 2px;
  padding-left: 14px;
}

a.win-button:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -5px;
}

/* Default-button look: extra black outline */
.cta {
  margin-top: 1.5rem;
  min-height: 36px;
  min-width: 140px;
  font-weight: 700;
  font-size: 13px;
  box-shadow: inset -2px -2px #0a0a0a, inset 1px 1px #0a0a0a, inset 2px 2px #fff, inset -3px -3px grey, inset 3px 3px #dfdfdf;
}

.cta:active {
  box-shadow: inset 2px 2px #0a0a0a, inset -1px -1px #0a0a0a, inset -2px -2px #fff, inset 3px 3px grey, inset -3px -3px #dfdfdf;
}

.status-bar-field {
  font-size: 11px;
}

/* ---------- Taskbar ---------- */

.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--taskbar-h);
  padding: 3px 3px calc(3px + env(safe-area-inset-bottom)) 3px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--silver);
  box-shadow: inset 0 1px #dfdfdf, inset 0 2px #fff;
  z-index: 10;
}

.taskbar .win-button {
  height: 100%;
}

.start-button {
  min-width: 0;
  padding: 0 6px 0 4px;
  gap: 4px;
  font-weight: 700;
}

.start-logo {
  width: 16px;
  height: 16px;
  flex: none;
}

/* Active task: pressed-in look */
.task-item {
  justify-content: flex-start;
  min-width: 160px;
  font-weight: 700;
  background: repeating-conic-gradient(#fff 0 25%, var(--silver) 0 50%) 0 0 / 2px 2px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
}

.tray {
  margin-left: auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 10px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px grey;
}

.clock {
  font-size: 11px;
  white-space: nowrap;
}

/* ---------- Pilot request page ---------- */

.desktop-centred {
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem calc(var(--taskbar-h) + 2rem);
}

.form-window {
  width: 100%;
  max-width: 520px;
}

/* Explorer-style toolbar with a Back button, top left */
.toolbar {
  display: flex;
  padding: 4px 4px 5px;
  margin: 0 1px;
  box-shadow: inset 0 -1px grey, inset 0 -2px #fff;
}

.back-button {
  gap: 6px;
  min-width: 0;
  min-height: 28px;
  padding: 0 12px 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.back-button:active {
  padding: 2px 10px 0 12px;
}

.back-icon {
  flex: none;
}

/* Headings used as title-bar text keep the title-bar look */
h1.title-bar-text,
h2.title-bar-text {
  margin: 0;
  font-size: 11px;
}

.form-window {
  display: flex;
  flex-direction: column;
}

.form-window .window-body {
  display: block; /* override the homepage's flex window body */
  flex: 1;
  margin: 16px 18px 18px;
}

.form-intro,
.pilot-form,
.win-dialog p {
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.form-intro {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.45;
}

.pilot-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.pilot-form label {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
}

/* 98.css gives inputs the sunken white field; enlarge them for readability.
   16px text also stops iOS zooming in on focus. */
.pilot-form input,
.pilot-form select,
.pilot-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  color: #000;
}

.pilot-form input,
.pilot-form select {
  height: 34px;
  line-height: normal;
  padding: 4px 8px;
}

.pilot-form select {
  padding-right: 28px;
  background-position: center right 3px;
}

.pilot-form select:focus {
  background-color: #fff;
  color: #000;
}

.pilot-form select:invalid {
  color: #555;
}

.pilot-form textarea {
  padding: 6px 8px;
  line-height: 1.4;
  resize: vertical;
}

.pilot-form textarea::placeholder {
  color: #777;
}

.pilot-form input:focus-visible,
.pilot-form select:focus-visible,
.pilot-form textarea:focus-visible {
  outline: 2px solid var(--ef-purple);
  outline-offset: 1px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

/* Win95 buttons on this page: readable size, purple focus ring */
.form-window button.submit,
.dialog-actions button {
  min-height: 34px;
  min-width: 96px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 700;
}

.form-window button.submit:focus,
.dialog-actions button:focus {
  outline: none;
}

.form-window button.submit:focus-visible,
.dialog-actions button:focus-visible {
  outline: 2px dotted var(--ef-purple);
  outline-offset: -6px;
}

.form-window button.submit:disabled {
  text-shadow: 1px 1px #fff;
  color: grey;
}

.title-bar-controls button:focus-visible {
  outline: 1px dotted #fff;
  outline-offset: 1px;
}

/* ---------- Win95 message boxes ---------- */

.win-dialog {
  width: calc(100% - 2rem);
  max-width: 380px;
  padding: 3px;
  border: 0;
  color: #000;
}

.win-dialog::backdrop {
  background: rgba(0, 0, 0, 0.15);
}

.dialog-body {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 16px 10px;
}

.win-dialog p {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}

.dialog-icon {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #000;
  font: 700 20px/1 Georgia, serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

.dialog-icon-info {
  background: navy;
  font-style: italic;
}

.dialog-icon-error {
  background: #e00000;
  font: 700 24px/1 Arial, sans-serif;
}

.dialog-actions {
  display: flex;
  justify-content: center;
  padding: 6px 0 12px;
}

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
  .title-bar-controls {
    display: none;
  }

  .hero {
    padding: 2.5rem 1rem;
  }

  .subline {
    font-size: 15px;
  }

  .cta {
    width: 100%;
    max-width: 320px;
    min-height: 44px; /* comfortable touch target */
  }

  .status-bar-field:last-child {
    display: none;
  }

  .task-item {
    display: none;
  }

  .desktop-centred {
    justify-content: flex-start;
    padding: 0 0 var(--taskbar-h);
  }

  .form-window {
    max-width: none;
    min-height: calc(100dvh - var(--taskbar-h));
  }

  .form-window .window-body {
    margin: 14px 12px 16px;
  }

  .form-window .title-bar-controls {
    display: flex; /* keep the close button: it's the way back home */
  }

  .form-actions button.submit {
    width: 100%;
    min-height: 44px;
  }
}
