/* ========================================
   AKSALAB Memories - Base Styles
   Mobile-First Responsive Design
   Dark Theme with Bronze Accents
   ======================================== */

/* CSS Variables - Dark Bronze Color Scheme */
:root {
  /* Primary Colors - Bronze/Dark Theme */
  --color-primary: #2D2D2D;
  --color-secondary: #8B6914;
  --color-accent: #C4A35A;
  
  /* Background Colors */
  --color-background: #1A1A1A;
  --color-surface: #2D2D2D;
  --color-surface-alt: #252525;
  
  /* Text Colors */
  --color-text: #E8E8E8;
  --color-text-light: #BBBBBB;
  --color-text-muted: #888888;
  --color-white: #ffffff;
  
  /* Accent Colors */
  --color-success: #4CAF50;
  --color-warning: #C4A35A;
  --color-error: #E74C3C;
  
  /* Legacy aliases */
  --primary-blue: var(--color-primary);
  --secondary-blue: var(--color-secondary);
  --accent-blue: var(--color-accent);
  --light-bg: var(--color-background);
  --dark-text: var(--color-text);
  --white: var(--color-white);
  
  /* Gray Scale */
  --gray-100: #F8F9FA;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-400: #CED4DA;
  --gray-500: #ADB5BD;
  --gray-600: #6C757D;
  --gray-700: #495057;
  --gray-800: #343A40;
  --gray-900: #212529;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
  
  /* Typography */
  --font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, sans-serif;
  --font-family-display: Georgia, 'Times New Roman', serif;
  --font-size-xs: clamp(0.75rem, 2vw, 0.875rem);
  --font-size-sm: clamp(0.875rem, 2.5vw, 1rem);
  --font-size-base: clamp(1rem, 3vw, 1.125rem);
  --font-size-lg: clamp(1.125rem, 3.5vw, 1.25rem);
  --font-size-xl: clamp(1.25rem, 4vw, 1.5rem);
  --font-size-2xl: clamp(1.5rem, 5vw, 2rem);
  --font-size-3xl: clamp(2rem, 6vw, 3rem);
  --font-size-4xl: clamp(2.5rem, 8vw, 4rem);
  
  /* Layout */
  --container-max-width: 1200px;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  
  /* Touch Target */
  --touch-target-min: 44px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(196, 163, 90, 0.3);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Z-index */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 1000;
  --z-tooltip: 1100;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Noise Overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

ul,
ol {
  list-style: none;
}

/* ========================================
   Utility Classes
   ======================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0D0D0D 0%, #1A1A1A 50%, #2D2D2D 100%);
  color: var(--color-white);
  padding: var(--spacing-3xl) var(--spacing-md);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(139, 105, 20, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(196, 163, 90, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(to top, var(--color-background), transparent);
  pointer-events: none;
}

.hero__content {
  text-align: center;
  max-width: 700px;
  position: relative;
  z-index: 1;
  animation: heroFadeIn 1s ease forwards;
}

/* Client Logo (Company using the software) */
.hero__client-logo {
  margin-bottom: var(--spacing-xl);
  display: flex;
  justify-content: center;
}

.hero__client-logo img {
  max-width: 200px;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  animation: logoFloat 3s ease-in-out infinite;
}

.hero__title {
  font-family: var(--font-family-display);
  font-size: var(--font-size-4xl);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, var(--color-white) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  opacity: 0.8;
  font-weight: 300;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.8;
  color: var(--color-text-light);
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 170px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollBounce 2s ease-in-out infinite;
  opacity: 0.5;
}

.hero__scroll-indicator svg {
  width: 32px;
  height: 32px;
  stroke: var(--color-accent);
}

/* ========================================
   Main Content
   ======================================== */
.main {
  padding: var(--spacing-xl) var(--spacing-md);
  max-width: var(--container-max-width);
  margin: 0 auto;
}

/* Section Title */
.section-title {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-title h2 {
  font-family: var(--font-family-display);
  font-size: var(--font-size-2xl);
  color: var(--color-accent);
  margin-bottom: var(--spacing-sm);
}

.section-title p {
  color: var(--color-text-muted);
  font-size: var(--font-size-base);
}

/* ========================================
   Filter Bar
   ======================================== */
.filter-bar {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-lg) 0;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  min-height: var(--touch-target-min);
  min-width: var(--touch-target-min);
  border-radius: 50px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  background: var(--color-surface);
  color: var(--color-text-light);
  border: 2px solid var(--color-surface-alt);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.filter-btn:hover {
  border-color: var(--color-secondary);
  color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
  color: var(--color-background);
  border-color: transparent;
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.filter-btn__icon {
  width: 18px;
  height: 18px;
}

.filter-btn__count {
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: var(--font-size-xs);
}

.filter-btn.active .filter-btn__count {
  background: rgba(0, 0, 0, 0.3);
}

/* ========================================
   Gallery Section
   ======================================== */
.gallery {
  padding: var(--spacing-md) 0 var(--spacing-2xl);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
}

/* Media Item */
.media-item {
  position: relative;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  aspect-ratio: 4/3;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.media-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(196, 163, 90, 0.3);
}

.media-item__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.media-item:hover .media-item__image {
  transform: scale(1.05);
}

.media-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-base);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--spacing-md);
}

