/* ============================================================
   James P. Frazier — Cinematographer
   Dark · cinematic · editorial. Pinned, scaling reel + scroll journey.
   Quick-edit palette/type in :root.
   ============================================================ */

:root {
  --bg:      #0a0a0b;
  --fg:      #f3efe7;
  --muted:   #8a8884;
  --line:    rgba(243,239,231,0.14);
  --accent:  #c9c4ba;   /* neutral light — no color accent */
  --display: "Space Grotesk", system-ui, sans-serif;
  --sans:    "Inter", system-ui, -apple-system, sans-serif;
  --ease:    cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html:not(.lenis) { scroll-behavior: smooth; } /* native smooth unless Lenis runs */
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); line-height: 1.5; overflow-x: hidden;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #000; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* ---------- progress + grain + vignette ---------- */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%; background: var(--accent); z-index: 100; }
.grain { position: fixed; inset: 0; z-index: 95; pointer-events: none; opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ===================== PINNED REEL BACKGROUND ===================== */
.reel-stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #050506; }
.reel-scaler {
  position: absolute; inset: 0;
  transform: scale(var(--s, 0.42));
  border-radius: var(--r, 10px);
  overflow: hidden;
  will-change: transform;
  box-shadow: 0 40px 120px rgba(0,0,0,0.55);
}
.reel-video { width: 100%; height: 100%; object-fit: cover; }
.reel-scrim { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 120% at 50% 40%, transparent 50%, rgba(0,0,0,0.55) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.10) 30%, rgba(0,0,0,0.45));
  opacity: var(--scrim, 0.55); transition: opacity .4s var(--ease); }

/* ===================== SOUND TOGGLE ===================== */
.sound { position: fixed; right: clamp(1rem,3vw,2.2rem); bottom: clamp(1rem,3vw,2.2rem); z-index: 90;
  display: inline-flex; align-items: center; gap: .6rem; padding: .6rem 1rem;
  background: rgba(10,10,11,0.4); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 100px; color: var(--fg); cursor: pointer;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .18em; transition: border-color .3s, background .3s; }
.sound:hover { border-color: var(--accent); }
.sound__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.sound__bars i { width: 2px; height: 100%; background: var(--accent); transform-origin: bottom; transform: scaleY(.35); }
.sound.is-on .sound__bars i { animation: eq .9s ease-in-out infinite; }
.sound.is-on .sound__bars i:nth-child(2){ animation-delay:.15s } .sound.is-on .sound__bars i:nth-child(3){ animation-delay:.3s } .sound.is-on .sound__bars i:nth-child(4){ animation-delay:.45s }
@keyframes eq { 0%,100%{ transform: scaleY(.35) } 50%{ transform: scaleY(1) } }

/* ---------- cinema watch mode (clears UI to watch the reel full-frame) ---------- */
.cinema-close { position: fixed; top: 1.2rem; right: 1.4rem; z-index: 210; width: 46px; height: 46px;
  border-radius: 50%; border: 1px solid var(--line); background: rgba(10,10,11,.55); backdrop-filter: blur(6px);
  color: var(--fg); font-size: 1.15rem; cursor: pointer; display: none; align-items: center; justify-content: center;
  transition: background .3s, border-color .3s; }
