/* ==========================================================
   NOAH VICE  noahvice.com  (2026 refresh)
   Same system as dingoduo.com, graded blue.
   Poppins throughout, carried over from the old site.
   Big uncropped frames, 6px corners, dust and grain.
   html.nv-carousel = one slide at a time (home, project pages)
   html.nv-stack    = a normal scrolling page (phones, short windows)
   ========================================================== */

:root {
  --blue:    #00BBFF;   /* the noahvice blue, hero colour */
  --blue-hi: #7FDBFF;   /* labels, ghost buttons */
  --blue-dk: #00577A;
  --ink:     #04070B;   /* cool black ground */
  --steel:   #0A1118;
  --bone:    #E2E9EF;   /* body copy, softer than white */
  --white:   #FFFFFF;
  --black:   #000000;

  --font-display: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Poppins", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1640px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --snap: cubic-bezier(.7, 0, .2, 1);
  --r: 6px;
  /* type knobs, so a font swap is one block */
  --w-display: 700; --ls-display: .01em; --w-label: 600; --ls-label: .14em; --w-body: 400;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body); font-weight: var(--w-body); line-height: 1.55;
  color: var(--bone); background: var(--ink);
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--blue); color: var(--black); }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--font-display); text-transform: uppercase; font-weight: var(--w-display); letter-spacing: var(--ls-display); line-height: 1; color: var(--white); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.4rem); margin-bottom: .6rem; line-height: 1.05; }
strong { color: var(--white); font-weight: 700; }
.mono { font-family: var(--font-mono); font-weight: var(--w-label); font-size: .76rem; letter-spacing: var(--ls-label); text-transform: uppercase; }
.c-blue { color: var(--blue); }
.c-white { color: var(--white); }
.scene-label, .eyebrow { color: var(--blue-hi); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons: 6px corners, Bungee labels ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  font-family: var(--font-mono); font-weight: var(--w-label); font-size: .9rem; letter-spacing: calc(var(--ls-label) + .04em); text-transform: uppercase;
  text-decoration: none; padding: 1rem 1.6rem; border-radius: var(--r);
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn--solid { background: var(--blue); color: var(--black); box-shadow: 5px 5px 0 var(--black); }
.btn--solid:hover { background: var(--white); color: var(--black); transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--blue); }
.btn--ghost { border: 2px solid var(--blue-hi); color: var(--blue-hi); background: rgba(0,0,0,.3); }
.btn--ghost:hover { border-color: var(--white); color: var(--white); }
.btn--sm { padding: .65rem 1rem; font-size: .8rem; }
.btn--lg { padding: 1.2rem 2rem; font-size: 1rem; }
.btn--nav { padding: .6rem 1rem; font-size: .8rem; box-shadow: none; }
.btn:focus-visible, .arrow:focus-visible, .hud__sound:focus-visible, .nav a:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: .8rem clamp(1.2rem, 3vw, 2.4rem);
  background: linear-gradient(180deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.45) 70%, transparent 100%);
}
.nav__brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--white); font-family: var(--font-display); font-weight: var(--w-display); letter-spacing: var(--ls-display); font-size: 1.2rem; }
.nav__brand img { border-radius: 50%; width: 38px; height: 38px; box-shadow: 0 0 0 2px rgba(0,187,255,.55); }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); }
.nav__links a:not(.btn) { color: var(--bone); text-decoration: none; font-family: var(--font-mono); font-weight: var(--w-label); font-size: .78rem; letter-spacing: var(--ls-label); text-transform: uppercase; opacity: .9; transition: color .2s, opacity .2s; }
.nav__links a:not(.btn):hover, .nav__links a.is-current:not(.btn) { color: var(--blue); opacity: 1; }
.nav__burger { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav__burger span { display: block; width: 26px; height: 2px; background: var(--white); margin: 6px 0; transition: transform .3s var(--ease), opacity .3s; }

@media (max-width: 1100px) {
  .nav__links {
    position: fixed; inset: 0; background: rgba(0,0,0,.98);
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 1.6rem; padding: 0 2rem;
    transform: translateX(100%); transition: transform .4s var(--snap);
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav:has(.nav__links.is-open) { z-index: 130; }
  .nav__links a:not(.btn) { font-family: var(--font-display); font-weight: var(--w-display); font-size: 2rem; opacity: 1; }
  .nav__burger { display: block; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); z-index: 110; }
  .nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Film finish: dust, grain, vignette ---------- */
#dustCanvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }
.grain, .vignette { position: fixed; pointer-events: none; z-index: 90; }
.vignette { inset: 0; background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0,0,0,.55) 100%); }
.grain {
  inset: -50%; background-image: var(--grain-url, none); background-size: 256px 256px;
  opacity: .11; mix-blend-mode: overlay; animation: grainShift .5s steps(6) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); } 17% { transform: translate(-6%, 4%); } 33% { transform: translate(5%, -7%); }
  50% { transform: translate(-3%, 8%); } 67% { transform: translate(7%, 2%); } 83% { transform: translate(-8%, -4%); } 100% { transform: translate(0, 0); }
}
html.is-playing .grain, html.is-playing .vignette, html.is-playing #dustCanvas { display: none; }

