/* ============================================
   ThehumanINC — Bali 2026
   Premium Gallery — v2 Redesign
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- Tokens ---------- */
:root {
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;

  --bg: #060a0f;
  --bg-card: rgba(255, 255, 255, 0.03);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.06);

  --text: #f8fafc;
  --text-dim: #94a3b8;
  --text-muted: #475569;

  --gold: #d4a853;
  --gold-light: #f0d48a;
  --teal: #2dd4bf;
  --sky: #38bdf8;
  --rose: #fb7185;
  --violet: #a78bfa;

  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden
}

img {
  display: block;
  max-width: 100%
}

a {
  text-decoration: none;
  color: inherit
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit
}

::-webkit-scrollbar {
  width: 5px
}

::-webkit-scrollbar-track {
  background: transparent
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 10px
}

/* ---------- HERO — Full-screen cinematic ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.hero-slide.active {
  opacity: 1
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5) saturate(1.2);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(6, 10, 15, 0.4) 40%, rgba(6, 10, 15, 0.1) 70%, rgba(6, 10, 15, 0.3) 100%),
    linear-gradient(135deg, rgba(212, 168, 83, 0.08) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 4rem 4rem;
  max-width: 800px;
  width: 100%;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(212, 168, 83, 0.15);
  border: 1px solid rgba(212, 168, 83, 0.25);
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  letter-spacing: -.02em;
  margin-bottom: .75rem;
}

.hero h1 .gold {
  color: var(--gold-light)
}

.hero .hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.5;
  max-width: 480px;
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
}

.hero-stat {
  text-align: left
}

.hero-stat-val {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-light);
}

.hero-stat-lbl {
  font-size: .7rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: .65rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

/* Hero video slides */
.hero-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55) saturate(1.2);
}

.hero-mute-btn {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-mute-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

/* ---------- STICKY NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 10, 15, 0.9);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-inner::-webkit-scrollbar {
  display: none
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  color: var(--gold);
  white-space: nowrap;
  margin-right: auto;
}

.nav-link {
  padding: 7px 14px;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all .25s var(--ease);
}

.nav-link:hover {
  color: var(--text-dim);
  background: var(--glass)
}

.nav-link.active {
  color: var(--gold-light);
  background: rgba(212, 168, 83, 0.1)
}

/* ---------- SECTION ---------- */
.section {
  padding: 5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.section-num {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 900;
  line-height: .85;
  color: rgba(255, 255, 255, 0.04);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.06);
}

.section-info {
  flex: 1
}

.section-tag {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--gold);
  margin-bottom: .35rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
}

.section-desc {
  color: var(--text-muted);
  font-size: .9rem;
  margin-top: .4rem;
}

/* ---------- FEATURED BANNER (full-bleed video divider) ---------- */
.featured-banner {
  width: 100%;
  height: 50vh;
  min-height: 300px;
  max-height: 500px;
  position: relative;
  overflow: hidden;
  margin: 0;
}

.featured-banner video,
.featured-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 8s ease;
}

.featured-banner:hover video,
.featured-banner:hover img {
  transform: scale(1.05)
}

.featured-banner .banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, transparent 30%, transparent 70%, var(--bg) 100%);
  z-index: 1;
}

/* ---------- MOSAIC GALLERY ---------- */
.gallery-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.gallery-mosaic .g-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  aspect-ratio: 1/1;
}

/* Featured items — larger */
.gallery-mosaic .g-item.feat-h {
  grid-column: span 2;
  aspect-ratio: 2/1
}

.gallery-mosaic .g-item.feat-v {
  grid-row: span 2;
  aspect-ratio: auto
}

.gallery-mosaic .g-item.feat-big {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: 1/1
}

.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}

.g-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .5) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s var(--ease);
  pointer-events: none;
}

.g-item:hover img {
  transform: scale(1.08)
}

.g-item:hover::after {
  opacity: 1
}

.g-item .g-zoom {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.7);
  transition: all .3s var(--ease);
}

.g-item:hover .g-zoom {
  opacity: 1;
  transform: scale(1)
}

.g-zoom svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
  fill: none;
  stroke-width: 2
}

/* Reveal animation */
.g-item {
  opacity: 0;
  transform: translateY(20px) scale(.97);
  transition: opacity .5s ease, transform .5s ease
}

