/* ============================================
   BDO Grotesk Font Face Declarations
   ============================================ */
@font-face {
  font-family: 'BDO Grotesk';
  src: url('../font/BDOGrotesk-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BDO Grotesk';
  src: url('../font/BDOGrotesk-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BDO Grotesk';
  src: url('../font/BDOGrotesk-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BDO Grotesk';
  src: url('../font/BDOGrotesk-DemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BDO Grotesk';
  src: url('../font/BDOGrotesk-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BDO Grotesk';
  src: url('../font/BDOGrotesk-ExtraBold.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BDO Grotesk';
  src: url('../font/BDOGrotesk-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
  --color-text: #1a1a1a;
  --color-text-muted: #888888;
  --color-background: #f5f5f5;
  --color-white: #ffffff;
  --font-family: 'BDO Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-subtle: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --grid-columns: 12;
  --grid-gap: 24px;
  --header-height: 80px;
  --meta-bar-height: 80px;
  --spacing-page: 40px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Lenis smooth scroll enhancements */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body {
  font-family: var(--font-family);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

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

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

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

/* ============================================
   12-Column Grid System
   ============================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  gap: var(--grid-gap);
  padding: 0 var(--spacing-page);
}

/* ============================================
   Header
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-page);
  z-index: 100;
  background: transparent;
}

.header__logo {
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.header__nav {
  display: flex;
  gap: 48px;
}

.nav__link {
  font-size: 1.125rem;
  font-weight: 400;
  opacity: 1;
  transition: opacity 0.2s ease-out;
}

.nav__link:hover {
  opacity: 0.4;
}

/* ============================================
   Project Numbers - Desktop (Left Sidebar)
   ============================================ */
.project-numbers {
  position: fixed;
  left: var(--spacing-page);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 90;
}

.project-number {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-muted);
  transition: color 0.2s ease-out, opacity 0.2s ease-out;
  padding: 4px 0;
  text-align: left;
  opacity: 0.5;
}

.project-number:hover {
  color: var(--color-text);
  opacity: 0.8;
}

.project-number.active {
  color: var(--color-text);
  opacity: 1;
}

/* ============================================
   Projects Container - Horizontal Scroll
   ============================================ */
.projects-container {
  display: flex;
  height: 100vh;
  /* Width is set dynamically by JS to support infinite loop clones */
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.project {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  scroll-snap-align: start;
}

.project__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  width: 100%;
  padding: 0 var(--spacing-page);
}

.project__image-wrapper {
  grid-column: 4 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project__image {
  max-height: 70vh;
  width: auto;
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.3s ease-out;
}

.project__image:hover {
  transform: scale(1.015);
}

/* ============================================
   Meta Bar - Client/Scope (Fixed Bottom)
   ============================================ */
.meta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--meta-bar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-page);
  z-index: 90;
  background: transparent;
}

.meta-bar__client,
.meta-bar__scope {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-bar__scope {
  text-align: right;
}

.meta-bar__label {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.meta-bar__value {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text);
  transition: opacity 0.15s ease-out;
}

/* ============================================
   About Overlay - Liquid Glass Effect
   ============================================ */
.about-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-overlay.active {
  opacity: 1;
  visibility: visible;
}

.about-overlay__close {
  position: absolute;
  top: var(--spacing-page);
  right: var(--spacing-page);
  font-size: 2rem;
  font-weight: 300;
  color: var(--color-text);
  opacity: 0.5;
  transition: var(--transition-subtle);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-overlay__close:hover {
  opacity: 1;
}

.about-overlay__content {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  width: 100%;
  padding: 0 var(--spacing-page);
}

.about-overlay__text {
  grid-column: 3 / 11;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s,
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.about-overlay.active .about-overlay__text {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 768px) {
  :root {
    --spacing-page: 24px;
    --header-height: 64px;
    --meta-bar-height: 100px;
  }

  .header__nav {
    gap: 24px;
  }

  .nav__link {
    font-size: 1rem;
  }

  .header__logo {
    font-size: 1rem;
  }

  /* Project numbers at bottom for mobile */
  .project-numbers {
    left: var(--spacing-page);
    right: var(--spacing-page);
    top: auto;
    bottom: var(--meta-bar-height);
    transform: none;
    flex-direction: row;
    justify-content: flex-start;
    gap: 24px;
  }

  .project__image-wrapper {
    grid-column: 1 / 13;
  }

  .project__image {
    max-height: 50vh;
  }

  .meta-bar {
    padding-bottom: 16px;
  }

  .about-overlay__text {
    grid-column: 1 / 13;
    font-size: clamp(1.5rem, 8vw, 2.5rem);
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-page: 16px;
  }

  .header__nav {
    gap: 16px;
  }

  .nav__link {
    font-size: 0.875rem;
  }

  .header__logo {
    font-size: 0.875rem;
  }

  .project-number {
    font-size: 0.875rem;
  }

  .meta-bar__label,
  .meta-bar__value {
    font-size: 0.875rem;
  }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.header {
  animation: fadeIn 0.6s ease-out forwards;
}

.project-numbers {
  animation: fadeIn 0.6s ease-out 0.1s forwards;
  opacity: 0;
}

.meta-bar {
  animation: fadeIn 0.6s ease-out 0.2s forwards;
  opacity: 0;
}

.project__image-wrapper {
  animation: fadeInUp 0.7s ease-out 0.3s forwards;
  opacity: 0;
}

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

/* Hide scrollbar but keep functionality */
.projects-container::-webkit-scrollbar {
  display: none;
}

.projects-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

