:root {
  --ink: #f3ecd9;
  --paper: #17231f;
  --field: #09120f;
  --soft: #22332d;
  --blue: #37a7ff;
  --red: #ff6a3d;
  --gold: #f0b94d;
  --muted: rgba(243, 236, 217, 0.66);
  --line: rgba(243, 236, 217, 0.18);
  --strong-line: rgba(243, 236, 217, 0.72);
  --shadow: 0 20px 58px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(55, 167, 255, 0.16), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(240, 185, 77, 0.12), transparent 30%),
    linear-gradient(90deg, rgba(243, 236, 217, 0.045) 0 1px, transparent 1px 72px),
    linear-gradient(0deg, rgba(243, 236, 217, 0.04) 0 1px, transparent 1px 72px),
    var(--field);
  color: var(--ink);
  font-family:
    "IBM Plex Sans Condensed", "Aptos Narrow", "Franklin Gothic Medium", "Segoe UI", "Noto Sans SC", sans-serif;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--strong-line);
  background: rgba(9, 18, 15, 0.88);
  padding: 0 44px;
  backdrop-filter: blur(12px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  text-decoration: none;
  font-weight: 950;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--strong-line);
  background:
    linear-gradient(135deg, var(--blue) 0 50%, var(--paper) 50% 100%);
  color: var(--paper);
  font-weight: 950;
  box-shadow: 4px 4px 0 var(--ink);
}

.nav a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 950;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--strong-line);
  padding: 0 20px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 950;
}

.button-primary {
  background: var(--blue);
  color: var(--paper);
  box-shadow: 5px 5px 0 var(--ink);
}

.button-secondary {
  background: var(--paper);
  color: var(--ink);
}

.hero {
  display: grid;
  min-height: 760px;
  grid-template-columns: minmax(440px, 0.88fr) minmax(520px, 1fr);
  gap: 46px;
  border-bottom: 1px solid var(--strong-line);
  background:
    linear-gradient(90deg, rgba(9, 18, 15, 0.96), rgba(9, 18, 15, 0.72)),
    radial-gradient(circle at 84% 18%, rgba(55, 167, 255, 0.18), transparent 32%),
    radial-gradient(circle at 72% 86%, rgba(255, 106, 61, 0.13), transparent 28%);
  padding: 64px 58px 44px;
}

.hero-copy {
  align-self: center;
  min-width: 0;
}

.kicker,
.eyebrow {
  width: fit-content;
  margin: 0 0 22px;
  border: 1px solid var(--strong-line);
  background: var(--paper);
  padding: 7px 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--ink);
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: 92px;
  line-height: 0.9;
}

.hero h1 span,
.hero h1 strong {
  display: block;
}

.hero h1 strong {
  position: relative;
  width: fit-content;
  background: var(--ink);
  color: var(--paper);
  padding: 4px 10px 10px;
}

.hero h1 strong::after {
  position: absolute;
  right: -16px;
  bottom: -12px;
  width: 86px;
  height: 12px;
  background: var(--red);
  content: "";
}

