/* ============================================================
   Fired — The Cosmic Background Check
   Win95 site stylesheet. System font stack only.
   No external requests: no CDNs, no webfonts, no trackers.
   ============================================================ */

:root {
  --desktop: #008080;
  --face: #C0C0C0;
  --light: #FFFFFF;
  --hilight: #DFDFDF;
  --shadow: #808080;
  --dark: #0A0A0A;
  --title: #000080;
  --title-end: #1084D0;
  --title-text: #FFFFFF;
  --text: #000000;
  --fired: #AA0000;
  --well: #FFFFFF;
}

@font-face {
  font-family: "W95FA";
  src: url("/assets/W95FA.otf") format("opentype");
  font-display: swap;
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 24px 12px 72px;
  background: var(--desktop);
  color: var(--text);
  font-family: "W95FA", Tahoma, "MS Sans Serif", Geneva, Verdana, monospace;
  font-size: 14px;
  line-height: 1.55;
}

.skip-link {
  position: fixed;
  top: 6px;
  left: 6px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--well);
  color: var(--text);
  transform: translateY(-150%);
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset 1px 1px 0 var(--light),
    inset -2px -2px 0 var(--shadow),
    inset 2px 2px 0 var(--hilight);
}

.skip-link:focus { transform: translateY(0); }

a:focus-visible,
button:focus-visible {
  outline: 2px dotted var(--dark);
  outline-offset: 2px;
}

::selection { background: var(--title); color: var(--title-text); }

.desktop {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
}

.zero-margin { margin: 0; }

/* ---------- Arcade desktop layer ---------- */

