/* WAKING_? — Project Archive Page */

.project-page .site-topbar__inner {
  justify-content: space-between;
}

.pegi-badge {
  display: block;
  width: 72px;
  height: auto;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.65));
}

.pegi-badge--hero {
  position: absolute;
  top: calc(var(--topbar-h) + 1rem);
  right: var(--section-px);
  width: clamp(64px, 8vw, 88px);
}

.pegi-badge--fixed {
  position: fixed;
  top: calc(var(--topbar-h) + 0.65rem);
  right: var(--section-px);
  z-index: 99;
  width: 56px;
  pointer-events: none;
}

.btn-play {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 360px);
  min-height: 68px;
  margin-bottom: 1.75rem;
  padding: 3px;
  font-family: var(--font-display);
  text-decoration: none;
  background: linear-gradient(180deg, #1a2828 0%, #080808 100%);
  border: 1px solid rgba(122, 165, 165, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(122, 165, 165, 0.22),
    0 14px 40px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(122, 165, 165, 0.25);
  clip-path: polygon(
    0 0, calc(100% - 14px) 0, 100% 14px,
    100% 100%, 14px 100%, 0 calc(100% - 14px)
  );
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  animation: btn-play-pulse 3s ease-in-out infinite;
}

.btn-play__glow {
  position: absolute;
  inset: -2px;
  background: radial-gradient(ellipse at 50% 50%, rgba(122, 165, 165, 0.35) 0%, transparent 70%);
  opacity: 0.65;
  pointer-events: none;
  z-index: 0;
}

.btn-play__frame {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(122, 165, 165, 0.15);
  pointer-events: none;
  z-index: 1;
}

.btn-play__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  min-height: 58px;
  padding: 0.85rem 2.25rem;
  background:
    linear-gradient(180deg, rgba(142, 188, 188, 0.95) 0%, rgba(90, 140, 140, 0.98) 45%, rgba(58, 108, 108, 1) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35);
}

.btn-play__inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.04) 2px,
    rgba(0, 0, 0, 0.04) 4px
  );
  pointer-events: none;
}

.btn-play__label {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #050505;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-play__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #050505;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.35) 0%, rgba(5, 5, 5, 0.15) 100%);
  border: 1px solid rgba(5, 5, 5, 0.35);
  box-shadow:
    0 0 16px rgba(122, 165, 165, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-play__icon svg {
  margin-left: 2px;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.1));
}

.btn-play:hover,
.btn-play:focus-visible {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(142, 188, 188, 0.75);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.8),
    0 0 60px rgba(122, 165, 165, 0.45),
    0 18px 48px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(142, 188, 188, 0.4);
}

.btn-play:hover .btn-play__inner,
.btn-play:focus-visible .btn-play__inner {
  background:
    linear-gradient(180deg, rgba(168, 210, 210, 1) 0%, rgba(106, 158, 158, 1) 45%, rgba(68, 118, 118, 1) 100%);
}

.btn-play:active {
  transform: translateY(1px) scale(0.99);
  box-shadow:
    0 0 24px rgba(122, 165, 165, 0.25),
    0 6px 20px rgba(0, 0, 0, 0.45),
    inset 0 2px 8px rgba(0, 0, 0, 0.35);
}

.btn-play:active .btn-play__inner {
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@keyframes btn-play-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.8),
      0 0 40px rgba(122, 165, 165, 0.22),
      0 14px 40px rgba(0, 0, 0, 0.55),
      inset 0 1px 0 rgba(122, 165, 165, 0.25);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.8),
      0 0 56px rgba(122, 165, 165, 0.38),
      0 14px 40px rgba(0, 0, 0, 0.55),
      inset 0 1px 0 rgba(122, 165, 165, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-play { animation: none; }
}

.project-main {
  position: relative;
  z-index: 1;
}

.project-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--section-px);
}

.project-wrap--narrow { max-width: 640px; }