/* ---------- Frames: shown whole, never cropped ---------- */
.frame { position: relative; display: block; margin: 0; aspect-ratio: var(--ar); background: #000; box-shadow: 0 28px 80px rgba(0,0,0,.65), 0 0 0 1px rgba(127,219,255,.1); }
.frame img, .frame iframe, .frame video { display: block; width: 100%; height: 100%; object-fit: contain; border: 0; }
a.frame { transition: box-shadow .3s var(--ease); }
a.frame:hover { box-shadow: 0 28px 80px rgba(0,0,0,.65), 0 0 0 2px var(--blue); }
.marks::before, .marks::after { content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none; z-index: 2; border-color: var(--blue); border-style: solid; }
.marks::before { top: -7px; left: -7px; border-width: 2px 0 0 2px; }
.marks::after { bottom: -7px; right: -7px; border-width: 0 2px 2px 0; }
.zoomable { cursor: zoom-in; }

/* ---------- Slide anatomy (home + project pages) ---------- */
.slide { position: relative; overflow: hidden; }
.slide > * { position: relative; z-index: 1; }
.slide__bg {
  position: absolute !important; inset: -10%; z-index: 0 !important;
  background-size: cover; background-position: center;
  filter: blur(46px) saturate(1.2) brightness(.32); transform: scale(1.08);
}
.slide__bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 55%, transparent 30%, rgba(4,7,11,.72) 100%); }
.slide__head { text-align: center; width: 100%; max-width: 62rem; margin: 0 auto; }
.slide__head .scene-label { margin-bottom: .55rem; }
.slide__head h1, .slide__head h2 { font-size: clamp(1.7rem, 2.8vw, 2.9rem); margin-bottom: .2rem; }
.slide__head .scene-label { margin-bottom: .35rem; }
.slide__sub { color: var(--blue-hi); }
.slide__media { width: 100%; display: flex; align-items: center; justify-content: center; }
.slide__foot { width: 100%; max-width: 64rem; margin: 0 auto; text-align: center; }
.ctas { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }
.slide__count { margin-top: .9rem; color: rgba(226,233,239,.5); font-size: .7rem; }

/* ---------- Carousel mode ---------- */
html.nv-carousel, html.nv-carousel body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.nv-carousel .slides { position: fixed; inset: 0; }
html.nv-carousel .slide {
  position: absolute; inset: 0;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; row-gap: clamp(.6rem, 1.6vh, 1.2rem);
  padding: calc(4rem + 1vh) clamp(1.2rem, 2vw, 2.4rem) 3.6rem;
  opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility 0s linear .9s;
}
html.nv-carousel .slide.is-active { opacity: 1; visibility: visible; transition: opacity .7s var(--ease), visibility 0s; }
html.nv-carousel .slide__media { height: 100%; min-height: 0; container-type: size; }
html.nv-carousel .frame { width: min(100cqw, 100cqh * var(--ar)); }
html.nv-carousel .frame { transition: transform 1s var(--snap), opacity .8s var(--ease), box-shadow .3s var(--ease); }
html.nv-carousel .slide.is-before .frame { transform: translateX(-14vw) scale(.9); opacity: 0; }
html.nv-carousel .slide.is-after .frame { transform: translateX(14vw) scale(.9); opacity: 0; }
html.nv-carousel .slide__head, html.nv-carousel .slide__foot { transition: transform .8s var(--snap), opacity .6s var(--ease); }
html.nv-carousel .slide:not(.is-active) .slide__head { transform: translateY(-18px); opacity: 0; }
html.nv-carousel .slide:not(.is-active) .slide__foot { transform: translateY(18px); opacity: 0; }
html.nv-carousel .slide.is-active .slide__head { transition-delay: .2s; }
html.nv-carousel .slide.is-active .slide__foot { transition-delay: .35s; }
html.nv-carousel .slide.is-active .slide__bg { animation: bgDrift 16s ease-in-out infinite alternate; }
@keyframes bgDrift { from { transform: scale(1.08) translateX(-1.5%); } to { transform: scale(1.16) translateX(1.5%); } }

