/* Industry design system — tokens from the handoff bundle (untitled/project/styles.css), trimmed to what this site uses, plus the screenshot-carousel component. */

:root {
  --color-bg: #f2f2f3;
  --color-surface: #e9e9ea;
  --color-text: #1d1f20;
  --color-accent: #4f8a63;
  --color-divider: color-mix(in srgb, #1d1f20 16%, transparent);

  --color-neutral-500: #98989b;
  --color-neutral-700: #5d5d60;

  --color-accent-600: #4e8463;
  --color-accent-700: #38664a;

  --font-heading: "Barlow Condensed", system-ui, sans-serif;
  --font-heading-weight: 600;
  --font-body: "Barlow", system-ui, sans-serif;

  --space-1: 3.4px;
  --space-2: 6.8px;
  --space-3: 10.2px;

  --radius-md: 4px;
}

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}

h1, h3 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
}
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }

.text-muted { color: color-mix(in srgb, var(--color-text) 55%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* — layout — */
.page { max-width: 1080px; margin: 0 auto; padding: 56px 20px 80px; }

.site-header { text-align: center; margin-bottom: 44px; }
.title-row { display: inline-block; position: relative; }
.title-row .tag {
  position: absolute; left: calc(100% + 10px); top: 50%;
  transform: translateY(-50%);
}
.title-row h1 { font-size: 38px; margin: 0; letter-spacing: 0.02em; }
.site-subtitle { font-size: 13px; margin: 8px 0 0; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px 28px;
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 11px;
  letter-spacing: 0.02em; padding: 3px 10px; border-radius: 0;
}
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 13px; line-height: 1.2; color: var(--color-text);
  background: transparent; border: 1px solid var(--color-divider);
  padding: calc(var(--space-2) * 0.85) var(--space-3);
  border-radius: 0;
}
.btn svg { display: block; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }

/* — card (blueprint frame) — */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: 18px; border-radius: 0;
  background: transparent; border: 1px solid var(--color-divider);
}
.card.coming-soon { border-style: dashed; }
.kicker-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 6px; position: relative;
}
.card-kicker {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-accent);
}
.kicker-side { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.card-period {
  font-family: ui-monospace, Menlo, monospace; font-size: 10px;
  letter-spacing: 0.05em;
  color: color-mix(in srgb, var(--color-text) 45%, transparent);
}
.card.coming-soon .card-kicker { color: var(--color-neutral-500); }
.card-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 20px; line-height: 1.2; margin: 0;
}
.card.coming-soon .card-title { color: var(--color-neutral-700); }
.card-body { margin: 0; font-size: 13px; opacity: 0.8; flex: 1; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card-actions .btn { flex: 1; }

.tmi { display: inline-flex; }
/* — TMI popover — */
.tmi-chip {
  font-family: ui-monospace, Menlo, monospace; font-size: 9px;
  letter-spacing: 0.08em; line-height: 1;
  padding: 3px 7px; cursor: pointer;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  background: transparent;
  border: 1px dashed var(--color-divider); border-radius: 0;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tmi-chip:hover, .tmi.open .tmi-chip {
  color: var(--color-accent-700); border-color: var(--color-accent);
  border-style: solid;
}
.tmi-pop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 5;
  padding: 10px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  box-shadow: 0 3px 10px color-mix(in srgb, #2b2b2d 16%, transparent);
  display: none;
}
.tmi.open .tmi-pop { display: block; }
.tmi-line {
  margin: 0; font-size: 12px; line-height: 1.5;
  color: color-mix(in srgb, var(--color-text) 80%, transparent);
}
.tmi-line + .tmi-line { margin-top: 3px; }
.tmi-line::before { content: "— "; color: var(--color-accent); }

.blueprint { position: relative; }
.blueprint > .corner {
  position: absolute; width: 11px; height: 11px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.blueprint > .corner::before, .blueprint > .corner::after {
  content: ""; position: absolute; background: currentColor;
}
.blueprint > .corner::before { left: 5px; top: 0; width: 1px; height: 100%; }
.blueprint > .corner::after  { top: 5px; left: 0; width: 100%; height: 1px; }
.blueprint > .corner.tl { top: -6px; left: -6px; }
.blueprint > .corner.tr { top: -6px; right: -6px; }
.blueprint > .corner.bl { bottom: -6px; left: -6px; }
.blueprint > .corner.br { bottom: -6px; right: -6px; }

/* — screenshot carousel — */
.shots {
  position: relative; width: 100%;
  aspect-ratio: var(--shots-aspect, 4 / 3);
  /* flex-item min-height:auto would let a portrait image's intrinsic height
     override the aspect-ratio — keep the image area uniform instead */
  min-height: 0;
  touch-action: pan-y;
}

.shots-viewport { width: 100%; height: 100%; position: relative; overflow: hidden; background: var(--color-surface); }
/* Duotone via SVG filter (index.html#duotone-green) instead of a mix-blend-mode
   overlay — blend layers leak past the card bounds in Chromium compositing. */
.shots-viewport.duotone .shots-track img { filter: url(#duotone-green); }

.shots-track {
  display: flex; height: 100%;
  transition: transform 0.35s ease;
}
.shots-track img {
  width: 100%; height: 100%; flex: none;
  object-fit: cover; object-position: top center;
  user-select: none; -webkit-user-drag: none;
}
/* portrait screenshots (auto-detected) and "fit": "contain" projects show whole,
   letterboxed on the surface background, instead of a cropped top slice */
.shots-track img.portrait,
.shots-viewport.fit-contain .shots-track img { object-fit: contain; object-position: center; }

.shots-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  border: 1px solid var(--color-divider); border-radius: 0;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.shots-btn svg { display: block; }
.shots-btn:hover { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.shots-btn.prev { left: 10px; }
.shots-btn.next { right: 10px; }
/* on devices with hover, arrows stay subtle until the card is hovered */
@media (hover: hover) {
  .shots-btn { opacity: 0; }
  .card:hover .shots-btn, .shots-btn:focus-visible { opacity: 1; }
}

.shots-dots {
  position: absolute; left: 0; right: 0; bottom: 10px;
  display: flex; justify-content: center; gap: 5px;
}
.shots-dots button {
  width: 16px; height: 3px; padding: 0; cursor: pointer;
  border: none; border-radius: 0;
  background: color-mix(in srgb, var(--color-text) 30%, transparent);
  transition: background 0.15s ease;
}
.shots-dots button:hover { background: color-mix(in srgb, var(--color-text) 55%, transparent); }
.shots-dots button[aria-current="true"] { background: var(--color-accent-700); }

.shots-count {
  position: absolute; right: 10px; bottom: 8px;
  font-family: ui-monospace, Menlo, monospace; font-size: 10px;
  color: var(--color-accent-700);
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  padding: 1px 6px;
}

/* single image or placeholder → no controls */
.shots.static .shots-btn, .shots.static .shots-dots, .shots.static .shots-count { display: none; }

.shots-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(-45deg, transparent, transparent 7px, var(--color-divider) 7px, var(--color-divider) 8px);
}
.shots-placeholder span {
  font-family: ui-monospace, Menlo, monospace; font-size: 11px;
  color: var(--color-accent-700); background: var(--color-bg); padding: 2px 8px;
}
