/* ========== BREADCRUMB ========== */
.project-crumb {
  padding: 22px 64px 0;
}

.project-crumb a {
  font-size: 10px;
  color: var(--muted);
  transition: color 0.15s ease;
}

.project-crumb a:hover {
  color: var(--yellow);
}

/* ========== HERO (edge-to-edge media + overlay, Devolver game-page style) ========== */
.project-hero {
  position: relative;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.project-hero-track {
  position: relative;
  height: 580px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.project-hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--ink);
}

.project-hero-backdrop {
  position: absolute;
  inset: -24px;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  object-fit: cover;
  filter: blur(32px) brightness(0.5) saturate(1.15);
  transform: scale(1.06);
}

.project-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.project-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(13, 12, 17, 0.95) 0%, rgba(13, 12, 17, 0.66) 34%, rgba(13, 12, 17, 0.18) 62%, rgba(13, 12, 17, 0.4) 100%);
}

/* Faint scanline pass — the same accent the homepage hero uses. */
.project-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0px, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 3px);
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 2;
}

.project-hero-stamp {
  z-index: 3;
}

.project-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 64px 36px;
  max-width: 800px;
}

.project-kicker {
  color: var(--yellow);
  font-size: 10px;
  margin-bottom: 16px;
}

.project-title {
  font-size: clamp(34px, 5.5vw, 62px);
  line-height: 1.0;
  margin-bottom: 16px;
  text-shadow: -2px 0 var(--cyan), 2px 0 var(--magenta);
}

.project-desc {
  font-size: 16px;
  line-height: 1.6;
  color: #d9d4e0;
  margin: 16px 0 26px;
  max-width: 620px;
}

.project-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.project-platform {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
}

.project-platform img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

/* ========== FACTS STRIP (reuses .commissions-strip / .price-grid) ========== */
.project-facts {
  margin-top: 40px;
  margin-bottom: 40px;
}

.project-facts .price-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-facts .price-value {
  font-size: 19px;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .project-facts .price-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .project-facts .price-grid {
    grid-template-columns: 1fr;
  }
}

.project-tools {
  margin-top: 28px;
}

.project-tools-label {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 14px;
}

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

.chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border: 1.5px solid var(--line);
  color: #d9d4e0;
}

/* ========== WRITE-UP (single column, numbered sections) ========== */
.project-doc {
  padding: 8px 20px 24px;
  max-width: 860px;
  margin: 0 auto;
}

.project-section {
  border-left: 3px solid var(--cyan);
  padding: 2px 0 2px 26px;
  margin-bottom: 40px;
}

.project-section:nth-of-type(2n) {
  border-left-color: var(--magenta);
}

.project-section:nth-of-type(3n) {
  border-left-color: var(--yellow);
}

.project-section-num {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}

.project-section-title {
  font-size: 26px;
  margin-bottom: 16px;
}

.project-section p {
  font-size: 16px;
  line-height: 1.7;
  color: #d9d4e0;
  margin-bottom: 20px;
  max-width: 800px;
}

.project-section p:last-child {
  margin-bottom: 0;
}

.project-media {
  margin: 24px 0;
}

.project-media img {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--line);
}

.project-media--diagram {
  padding: 24px;
  background: #131313;
  display: flex;
  justify-content: center;
  border: 1px solid var(--line);
}

.project-media--diagram img {
  width: auto;
  max-width: 100%;
  max-height: 720px;
  border: none;
}

/* ========== COMMENT FIELD (floating bouncing testimonials — experimental, Radio Noise only for now) ========== */
.comment-field-section {
  padding: 0 64px 80px;
}

.comment-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.comment-field-title {
  font-size: 28px;
}

.comment-field-hint {
  font-size: 9px;
  color: var(--muted);
}

.comment-field {
  position: relative;
  height: 420px;
  border: 2px solid var(--line);
  background-color: var(--surface-2);
  background-image: radial-gradient(rgba(244, 240, 230, 0.07) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  overflow: hidden;
}

.comment-chip {
  position: absolute;
  top: 0;
  left: 0;
  max-width: 240px;
  cursor: pointer;
  z-index: 1;
  will-change: transform;
}

.comment-chip.is-frozen {
  z-index: 5;
  max-width: 300px;
}

.comment-chip-inner {
  background: var(--paper);
  color: var(--text-dark);
  border: 2px solid var(--ink);
  border-top: 4px solid var(--cyan);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 13px 15px;
  transform: rotate(-3deg);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.comment-chip:nth-child(3n+2) .comment-chip-inner {
  border-top-color: var(--magenta);
  transform: rotate(2deg);
}

.comment-chip:nth-child(3n) .comment-chip-inner {
  border-top-color: var(--yellow);
  transform: rotate(-2deg);
}

.comment-chip:nth-child(4n) .comment-chip-inner {
  transform: rotate(3deg);
}

.comment-chip-author {
  font-size: 9px;
  color: var(--muted-dark);
  margin-bottom: 8px;
}

.comment-chip-text {
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.comment-chip.is-frozen .comment-chip-inner {
  transform: rotate(0deg) scale(1.06);
  box-shadow: 5px 5px 0 var(--ink);
}

.comment-chip.is-frozen .comment-chip-text {
  -webkit-line-clamp: unset;
  overflow: visible;
}

/* Denser variant — for pages with far more testimonials than the base
   field size comfortably fits (see Lich King's Gambit's ~25 quotes vs.
   Radio Noise's ~9): a taller field plus a smaller chip footprint, so
   the extra volume reads as "lively crowd" instead of a jammed pile-up. */
.comment-field.comment-field--dense {
  height: 820px;
}

.comment-field--dense .comment-chip {
  max-width: 200px;
}

.comment-field--dense .comment-chip.is-frozen {
  max-width: 270px;
}

.comment-field--dense .comment-chip-inner {
  padding: 10px 12px;
}

.comment-field--dense .comment-chip-text {
  font-size: 12px;
  line-height: 1.4;
  -webkit-line-clamp: 3;
}

.comment-field--dense .comment-chip.is-frozen .comment-chip-text {
  -webkit-line-clamp: unset;
}

/* Fallback for small screens / reduced-motion — JS adds this instead of
   running the physics loop, since a bouncing sim in a cramped column or
   for a motion-sensitive visitor isn't the point of the feature. */
.comment-field--static-mode .comment-field-hint {
  display: none;
}

.comment-field--static {
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
}

.comment-field--static .comment-chip {
  position: static;
  max-width: none;
}

.comment-field--static .comment-chip-inner {
  transform: none !important;
}

.comment-field--static .comment-chip-text {
  -webkit-line-clamp: unset;
  overflow: visible;
}

@media (max-width: 900px) {
  .comment-field-section {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 640px) {
  .comment-field-section {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1100px) {
  .project-hero-track {
    height: 480px;
  }
}

@media (max-width: 900px) {
  .project-crumb,
  .project-doc {
    padding-left: 24px;
    padding-right: 24px;
  }
  .project-hero-content {
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (max-width: 640px) {
  .project-crumb {
    padding-left: 20px;
    padding-right: 20px;
  }
  .project-doc {
    padding: 8px 20px 8px;
  }
  .project-hero-track {
    height: 560px;
  }
  .project-hero-content {
    padding: 0 22px 28px;
  }
  .project-section {
    padding-left: 18px;
    margin-bottom: 40px;
  }
  .project-section-title {
    font-size: 21px;
  }
}
