@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Space+Mono:ital@0;1&display=swap');

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

:root {
  --ink: #0e0d0b;
  --ash: #f2ede6;
  --dust: #c4bdb3;
  --ember: #8c6e52;
  --fog: #2a2721;
}

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--ash);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
}

/* CURSOR */
.cursor {
  position: fixed; width: 8px; height: 8px;
  background: var(--ash); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
.cursor-ring {
  position: fixed; width: 32px; height: 32px;
  border: 1px solid rgba(242,237,230,0.4); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, border-color 0.25s;
}

/* GRAIN */
body::before {
  content: ''; position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 1000; opacity: 0.6;
}

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200; padding: 2rem 3rem;
  display: flex; justify-content: space-between; align-items: flex-start;
  background: linear-gradient(180deg, rgba(14,13,11,0.9) 0%, transparent 100%);
}
.nav-name {
  display: inline-flex; align-items: center;
  text-decoration: none; opacity: 0.85;
  transition: opacity 0.3s;
}
.nav-name:hover { opacity: 1; }
.nav-name img { height: 30px; width: auto; display: block; }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--dust); text-decoration: none;
  transition: color 0.3s, opacity 0.3s; opacity: 0.7; cursor: none;
}
.nav-links a:hover { color: var(--ash); opacity: 1; }

/* BACK BUTTON */
.page-back {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-family: 'Space Mono', monospace; font-size: 0.75rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--dust); text-decoration: none; opacity: 0.6;
  transition: opacity 0.3s, color 0.3s; cursor: none;
  padding: 2rem 3rem;
  display: flex;
}
.page-back::before { content: '←'; font-size: 0.9rem; }
.page-back:hover { opacity: 1; color: var(--ash); }

.back-bar {
  position: fixed; top: 5.2rem; left: 0; z-index: 150;
  background: none;
  padding: 0;
}

/* UTILITIES */
.section-label {
  font-family: 'Space Mono', monospace; font-size: 0.75rem;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--ember); opacity: 0.7;
}
.h-rule { width: 40px; height: 1px; background: var(--ember); opacity: 0.5; margin: 2rem 0; }

.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.35s; }

/* FOOTER */
footer {
  padding: 4rem 3rem;
  border-top: 1px solid rgba(196,189,179,0.08);
  display: flex; justify-content: space-between; align-items: end;
}
.footer-name { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 300; letter-spacing: -0.01em; }
.footer-name em { font-style: italic; color: var(--dust); }
.footer-contact a {
  font-family: 'Space Mono', monospace; font-size: 0.75rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--dust); opacity: 0.5; text-decoration: none;
  display: block; margin-bottom: 0.5rem;
  transition: opacity 0.3s, color 0.3s;
}
.footer-contact a:hover { opacity: 1; color: var(--ash); }
.footer-copy { font-family: 'Space Mono', monospace; font-size: 0.7rem; color: var(--dust); opacity: 0.25; letter-spacing: 0.12em; margin-top: 2rem; }

/* PROJECT DETAIL — shared layout */
.detail-hero { width: 100%; aspect-ratio: 16/6; overflow: hidden; background: var(--fog); }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }

.detail-body {
  padding: 5rem 3rem 8rem;
  display: grid; grid-template-columns: 1fr 2fr;
  gap: 6rem; align-items: start;
}
.detail-meta-col { position: sticky; top: 8rem; }
.detail-num { font-family: 'Space Mono', monospace; font-size: 0.75rem; color: var(--ember); letter-spacing: 0.2em; opacity: 0.7; display: block; margin-bottom: 2rem; }
.detail-title { font-size: clamp(2.2rem, 4vw, 3.5rem); font-weight: 300; line-height: 1.0; letter-spacing: -0.02em; margin-bottom: 2.5rem; }
.detail-title em { font-style: italic; color: var(--dust); }
.detail-divider { width: 30px; height: 1px; background: var(--ember); opacity: 0.4; margin-bottom: 2rem; }
.detail-info-row { margin-bottom: 1.2rem; }
.detail-info-label { font-family: 'Space Mono', monospace; font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ember); opacity: 0.6; display: block; margin-bottom: 0.25rem; }
.detail-info-value { font-family: 'Space Mono', monospace; font-size: 0.875rem; letter-spacing: 0.1em; color: var(--dust); opacity: 0.7; }

