@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  src: local(''),
    url('/assets/fonts/SpaceGrotesk-Regular.woff2') format('woff2'),
    url('/assets/fonts/SpaceGrotesk-Regular.woff') format('woff');
}

@font-face {
  font-family: 'Space Grotesk Bold';
  font-style: normal;
  font-weight: 400;
  src: local(''),
    url('/assets/fonts/SpaceGrotesk-Bold.woff2') format('woff2'),
    url('/assets/fonts/SpaceGrotesk-Bold.woff') format('woff');
}

@font-face {
  font-family: 'Space Grotesk Meduium';
  font-style: normal;
  font-weight: 400;
  src: local(''),
    url('/assets/fonts/SpaceGrotesk-Medium.woff2') format('woff2'),
    url('/assets/fonts/SpaceGrotesk-Medium.woff') format('woff');
}

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

:root {
  --bg:     #eeeeee;
  --fg:     #111111;
  --muted:  #999999;
  --border: #e8e8e8;

  /* Carousel slide size — overridden at breakpoints */
  --slide-w: 400px;
  --slide-h: 430px;
  --slide-gap: 40px;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

h1 {
  font-family: 'Space Grotesk Bold', system-ui, sans-serif;
}

a { color: inherit; text-decoration: none; }
img { display: block; }

/* ════════════════════════════════════
   HEADER
════════════════════════════════════ */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 950;
  height: 68px; padding: 0 36px;
  display: flex; align-items: center; justify-content: space-between;
  background: transparent;
  font-family: 'Space Grotesk Bold', system-ui, sans-serif;
}

header:hover {
  color: #B2454E;
}

li { list-style-type: none; }

.logo {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700; letter-spacing: -.02em;
}

/* ════════════════════════════════════
   BURGER
════════════════════════════════════ */
.burger {
  position: fixed;
  top: 20px; right: 36px;
  width: 28px; height: 28px;
  background: none; border: none; cursor: pointer; padding: 0;
  z-index: 1000;
}
.burger span {
  position: absolute; left: 3px;
  display: block; width: 22px; height: 1.5px;
  background: var(--fg);
  transition: transform .3s ease, top .3s ease;
}
.burger span:nth-child(1) { top: 10px; }
.burger span:nth-child(2) { top: 17px; }
.burger.open span:nth-child(1) { top: 13.5px; transform: rotate(45deg); }
.burger.open span:nth-child(2) { top: 13.5px; transform: rotate(-45deg); }

/* ════════════════════════════════════
   FOOTER
════════════════════════════════════ */
footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 950;
  padding: 0 36px 26px;
  display: flex; align-items: flex-end; justify-content: space-between;
  pointer-events: none;
}
footer > * { pointer-events: all; }

.f-copy { font-size: 12px; color: var(--fg); }
.f-num  { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--fg); }

