/**
 * AURA NIRMAN — SECTION 5: PROJECT SHOWCASE
 * Premium Scroll-Controlled Architectural Collage
 * 
 * - Sticky Pinned Viewport Track (380vh desktop / 320vh mobile)
 * - Sharp White Photograph Borders (Real Printed Architectural Proofs)
 * - Handwritten Category Annotations & Hand-Drawn Curved Arrows
 * - Art-Directed Overlapping Mobile & Desktop Composition
 * - Cinematic Opening & Post-Collage Text Revelations
 * - Fully Bi-directional Scrubbing & Reduced Motion Support
 */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&display=swap');

/* ------------------------------------------------------------------------- */
/* 1. SECTION WRAPPER & PINNED VIEWPORT                                      */
/* ------------------------------------------------------------------------- */
.an-showcase-section {
  position: relative;
  width: 100%;
  height: 380vh;
  background-color: #050d0a;
  color: #ffffff;
  overflow: visible;
  z-index: 20;
}

.an-showcase-viewport,
.an-stage-section-5 {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  left: 0 !important;
  top: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: radial-gradient(ellipse at 50% 40%, #0d2620 0%, #061511 60%, #030a08 100%);
  display: block !important;
  perspective: 1200px;
}

/* Atmospheric Background Linework & Subtle Blueprint Matrix */
.an-showcase-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.an-showcase-radial-glow {
  position: absolute;
  width: 900px;
  height: 900px;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(212, 245, 76, 0.08) 0%, rgba(13, 38, 32, 0.3) 45%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

.an-showcase-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 85%);
}

.an-showcase-noise {
  position: absolute;
  inset: 0;
  background-image: url('/assets/img/noise.svg');
  opacity: 0.04;
  pointer-events: none;
}

/* ------------------------------------------------------------------------- */
/* 2. SECTION OPENING                                                        */
/* ------------------------------------------------------------------------- */
.an-showcase-opening {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 2rem;
  z-index: 30;
  pointer-events: none;
  will-change: transform, opacity;
}

.an-showcase-kicker-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.an-showcase-kicker-line {
  display: inline-block;
  width: 48px;
  height: 1px;
  background: #D4F54C;
  opacity: 0.6;
}

.an-showcase-kicker-text {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: #D4F54C;
}

.an-showcase-heading-1 {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: clamp(2.5rem, 6.5vw, 6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  will-change: transform, opacity;
}

.an-showcase-heading-2 {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: clamp(2.5rem, 6.5vw, 6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #D4F54C;
  margin: 0.25rem 0 0 0;
  text-shadow: 0 0 35px rgba(212, 245, 76, 0.35);
  will-change: transform, opacity;
}

.an-showcase-subtext {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  max-width: 620px;
  margin-top: 2rem;
  will-change: transform, opacity;
}

/* ------------------------------------------------------------------------- */
/* 3. PROJECT COLLAGE STAGE                                                  */
/* ------------------------------------------------------------------------- */
.an-showcase-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: auto;
  overflow: hidden;
}

/* Sharp Printed Photograph Styling with Crisp White Borders */
.an-collage-card {
  position: absolute;
  border-radius: 0px !important;
  /* Sharp rectangular photograph corners */
  border: 4px solid #ffffff;
  /* Clean, visible white photograph border */
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 3px 10px rgba(0, 0, 0, 0.45);
  background-color: #ffffff;
  overflow: hidden;
  cursor: pointer;
  transform-origin: center center;
  transition: box-shadow 0.35s ease, transform 0.35s ease, z-index 0.35s ease;
  will-change: transform, opacity;
  display: block;
  text-decoration: none;
}

@media (min-width: 769px) {
  .an-collage-card {
    border: 5px solid #ffffff;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.8), 0 4px 14px rgba(0, 0, 0, 0.5);
  }
}

.an-collage-card:hover,
.an-collage-card:focus-visible {
  z-index: 50 !important;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.95), 0 0 25px rgba(212, 245, 76, 0.35), 0 0 0 2px #D4F54C;
}

.an-card-media-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #050d0a;
}

.an-card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}

.an-collage-card:hover .an-card-img {
  transform: scale(1.04);
}

