/* ================================================================
   Urban Prism — Page Styles
   ================================================================ */

/* ── Global dark override ───────────────────────────────────────── */
body:has(.up-page) {
  background: #0a0a14;
}
body:has(.up-page) .site-main {
  /* Keep site-main's natural padding-top so content clears the fixed nav */
  background: #0a0a14;
}
body:has(.up-page) .site-nav {
  background: rgba(10, 10, 20, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(232,232,240,0.07);
}
body:has(.up-page) .nav-brand,
body:has(.up-page) .nav-link {
  color: rgba(232,232,240,0.65);
}
body:has(.up-page) .nav-link:hover,
body:has(.up-page) .nav-link.is-active { color: #e8e8f0; }
body:has(.up-page) .nav-hamburger .ham-line { background: #e8e8f0; }

/* Brand mark: "PHIL.ST" text takes page background color instead of cream */
body:has(.up-page) .sbm-street .sbm-fill {
  color: #0a0a14;
}
/* Suffix "REET" stays teal, no change needed */
body:has(.up-page) .site-footer {
  background: #0a0a14;
  border-top: 1px solid rgba(232,232,240,0.07);
}
body:has(.up-page) .site-footer,
body:has(.up-page) .site-footer * { color: rgba(232,232,240,0.55); }
body:has(.up-page) .site-footer a:hover { color: #e8e8f0; }
body:has(.up-page) .footer-nl { border-color: rgba(232,232,240,0.07); }
body:has(.up-page) .btn-primary {
  background: #e8e8f0;
  color: #0a0a14;
}

/* ── Page wrapper ───────────────────────────────────────────────── */
.up-page {
  background: #0a0a14;
  color: #e8e8f0;
}

/* ================================================================
   HERO SCENE
   ================================================================ */
.prism-scene {
  position: relative;
  width: 100%;
  height: calc(100vh - 61px);
  min-height: 560px;
  overflow: hidden;
  /* Mobile default: stacked */
  display: grid;
  grid-template-rows: auto 1fr;
}

/* Desktop: headline left, interactive scene right */
@media (min-width: 960px) {
  .prism-scene {
    grid-template-rows: 1fr;
    grid-template-columns: 2fr 3fr; /* 40% / 60% */
  }
}

/* ── Headline ──────────────────────────────────────────────────── */
.prism-headline {
  padding: 40px 48px 0;
  pointer-events: none;
  z-index: 3;
}

/* Desktop: fills left column, vertically centered */
@media (min-width: 960px) {
  .prism-headline {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 32px 0 48px;
  }
}

.prism-headline-label {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
  opacity: 0.85;
}
.prism-headline-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(72px, 13vw, 172px);
  line-height: 0.88;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #e8e8f0;
}
@media (min-width: 960px) {
  .prism-headline-title {
    /* Fill the column more: ~2 lines × line-height should cover ~50% of column */
    font-size: clamp(80px, 12vw, 192px);
  }
}

/* ── Canvas stage ──────────────────────────────────────────────── */
.prism-canvas-wrap {
  position: relative;
  width: 100%;
}

/* Canvas renders on top of photos (z-index: 2 > 1) */
#prismCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  z-index: 2;
}
#prismCanvas:active { cursor: grabbing; }

/* ── Photos: anchored at bottom of canvas ───────────────────────── */
.prism-photos {
  position: absolute;
  bottom: 32px;
  left: 24px;
  right: 24px;
  top: auto;
  z-index: 1;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}

.prism-photo {
  position: relative;
  flex: 1;
  max-width: 130px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 2px;
  transition: filter 0.8s ease, transform 0.5s ease, box-shadow 0.8s ease;
  filter: grayscale(100%) brightness(0.45);
}
.prism-photo.is-lit {
  filter: none;
  transform: translateY(-8px);
  box-shadow: 0 8px 40px color-mix(in srgb, var(--scolor) 50%, transparent);
}
.prism-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.prism-photo-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 8px 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--scolor);
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  opacity: 0;
  transition: opacity 0.5s ease;
}
.prism-photo.is-lit .prism-photo-label { opacity: 1; }