.detail-quote { font-size: clamp(1.5rem, 2.5vw, 2.1rem); font-style: italic; font-weight: 300; line-height: 1.45; color: var(--ash); opacity: 0.88; margin-bottom: 3rem; padding-left: 2rem; border-left: 1px solid var(--ember); }
.detail-text { font-size: 1.2rem; line-height: 1.9; color: var(--dust); opacity: 0.8; }
.detail-text p + p { margin-top: 1.5rem; }

.detail-gallery { margin-top: 4rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(196,189,179,0.08); }
.detail-gallery-item { aspect-ratio: 4/3; background: var(--fog); overflow: hidden; }
.detail-gallery-item.wide { grid-column: 1 / -1; aspect-ratio: 21/7; }
.detail-gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* IMAGE PLACEHOLDER */
.img-placeholder {
  width: 100%; height: 100%;
  background: var(--fog);
  display: flex; align-items: flex-end;
  padding: 1rem 1.25rem;
}
.img-placeholder span {
  font-family: 'Space Mono', monospace; font-size: 0.7rem;
  color: var(--dust); opacity: 0.3; letter-spacing: 0.12em; text-transform: uppercase;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  nav { padding: 1.5rem; }
  .nav-links { gap: 1.5rem; }
  .page-back { padding: 1.5rem; }
  footer {
    flex-direction: column;
    gap: 2.5rem;
    align-items: flex-start;
  }
  footer > div:last-child { text-align: left !important; }
  .footer-contact { display: flex; flex-direction: row; gap: 2rem; flex-wrap: wrap; }
  .footer-contact a { display: inline; margin-bottom: 0; }
  .detail-body { grid-template-columns: 1fr; gap: 3rem; padding: 3rem 1.5rem 6rem; }
  .detail-meta-col { position: static; }
  .detail-gallery { grid-template-columns: 1fr; }
  .detail-gallery-item.wide { aspect-ratio: 4/3; }
}

/* NEXT PROJECT */
.next-project {
  display: block;
  padding: 4rem 3rem;
  border-top: 1px solid rgba(196,189,179,0.08);
  text-decoration: none;
  color: inherit;
  background: var(--ink);
  transition: background 0.5s;
  cursor: none;
}

.next-project:hover { background: var(--fog); }

.next-project-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ember);
  opacity: 0.6;
  display: block;
  margin-bottom: 1.5rem;
}

.next-project-name {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.0;
  color: var(--ash);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.next-project-name em { font-style: italic; color: var(--dust); }

.next-project-arrow {
  font-family: 'Space Mono', monospace;
  font-size: 1.2rem;
  color: var(--ash);
  opacity: 0.35;
  transition: opacity 0.3s, transform 0.3s;
}

.next-project:hover .next-project-arrow {
  opacity: 1;
  transform: translateX(8px);
}

@media (max-width: 900px) {
  .next-project { padding: 3rem 1.5rem; }
}

@media (max-width: 480px) {
  .next-project { padding: 2.5rem 1.25rem; }
  .next-project-name { font-size: clamp(1.6rem, 7vw, 2.5rem); }
}

/* Touch devices — disable custom cursor so taps work normally */
@media (hover: none) and (pointer: coarse) {
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
  a, button, [role="button"], .nav-links a, .page-back, .hero-cta, .selected-link,
  .project-item, .project-featured-film { cursor: pointer; }
}

/* Small phones — 480px and below */
@media (max-width: 480px) {
  nav { padding: 1rem 1.25rem; }
  .nav-links { gap: 1.25rem; }
  .nav-name img { height: 24px; }
  .back-bar { top: 3.6rem; }
  .page-back { padding: 0.65rem 1.25rem; font-size: 0.65rem; }
  footer { padding: 2.5rem 1.25rem; text-align: left; }
  .footer-contact { margin-top: 1rem; }
  .detail-body { padding: 2.5rem 1.25rem 5rem; gap: 2rem; }
  .detail-quote { font-size: clamp(1.3rem, 4.5vw, 1.7rem); padding-left: 1.25rem; }
  .detail-text { font-size: 1.1rem; }
}