.lede {
  max-width: 690px;
  margin: 32px 0 0;
  color: rgba(243, 236, 217, 0.78);
  font-size: 23px;
  font-weight: 850;
  line-height: 1.35;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.stats {
  display: grid;
  max-width: 640px;
  margin-top: 34px;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stats div {
  min-height: 105px;
  border: 1px solid var(--strong-line);
  background: var(--paper);
  padding: 16px;
  box-shadow: 5px 5px 0 rgba(55, 167, 255, 0.45);
}

.stats strong {
  display: block;
  color: var(--blue);
  font-size: 42px;
  line-height: 1;
}

.stats span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.hero-stage {
  position: relative;
  align-self: center;
  min-height: 570px;
  overflow: hidden;
  border: 1px solid var(--strong-line);
  background:
    linear-gradient(90deg, rgba(243, 236, 217, 0.07) 0 1px, transparent 1px 34px),
    linear-gradient(0deg, rgba(243, 236, 217, 0.07) 0 1px, transparent 1px 34px),
    #0e1b17;
  padding: 18px 18px 70px;
  box-shadow: 12px 12px 0 var(--ink);
}

.hero-stage::before {
  position: absolute;
  z-index: 3;
  top: 16px;
  left: 18px;
  border: 1px solid var(--strong-line);
  background: var(--gold);
  padding: 5px 9px;
  color: #09120f;
  content: "CONTACT SHEET";
  font-size: 11px;
  font-weight: 950;
}

.hero-mosaic {
  position: relative;
  min-height: 478px;
  overflow: hidden;
}

.hero-mosaic::before,
.hero-mosaic::after {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  width: 80px;
  content: "";
  pointer-events: none;
}

.hero-mosaic::before {
  left: 0;
  background: linear-gradient(90deg, #0e1b17, transparent);
}

.hero-mosaic::after {
  right: 0;
  background: linear-gradient(270deg, #0e1b17, transparent);
}

.hero-lane {
  position: absolute;
  left: 0;
  display: flex;
  width: max-content;
  gap: 16px;
  will-change: transform;
}

.hero-lane-1 {
  top: 42px;
  animation: imageRailA 42s linear infinite;
}

.hero-lane-2 {
  bottom: 24px;
  animation: imageRailB 50s linear infinite;
}

.hero-tile {
  position: relative;
  flex: 0 0 215px;
  height: 245px;
  margin: 0;
  overflow: hidden;
  border: 10px solid var(--paper);
  background: var(--soft);
  box-shadow:
    0 0 0 1px var(--strong-line),
    0 18px 34px rgba(0, 0, 0, 0.38);
}

.hero-tile:nth-child(3n) {
  flex-basis: 255px;
}

.hero-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-tile figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  border: 1px solid var(--strong-line);
  background: rgba(23, 35, 31, 0.9);
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 950;
}

@keyframes imageRailA {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes imageRailB {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0);
  }
}

.hero-caption {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  justify-content: space-between;
  border: 1px solid var(--strong-line);
  background: var(--paper);
  padding: 12px 14px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.library {
  padding: 70px 36px 86px;
  background:
    linear-gradient(180deg, #0e1b17, #09120f),
    radial-gradient(circle at 80% 0%, rgba(55, 167, 255, 0.1), transparent 32%);
}

.section-head,
.library-head,
.count-row,
.filter-block,
.grid,
.use-case-grid,
.steps,
.faq-grid {
  max-width: 1440px;
  margin-right: auto;
  margin-left: auto;
}

.section-head {
  margin-bottom: 28px;
}

.section-head h2,
.library h2 {
  max-width: 920px;
  margin: 0;
  font-size: 54px;
  line-height: 1;
}

.section-head > p:not(.eyebrow) {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 780;
  line-height: 1.45;
}

.library-head,
.count-row {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 440px);
  gap: 24px;
  align-items: end;
}

.library-head {
  margin-bottom: 24px;
}

.search {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 950;
}

.search input {
  min-height: 54px;
  border: 1px solid var(--strong-line);
  background: var(--paper);
  color: var(--ink);
  padding: 0 14px;
  outline: none;
  box-shadow: 5px 5px 0 var(--ink);
}

.search input:focus {
  border-color: var(--blue);
}

.filter-block {
  margin-bottom: 24px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-row button {
  min-height: 38px;
  border: 1px solid var(--strong-line);
  background: var(--paper);
  color: var(--ink);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.filter-row button span {
  margin-left: 6px;
  color: var(--muted);
}

.filter-row button.active {
  background: var(--blue);
  color: #07100d;
}

.filter-row button.active span {
  color: rgba(7, 16, 13, 0.72);
}

.count-row {
  align-items: center;
  margin-bottom: 20px;
}

.count-row p {
  margin: 0;
  font-size: 18px;
  font-weight: 950;
}

.count-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-align: right;
}

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

.card {
  display: flex;
  min-height: 585px;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--strong-line);
  background: var(--paper);
  box-shadow: 6px 6px 0 rgba(55, 167, 255, 0.36);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.card:hover {
  transform: translate(-2px, -3px);
  box-shadow: 10px 10px 0 rgba(240, 185, 77, 0.8);
}

.card-preview {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--strong-line);
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.preview {
  position: relative;
  height: 255px;
  overflow: hidden;
  background: var(--soft);
  color: var(--paper);
}

.preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 16, 20, 0) 46%, rgba(16, 16, 20, 0.72)),
    linear-gradient(90deg, rgba(18, 71, 255, 0.14), transparent 28%);
  content: "";
  pointer-events: none;
}

.preview-tags {
  position: absolute;
  z-index: 1;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.preview-tags span {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(23, 35, 31, 0.88);
  color: var(--ink);
  padding: 5px 6px;
  font-size: 10px;
  font-weight: 950;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview.image-failed img,
.hero-tile.image-failed img,
.dialog-media.image-failed > img,
.image-strip.image-failed img {
  opacity: 0.16;
  filter: grayscale(1);
}

.preview.image-failed::before,
.hero-tile.image-failed::before,
.dialog-media.image-failed::before,
.image-strip.image-failed::before {
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  border: 1px solid var(--strong-line);
  background: var(--paper);
  color: var(--red);
  padding: 8px 10px;
  content: "Preview unavailable";
  font-size: 11px;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.card-body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.card-meta,
.source-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.card h3 {
  display: -webkit-box;
  min-height: 52px;
  margin: 12px 0 8px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 22px;
  line-height: 1.08;
}

.card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.source-row {
  margin-top: 12px;
}

.card-actions {
  display: grid;
  margin-top: auto;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.card-actions button,
.prompt-box button,
.dialog-close,
#loadMore {
  min-height: 42px;
  border: 1px solid var(--strong-line);
  background: var(--blue);
  color: var(--paper);
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.card-actions button:last-child,
.prompt-box button:last-child {
  background: var(--paper);
  color: var(--ink);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

#loadMore {
  min-width: 220px;
  box-shadow: 5px 5px 0 var(--ink);
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px solid var(--strong-line);
  background: var(--paper);
  padding: 28px;
  font-weight: 950;
  box-shadow: 5px 5px 0 rgba(55, 167, 255, 0.42);
}

.use-cases,
.how-to,
.faq {
  padding: 74px 36px;
  border-top: 1px solid var(--strong-line);
}

.use-cases {
  background:
    linear-gradient(90deg, rgba(243, 236, 217, 0.045) 0 1px, transparent 1px 72px),
    var(--soft);
}

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

.use-case-grid a {
  display: flex;
  min-height: 240px;
  flex-direction: column;
  border: 1px solid var(--strong-line);
  background: var(--paper);
  padding: 18px;
  text-decoration: none;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.42);
}

.use-case-grid a:hover {
  background: #253a32;
}

.use-case-grid span {
  width: fit-content;
  border: 1px solid var(--strong-line);
  background: var(--red);
  color: #09120f;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 950;
}

.use-case-grid strong {
  display: block;
  margin-top: 18px;
  font-size: 25px;
  line-height: 1;
}

.use-case-grid em {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-style: normal;
  font-weight: 780;
  line-height: 1.4;
}

.use-case-grid b {
  display: block;
  margin-top: auto;
  font-size: 12px;
  text-transform: uppercase;
}

.how-to {
  background: #06100d;
  color: var(--ink);
}

.how-to .eyebrow {
  color: var(--paper);
  background: var(--blue);
}

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

.steps div {
  min-height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  padding: 18px;
}

.steps strong {
  display: block;
  color: var(--gold);
  font-size: 40px;
}

.steps span {
  display: block;
  margin-top: 14px;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.2;
}

.faq {
  background: #09120f;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.faq-grid article {
  border: 1px solid var(--strong-line);
  background: var(--paper);
  padding: 20px;
  box-shadow: 5px 5px 0 rgba(55, 167, 255, 0.36);
}

.faq-grid h3 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.1;
}

.faq-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  border-top: 1px solid var(--strong-line);
  background: var(--paper);
  padding: 34px 44px;
}

.footer strong {
  font-size: 20px;
  font-weight: 950;
}

.footer p {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--muted);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  font-size: 13px;
  font-weight: 950;
}

.footer a {
  text-decoration: none;
}

.legal-page {
  max-width: 920px;
  min-height: calc(100vh - 66px);
  padding: 82px 36px;
}

.legal-page h1 {
  margin: 0 0 28px;
  font-size: 76px;
  line-height: 0.92;
}

.legal-page p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 19px;
  font-weight: 760;
  line-height: 1.55;
}