.f-links { display: flex; gap: 20px; list-style: none; }
.f-links a {
  font-size: 13px; font-weight: 500;
  color: var(--fg); opacity: .6; transition: opacity .2s;
  font-family: 'Space Grotesk Bold', system-ui, sans-serif;
}
.f-links a:hover { opacity: 1; color: #B2454E;}

/* ════════════════════════════════════
   MENU OVERLAY
════════════════════════════════════ */
.menu-ov {
  position: fixed; inset: 0; z-index: 900;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3vh, 32px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
  font-family: 'Space Grotesk Bold', system-ui, sans-serif;
}
.menu-ov.open { opacity: 1; }
.menu-ov a {
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 700; letter-spacing: -.03em;
  color: var(--fg); transition: opacity .2s;
  pointer-events: none;
}
.menu-ov.open a { pointer-events: all; }
.menu-ov a:hover { opacity: 1;
  color: #B2454E;
}

/* ════════════════════════════════════
   CAROUSEL
════════════════════════════════════ */
.carousel-outer {
  position: fixed; inset: 0; z-index: 1;
  display: flex; align-items: center;
  overflow: hidden;
}

body.menu-open .carousel-outer { pointer-events: none; }
body.menu-open main            { pointer-events: none; }

.carousel-track {
  display: flex; align-items: center;
  gap: var(--slide-gap);
  will-change: transform;
}

.c-slide {
  flex-shrink: 0;
  display: flex; flex-direction: column;
  width: var(--slide-w);
  opacity: 0.55;
  transform: scale(0.80);
  transition: opacity .4s ease, transform .4s ease;
}
.c-slide.active { opacity: 1; transform: scale(1); }

.c-slide-img {
  width: var(--slide-w);
  height: var(--slide-h);
  overflow: hidden; flex-shrink: 0;
}
.c-slide-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.c-slide:hover .c-slide-img img { transform: scale(1); }

.c-slide-label {
  font-size: clamp(24px, 1.5vw, 18px); font-weight: 400;
  color: var(--fg);
  padding-top: 14px;
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s ease, transform .35s cubic-bezier(.22,1,.36,1);
  font-family: 'Space Grotesk Bold', system-ui, sans-serif;
}
.c-slide:hover .c-slide-label { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════
   PROJECT / EVENT PAGES — shared main
════════════════════════════════════ */
main {
  position: fixed; inset: 0;
  padding-top: 68px; padding-bottom: 60px;
  overflow: hidden;
}

.project { display: none; width: 100%; height: 100%; }

.project.active {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  animation: pageIn .4s cubic-bezier(.22,1,.36,1) both;
}
.project.active::-webkit-scrollbar { display: none; }

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

/* Scroll content scales down so everything fits proportionally */
.project.active > * { flex-shrink: 0; }

/* ── Sticky info panel ── */
.proj-left {
  flex-shrink: 0;
  width: clamp(220px, 25vw, 310px);
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(20px, 3vw, 40px) clamp(20px, 3vw, 48px) clamp(16px, 2vw, 32px) clamp(20px, 3vw, 40px);
  position: sticky; left: 0; z-index: 10;
  background: var(--bg);
  overflow-y: auto;
}

.proj-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 36px;
  transition: color .2s; width: fit-content;
}
.proj-back:hover { color: var(--fg); }

.proj-title {
  font-size: clamp(1.2rem, 2.5vw, 2.8rem);
  font-weight: 700; letter-spacing: -.03em;
  line-height: 1.05; margin-bottom: 16px;
}
.proj-desc {
  font-size: clamp(11px, 1.2vw, 13px); font-weight: 300; line-height: 1.75;
  color: var(--muted); margin-bottom: 24px; max-width: 260px;
}
.proj-meta {
  display: flex; flex-direction: column;
  gap: 8px; margin-bottom: 28px;
}
.proj-meta p { font-size: clamp(11px, 1.2vw, 13px); line-height: 1.5; }
.proj-meta b { font-weight: 600; margin-right: 6px; }
.proj-meta span { font-weight: 300; color: var(--muted); }

.proj-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: clamp(11px, 1.2vw, 13px); font-weight: 500; transition: gap .2s;
  font-family: 'Space Grotesk Bold', system-ui, sans-serif;
}
.proj-link:hover {
  gap: 16px;
  color: #B2454E;
}

.contact {
  font-family: 'Space Grotesk Bold', system-ui, sans-serif;
}

.contact:hover {
  color: #B2454E;
}

/* ── Image columns ── */
/* All image containers use vh-relative heights so they scale with window */
.proj-img {
  flex-shrink: 0; height: 100%;
  padding: 0 6px; margin-left: 6px;
  display: flex; align-items: center; justify-content: center;
}
.proj-img img {
  display: block;
  height: clamp(200px, 60vh, 522px);
  width:  clamp(200px, 60vh, 522px);
  object-fit: cover; flex-shrink: 0;
}

.event-img {
  flex-shrink: 0; height: 100%;
  padding: 0 6px; margin-left: 6px;
  display: flex; align-items: center; justify-content: center;
}
.event-img img {
  display: block;
  height: clamp(280px, 75vh, 738px);
  width:  clamp(190px, 53vh, 522px);
  object-fit: cover; flex-shrink: 0;
}

/* ── Past events grid ── */
.event-past-grid {
  flex-shrink: 0; height: 100%;
  margin-left: 6px; padding: 0 6px;
  display: flex; align-items: center;
}
.event-past-grid-inner {
  display: grid;
  grid-template-rows: 1fr 1fr;
  grid-auto-flow: column;
  grid-auto-columns: clamp(120px, 26.5vh, 261px);
  gap: clamp(6px, 1vh, 12px);
}
.event-past-grid-inner img {
  display: block;
  width:  clamp(120px, 26.5vh, 261px);
  height: clamp(170px, 37vh, 363px);
  object-fit: cover;
}

/* ── Video ── */
.proj-video {
  flex-shrink: 0; height: 100%;
  padding: 0 6px; margin-left: 6px;
  display: flex; align-items: center; justify-content: center;
}
.proj-video iframe {
  display: block;
  height: clamp(200px, 60vh, 522px);
  width:  clamp(356px, 106.7vh, 928px); /* maintains 16:9 */
  border: 0;
}