.g-item.vis {
  opacity: 1;
  transform: translateY(0) scale(1)
}

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .97);
  backdrop-filter: blur(40px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all .4s var(--ease);
}

.lightbox.open {
  opacity: 1;
  visibility: visible
}

.lb-img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  transform: scale(.92);
  transition: transform .5s var(--ease-spring);
}

.lightbox.open .lb-img {
  transform: scale(1)
}

.lb-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.lb-close:hover {
  background: rgba(255, 255, 255, .15)
}

.lb-close svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  stroke-width: 2
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}

.lb-nav:hover {
  background: rgba(255, 255, 255, .12)
}

.lb-nav svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  stroke-width: 2
}

.lb-prev {
  left: 1.2rem
}

.lb-next {
  right: 1.2rem
}

.lb-counter {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: .8rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, .6);
  padding: 5px 14px;
  border-radius: 100px;
}

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  padding: 5rem 2rem 3rem;
  border-top: 1px solid var(--border);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  font-style: italic;
  color: var(--gold);
  margin-bottom: .5rem;
}

.footer p {
  color: var(--text-muted);
  font-size: .85rem
}

.footer-emoji {
  font-size: 2rem;
  margin-bottom: 1rem
}

/* ---------- LOAD MORE ---------- */
.load-more-wrap {
  text-align: center;
  margin-top: 2rem
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: 100px;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .85rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  transition: all .3s var(--ease);
}

.load-more-btn:hover {
  background: var(--glass-strong);
  transform: translateY(-2px)
}

/* ---------- Animations ---------- */
@keyframes scrollLine {
  0% {
    opacity: 1;
    height: 40px
  }

  50% {
    opacity: .4;
    height: 20px
  }

  100% {
    opacity: 1;
    height: 40px
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.fade-up {
  animation: fadeUp .8s var(--ease) both
}

.fade-up-d1 {
  animation-delay: .1s
}

.fade-up-d2 {
  animation-delay: .2s
}

.fade-up-d3 {
  animation-delay: .3s
}

.fade-up-d4 {
  animation-delay: .4s
}

/* ---------- Responsive ---------- */
@media(max-width:1100px) {
  .gallery-mosaic {
    grid-template-columns: repeat(3, 1fr)
  }
}

@media(max-width:768px) {
  .gallery-mosaic {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px
  }

  .gallery-mosaic .g-item.feat-h {
    grid-column: span 2
  }

  .gallery-mosaic .g-item.feat-big {
    grid-column: span 2;
    grid-row: span 2
  }

  .hero-content {
    padding: 2rem 1.5rem 3rem
  }

  .section {
    padding: 3rem 1rem
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem
  }

  .section-num {
    font-size: 3.5rem
  }

  .hero-stats {
    gap: 1.5rem
  }

  .lb-prev {
    left: .5rem
  }

  .lb-next {
    right: .5rem
  }

  .featured-banner {
    height: 35vh;
    min-height: 200px
  }
}

@media(max-width:480px) {
  .gallery-mosaic {
    grid-template-columns: repeat(2, 1fr);
    gap: 3px
  }

  .gallery-mosaic .g-item {
    border-radius: 2px
  }

  .hero h1 {
    font-size: 2.5rem
  }
}

/* ---------- VIDEO items ---------- */
.g-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}

.g-item:hover video {
  transform: scale(1.08);
}

.g-play-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  padding: 4px 10px;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(8px);
  border-radius: 100px;
  font-size: .65rem;
  font-weight: 600;
  color: white;
  letter-spacing: .05em;
  pointer-events: none;
}

/* Lightbox video */
.lb-video {
  display: block;
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 6px;
  background: #000;
}

/* ---------- SLIDESHOW button in nav ---------- */
#slideshow-btn {
  margin-left: auto;
  color: var(--gold) !important;
  border: 1px solid rgba(212, 168, 83, 0.3) !important;
  font-weight: 600;
  transition: all .25s var(--ease);
}

#slideshow-btn:hover {
  background: rgba(212, 168, 83, 0.15);
  border-color: var(--gold) !important;
}

/* ---------- Slideshow progress indicator ---------- */
.lb-counter {
  transition: all .3s var(--ease);
}

.lightbox.open .lb-counter {
  opacity: 1;
}