/* ── Hint — floats above the prism via JS (position: fixed) ─────── */
.prism-hint {
  position: fixed;
  /* JS sets left/top; transform centers it above prism */
  transform: translate(-50%, calc(-100% - 12px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease;
  z-index: 300;
}
.prism-hint.is-hidden { opacity: 0; }

.prism-hint-hand {
  color: rgba(255,255,255,0.8);
  animation: hint-grab 2s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.4));
}
.prism-hint-text {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
}
@keyframes hint-grab {
  0%   { transform: translateY(0)    rotate(-8deg);  }
  35%  { transform: translateY(-7px) rotate(0deg);   }
  65%  { transform: translateY(-2px) rotate(8deg);   }
  100% { transform: translateY(0)    rotate(-8deg);  }
}

/* ── Mobile tap button ─────────────────────────────────────────── */
.prism-tap-btn {
  display: none;
  position: absolute;
  bottom: 56px;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.18);
  color: #e8e8f0;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.07em;
  padding: 9px 22px;
  border-radius: 40px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.prism-tap-btn:hover,
.prism-tap-btn.is-active {
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.32);
}

/* ── Scroll arrow ──────────────────────────────────────────────── */
.prism-scroll-arrow {
  position: absolute;
  bottom: 20px;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  color: rgba(232,232,240,0.3);
  text-decoration: none;
  transition: color 0.2s;
  animation: arrow-bob 2.8s ease-in-out infinite;
}
.prism-scroll-arrow:hover { color: rgba(232,232,240,0.65); }
@keyframes arrow-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ================================================================
   PROJEKT-TEXT
   ================================================================ */
.prism-text {
  max-width: 680px;
  margin: 0 auto;
  padding: 120px 32px 80px;
}

.prism-statement { margin-bottom: 88px; }

.prism-lead {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 400;
  line-height: 1.35;
  color: rgba(232,232,240,0.6);
  margin-bottom: 0.15em;
}
.prism-lead--accent {
  color: #e8e8f0;
  font-style: italic;
}

/* Lückentext */
.prism-blanks { display: flex; flex-direction: column; gap: 64px; }

.blank-item {
  border-left: 2px solid rgba(232,232,240,0.09);
  padding-left: 28px;
}
.blank-sentence {
  font-family: var(--font-heading);
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 400;
  line-height: 1.6;
  color: rgba(232,232,240,0.7);
}

.blank-slot {
  display: inline-block;
  background: none;
  border: none;
  border-bottom: 1.5px solid rgba(232,232,240,0.3);
  color: rgba(232,232,240,0.4);
  font-family: var(--font-mono);
  font-size: 0.82em;
  letter-spacing: 0.07em;
  padding: 2px 8px;
  cursor: pointer;
  vertical-align: baseline;
  line-height: inherit;
  transition: border-color 0.2s, color 0.2s;
}
.blank-slot:hover { border-color: rgba(232,232,240,0.6); color: rgba(232,232,240,0.75); }
.blank-slot.is-open  { border-color: var(--teal); color: var(--teal); }
.blank-slot.is-solved {
  border-color: transparent;
  color: #e8e8f0;
  font-family: var(--font-heading);
  font-size: 1em;
  font-style: italic;
  letter-spacing: 0;
  cursor: default;
  pointer-events: none;
}

.blank-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, margin-top 0.35s ease;
}
.blank-options.is-open { max-height: 120px; margin-top: 14px; }

.blank-option {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.11);
  color: rgba(232,232,240,0.65);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 40px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.blank-option:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.22); color: #e8e8f0; }
.blank-option.is-correct { background: rgba(95,179,179,0.12); border-color: var(--teal); color: var(--teal); }
.blank-option.is-wrong   { background: rgba(232,85,85,0.08); border-color: rgba(232,85,85,0.35); color: rgba(232,85,85,0.55); pointer-events: none; }

.blank-reveal {
  font-family: var(--font-heading);
  font-size: clamp(16px, 2vw, 20px);
  font-style: italic;
  color: rgba(232,232,240,0.75);
  line-height: 1.5;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.6s ease, opacity 0.6s ease, margin-top 0.5s ease;
}
.blank-reveal.is-visible { max-height: 80px; opacity: 1; margin-top: 20px; }