.project-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.project-section--meta { padding: 3rem 0; }

.project-section--closing {
  padding: 5rem 0 3rem;
  border-top: none;
}

.project-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.project-label--emphasis {
  color: var(--accent);
  text-align: center;
  text-shadow: 0 0 30px var(--accent-glow);
}

/* Hero */
.project-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 4rem;
}

.project-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.project-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.75) brightness(0.55);
}

.project-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(5, 5, 5, 0.95) 0%, rgba(5, 5, 5, 0.4) 45%, rgba(5, 5, 5, 0.65) 100%),
    linear-gradient(to right, rgba(5, 5, 5, 0.5) 0%, transparent 50%);
}

.project-hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 3rem) var(--section-px) 0;
  width: 100%;
}

.project-file-id {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

.project-hero-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 50px var(--accent-glow);
  line-height: 1;
  margin-bottom: 1rem;
}

.project-hero-sub {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 1.5rem;
}

.project-hero-whisper {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.8;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.project-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Prose */
.project-prose {
  max-width: 520px;
}

.project-prose p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

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

.project-prose--compact { margin-bottom: 2.5rem; }

.project-prose--center {
  max-width: none;
  text-align: center;
}

.project-prose--center p {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

/* Meta */
.project-meta {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: transparent;
}

.project-meta div {
  background: var(--bg-elevated);
  padding: 1.25rem 1rem;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-meta dt {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.project-meta dd {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Features */
.feature-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
}

.feature-grid li {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1.25rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.feature-grid li:hover {
  color: var(--accent);
  border-color: var(--border-strong);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: transparent;
}

.gallery-item {
  position: relative;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 10;
  transition: border-color 0.3s var(--ease);
}

.gallery-item:hover {
  border-color: var(--border-strong);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) brightness(0.8);
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
}

.gallery-item:hover img {
  transform: scale(1.03);
  filter: saturate(0.85) brightness(0.9);
}

/* Workshop */
.workshop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
}

.workshop-item {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
  margin: 0;
}

.workshop-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: saturate(0.7) brightness(0.78);
}

/* Trailer */
.trailer-frame {
  aspect-ratio: 16 / 9;
  max-width: 900px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  overflow: hidden;
}

.trailer-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.trailer-placeholder {
  width: 100%;
  height: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.trailer-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.trailer-soon {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Dev status */
.status-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
}

.status-grid li {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1.35rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.status-name {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.status-val {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-val--active { color: var(--accent); }
.status-val--dev { color: var(--text-muted); }
.status-val--upcoming { color: var(--text-dim); }

/* CTA */
.project-cta {
  padding: 2rem var(--section-px) 5rem;
  display: flex;
  justify-content: center;
}

.project-footer {
  border-top: 1px solid var(--border);
  justify-content: center;
  gap: 1.5rem;
}

/* Lightbox */
.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  max-width: min(1100px, 100%);
  max-height: 90vh;
  margin: 0;
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(90vh - 3rem);
  object-fit: contain;
  border: 1px solid var(--border-strong);
}

.lightbox-caption {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  margin-top: 0.75rem;
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 36px;
  height: 36px;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  transition: color 0.2s;
}

.lightbox-close:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 1100px) {
  .project-meta { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .status-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .project-hero { min-height: 75vh; padding-bottom: 3rem; }
  .project-section { padding: 3rem 0; }
  .project-meta { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .workshop-grid { grid-template-columns: 1fr; }
  .project-hero-actions { flex-direction: column; align-items: flex-start; }
  .project-hero-actions .btn { width: 100%; justify-content: center; }
  .btn-play { width: 100%; max-width: none; }
  .pegi-badge--hero { width: 56px; right: 1rem; }
  .pegi-badge--fixed { width: 48px; }
}

@media (max-width: 480px) {
  .project-meta,
  .feature-grid,
  .gallery-grid,
  .status-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item img { transition: none; }
}