/* side arrows (the bottom of the screen is the sound button's alone) */
.arrow { display: none; }
html.nv-carousel .arrow, .arrow--page {
  display: block; position: fixed; top: 50%; z-index: 60;
  width: 50px; height: 50px; margin-top: -25px; border-radius: var(--r);
  background: rgba(0,0,0,.45); border: 1px solid rgba(226,233,239,.35);
  cursor: pointer; transition: border-color .2s, background .2s, opacity .3s;
}
.arrow::before { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--bone); border-bottom: 2px solid var(--bone); }
.arrow--prev { left: clamp(1rem, 2vw, 2rem); }
.arrow--next { right: clamp(1rem, 2vw, 2rem); }
.arrow--prev::before { transform: translate(-30%, -50%) rotate(135deg); }
.arrow--next::before { transform: translate(-70%, -50%) rotate(-45deg); }
.arrow:hover { border-color: var(--blue); background: rgba(0,187,255,.18); }
.arrow:hover::before { border-color: var(--blue); }
.arrow[disabled] { opacity: 0; pointer-events: none; }
.arrow.is-hint { border-color: var(--blue); animation: hintGlow 1.8s ease-out infinite; }
.arrow.is-hint::before { border-color: var(--blue); }
@keyframes hintGlow { 0% { box-shadow: 0 0 0 0 rgba(0,187,255,.6); } 100% { box-shadow: 0 0 0 16px rgba(0,187,255,0); } }
html.nv-stack .arrow--page { display: none; }

@media (max-height: 760px) {
  html.nv-carousel .slide { padding-top: 4.2rem; padding-bottom: 4rem; row-gap: .7rem; }
  .slide__head h1, .slide__head h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); }
}

/* ---------- Stack mode: a normal scrolling page ---------- */
html.nv-stack .slide { display: flex; flex-direction: column; align-items: center; gap: 1.3rem; padding: 5.6rem 1.2rem 3.2rem; border-top: 1px solid rgba(0,187,255,.25); }
html.nv-stack .slide:first-child { border-top: 0; padding-top: 6.2rem; }
html.nv-stack .slide .frame { width: 100%; }

/* ---------- Scrolling pages (about, art direction, reel, contact) ---------- */
.page { position: relative; padding: clamp(6rem, 12vh, 8rem) 0 4rem; }
.page__bg { position: fixed; inset: -10%; z-index: -1; background-size: cover; background-position: center; filter: blur(60px) saturate(1.1) brightness(.22); transform: scale(1.1); }
.page__bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, transparent 25%, rgba(4,7,11,.8) 100%); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3rem); }
.page__head { text-align: center; margin: 0 auto clamp(2rem, 5vh, 3.2rem); max-width: 60rem; }
.page__head .eyebrow { margin-bottom: .7rem; }
.page__head h1 { font-size: clamp(2.2rem, 5.2vw, 4.6rem); line-height: .98; }
.page__head h1 > span { display: block; }
.lead { font-size: clamp(1rem, 1.3vw, 1.12rem); line-height: 1.6; max-width: 44rem; }
.lead p + p { margin-top: .9em; }
.center { text-align: center; }
.center .lead, .lead.center { margin-left: auto; margin-right: auto; }
.lead.center { text-align: left; }

.section { margin-top: clamp(3.5rem, 9vh, 6rem); }
.section__title { text-align: center; font-size: clamp(1.5rem, 3vw, 2.4rem); margin-bottom: clamp(1.6rem, 4vh, 2.4rem); }
.section__title::after { content: ""; display: block; width: 64px; height: 3px; border-radius: 2px; background: var(--blue); margin: .9rem auto 0; }

/* a column of big frames, each whole, each no taller than the screen */
.reel-stack { display: flex; flex-direction: column; align-items: center; gap: clamp(2rem, 6vh, 3.6rem); }
.reel-stack .frame { width: min(100%, calc(86vh * var(--ar))); }

