/**
 * Infinite Horizontal Scroll Gallery — Styles
 */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  background: #f4f1eb; color: #2a2a28;
  font-family: 'Outfit', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: none;
  cursor: grab;
}
body:active { cursor: grabbing !important; }
body.detail-open { cursor: default; }

/* ===== LOADER ===== */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #f4f1eb;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  transition: opacity 0.5s ease;
}
.loader.hidden { opacity: 0; pointer-events: none; }
.loader-bar-track {
  width: 200px; height: 2px;
  background: rgba(42,42,40,0.12);
  border-radius: 1px;
  overflow: hidden;
}
.loader-bar-fill {
  width: 0%; height: 100%;
  background: #2a2a28;
  transition: width 0.3s ease;
}
.loader-percent {
  font-size: 12px; font-weight: 400;
  color: rgba(42,42,40,0.35);
  letter-spacing: 2px;
}

/* ===== THREE.JS CANVAS ===== */
#c { position: fixed; inset: 0; z-index: 1; }

/* ===== DETAIL OVERLAY ===== */
.detail-overlay {
  position: fixed; inset: 0; z-index: 100;
  pointer-events: none;
  visibility: hidden;
}
.detail-overlay.active {
  pointer-events: all;
  visibility: visible;
}

.detail-click-layer {
  position: absolute; inset: 0; z-index: 3;
}

.detail-content {
  position: absolute; inset: 0;
  z-index: 10;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 60px;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.0) 50%);
  opacity: 0;
  pointer-events: none;
  color: #fff;
}
.detail-overlay.active .detail-content { pointer-events: all; }

.detail-title {
  font-size: 48px; font-weight: 700;
  letter-spacing: -1px; line-height: 1.1;
}
.detail-tag {
  font-size: 13px; font-weight: 400;
  color: rgba(255,255,255,0.5);
  letter-spacing: 2px; text-transform: uppercase;
  margin-top: 12px;
}
.detail-desc {
  font-size: 16px; font-weight: 300;
  color: rgba(255,255,255,0.7);
  line-height: 1.6; max-width: 480px;
  margin-top: 24px;
}

.detail-close {
  position: absolute; top: 32px; right: 36px;
  width: 48px; height: 48px;
  border: none;
  border-radius: 50%;
  background: #000; color: #fff;
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: all;
  z-index: 20;
}

/* ===== MOBILE (≤768px) ===== */
@media (max-width: 768px) {
  .detail-content { padding: 28px; }
  .detail-title { font-size: 28px; }
  .detail-tag { font-size: 11px; margin-top: 8px; }
  .detail-desc { font-size: 14px; margin-top: 16px; }
  .detail-close {
    top: 20px; right: 20px;
    width: 40px; height: 40px;
    font-size: 16px;
  }
}