.dialog {
  position: fixed;
  z-index: 40;
  inset: 0;
  overflow: auto;
  background: rgba(16, 16, 20, 0.78);
  padding: 28px;
}

.dialog[hidden] {
  display: none;
}

.dialog-panel {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--strong-line);
  background: var(--paper);
  box-shadow: 12px 12px 0 rgba(55, 167, 255, 0.58);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 44px;
  min-height: 44px;
}

.dialog-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.92fr) 1fr;
  gap: 28px;
  padding: 28px;
}

.dialog-media,
.image-strip {
  position: relative;
}

.dialog-media > img {
  width: 100%;
  max-height: 620px;
  border: 1px solid var(--strong-line);
  background: var(--soft);
  object-fit: cover;
}

.image-strip {
  display: grid;
  margin-top: 10px;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.image-strip img {
  width: 100%;
  height: 86px;
  border: 1px solid var(--strong-line);
  object-fit: cover;
}

.dialog-info h2 {
  margin: 10px 0;
  font-size: 42px;
  line-height: 1;
}

.dialog-info > p {
  color: var(--muted);
  line-height: 1.55;
}

.dialog-kicker {
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.detail-meta div {
  min-width: 0;
  border: 1px solid var(--strong-line);
  padding: 10px;
}

.detail-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.detail-meta strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-box {
  border: 1px solid var(--strong-line);
}

.prompt-box > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--strong-line);
  padding: 12px;
}

