/* ══════════════════════════════════════
   style_gallerie.css
   All styles for Gallerie.html
   ══════════════════════════════════════ */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Google+Sans+Display:wght@300;400&display=swap');

/* ── VARIABLES ── */
:root {
  --purple-light: #c9a7eb;
  --purple-mid:   #7b3fa0;
  --purple-dark:  #2a0a3a;
  --near-black:   #0a0010;
  --text-primary: #f0e8ff;
  --text-dim:     #a989c5;
  --accent:       #d4a8ff;
  --nav-h:        70px;
  --font-body:    'Google Sans', sans-serif;
  --font-display: 'Google Sans Display', sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── BODY & BACKGROUND ── */
body {
  background: linear-gradient(160deg, #1a0a2e 0%, #0d0118 40%, #000008 100%);
  min-height: 100vh;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
}

/* ── NOISE TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: .6;
}

/* ════════════════════════════
   NAVBAR
════════════════════════════ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  background: linear-gradient(to bottom, rgba(10,0,24,.92), rgba(10,0,24,0));
  backdrop-filter: blur(6px);
}

.nav-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 300;
  letter-spacing: .35em;
  color: var(--accent);
  text-transform: uppercase;
  text-decoration: none;
  user-select: none;
}

/* ── HAMBURGER BUTTON ── */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 200;
}
.hamburger span {
  display: block;
  height: 1.5px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform .35s ease, opacity .25s ease, width .3s ease;
  transform-origin: center;
}
.hamburger span:nth-child(1) { width: 100%; }
.hamburger span:nth-child(2) { width: 70%; margin-left: auto; }
.hamburger span:nth-child(3) { width: 100%; }
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); width: 100%; }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── SIDE MENU ── */
.nav-menu {
  position: fixed;
  top: 0; right: 0;
  width: min(320px, 100vw);
  height: 100vh;
  background: linear-gradient(135deg, rgba(42,10,58,.97) 0%, rgba(10,0,16,.99) 100%);
  border-left: 1px solid rgba(201,167,235,.12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem;
  transform: translateX(100%);
  transition: transform .45s cubic-bezier(.77,0,.175,1);
  z-index: 150;
}
.nav-menu.open { transform: translateX(0); }
.nav-menu a {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: .08em;
  color: var(--text-dim);
  text-decoration: none;
  padding: .5rem 0;
  position: relative;
  transition: color .25s;
}
.nav-menu a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 4px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width .35s ease;
}
.nav-menu a:hover { color: var(--accent); }
.nav-menu a:hover::after { width: 100%; }

/* ── OVERLAY ── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
  z-index: 140;
}
.overlay.active { opacity: 1; pointer-events: all; }

/* ════════════════════════════
   GALLERY PAGE
════════════════════════════ */
.gallery-page {
  padding-top: var(--nav-h);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── GRID ── */
.gallery-grid {
  display: grid;
  gap: 4px;
  padding: 4px;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 6px;
  }
}

@media (max-width: 767px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 2px;
  }
}

/* ── GRID ITEM ── */
.grid-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer;
  display: block;
  text-decoration: none;
  /* fade-in initial state */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .55s ease, transform .55s ease;
}

@media (max-width: 767px) {
  .grid-item { aspect-ratio: 1/1; }
}

.grid-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── IMAGE ── */
.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(1) saturate(1);
  transition: transform .6s cubic-bezier(.25,.46,.45,.94), filter .5s ease;
}
.grid-item:hover img {
  transform: scale(1.06);
  
}