/* Card Overlays & Architectural Metadata Badge */
.an-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3, 10, 8, 0.88) 0%, rgba(3, 10, 8, 0.15) 45%, transparent 100%);
  pointer-events: none;
}

.an-card-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.65rem 0.85rem;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  transform: translateY(1px);
  transition: transform 0.3s ease;
}

.an-collage-card:hover .an-card-content {
  transform: translateY(0);
}

.an-card-cat {
  display: block;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #D4F54C;
  margin-bottom: 2px;
}

.an-card-title {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: clamp(0.75rem, 0.95vw, 1.05rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.an-card-hover-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(3, 10, 8, 0.75);
  border: 1px solid rgba(212, 245, 76, 0.5);
  color: #D4F54C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 3;
}

.an-collage-card:hover .an-card-hover-indicator {
  opacity: 1;
  transform: scale(1);
}

/* ------------------------------------------------------------------------- */
/* 4. HANDWRITTEN CATEGORY ANNOTATIONS & HAND-DRAWN CURVED ARROWS            */
/* ------------------------------------------------------------------------- */
.an-annotations-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 28;
  overflow: hidden;
  will-change: opacity, transform;
}

.an-annotation {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
}

.an-anno-text {
  font-family: 'Caveat', 'Segoe Print', cursive, sans-serif;
  font-size: clamp(1.2rem, 3.8vw, 1.6rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.03em;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 0 2px rgba(0, 0, 0, 1);
  white-space: nowrap;
}

.an-anno-arrow {
  width: 50px;
  height: 34px;
  overflow: visible;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.85));
  margin-top: 2px;
}

/* Precise Hand-Annotated Coordinates around the Mobile Composition */
.an-anno-residential {
  top: 4%;
  left: 48%;
}

.an-anno-institutional {
  top: 14%;
  right: 3%;
}

.an-anno-architecture {
  top: 29%;
  left: 2%;
}

.an-anno-interiors {
  top: 48%;
  left: 3%;
}

.an-anno-commercial {
  top: 61%;
  right: 4%;
}

@media (min-width: 769px) {

  /* On desktop, keep annotations elegant around perimeter */
  .an-anno-residential {
    top: 5%;
    left: 20%;
  }

  .an-anno-institutional {
    top: 32%;
    left: 4%;
  }

  .an-anno-architecture {
    top: 5%;
    right: 22%;
  }

  .an-anno-interiors {
    top: 32%;
    right: 5%;
  }

  .an-anno-commercial {
    top: 68%;
    right: 24%;
  }
}

/* ------------------------------------------------------------------------- */
/* 5. POST-COLLAGE TEXT & CTA                                                */
/* ------------------------------------------------------------------------- */
.an-showcase-closing {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.5rem;
  z-index: 35;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}

.an-showcase-closing-card {
  max-width: 680px;
  padding: 3rem 3.5rem;
  background: rgba(6, 18, 14, 0.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212, 245, 76, 0.3);
  border-radius: 20px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.85), 0 0 50px rgba(212, 245, 76, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.an-closing-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(212, 245, 76, 0.1);
  border: 1px solid rgba(212, 245, 76, 0.25);
  margin-bottom: 1.5rem;
}

.an-closing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #D4F54C;
  box-shadow: 0 0 8px #D4F54C;
}

.an-closing-label {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #D4F54C;
}

