/* ==========================================================================
   GALLERY & ARCHIVES — SERVICES-STYLE ARCHITECTURAL HERO
   Exact replication of the proven Services Module design language:
   - Volumetric sunbeam caustics (.gallery-hero__light-ray)
   - Organic topographic elevation contours with vector curves (.gallery-hero__topo)
   - Multi-layer staggered headline with brand shimmer & organic underline swoosh
   - 3D bento telemetry stats cards
   - Pill CTA button pair
   ========================================================================== */

.gallery-hero {
  position: relative;
  min-height: 94vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 130px 5% 90px;
  overflow: hidden;
  perspective: 1200px;
  background-color: #f8fafc;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-sizing: border-box;
  z-index: 1;
}

/* ── 0. MINIMAL ARCHITECTURAL BACKGROUND ──────────────────────────────────── */
.gallery-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.gallery-hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.5 !important;
  filter: contrast(1.08) saturate(1.02);
  transform: scale(1.02);
  transition: opacity 0.5s ease;
}

.gallery-hero__bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.15) 60%, rgba(248, 250, 252, 0.45) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, transparent 50%, rgba(255, 255, 255, 0.6) 100%);
}

/* ── 1. VOLUMETRIC ATMOSPHERIC LIGHT BEAMS ────────────────────────────────── */
.gallery-hero__light-ray {
  position: absolute;
  pointer-events: none;
  filter: blur(55px);
  opacity: 0.7;
  z-index: 1;
}

.gallery-hero__light-ray--left {
  top: -100px;
  left: -60px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(34, 46, 64, 0.08) 0%, rgba(34, 46, 64, 0.02) 45%, transparent 70%);
  animation: galRayBreathe 9s ease-in-out infinite alternate;
}

.gallery-hero__light-ray--right {
  top: 10%;
  right: -80px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(34, 46, 64, 0.06) 0%, rgba(225, 29, 72, 0.03) 35%, transparent 70%);
  animation: galRayBreathe 11s ease-in-out infinite alternate-reverse;
}

@keyframes galRayBreathe {
  0%   { transform: scale(0.92) translate(0, 0); opacity: 0.5; }
  100% { transform: scale(1.08) translate(15px, 20px); opacity: 0.85; }
}

/* ── 2. ORGANIC TOPOGRAPHIC CONTOURS ──────────────────────────────────────── */
.gallery-hero__topo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  will-change: transform;
}

.gallery-topo-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topo-curve {
  transform-origin: center;
}
.topo-curve--1 { animation: galTopoWiggle1 14s ease-in-out infinite alternate; }
.topo-curve--2 { animation: galTopoWiggle2 16s ease-in-out infinite alternate; }
.topo-curve--3 { animation: galTopoWiggle1 18s ease-in-out infinite alternate-reverse; }
.topo-curve--4 { animation: galTopoWiggle2 20s ease-in-out infinite alternate; }
.topo-curve--5 { animation: galTopoWiggle1 22s ease-in-out infinite alternate-reverse; }
.topo-curve--6 { animation: galTopoWiggle2 15s ease-in-out infinite alternate; }
.topo-curve--7 { animation: galTopoWiggle1 19s ease-in-out infinite alternate-reverse; }

@keyframes galTopoWiggle1 {
  0%   { transform: translateY(0px) skewX(0deg); }
  50%  { transform: translateY(-8px) skewX(0.8deg); }
  100% { transform: translateY(6px) skewX(-0.6deg); }
}
@keyframes galTopoWiggle2 {
  0%   { transform: translateY(0px) skewX(0deg); }
  50%  { transform: translateY(10px) skewX(-0.7deg); }
  100% { transform: translateY(-7px) skewX(0.9deg); }
}

/* ── 3. INNER CONTAINER ───────────────────────────────────────────────────── */
.gallery-hero__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
}

