:root {
  --bg-dark:      #070707;
  --bg-light:     #e9e4db;
  --bg-light-alt: #f0ece4;
  --text-dark:    #f4efe8;
  --text-light:   #141414;
  --muted-light:  rgba(20, 20, 20, 0.44);
  --line-light:   rgba(20, 20, 20, 0.10);
  --shadow:       0 20px 64px rgba(0, 0, 0, 0.16);
  --ease:         cubic-bezier(.16, 1, .3, 1);
  --font-sans:    'Manrope', Arial, Helvetica, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', Courier, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--text-dark);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  cursor: none;
  overflow-x: hidden;
}

a, button, video {
  color: inherit;
  text-decoration: none;
  cursor: none !important;
  -webkit-tap-highlight-color: transparent;
}

@media (pointer: coarse) {
  body, a, button, video {
    cursor: auto !important;
  }
}

img, video { display: block; }

/* ── Custom cursor ────────────────────────────────── */

.cursor-logo {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 34px;
  height: 34px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.cursor-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cursor-logo.is-burst {
  animation: cursorBurst 460ms var(--ease);
}

@media (pointer: coarse) {
  .cursor-logo { display: none; }
}

/* ── Header ───────────────────────────────────────── */

.project-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  pointer-events: none;
}

.brand,
.project-date {
  pointer-events: auto;
}

.brand img {
  width: 44px;
  height: auto;
}

.project-date {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted-light);
}

/* ── Shell ────────────────────────────────────────── */

.project-shell {
  min-height: 100dvh;
}

/* ── Stage section ────────────────────────────────── */

.project-stage-wrap {
  background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-light-alt) 100%);
  color: var(--text-light);
  padding: 100px 24px 24px;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-stage-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
}

/* ── Topline ──────────────────────────────────────── */

.project-topline {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  flex-shrink: 0;
}

.project-nav-col {
  display: grid;
  align-content: start;
  padding-top: 8px;
}

.project-back {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--muted-light);
  transition: color 180ms ease;
}

.project-back:hover,
.project-back:focus-visible {
  color: var(--text-light);
}

.project-meta-block {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.project-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-light);
}

.project-title {
  margin: 0;
  max-width: 16ch;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(2.0rem, 3.6vw, 4.2rem);
  line-height: 0.93;
  letter-spacing: -0.058em;
  color: var(--text-light);
}

.project-summary,
.project-source-link {
  margin: 0;
  max-width: 38ch;
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.45vw, 1.22rem);
  font-weight: 400;
  line-height: 1.48;
  letter-spacing: -0.025em;
  color: rgba(20, 20, 20, 0.66);
}

.project-source-link {
  display: inline-block;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  transition: opacity 180ms ease;
}

.project-source-link:hover,
.project-source-link:focus-visible {
  opacity: 0.62;
}

/* ── Video stage ──────────────────────────────────── */

.project-stage {
  flex: 1 1 0;
  min-height: 0;
  background: #0d0d0d;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.project-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Action buttons ───────────────────────────────── */

.project-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.project-action {
  padding: 12px 20px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  border: 1px solid var(--line-light);
  color: var(--text-light);
  transition: opacity 180ms ease;
}

.project-action:hover,
.project-action:focus-visible {
  opacity: 0.64;
}

.project-action-fill {
  background: var(--text-light);
  color: var(--bg-light);
  border-color: var(--text-light);
}

/* ── Footer ───────────────────────────────────────── */

.project-footer {
  background: #050505;
  color: var(--text-dark);
  min-height: 72vh;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  box-shadow: 0 -28px 72px rgba(0,0,0,0.22);
}

.footer-layout {
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 72vh;
  padding: 36px 24px 20px;
  overflow: hidden;
}

.footer-email {
  position: absolute;
  top: 20px;
  left: 24px;
  z-index: 2;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.03em;
  transition: opacity 160ms ease;
}

.footer-email:hover,
.footer-email:focus-visible {
  opacity: 0.52;
}

.footer-links {
  position: absolute;
  top: 36px;
  right: 24px;
  z-index: 2;
  display: grid;
  gap: 10px;
  text-align: right;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.footer-links a {
  transition: opacity 160ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  opacity: 0.52;
}

.footer-wordmark {
  width: 100%;
  text-align: center;
  display: block;
}

.footer-wordmark span {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 31rem;
  line-height: 0.78;
  letter-spacing: -0.065em;
  white-space: nowrap;
}

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 900px) {
  .project-stage-wrap {
    padding-top: 80px;
    padding-bottom: 16px;
    gap: 14px;
  }

  .project-topline {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .project-nav-col {
    padding-top: 0;
  }

  .project-title {
    font-size: clamp(2.0rem, 8vw, 3.6rem);
  }

  .footer-wordmark span {
    font-size: 12rem;
  }
}

@media (max-width: 720px) {
  .project-stage-wrap {
    padding: 72px 14px 14px;
    height: 100dvh;
  }

  .project-stage-shell {
    gap: 12px;
  }

  .project-title {
    font-size: clamp(1.8rem, 9vw, 3rem);
  }

  .project-summary,
  .project-source-link {
    font-size: 0.9rem;
    max-width: 100%;
  }

  .project-actions {
    width: 100%;
  }

  .project-action {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 13px 16px;
    font-size: 0.82rem;
  }

  .footer-layout {
    padding: 18px 16px 16px;
  }

  .footer-email {
    left: 16px;
    top: 18px;
    font-size: 13px;
  }

  .footer-links {
    top: 18px;
    right: 16px;
    font-size: 13px;
    gap: 8px;
  }

  .footer-wordmark span {
    font-size: clamp(4.5rem, 22vw, 8rem);
  }
}

/* ── Keyframes ────────────────────────────────────── */

@keyframes cursorBurst {
  0%   { transform: translate(-50%, -50%) scale(1); }
  45%  { transform: translate(-50%, -50%) scale(1.42); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