.an-closing-heading-1 {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: clamp(1.85rem, 3.8vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0;
}

.an-closing-heading-2 {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: clamp(1.85rem, 3.8vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #D4F54C;
  margin: 0.25rem 0 0 0;
  text-shadow: 0 0 25px rgba(212, 245, 76, 0.25);
}

.an-closing-subtext {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: clamp(0.95rem, 1.2vw, 1.125rem);
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  margin: 1.5rem 0 0 0;
}

.an-closing-action {
  margin-top: 2rem;
  pointer-events: auto;
}

.an-showcase-btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 2rem;
  border-radius: 9999px;
  background: #D4F54C;
  color: #030a08;
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.4s ease;
  box-shadow: 0 10px 25px rgba(212, 245, 76, 0.25);
}

.an-showcase-btn:hover {
  background: #ffffff;
  color: #030a08;
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(255, 255, 255, 0.3);
}

.an-btn-arrow {
  display: inline-block;
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.an-showcase-btn:hover .an-btn-arrow {
  transform: translateX(4px);
}

/* Scrub Progress Bar */
.an-showcase-progress-wrap {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  overflow: hidden;
  z-index: 40;
  pointer-events: none;
}

.an-showcase-progress-bar {
  width: 100%;
  height: 100%;
  background: #D4F54C;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.08s linear;
}

/* ------------------------------------------------------------------------- */
/* 6. MOBILE RESPONSIVE OPTIMIZATIONS                                        */
/* ------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .an-showcase-section {
    height: 340vh;
  }

  .an-showcase-closing-card {
    padding: 2.25rem 2.25rem;
    max-width: 90%;
  }
}

@media (max-width: 768px) {
  .an-showcase-section {
    height: 320vh;
  }

  .an-showcase-viewport {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  /* Dead Center Section Introduction on Mobile */
  .an-showcase-opening {
    position: absolute;
    inset: 0;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .an-showcase-kicker-wrap {
    margin-bottom: 0.5rem;
    gap: 0.75rem;
  }

  .an-showcase-kicker-line {
    width: 24px;
  }

  .an-showcase-kicker-text {
    font-size: 0.5625rem;
    letter-spacing: 0.25em;
  }

  .an-showcase-heading-1,
  .an-showcase-heading-2 {
    font-size: clamp(1.65rem, 6vw, 2.2rem);
    line-height: 1.08;
  }

  .an-showcase-subtext {
    font-size: 0.8125rem;
    line-height: 1.45;
    margin-top: 0.5rem;
    max-width: 320px;
  }

  /* Hand-Drawn Annotations on Mobile */
  .an-annotations-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
  }

  .an-anno-text {
    font-size: clamp(0.95rem, 3.2vw, 1.25rem);
  }

  .an-anno-arrow {
    width: 36px;
    height: 24px;
  }

  .an-anno-residential {
    top: 4%;
    left: 45%;
  }

  .an-anno-institutional {
    top: 13%;
    right: 4%;
  }

  .an-anno-architecture {
    top: 27%;
    left: 4%;
  }

  .an-anno-interiors {
    top: 42%;
    left: 4%;
  }

  .an-anno-commercial {
    top: 62%;
    right: 4%;
  }

  /* Post-Collage Mobile Layout */
  .an-showcase-closing {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    z-index: 35;
  }

  .an-showcase-closing-card {
    padding: 1.85rem 1.35rem;
    width: 92%;
    max-width: 380px;
    border-radius: 16px;
    margin: 0 auto;
  }

  .an-closing-pill {
    padding: 0.25rem 0.65rem;
    margin-bottom: 1rem;
  }

  .an-closing-label {
    font-size: 0.5625rem;
  }

  .an-closing-heading-1,
  .an-closing-heading-2 {
    font-size: 1.45rem;
    line-height: 1.15;
  }

  .an-closing-subtext {
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-top: 0.85rem;
  }

  .an-closing-action {
    margin-top: 1.35rem;
  }

  .an-showcase-btn {
    padding: 0.65rem 1.5rem;
    font-size: 0.6875rem;
  }

  /* Photograph Content Strip */
  .an-card-content {
    padding: 0.45rem 0.65rem;
  }

  .an-card-cat {
    font-size: 0.5rem;
  }

  .an-card-title {
    font-size: 0.72rem;
  }

  .an-card-hover-indicator {
    width: 20px;
    height: 20px;
    font-size: 9px;
    top: 5px;
    right: 5px;
  }
}

/* ------------------------------------------------------------------------- */
/* 7. REDUCED MOTION SUPPORT                                                 */
/* ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .an-showcase-section {
    height: auto !important;
    min-height: 100vh;
  }

  .an-showcase-viewport {
    position: relative !important;
    height: auto !important;
    padding: 6rem 2rem;
    flex-direction: column;
    overflow: visible !important;
  }

  .an-showcase-opening,
  .an-showcase-closing {
    position: relative !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  .an-showcase-stage {
    position: relative !important;
    height: auto !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1.5rem !important;
    justify-content: center !important;
    padding: 3rem 0 !important;
    overflow: visible !important;
  }

  .an-collage-card {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 280px !important;
    height: 200px !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .an-annotations-layer {
    display: none !important;
  }

  .an-showcase-progress-wrap {
    display: none !important;
  }
}