.media-item:hover .media-item__overlay {
  opacity: 1;
}

.media-item__title {
  color: var(--color-white);
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.media-item__date {
  color: var(--color-accent);
  font-size: var(--font-size-xs);
}

/* Media Type Badge */
.media-item__badge {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
  z-index: 2;
}

.media-item__badge--gif {
  background: rgba(139, 105, 20, 0.9);
  color: white;
}

.media-item__badge--live {
  background: rgba(196, 163, 90, 0.9);
  color: var(--color-background);
  display: flex;
  align-items: center;
  gap: 4px;
}

.media-item__badge--live::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-background);
  border-radius: 50%;
  animation: livePulse 1.5s ease-in-out infinite;
}

/* ========================================
   Lightbox
   ======================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
}

.lightbox[aria-hidden="false"] {
  display: flex;
}

.lightbox__content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox__image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--border-radius-md);
}

.lightbox__close {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  z-index: 10;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav--prev {
  left: var(--spacing-md);
}

.lightbox__nav--next {
  right: var(--spacing-md);
}

.lightbox__counter {
  position: absolute;
  bottom: var(--spacing-lg);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-size-sm);
}

.lightbox__info {
  position: absolute;
  bottom: var(--spacing-xl);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: white;
}

.lightbox__title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--color-surface);
  color: var(--color-text);
  padding: var(--spacing-2xl) var(--spacing-md);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__content {
  max-width: var(--container-max-width);
  margin: 0 auto;
}

.footer__logo {
  display: flex;
  justify-content: center;
  margin-bottom: var(--spacing-lg);
}

.footer__logo img {
  width: 50px;
  height: auto;
  opacity: 0.8;
}

.footer__brand {
  font-family: var(--font-family-display);
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--color-accent);
}

.footer__tagline {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin-bottom: var(--spacing-lg);
}

.footer__divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-secondary), transparent);
  margin: 0 auto var(--spacing-lg);
}

.footer__copyright {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

/* Powered By Section */
.footer__powered {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__powered-text {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-sm);
}

.footer__powered-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
}

.footer__powered-logo img {
  width: 32px;
  height: auto;
  opacity: 0.7;
}

.footer__powered-logo span {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  font-weight: 500;
}

/* ========================================
   Scroll to Top Button
   ======================================== */
.scroll-top {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
  color: var(--color-background);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: var(--z-sticky);
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl), 0 0 30px rgba(196, 163, 90, 0.5);
}

/* ========================================
   Animations
   ======================================== */
@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes scrollBounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

@keyframes livePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp var(--transition-slow) ease forwards;
}

.fade-in-delay-1 { animation-delay: 100ms; }
.fade-in-delay-2 { animation-delay: 200ms; }
.fade-in-delay-3 { animation-delay: 300ms; }
.fade-in-delay-4 { animation-delay: 400ms; }

/* ========================================
   Responsive - Tablet (768px+)
   ======================================== */
@media (min-width: 768px) {
  .hero {
    min-height: 60vh;
    padding: var(--spacing-3xl) var(--spacing-lg);
  }
  
  .hero__logo img {
    width: 100px;
  }
  
  .main {
    padding: var(--spacing-2xl) var(--spacing-lg);
  }
  
  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
  }
  
  .footer {
    padding: var(--spacing-3xl) var(--spacing-lg);
  }
}

/* ========================================
   Responsive - Desktop (1024px+)
   ======================================== */
@media (min-width: 1024px) {
  .hero {
    min-height: 70vh;
  }
  
  .hero__logo img {
    width: 120px;
  }
  
  .gallery__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
  }
  
  .media-item {
    border-radius: var(--border-radius-lg);
  }
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