/* about: portrait beside the bio */
.about { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about .frame { width: min(100%, 80vh); justify-self: end; }
.about .lead { font-size: clamp(1rem, 1.25vw, 1.1rem); }
.logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.4rem); max-width: 58rem; margin: 0 auto; align-items: center; }
.logos li { list-style: none; display: flex; align-items: center; justify-content: center; height: clamp(84px, 12vw, 128px); padding: 1rem; border-radius: var(--r); background: rgba(0,0,0,.4); border: 1px solid rgba(226,233,239,.12); transition: border-color .25s var(--ease), background .25s var(--ease); }
.logos li:hover { border-color: var(--blue); background: rgba(0,187,255,.08); }
.logos img { max-height: 100%; max-width: 100%; width: auto; height: auto; opacity: .88; }

/* single-screen pages: reel and contact */
.page--fit .page__head { margin-bottom: clamp(1.2rem, 3.5vh, 2.2rem); }
.page--fit .frame { width: min(100%, calc(min(78vh, 100vh - 290px) * var(--ar))); margin: 0 auto; }
.page--contact .frame { width: min(100%, calc(58vh * var(--ar))); }
.page--fit .ctas { margin-top: clamp(1.6rem, 4vh, 2.4rem); }
.reel-note { margin-top: 1.2rem; color: rgba(226,233,239,.6); }

/* credits line at the end of each page */
.credits-line { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.2rem; margin-top: clamp(3rem, 8vh, 5rem); padding-bottom: 4rem; color: rgba(226,233,239,.5); font-size: .7rem; }
.credits-line a { color: rgba(226,233,239,.75); text-decoration: none; }
.credits-line a:hover { color: var(--blue); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.95); display: flex; align-items: center; justify-content: center; padding: 4vmin; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox__close { position: absolute; top: 1rem; right: 1.2rem; width: 46px; height: 46px; border-radius: var(--r); background: rgba(0,0,0,.6); border: 1px solid rgba(226,233,239,.35); color: var(--white); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.lightbox__close:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Sound: the only thing at the bottom ---------- */
.nv-sound { position: fixed; right: clamp(1rem, 3vw, 2.4rem); bottom: 1.1rem; z-index: 100; font-family: var(--font-mono); font-weight: var(--w-label); font-size: .78rem; letter-spacing: var(--ls-label); text-transform: uppercase; }
.hud__sound { background: rgba(0,0,0,.55); border: 1px solid rgba(226,233,239,.4); border-radius: var(--r); color: var(--bone); font: inherit; letter-spacing: inherit; text-transform: inherit; padding: .45rem .75rem; cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; }
.hud__sound:hover, .hud__sound[aria-pressed="true"] { border-color: var(--blue); color: var(--blue); }
.hud__eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.hud__eq i { width: 2px; height: 3px; background: currentColor; }
.hud__sound[aria-pressed="true"] .hud__eq i { animation: eq .9s ease-in-out infinite; }
.hud__sound[aria-pressed="true"] .hud__eq i:nth-child(2) { animation-delay: .2s; }
.hud__sound[aria-pressed="true"] .hud__eq i:nth-child(3) { animation-delay: .45s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 10px; } }

/* ---------- Phones ---------- */
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .about .frame { justify-self: center; width: min(100%, 520px); }
  .about .lead { text-align: left; }
}
@media (max-width: 700px) {
  .ctas .btn { width: 100%; }
  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav__brand span { font-size: 1rem; }
  .btn--lg { font-size: .8rem; padding: 1rem 1.1rem; }
  .page { padding-top: 5.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.nv-carousel .slide, html.nv-carousel .frame, html.nv-carousel .slide__head, html.nv-carousel .slide__foot { transition: none !important; }
  .slide__bg { animation: none !important; }
  .grain { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* home carousel: count, title and studio share one line so the frame gets the height */
html.nv-carousel body[data-carousel] .slide__head {
  display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: .3rem 1.1rem; max-width: none;
}
html.nv-carousel body[data-carousel] .slide__head .scene-label,
html.nv-carousel body[data-carousel] .slide__head h2,
html.nv-carousel body[data-carousel] .slide__head .slide__sub { margin: 0; }
html.nv-carousel body[data-carousel] .slide__head h2 { font-size: clamp(1.6rem, 2.4vw, 2.6rem); order: 2; }
html.nv-carousel body[data-carousel] .slide__head .scene-label { order: 1; }
html.nv-carousel body[data-carousel] .slide__head .slide__sub { order: 3; }
html.nv-carousel body[data-carousel] .slide { padding-top: calc(3.9rem + .5vh); }