/* ── 4. HEADLINE TYPOGRAPHY WITH SHIMMER & SWOOSH ────────────────────────── */
.gallery-hero__h1 {
  font-family: 'DM Sans', 'Inter Tight', sans-serif;
  font-size: clamp(2.5rem, 5.8vw, 4.6rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.035em;
  color: #222e40;
  margin: 0 0 24px;
  text-shadow: 0 2px 4px rgba(34, 46, 64, 0.04), 0 14px 30px rgba(34, 46, 64, 0.06);
}

.gallery-hero__line {
  display: block;
  position: relative;
}

.gallery-hero__line--1 {
  color: #0f172a;
}

.gallery-hero__line--2 {
  display: inline-block;
  margin: 4px 0 6px;
}

.gallery-hero__shimmer {
  font-style: normal;
  display: inline-block;
  background: linear-gradient(120deg, #222e40 0%, #1e40af 35%, #222e40 65%, #222e40 100%);
  background-size: 260% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: galShimmerFlow 7s ease-in-out infinite;
}

@keyframes galShimmerFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Organic Underline Swoosh */
.gallery-hero__swoosh {
  display: block;
  width: min(100%, 280px);
  height: 18px;
  margin: -6px auto 0;
  overflow: visible;
}

.gallery-hero__swoosh path {
  stroke-dasharray: 280;
  stroke-dashoffset: 0;
}

.gallery-hero__line--3 {
  font-size: 0.92em;
  margin-top: 4px;
}

.gallery-hero__line-prefix {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.82em;
  color: #64748b;
  letter-spacing: 0.02em;
  margin-right: 8px;
  vertical-align: middle;
}

.gallery-hero__brand-name {
  color: #222e40;
  font-weight: 800;
  letter-spacing: -0.025em;
  position: relative;
  display: inline-block;
  background: linear-gradient(180deg, #222e40 0%, #161e29 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── 5. DESCRIPTION ──────────────────────────────────────────────────────── */
.gallery-hero__p {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  color: #475569;
  max-width: 720px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

/* ── 6. HERO CTA BUTTONS (Matching Services Style) ───────────────────────── */
.gallery-hero__btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.gallery-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  background: #222e40 !important;
  color: #ffffff !important;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(34, 46, 64, 0.25);
  transition: all 0.25s ease;
}

.gallery-btn-primary:hover {
  background: #18212e !important;
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(34, 46, 64, 0.35);
  color: #ffffff !important;
}

.gallery-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: #ffffff;
  color: #222e40;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 9999px;
  text-decoration: none;
  border: 1px solid rgba(34, 46, 64, 0.2);
  box-shadow: 0 2px 8px rgba(34, 46, 64, 0.05);
  transition: all 0.25s ease;
}

.gallery-btn-secondary:hover {
  background: #f8fafc;
  border-color: #222e40;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(34, 46, 64, 0.14);
  color: #222e40;
}

/* ── 7. 3D BENTO TELEMETRY STATS CARDS ───────────────────────────────────── */
.gallery-hero__stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 55px;
}

.gallery-hero__stat {
  background: #ffffff;
  border: 1px solid rgba(34, 46, 64, 0.12);
  border-radius: 18px;
  padding: 22px 30px;
  text-align: center;
  box-shadow: 0 8px 22px rgba(34, 46, 64, 0.07);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 150px;
}

.gallery-hero__stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(34, 46, 64, 0.14);
  border-color: rgba(34, 46, 64, 0.22);
}

.gallery-hero__stat-num {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #0f172a;
  line-height: 1;
  margin-bottom: 6px;
}

.gallery-hero__stat-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
}

/* ── 8. RESPONSIVE BREAKPOINTS ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .gallery-hero {
    padding: 110px 5% 70px;
    min-height: auto;
  }

  .gallery-hero__stats {
    gap: 16px;
    margin-top: 40px;
  }

  .gallery-hero__stat {
    padding: 18px 22px;
    min-width: 130px;
  }

  .gallery-hero__stat-num {
    font-size: 1.8rem;
  }
}

@media (max-width: 600px) {
  .gallery-hero {
    padding: 100px 4% 60px;
  }

  .gallery-hero__h1 {
    font-size: 2.2rem;
  }

  .gallery-hero__btns {
    flex-direction: column;
    width: 100%;
  }

  .gallery-btn-primary,
  .gallery-btn-secondary {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .gallery-hero__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
  }

  .gallery-hero__stat {
    min-width: auto;
    padding: 16px 12px;
  }

  .gallery-hero__stat-num {
    font-size: 1.5rem;
  }

  .gallery-hero__stat-label {
    font-size: 0.72rem;
  }
}
