/* ColoredAI subsite: visuals on top of the shared app-pages.css. */

.coloredai-page {
  overflow-x: hidden;
}

/* Hero: copy on the left, the live photo-to-page comparison on the right. */
.coloredai-hero {
  grid-template-columns: 0.9fr 1.1fr;
  min-height: auto;
  padding-top: clamp(48px, 8vw, 96px);
}

.hero-copy .app-icon {
  width: 92px;
  margin-bottom: 22px;
  animation: none;
}

.compare {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.compare .compare-photo {
  clip-path: inset(0 calc(100% - var(--reveal, 50%)) 0 0);
}

.compare .compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--reveal, 50%);
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.12);
}

.compare .compare-knob {
  position: absolute;
  top: 50%;
  left: var(--reveal, 50%);
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  color: var(--ink);
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(17, 17, 17, 0.22);
  font-weight: 850;
  letter-spacing: -1px;
}

.compare .compare-label {
  position: absolute;
  bottom: 14px;
  padding: 6px 11px;
  color: #fff;
  background: rgba(17, 17, 17, 0.62);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.compare .compare-label.photo { left: 14px; }
.compare .compare-label.page { right: 14px; }

.compare input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.hero-hint {
  margin: 12px 4px 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* Gallery: page on top, the photo slides in on hover or tap. */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.gallery .flip {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 40px rgba(17, 17, 17, 0.1);
  cursor: pointer;
}

.gallery .flip img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 420ms ease;
}

.gallery .flip .flip-photo {
  opacity: 0;
}

.gallery .flip:hover .flip-photo,
.gallery .flip.show-photo .flip-photo {
  opacity: 1;
}

.gallery .flip .flip-tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 11px;
  color: #fff;
  background: rgba(17, 17, 17, 0.62);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gallery-hint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

/* Idea band: a typed prompt next to the page it produced, already colored. */
.idea-band {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  padding: clamp(24px, 4vw, 40px);
  background: var(--night);
  color: #fff;
  border-radius: 28px;
}

.idea-band .eyebrow {
  color: var(--accent);
}

.idea-band h2 {
  color: #fff;
}

.idea-band p {
  color: rgba(255, 255, 255, 0.72);
}

.prompt-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 12px 16px;
  color: var(--ink);
  background: #fff;
  border-radius: 14px;
  font-size: 17px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.prompt-bubble .caret {
  width: 2px;
  height: 20px;
  background: var(--accent);
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  to { visibility: hidden; }
}

.idea-band img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

@media (max-width: 860px) {
  .coloredai-hero {
    grid-template-columns: 1fr;
  }

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

  .idea-band {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery .flip img,
  .prompt-bubble .caret {
    transition: none;
    animation: none;
  }
}

/* Landscape examples get a wider tile. */
.gallery-wide .flip {
  aspect-ratio: 4 / 3;
}