.cinema-close:hover { background: var(--fg); color: #000; }
body.cinema .cinema-close { display: flex; }
body.cinema .reel-stage { z-index: 200; }
body.cinema .reel-scaler { transform: none !important; border-radius: 0 !important; box-shadow: none; }
body.cinema .reel-video { object-fit: contain; background: #000; }
body.cinema .reel-scrim { opacity: 0 !important; }
body.cinema .nav, body.cinema .sound, body.cinema .progress, body.cinema .grain { opacity: 0; pointer-events: none; }

/* ===================== NAV ===================== */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.3rem clamp(1.2rem,4vw,3rem); mix-blend-mode: difference; }
.nav__logo { font-family: "Bebas Neue", var(--sans); font-weight: 400; font-size: 1.6rem; letter-spacing: .12em; }
.nav__links { display: flex; gap: clamp(.9rem,2.5vw,2rem); }
.nav__links a { font-size: .74rem; text-transform: uppercase; letter-spacing: .18em; position: relative; padding-bottom: 2px; }
.nav__links a::after { content:""; position:absolute; left:0; bottom:0; height:1px; width:0; background: currentColor; transition: width .4s var(--ease); }
.nav__links a:hover::after { width: 100%; }

/* ===================== SHARED ===================== */
main { position: relative; z-index: 2; }
.eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: .24em; color: var(--muted); }
.stage { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: clamp(4rem,10vh,9rem) clamp(1.2rem,5vw,5rem); }
.stage__inner { text-align: center; max-width: 1100px; }
[data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- HERO ---------- */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(5rem,12vh,8rem) clamp(1.2rem,5vw,5rem) clamp(2rem,5vh,3rem); }
.hero__name { font-family: "Bebas Neue", var(--sans); font-weight: 400; font-size: clamp(4rem,17vw,17rem);
  line-height: .82; letter-spacing: .015em; }
.hero__name em { font-style: normal; font-weight: 400; }
.hero__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.hero__meta { display: flex; flex-direction: column; gap: 1rem; align-items: flex-end; text-align: right;
  font-size: .8rem; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); padding-bottom: .6rem; }
.hero__cue { display: inline-flex; flex-direction: column; align-items: center; gap: .5rem; }
.hero__cue i { width: 1px; height: 42px; background: linear-gradient(var(--muted), transparent); animation: cue 2s var(--ease) infinite; }
@keyframes cue { 0%,100%{ opacity:.3; transform: scaleY(.6) } 50%{ opacity:1; transform: scaleY(1) } }

/* ---------- STATEMENT ---------- */
.statement__text { font-family: var(--display); font-weight: 400; font-size: clamp(2.4rem,8vw,7rem);
  line-height: 1.02; letter-spacing: -.02em; }
.statement__text em { font-style: normal; }                                   /* "light" — bright (mono) */
.statement__text .shadow { color: var(--fg); opacity: .4; }                   /* "shadows" — dim by value, not hue */
.ghost-btn { margin-top: 2.4rem; display: inline-flex; align-items: center; gap: .5rem;
  background: transparent; border: 1px solid var(--line); color: var(--fg); cursor: pointer;
  padding: .85rem 1.6rem; border-radius: 100px; font-size: .76rem; text-transform: uppercase; letter-spacing: .2em;
  transition: background .3s, color .3s, border-color .3s; }
.ghost-btn:hover { background: var(--fg); color: #000; border-color: var(--fg); }

/* ---------- QUOTE ---------- */
.quote__text { font-family: var(--display); font-style: italic; font-weight: 360;
  font-size: clamp(2rem,7vw,6rem); line-height: 1.05; letter-spacing: -.01em; }

/* ---------- ABOUT ---------- */
.about { min-height: 130vh; flex-direction: column; gap: clamp(2rem,5vh,4rem); }
.about__card { max-width: 1150px; background: rgba(8,8,9,0.66); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 10px; padding: clamp(1.4rem,3.2vw,2.8rem); text-align: left; }
.about__body { max-width: 64ch; }
.about__copy { margin-top: 1rem; font-family: var(--display); font-optical-sizing: auto; font-weight: 400;
  font-size: clamp(1.15rem,1.9vw,1.55rem); line-height: 1.6; color: #ddd8ce; }
.about__copy em { font-style: normal; font-weight: 600; color: var(--fg); }
.about__copy strong { font-weight: 600; color: var(--fg); }
.about__gallery { margin-top: clamp(1.5rem,3.5vw,2.6rem); display: grid; grid-template-columns: repeat(3,1fr); gap: clamp(.6rem,1.5vw,1rem); }
.about__gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px;
  filter: grayscale(.15) contrast(1.02); transition: filter .6s var(--ease); }
.about__gallery img:hover { filter: grayscale(0) contrast(1.05); }
/* About BTS reel (counter-rotates vs. Selected Work) */
.about__roll { overflow: hidden; width: 100%; padding: .4rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.about__track { display: flex; width: max-content; will-change: transform; }
.about__track .frame { flex: 0 0 auto; width: clamp(220px, 26vw, 360px); aspect-ratio: 4/3; margin-right: clamp(.7rem,1.4vw,1.1rem); border-radius: 4px; }

/* ---------- WORK (solid, covers the reel) ---------- */
.work { position: relative; z-index: 2; background: var(--bg);
  padding: clamp(5rem,12vh,9rem) clamp(1.2rem,5vw,5rem); }
.work__head { max-width: 1400px; margin: 0 auto clamp(2rem,5vh,3.5rem); display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-title { font-family: var(--display); font-weight: 500; font-size: clamp(2rem,5vw,4rem); letter-spacing: -.02em; }
.section-sub { font-size: .78rem; text-transform: uppercase; letter-spacing: .2em; color: var(--muted); }
.work__grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(3,1fr); gap: clamp(.8rem,2vw,1.4rem); }
.card { cursor: pointer; }
.card__media { aspect-ratio: 16/10; border-radius: 4px; overflow: hidden; background: #111; }
.card__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.25) brightness(.9);
  transition: transform .7s var(--ease), filter .7s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); filter: grayscale(0) brightness(1); }