/* ── Bandcamp ── */
.proj-bandcamp {
  flex-shrink: 0; height: 100%;
  padding: 0 6px; margin-left: 6px;
  display: flex; align-items: center; justify-content: center;
}
.proj-bandcamp iframe {
  display: block; border: 0;
  /* Scale the fixed-size bandcamp player down on small windows */
  transform-origin: center center;
  transform: scale(clamp(0.5, 0.8vh, 1));
}

/* ── End cap ── */
.proj-all {
  flex-shrink: 0;
  width: 80px; height: 100%;
  margin-left: 8px; margin-right: 30px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk Medium', system-ui, sans-serif;
}
.proj-all a {
  display: inline-flex; align-items: center; gap: 30px;
  font-size: 13px; font-weight: 500; transition: gap .2s;
  white-space: nowrap;
}
.proj-all a:hover {
  gap: 16px;
  color: #B2454E;
}

/* ════════════════════════════════════
   BREAKPOINTS
════════════════════════════════════ */

/* ── Tablet / small desktop (≤ 1024px) ── */
@media (max-width: 1024px) {
  :root {
    --slide-w: 300px;
    --slide-h: 300px;
    --slide-gap: 30px;
  }
  header { padding: 0 24px; }
  footer { padding: 0 24px 20px; }
  .burger { right: 24px; }
}

/* ── Mobile landscape / large phone (≤ 768px) ── */
@media (max-width: 768px) {
  :root {
    --slide-w: 220px;
    --slide-h: 220px;
    --slide-gap: 24px;
    --mob-pad: 24px;                          /* left/right page padding */
    --mob-w: calc(100vw - var(--mob-pad) * 2); /* consistent content width */
  }
  header { height: 56px; padding: 0 20px; }
  footer { padding: 0 20px 16px; }
  .burger { top: 14px; right: 20px; }
  main { padding-top: 56px; padding-bottom: 50px; }

  /* Switch project/event pages to vertical scroll on mobile */
  .project.active {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    align-items: flex-start;       /* left-align so padding works correctly */
    padding: 20px var(--mob-pad) 80px;
    gap: 8px;
    width: 100%;
  }

  /* Reset height:100% — in column layout it expands to full viewport height */
  .proj-img,
  .event-img,
  .proj-video,
  .proj-bandcamp,
  .event-past-grid,
  .proj-all {
    height: auto;
    width: var(--mob-w);
    margin-left: 0;
    padding: 0;
  }

  /* Info panel — full width, no sticky, padding matches page padding */
  .proj-left {
    width: var(--mob-w);
    position: relative;
    left: auto;
    padding: 0 0 16px 0;
  }

  /* All images fill the same content width */
  .proj-img img {
    width: var(--mob-w);
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .event-img img {
    width: var(--mob-w);
    height: auto;
    aspect-ratio: 2 / 3;
  }

  /* Past events grid — two equal columns inside content width */
  .event-past-grid {
    justify-content: flex-start;
  }
  .event-past-grid-inner {
    grid-template-rows: none;
    grid-auto-flow: row;
    grid-template-columns: 1fr 1fr;
    grid-auto-columns: unset;
    width: var(--mob-w);
    gap: 8px;
  }
  .event-past-grid-inner img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
  }

  /* Video — full content width, 16:9 height */
  .proj-video iframe {
    width: var(--mob-w);
    height: auto;
    aspect-ratio: 16 / 9;
  }

  /* Bandcamp — shrink to content width, clip phantom space */
  .proj-bandcamp {
    overflow: hidden;
  }
  .proj-bandcamp iframe {
    transform: scale(0.75);
    transform-origin: top left;
    /* Negative margin compensates for the space scale() leaves behind.
       iframe is 350×522px; at 0.75 it visually = 263×392px.
       Leftover: width 350-263=87px, height 522-392=130px */
    margin-bottom: -130px;
    margin-right: -87px;
  }

  .proj-all { justify-content: flex-start; margin: 0; }
}

/* ── Small phone (≤ 480px) ── */
@media (max-width: 480px) {
  :root {
    --slide-w: 160px;
    --slide-h: 160px;
    --slide-gap: 16px;
  }
  .f-copy { display: none; }
  .proj-bandcamp iframe {
    transform: scale(0.7);
    margin-bottom: -157px;
    margin-right: -105px;
  }
}
