/* Workshop page styles — layered on /legal/legal.css (same variables). */

/* ── Project cards (tools / games / this site) ─────────────────────── */
.proj-list {
  list-style: none;
  margin: 18px 0 10px;
  padding: 0;
  display: grid;
  /* auto-FILL (not -fit): a group with a single card (This site) keeps the
     empty tracks, so its lone card is the same width as every other card. */
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.proj-card {
  position: relative;
  display: flex;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 18px 16px;
  overflow: hidden;
}

/* Accent hairline down the left edge — the project's own colour. */
.proj-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0.85;
}

/* All media variants share one fixed column width so the name/description
   text edge aligns across every card (character, icon and mark alike). */
.proj-media {
  flex: none;
  width: 104px;
  display: grid;
  place-items: start center;
}
.proj-media img { display: block; }

.proj-media--icon img {
  width: 66px;
  height: 66px;
  border-radius: 22%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.proj-media--character img {
  width: 104px;
  height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
}

/* Lettermark tile — tools without a painted portrait yet. Dark glyph over the
   bright accent keeps contrast well past AA. */
.proj-media--mark {
  width: 66px;
  height: 66px;
  margin: 0 19px;
  border-radius: 22%;
  display: grid;
  place-items: center;
  font-family: "Audiowide", sans-serif;
  font-size: 1.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.proj-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.proj-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.proj-head h3 {
  color: var(--heading);
  font-size: 1.05rem;
  margin: 0;
  font-family: "Audiowide", sans-serif;
}
.proj-lang {
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--accent);
}

.proj-plats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.proj-plat {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
}

.proj-desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text);
  flex: 1;
}

.proj-activity {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.proj-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 30px;
}
.proj-bars .bar {
  flex: 1;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--border);
}
.proj-bars .bar-on {
  background: var(--accent);
  opacity: 0.9;
}
.proj-bars--empty {
  height: 30px;
  border-bottom: 2px dashed var(--border);
}
.proj-meta {
  margin: 8px 0 0;
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* ── Game action: App Store badge (live) or a Get-notified button ──────── */
.proj-action { margin: 2px 0 2px; }

.proj-store img { display: block; height: 40px; width: auto; }

/* Outlined counterpart to the shared .cta-btn (legal.css): same radius-6,
   uppercase, wide-tracking language, sized down for the project cards. */
.proj-notify {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 8px 16px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.proj-notify:hover,
.proj-notify:focus-visible {
  background: var(--accent);
  color: #04120f;
}

@media (max-width: 460px) {
  .proj-card { flex-direction: column; }
  .proj-media { place-items: center; }
}

/* ── Highlights & journal cross-links ──────────────────────────────── */
.highlights,
.post-links {
  list-style: none;
  margin: 14px 0 8px;
  padding: 0;
}

.highlights li,
.post-links li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding: 10px 2px;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}

.highlights li:last-child,
.post-links li:last-child {
  border-bottom: 1px solid var(--border);
}

.hl-date {
  flex: none;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  min-width: 110px;
}

.post-links a {
  color: var(--accent);
  text-decoration: none;
}

.post-links a:hover {
  text-decoration: underline;
}

/* ── The toolchain as an isometric studio ──────────────────────────────
   Consistent floorless "desk-unit" sprites aligned in rows on black; each
   teammate's info card is toggled by a hidden radio (CSS-only, CSP-safe). */
.office-hint {
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  margin: 2px 0 0;
}

.office {
  /* full-bleed black band, like the site chrome */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: #000;
  padding: 46px clamp(12px, 4vw, 48px) 52px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  --office-card-bg: #10141c;
  --office-line: rgba(73, 224, 224, 0.32);
  --office-warm: #49e0e0; /* neon cyan accent, matching the sprites */
}

.office-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: clamp(14px, 3vw, 40px);
}

.office-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* hidden but keyboard-focusable */
.office-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}

.office-char {
  display: block;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.6));
}
.office-char img {
  display: block;
  height: calc(clamp(120px, 15.5vw, 200px) * var(--u, 1));
  width: auto;
}
.office-char:hover {
  transform: translateY(-6px);
}
.office-char:hover img {
  filter: drop-shadow(0 0 12px rgba(230, 176, 112, 0.42));
}
.office-radio:focus-visible ~ .office-char {
  outline: 2px solid var(--office-warm);
  outline-offset: 4px;
  border-radius: 6px;
}

.office-name {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.16s;
}
.office-char:hover .office-name {
  color: var(--office-warm);
}

/* inline card, floated above the teammate */
.office-card {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 22px);
  transform: translate(-50%, 8px) scale(0.97);
  width: 290px;
  max-width: min(290px, 82vw);
  background: var(--office-card-bg);
  border: 1px solid var(--office-line);
  border-radius: 12px;
  padding: 15px 16px 16px;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.75);
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 40;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.office-card::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 9px solid transparent;
  border-top-color: var(--office-card-bg);
}
.office-card h3 {
  margin: 0;
  font-size: 1.1rem;
}
.office-lang {
  color: var(--office-warm);
  font-size: 0.75rem;
  margin: 3px 0 9px;
}
.office-desc {
  font-size: 0.8rem;
  line-height: 1.55;
  color: #d8cfbf;
  margin: 0 0 11px;
}
.office-card .proj-bars .bar-on {
  background: #8fbf8f;
}
.office-close {
  position: absolute;
  top: 6px;
  right: 9px;
  color: var(--text-dim);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 5px;
}
.office-close:hover {
  color: var(--office-warm);
}

/* reveal the card + lift the teammate when their radio is checked */
.office-slot .office-radio:checked ~ .office-card {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}
.office-slot .office-radio:checked ~ .office-char {
  transform: translateY(-6px);
}

/* Top row: cards drop downward (over the row below) so they stay on black. */
.office-row--top .office-card {
  top: calc(100% - 22px);
  bottom: auto;
  transform: translate(-50%, -8px) scale(0.97);
}
.office-row--top .office-slot .office-radio:checked ~ .office-card {
  transform: translate(-50%, 0) scale(1);
}
.office-row--top .office-card::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--office-card-bg);
}

@media (max-width: 720px) {
  /* Mobile: one teammate per column (a single vertical stack), each with its
     card revealed inline directly beneath it — an accordion, not a bottom
     sheet. The rows collapse to columns and the whole band becomes one column
     because .office is itself a column. */
  .office {
    padding: 32px clamp(12px, 5vw, 32px) 40px;
    gap: 0;
  }
  .office-row {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
  .office-slot {
    width: 100%;
    max-width: 440px;
    padding: 20px 0;
  }
  .office-char img {
    height: calc(clamp(150px, 42vw, 220px) * var(--u, 1));
  }
  /* card drops into normal flow, directly under its teammate; collapsed until
     its radio is checked (display can't animate, but the accordion reads
     clearly on touch). */
  .office-card {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    max-width: none;
    margin-top: 14px;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  }
  .office-slot .office-radio:checked ~ .office-card {
    display: block;
    transform: none;
  }
  .office-card::after {
    display: none;
  }
  /* neutralise the desktop top-row "open downward" overrides on mobile */
  .office-row--top .office-card {
    top: auto;
    bottom: auto;
    transform: none;
  }
  .office-row--top .office-slot .office-radio:checked ~ .office-card {
    transform: none;
  }
}