.card__info { display: flex; align-items: center; justify-content: space-between; padding: .9rem .15rem 0; }
.card__info h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.05rem,1.8vw,1.5rem); }
.tag { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); border: 1px solid var(--line); border-radius: 100px; padding: .3rem .7rem; white-space: nowrap; }
/* title-free frame gallery */
.frame { display: block; margin: 0; overflow: hidden; border-radius: 4px; aspect-ratio: 16/9; background: #111; cursor: pointer; }
.frame img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.25) brightness(.9); transition: transform .7s var(--ease), filter .7s var(--ease); }
.frame:hover img { transform: scale(1.04); filter: grayscale(0) brightness(1); }
/* rolling filmstrip — translateX is driven by scroll position (see script.js) */
.work__roll { overflow: hidden; width: 100%; padding: .4rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.work__track { display: flex; width: max-content; will-change: transform; }
.work__track .frame { flex: 0 0 auto; width: clamp(300px, 36vw, 560px); aspect-ratio: 16/9; margin-right: clamp(.8rem,1.6vw,1.4rem); border-radius: 4px; }

/* ---------- CONTACT ---------- */
.contact__head { font-family: var(--display); font-weight: 500; font-size: clamp(2.6rem,11vw,9rem); line-height: .95; letter-spacing: -.02em; margin: 1.2rem 0; }
.contact__email { display: inline-block; font-family: var(--display); font-size: clamp(1.3rem,3.5vw,2.6rem);
  border-bottom: 1px solid var(--line); padding-bottom: .2rem; transition: color .3s, border-color .3s; }
.contact__email:hover { color: var(--accent); border-color: var(--accent); }
.contact__links { display: flex; gap: clamp(1rem,3vw,2.5rem); justify-content: center; flex-wrap: wrap; margin-top: clamp(1.8rem,4vh,3rem); }
.contact__links a { font-size: .78rem; text-transform: uppercase; letter-spacing: .18em; color: var(--muted); transition: color .3s; }
.contact__links a:hover { color: var(--fg); }

/* ---------- FOOTER ---------- */
.footer { position: relative; z-index: 2; background: var(--bg); border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.4rem clamp(1.2rem,5vw,5rem); font-size: .74rem; text-transform: uppercase; letter-spacing: .15em; color: var(--muted); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 820px) {
  .work__grid { grid-template-columns: 1fr 1fr; }
  .hero__foot { flex-direction: column; align-items: flex-start; }
  .hero__meta { align-items: flex-start; text-align: left; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .reel-scaler { transform: scale(1); } /* just show the reel full, no scrubbing */
  /* rolling strip becomes a static centered grid */
  .work__track, .about__track { flex-wrap: wrap; width: 100%; justify-content: center; gap: 1rem; }
  .work__track .frame { width: clamp(280px, 44vw, 460px); margin-right: 0; }
  .about__track .frame { width: clamp(220px, 40vw, 340px); margin-right: 0; }
  .work__track .frame[aria-hidden="true"], .about__track .frame[aria-hidden="true"] { display: none; }
}