.prompt-box > div span {
  display: flex;
  gap: 8px;
}

.prompt-box pre {
  max-height: 360px;
  margin: 0;
  overflow: auto;
  padding: 16px;
  white-space: pre-wrap;
  font-family: "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
}

.detail-actions {
  margin-top: 14px;
}

.detail-actions a,
.detail-actions span {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 1px solid var(--strong-line);
  background: var(--gold);
  padding: 0 14px;
  text-decoration: none;
  font-weight: 950;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.detail-tags button {
  min-height: 32px;
  border: 1px solid var(--strong-line);
  background: var(--paper);
  font-size: 12px;
  font-weight: 900;
}

.modal-open {
  overflow: hidden;
}

@media (max-width: 1180px) {
  .hero,
  .library-head,
  .count-row,
  .dialog-grid,
  .footer {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 52px 24px;
  }

  .hero h1 {
    font-size: 74px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .use-case-grid,
  .steps,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .count-row span {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 0 16px;
  }

  .nav {
    display: none;
  }

  .hero {
    padding: 42px 16px;
  }

  .hero h1 {
    max-width: 360px;
    font-size: 42px;
    line-height: 0.96;
    overflow-wrap: anywhere;
  }

  .lede {
    max-width: 360px;
    font-size: 17px;
    overflow-wrap: anywhere;
  }

  .hero-stage {
    min-height: 430px;
    padding: 14px 14px 64px;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .hero-mosaic {
    min-height: 350px;
  }

  .hero-lane-1 {
    top: 36px;
  }

  .hero-tile {
    flex-basis: 150px;
    height: 170px;
    border-width: 7px;
  }

  .hero-caption {
    display: grid;
    gap: 4px;
    font-size: 10px;
  }

  .stats,
  .grid,
  .card-actions,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .library {
    padding: 42px 14px 68px;
  }

  .use-cases,
  .how-to,
  .faq {
    padding: 52px 14px;
  }

  .section-head h2,
  .library h2 {
    font-size: 38px;
  }

  .card {
    min-height: 560px;
  }

  .dialog {
    padding: 8px;
  }

  .dialog-panel {
    box-shadow: none;
  }

  .dialog-grid {
    padding: 12px;
  }
}
