/* ============================================================
   ITS ALIGNED — Design Tokens + Global Styles
   DESIGN_VARIANCE: 8 | MOTION_INTENSITY: 7 | VISUAL_DENSITY: 2
   ============================================================ */

:root {
  --bg:       #0a0a0a;
  --surface:  #111111;
  --text:     #e0ddd7;
  --muted:    #585552;
  --accent:   #1e35c4;
  --border:   #1c1c1c;
  --nav-h:    64px;
  --radius:   0px;        /* Sharp. No pill borders. Art gallery aesthetic. */
}

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

html {
  font-size: 16px;
  /* No scroll-behavior: smooth. It fights ScrollTrigger's pinned gallery,
     which then renders over the hero mid-jump. */
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }

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

/* ── Nav ───────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  mix-blend-mode: difference;
}

.nav-logo {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #fff;
  text-transform: uppercase;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.7);
  transition: color 0.25s ease;
}

.nav-links a:hover { color: #fff; }

/* ── Hero ──────────────────────────────────────────── */
#hero {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 45% 55%;
  padding-top: var(--nav-h);
  background: var(--bg);
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 80px 56px 80px 48px;
  gap: 0;
}

.hero-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
}

.hero-text h1 {
  font-size: clamp(44px, 5.5vw, 80px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.hero-sub {
  font-size: 15px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.6;
  max-width: 38ch;
  margin-bottom: 48px;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 100dvh;
}

.hero-visual .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform-origin: center center;
  will-change: transform;
}

/* ── Buttons ───────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 14px 28px;
  width: fit-content;
  transition: background 0.25s ease, color 0.25s ease;
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--bg);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--muted);
}

/* ── Gallery: Horizontal Scroll ────────────────────── */
#gallery {
  /* height set by JS to accommodate scroll distance */
}

.gallery-sticky {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  /* Opaque, so the pinned track can never show the hero through it */
  background: var(--bg);
}

.gallery-track {
  display: flex;
  gap: 24px;
  padding: 0 48px;
  align-items: flex-start;
  will-change: transform;
}

/* Piece Card */
.piece {
  flex-shrink: 0;
  width: clamp(220px, 25vw, 340px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.piece-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface);
}

.piece-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.piece:hover .piece-img img {
  transform: scale(1.04);
}

.piece-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.piece-num {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
}

.commissioned-tag {
  color: var(--muted);
}

.piece-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}

.piece-medium {
  font-size: 12px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.4;
}

.piece-more {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
  white-space: nowrap;
}

.piece-more:hover {
  border-color: var(--accent);
}

/* Gallery progress indicator */
.gallery-progress {
  position: fixed;
  bottom: 28px;
  left: 48px;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gallery-progress.visible { opacity: 1; }

.progress-bar {
  width: 80px;
  height: 1px;
  background: var(--border);
  position: relative;
}

.progress-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.1s;
}

.progress-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ── Statement ─────────────────────────────────────── */
#statement {
  padding: 160px 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  max-width: 900px;
  border-top: 1px solid var(--border);
}

#statement blockquote p {
  font-size: clamp(22px, 2.8vw, 38px);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--text);
}

/* ── Footer ────────────────────────────────────────── */
#footer {
  border-top: 1px solid var(--border);
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--text);
}

.footer-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.footer-right a {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  transition: color 0.25s ease;
}

.footer-right a:hover { color: var(--accent); }

/* ── Scroll reveal ─────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ── Reduced Motion ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-visual .hero-img { will-change: auto; }
}

/* ── Gallery: native touch scroll (mobile + tablet) ── */
@media (max-width: 900px) {
  .gallery-sticky {
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 20px;
  }

  .gallery-sticky::-webkit-scrollbar { display: none; }
  .gallery-sticky { scrollbar-width: none; }

  .gallery-track {
    width: max-content;
    padding: 60px 20px 48px;
    gap: 16px;
    transform: none !important; /* prevent any residual GSAP x offset */
  }

  .piece {
    width: clamp(180px, 62vw, 280px);
    scroll-snap-align: start;
  }

  .gallery-progress { display: none; }
}

/* ── Mobile ────────────────────────────────────────── */
@media (max-width: 768px) {
  #nav { padding: 0 20px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 12px; }
}

/* Four nav items need a little more room on small phones */
@media (max-width: 430px) {
  .nav-logo { font-size: 13px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 11px; }
}

@media (max-width: 768px) {

  #hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto 60dvh;
    min-height: 100dvh;
  }

  .hero-text {
    padding: 32px 20px 40px;
    justify-content: flex-end;
    order: 2;
  }

  .hero-label { margin-bottom: 20px; }

  .hero-text h1 { font-size: clamp(36px, 10vw, 52px); margin-bottom: 20px; }

  .hero-sub { font-size: 14px; margin-bottom: 32px; }

  .hero-visual {
    order: 1;
    min-height: 60dvh;
  }

  #statement {
    padding: 80px 20px;
  }

  .gallery-progress { left: 20px; }

  #footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 20px;
  }
}
