/* About — "scroll to explore" morph gallery.
   Vanilla port of the scroll-morph-hero component (React/framer-motion).
   GSAP drives the intro (scatter -> line -> circle); a pinned, scrubbed
   ScrollTrigger morphs the circle into a bottom arc with a bounded shuffle
   and mouse parallax (js/about-morph.js). All animation work is JS-driven;
   this file only provides layout, typography, the card flip, and fallbacks. */

.about-morph {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
}

.about-morph-stage {
  position: absolute;
  inset: 0;
}

/* --- Cards layer --- */
.about-morph-cards {
  position: absolute;
  inset: 0;
}

.morph-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 110.5px;
  margin: -55.25px 0 0 -39px;
  transform-style: preserve-3d;
  perspective: 1000px;
  opacity: 0;
}

.about-morph.is-live .morph-card {
  will-change: transform;
}

.morph-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.morph-card-front,
.morph-card-back {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 12px 32px rgba(14, 14, 15, 0.16);
}

.morph-card-front {
  background: #e5e5e0;
}

.morph-card-front img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  display: block;
}

.morph-card-front::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease;
}

.morph-card-back {
  background: var(--ink);
  transform: rotateY(180deg);
  border: 1px solid #2c2c2d;
}

.morph-card-back img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  display: block;
  transform: rotateY(180deg);
}

@media (hover: hover) and (pointer: fine) {
  .morph-card:hover .morph-card-inner {
    transform: rotateY(180deg);
  }
  .morph-card:hover .morph-card-front::after {
    background: transparent;
  }
}

/* --- Intro text (fades out as the arc forms) --- */
.about-morph-intro {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  padding: 0 24px;
}

.about-morph-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 18px;
}

.about-morph-headline {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 4vw, 42px);
  letter-spacing: -0.01em;
  color: var(--ink);
}

.about-morph-hint {
  margin-top: 28px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--graphite);
  animation: about-morph-pulse 2.4s ease-in-out infinite;
}

@keyframes about-morph-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* --- Content that fades in once the arc has formed --- */
.about-morph-content {
  position: absolute;
  left: 50%;
  top: 10%;
  width: 100%;
  max-width: 580px;
  padding: 0 24px;
  z-index: 2;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
}

.about-morph-content h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 4.5vw, 48px);
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 14px;
}

.about-morph-content p {
  font-size: clamp(14px, 1.7vw, 17px);
  line-height: 1.6;
  color: var(--graphite);
}

/* --- Static fallback (JS sets these when it renders the arc) --- */
.about-morph.is-static .about-morph-intro,
.about-morph.is-static .about-morph-hint {
  display: none;
}

.about-morph.is-static .about-morph-content {
  opacity: 1;
}

/* --- Reduced motion: kill the pulsing hint --- */
@media (prefers-reduced-motion: reduce) {
  .about-morph-hint {
    animation: none;
  }
  .morph-card-inner {
    transition: none;
  }
}