.arcade-layer {
  position: fixed;
  inset: 0 0 34px;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.maze-wall,
.data-dot,
.pixel-file-eater {
  position: absolute;
  display: block;
  background: #000000;
}

.maze-wall { height: 4px; }
.mw-1 { width: 22vw; min-width: 120px; left: 2vw; top: 13vh; }
.mw-1::before { content: ""; position: absolute; left: 0; top: 0; width: 4px; height: 52px; background: #000000; }
.mw-2 { width: 16vw; min-width: 90px; right: 4vw; top: 24vh; }
.mw-2::after { content: ""; position: absolute; right: 0; top: 0; width: 4px; height: 70px; background: #000000; }
.mw-3 { width: 18vw; min-width: 100px; left: 4vw; bottom: 18vh; }
.mw-3::after { content: ""; position: absolute; right: 0; bottom: 0; width: 4px; height: 54px; background: #000000; }
.mw-4 { width: 21vw; min-width: 110px; right: 3vw; bottom: 26vh; }
.mw-4::before { content: ""; position: absolute; left: 0; bottom: 0; width: 4px; height: 48px; background: #000000; }

.data-dot { width: 7px; height: 7px; bottom: 11vh; }
.dd-1 { left: 14vw; }.dd-2 { left: 28vw; }.dd-3 { left: 42vw; }
.dd-4 { left: 56vw; }.dd-5 { left: 70vw; }

.pixel-file-eater {
  left: -48px;
  bottom: calc(11vh - 10px);
  width: 34px;
  height: 28px;
  clip-path: polygon(12% 14%, 35% 14%, 35% 0, 50% 0, 50% 14%, 88% 14%, 88% 28%, 100% 28%, 100% 70%, 88% 70%, 88% 84%, 72% 84%, 72% 100%, 55% 100%, 55% 84%, 30% 84%, 30% 100%, 13% 100%, 13% 84%, 0 84%, 0 28%, 12% 28%);
  animation: file-eater-run 4.8s steps(48, end) 1 both;
}

.pixel-file-eater::before {
  content: "";
  position: absolute;
  right: 7px;
  top: 7px;
  width: 4px;
  height: 4px;
  background: var(--desktop);
}

.pixel-file-eater::after {
  content: "";
  position: absolute;
  right: 0;
  top: 15px;
  width: 8px;
  height: 4px;
  background: var(--desktop);
}

@keyframes file-eater-run {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 96px)); }
}

/* ---------- Windows ---------- */

.window {
  background: var(--face);
  padding: 3px;
  margin: 0 0 22px;
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset 1px 1px 0 var(--hilight),
    inset -2px -2px 0 var(--shadow),
    inset 2px 2px 0 var(--light);
}

.title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 3px 3px 8px;
  background: linear-gradient(90deg, var(--title), var(--title-end));
  color: var(--title-text);
}

.window.inactive .title-bar {
  background: linear-gradient(90deg, var(--shadow), #B0B0B0);
}

.title-bar .title {
  font-weight: normal;
  font-size: 13px;
  letter-spacing: 0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb-buttons { display: flex; gap: 2px; flex-shrink: 0; }

.tb-btn {
  width: 18px;
  height: 16px;
  background: var(--face);
  color: var(--text);
  font-size: 10px;
  font-weight: normal;
  line-height: 14px;
  text-align: center;
  user-select: none;
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset 1px 1px 0 var(--light),
    inset -2px -2px 0 var(--shadow),
    inset 2px 2px 0 var(--hilight);
}

.menu-bar {
  display: flex;
  gap: 16px;
  padding: 4px 8px;
  font-size: 13px;
  border-bottom: 1px solid var(--shadow);
  box-shadow: 0 1px 0 var(--light);
}

.menu-bar span { color: var(--text); }
.menu-bar span:first-letter { text-decoration: underline; }

.window-body { padding: 14px 16px 16px; }

/* ---------- Bevel helpers ---------- */

.well {
  background: var(--well);
  padding: 12px 14px;
  box-shadow:
    inset -1px -1px 0 var(--light),
    inset 1px 1px 0 var(--shadow),
    inset -2px -2px 0 var(--hilight),
    inset 2px 2px 0 var(--dark);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 18px;
  background: var(--face);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: none;
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset 1px 1px 0 var(--light),
    inset -2px -2px 0 var(--shadow),
    inset 2px 2px 0 var(--hilight);
}

.btn:active {
  box-shadow:
    inset 1px 1px 0 var(--dark),
    inset -1px -1px 0 var(--light),
    inset 2px 2px 0 var(--shadow),
    inset -2px -2px 0 var(--hilight);
}

.btn.default { outline: 1px solid var(--dark); outline-offset: -4px; }

.btn.disabled {
  color: var(--shadow);
  text-shadow: 1px 1px 0 var(--light);
  cursor: default;
  pointer-events: none;
}

/* ---------- Status bar ---------- */

.status-bar {
  display: flex;
  gap: 3px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.status-field {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 3px 8px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow:
    inset 1px 1px 0 var(--shadow),
    inset -1px -1px 0 var(--light);
}

/* ---------- Message boxes ---------- */

.msgbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  margin: 14px 0;
  background: var(--face);
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset 1px 1px 0 var(--light),
    inset -2px -2px 0 var(--shadow),
    inset 2px 2px 0 var(--hilight);
}

.msgbox .icon {
  font-size: 22px;
  line-height: 1.2;
  flex-shrink: 0;
}

.msgbox p { margin: 0; }
.msgbox p + p { margin-top: 8px; }

/* ---------- Progress bar ---------- */

.progress {
  height: 18px;
  margin: 10px 0 4px;
  background: var(--well);
  box-shadow:
    inset -1px -1px 0 var(--hilight),
    inset 1px 1px 0 var(--shadow),
    inset -2px -2px 0 var(--light),
    inset 2px 2px 0 var(--dark);
  padding: 3px;
}

.progress .blocks {
  display: flex;
  gap: 2px;
  height: 100%;
  width: 62%;
}

.progress .blocks i {
  display: block;
  flex: 1 1 0;
  background: var(--title);
}

/* ---------- Typography ---------- */

h1, h2, h3 { line-height: 1.25; }
strong, b { font-weight: normal; }

h1 {
  font-size: 22px;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

h2 {
  font-size: 15px;
  margin: 22px 0 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--shadow);
  box-shadow: 0 1px 0 var(--light);
  padding-bottom: 3px;
}

p { margin: 0 0 10px; }

ul, ol { margin: 0 0 10px; padding-left: 22px; }
li { margin-bottom: 4px; }

a { color: var(--title); }
a:hover { color: var(--fired); }

.crumbs {
  font-size: 12px;
  margin: 0 0 14px;
  padding: 3px 8px;
  background: var(--well);
  box-shadow:
    inset 1px 1px 0 var(--shadow),
    inset -1px -1px 0 var(--light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fineprint { font-size: 12px; color: var(--text); }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  margin-bottom: 12px;
  background: var(--title);
  color: var(--title-text);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---------- Landing page ---------- */

.stack { position: relative; }

.stack .window.back {
  margin-left: 26px;
  margin-bottom: -34px;
  position: relative;
  z-index: 1;
}

.stack .window.front {
  position: relative;
  z-index: 2;
  margin-right: 26px;
}

@media (max-width: 560px) {
  .stack .window.back { margin-left: 10px; margin-bottom: -26px; }
  .stack .window.front { margin-right: 10px; }
}

.dossier {
  font-family: inherit;
  font-size: 13px;
  position: relative;
  overflow: hidden;
}

.dossier .file-line { margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stamp {
  display: block;
  width: fit-content;
  margin: 18px auto 8px;
  padding: 6px 22px 8px;
  border: 5px double var(--fired);
  color: var(--fired);
  font-family: inherit;
  font-weight: normal;
  font-size: clamp(44px, 13vw, 88px);
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(-3deg);
}

.subtitle {
  display: block;
  text-align: center;
  margin: 4px 0 18px;
  font-size: clamp(12px, 3vw, 15px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text);
}

.pitch { margin: 16px 0; }

.pitch p {
  margin: 0 0 12px;
  font-size: 15px;
}

.price-line {
  margin: 16px 0;
  padding: 10px 14px;
  background: var(--well);
  font-family: inherit;
  font-size: 14px;
  box-shadow:
    inset -1px -1px 0 var(--hilight),
    inset 1px 1px 0 var(--shadow),
    inset -2px -2px 0 var(--light),
    inset 2px 2px 0 var(--dark);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 4px;
}

/* ---------- Work case monitor ---------- */

.case-monitor {
  display: block;
  width: min(100%, 690px);
  margin: 16px auto;
  padding: 3px;
  border: 0;
  background: var(--face);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset 1px 1px 0 var(--hilight),
    inset -2px -2px 0 var(--shadow),
    inset 2px 2px 0 var(--light);
}

.case-monitor:focus-visible { outline: 2px dotted var(--dark); outline-offset: 2px; }

.case-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  padding: 3px 6px;
  background: var(--title);
  color: var(--title-text);
  font-size: 12px;
}

.case-screen {
  display: block;
  margin: 2px 0 0;
  padding: 4px;
  background: #000000;
  box-shadow:
    inset 1px 1px 0 var(--dark),
    inset -1px -1px 0 var(--light);
}

.case-screen img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  background: #000000;
  image-rendering: pixelated;
}

.case-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  padding: 4px 6px;
  font-family: inherit;
  font-size: 12px;
}

.case-markers { display: flex; gap: 3px; flex-shrink: 0; }
.case-markers i { display: block; width: 7px; height: 7px; background: var(--shadow); }
.case-markers i.active { background: var(--fired); }

/* ---------- Work files + process ---------- */

.work-files .window-body { padding-top: 16px; }
.section-head { margin-top: 0; }
.work-intro { max-width: 700px; margin: -2px 0 14px; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.work-card {
  margin: 0;
  padding: 4px;
  background: var(--face);
  box-shadow:
    inset 1px 1px 0 var(--shadow),
    inset -1px -1px 0 var(--light),
    inset 2px 2px 0 var(--dark),
    inset -2px -2px 0 var(--hilight);
}

.work-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #000000;
  image-rendering: pixelated;
}

.work-card figcaption {
  display: flex;
  flex-direction: column;
  min-height: 92px;
  padding: 6px 5px 3px;
  font-size: 12px;
  line-height: 1.35;
}

.work-card figcaption span {
  margin-bottom: 3px;
  color: var(--title);
  font-size: 10px;
}

.work-card figcaption strong { font-weight: normal; }
.work-card small { display: block; margin-top: 4px; color: #333333; font-size: 11px; }

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.process-step {
  min-height: 132px;
  padding: 10px;
  background: var(--well);
  box-shadow:
    inset 1px 1px 0 var(--shadow),
    inset -1px -1px 0 var(--light),
    inset 2px 2px 0 var(--dark),
    inset -2px -2px 0 var(--hilight);
}

.process-step b { display: block; margin-bottom: 10px; color: var(--title); }
.process-step span { display: block; font-size: 13px; }

/* ---------- Footer ---------- */

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 10px;
}

.footer-links a { font-size: 13px; }

.footer-meta {
  font-size: 12px;
  color: var(--text);
}

.footer-meta a { color: var(--title); }

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

.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px;
  background: var(--face);
  box-shadow: inset 0 1px 0 var(--light), 0 -1px 0 var(--dark);
}

.start-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-weight: normal;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  background: var(--face);
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset 1px 1px 0 var(--light),
    inset -2px -2px 0 var(--shadow),
    inset 2px 2px 0 var(--hilight);
}

.start-btn:hover { color: var(--text); }

.flag {
  display: inline-grid;
  grid-template-columns: 6px 6px;
  grid-template-rows: 6px 6px;
  gap: 1px;
}

.flag i { display: block; }
.flag i:nth-child(1) { background: #E03C31; }
.flag i:nth-child(2) { background: #7AB648; }
.flag i:nth-child(3) { background: #009DDC; }
.flag i:nth-child(4) { background: #FDB913; }

.task-title {
  flex: 1 1 auto;
  min-width: 0;
  padding: 3px 10px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow:
    inset 1px 1px 0 var(--dark),
    inset -1px -1px 0 var(--hilight);
}

.task-clock {
  flex-shrink: 0;
  padding: 3px 12px;
  font-size: 12px;
  box-shadow:
    inset 1px 1px 0 var(--shadow),
    inset -1px -1px 0 var(--light);
}

.sound-btn {
  flex-shrink: 0;
  padding: 3px 10px;
  border: 0;
  background: var(--face);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset 1px 1px 0 var(--light),
    inset -2px -2px 0 var(--shadow),
    inset 2px 2px 0 var(--hilight);
}

.sound-btn:active {
  box-shadow:
    inset 1px 1px 0 var(--dark),
    inset -1px -1px 0 var(--light),
    inset 2px 2px 0 var(--shadow),
    inset -2px -2px 0 var(--hilight);
}

@media (max-width: 680px) {
  body { padding-left: 8px; padding-right: 8px; }
  .work-grid, .process-grid { grid-template-columns: 1fr; }
  .process-step { min-height: 0; }

  /*
   * Mobile interaction contract: the visible Win95 furniture stays compact,
   * but every real link and button owns an Apple-sized touch box. Keeping
   * this rule universal also covers inline legal/email links on every route.
   */
  a,
  button {
    min-width: 44px;
    min-height: 44px;
  }

  a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .taskbar {
    min-height: 44px;
    padding-block: 0;
  }

  .start-btn,
  .sound-btn {
    position: relative;
    isolation: isolate;
    padding-inline: 7px;
    background: transparent;
    box-shadow: none;
  }

  .start-btn::before,
  .sound-btn::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 8px 0;
    background: var(--face);
    pointer-events: none;
    box-shadow:
      inset -1px -1px 0 var(--dark),
      inset 1px 1px 0 var(--light),
      inset -2px -2px 0 var(--shadow),
      inset 2px 2px 0 var(--hilight);
  }

  .start-btn:active,
  .sound-btn:active { box-shadow: none; }

  .start-btn:active::before,
  .sound-btn:active::before {
    box-shadow:
      inset 1px 1px 0 var(--dark),
      inset -1px -1px 0 var(--light),
      inset 2px 2px 0 var(--shadow),
      inset -2px -2px 0 var(--hilight);
  }

  .task-clock { display: none; }
}

@media (min-width: 681px) and (max-width: 820px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pixel-file-eater { animation: none; left: 8vw; }
}