/* Lead-Variante: Slot sitzt in der großen Headline-Zeile */
.blank-item--lead {
  border-left: none;
  padding-left: 0;
}
.blank-slot--lead {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: inherit; /* erbt von .prism-lead--accent */
  letter-spacing: -0.02em;
  color: rgba(232,232,240,0.35);
  border-bottom: 2px solid rgba(232,232,240,0.25);
  padding: 0 4px;
  vertical-align: baseline;
  line-height: inherit;
}
.blank-slot--lead:hover {
  color: rgba(232,232,240,0.7);
  border-bottom-color: rgba(232,232,240,0.55);
}
.blank-slot--lead.is-open {
  color: var(--teal);
  border-bottom-color: var(--teal);
}
.blank-slot--lead.is-solved {
  color: #e8e8f0;
  border-bottom-color: transparent;
  pointer-events: none;
}

/* Reveal unter der Lead-Zeile: mehr Platz für längeren Text */
.blank-reveal--lead {
  font-style: normal;
  font-size: clamp(16px, 1.8vw, 20px);
  color: rgba(232,232,240,0.6);
  border-left: 2px solid rgba(232,232,240,0.1);
  padding-left: 20px;
  margin-top: 0;
}
.blank-reveal--lead.is-visible { max-height: 200px; margin-top: 28px; }

/* ================================================================
   GALERIE
   ================================================================ */
.prism-gallery {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 32px 80px;
}

.gallery-eyebrow {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232,232,240,0.3);
  margin-bottom: 56px;
}

.gallery-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 96px;
}
.gallery-item:last-child { margin-bottom: 0; }

@media (min-width: 768px) {
  .gallery-item { grid-template-columns: 1fr 1fr; align-items: end; gap: 48px; }
  .gallery-item:nth-child(odd)  .gallery-img-wrap { order: 1; }
  .gallery-item:nth-child(odd)  .gallery-meta     { order: 2; }
  .gallery-item:nth-child(even) .gallery-img-wrap { order: 2; }
  .gallery-item:nth-child(even) .gallery-meta     { order: 1; padding-left: 40px; }
}

.gallery-img-wrap { overflow: hidden; border-radius: 2px; }
.gallery-img-wrap img { width: 100%; display: block; transition: transform 0.7s ease; }
.gallery-item:hover .gallery-img-wrap img { transform: scale(1.025); }

.gallery-meta { display: flex; flex-direction: column; gap: 10px; padding-bottom: 24px; }
.gallery-num  { font-family: var(--font-mono); font-size: 10px; color: rgba(232,232,240,0.2); letter-spacing: 0.1em; }
.gallery-color-dot { width: 24px; height: 3px; border-radius: 2px; display: block; }
.gallery-color-name {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 96px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--scolor);
  text-transform: uppercase;
}

/* ================================================================
   ABSCHLUSS
   ================================================================ */
.prism-closing {
  text-align: center;
  padding: 80px 32px 120px;
}
.closing-line {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #e8e8f0;
  margin-bottom: 40px;
  line-height: 1.2;
}
.btn-ghost-light {
  display: inline-block;
  border: 1px solid rgba(232,232,240,0.18);
  color: rgba(232,232,240,0.5);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.05em;
  padding: 10px 24px;
  border-radius: 40px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost-light:hover { border-color: rgba(232,232,240,0.4); color: #e8e8f0; }

/* ================================================================
   SCROLL FADE-IN
   ================================================================ */
.js-fadein {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js-fadein.is-visible { opacity: 1; transform: translateY(0); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 767px) {
  .prism-scene { height: calc(100vh - 56px); }

  .prism-headline { padding: 28px 20px 0; }
  .prism-headline-title { font-size: clamp(60px, 20vw, 88px); }

  .prism-photos { gap: 4px; padding: 0 12px 32px; }
  .prism-photo  { max-width: 88px; }
  .prism-photo-label { display: none; }

  #prismCanvas  { cursor: default; }
  .prism-tap-btn { display: block; }

  .prism-text   { padding: 80px 20px 60px; }
  .prism-gallery { padding-inline: 20px; }
  .gallery-item:nth-child(even) .gallery-meta { padding-left: 0; }
}
