:root {
  --bg: #000;
  --text: #f5f5f7;
  --muted: #86868b;
  --line: rgba(255, 255, 255, .12);
  --accent: #00afd6; /* the cyan of the logo's "N" */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1440px;
  --header-h: 64px;
  --foot-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); color-scheme: dark;
  scroll-snap-type: y proximity;               /* touch / small: proximity */
}
@media (hover: hover) and (pointer: fine) {
  html { scroll-snap-type: y mandatory; }      /* desktop: mandatory */
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--text); color: #000; padding: 10px 16px; border-radius: 980px; font-size: 14px;
}
.skip:focus { top: 12px; }

/* ---------- Header: clear over the films, solid bar elsewhere ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h); }
.site-header::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(0, 0, 0, .72);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  opacity: 0; transition: opacity .4s ease;
}
.site-header.solid::before { opacity: 1; }
.bar {
  position: relative; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
}
.brand img { height: 24px; width: auto; }
.bar nav { display: flex; gap: 28px; }
.bar nav a { font-size: 13px; letter-spacing: .01em; color: rgba(245, 245, 247, .85); transition: color .2s; }
.bar nav a:hover { color: #fff; }

/* ---------- Counter (top right, under the header) ---------- */
.counter {
  position: fixed; z-index: 40; right: var(--gutter); top: calc(var(--header-h) + 10px);
  font-size: 13px; font-weight: 500; letter-spacing: .14em; font-variant-numeric: tabular-nums; color: rgba(245, 245, 247, .85);
  opacity: 0; transition: opacity .4s ease; pointer-events: none;
}
body.in-films .counter { opacity: 1; }

/* ---------- Vertical index (desktop right edge) ---------- */
.index {
  position: fixed; z-index: 40; right: var(--gutter); top: 50%; transform: translateY(-50%);
  opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility 0s linear .4s;
}
body.in-films .index { opacity: 1; visibility: visible; transition-delay: 0s; }
.index ol { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.index a {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 6px 0; font-size: 12px; letter-spacing: .08em; color: rgba(245, 245, 247, .55);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5); transition: color .25s;
}
.index a i { display: block; width: 0; height: 1px; background: #fff; transition: width .3s ease; }
.index a:hover { color: rgba(245, 245, 247, .9); }
.index a[aria-current="true"] { color: #fff; }
.index a[aria-current="true"] i { width: 24px; }

/* ---------- Films: each one is a full screen ---------- */
.film {
  position: relative; height: 100vh; height: 100svh; min-height: 460px; overflow: hidden; background: #000;
  scroll-snap-align: start; scroll-snap-stop: always; cursor: pointer;
}
.film .poster, .film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film video { opacity: 0; transition: opacity .6s ease; }
.film video.on { opacity: 1; }
.film .shade {
  position: absolute; inset: auto 0 0 0; height: 62%; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, 0));
}
.film::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 160px; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
}
.film-copy {
  position: absolute; z-index: 2; left: var(--gutter); bottom: clamp(32px, 7vh, 80px);
  max-width: calc(100% - var(--gutter) * 2 - 220px);
}
.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: rgba(245, 245, 247, .88); }
.film-title {
  margin-top: clamp(8px, 1.6vh, 16px);
  font-size: clamp(44px, 7.6vw, 112px); font-weight: 700; line-height: .98; letter-spacing: -.04em;
  text-wrap: balance;
}
.film-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 20px; margin-top: clamp(12px, 2.2vh, 24px); }
.film-meta p { font-size: 17px; color: rgba(245, 245, 247, .75); }
.play { font-size: 15px; color: rgba(245, 245, 247, .75); white-space: nowrap; transition: color .2s; padding: 6px 0; }
.film:hover .play, .play:focus-visible { color: #fff; }

/* Entrance of the text when a film comes into view */
.js .film-copy { opacity: 0; transform: translateY(22px); transition: opacity .7s ease-out, transform .7s ease-out; }
.js .film.seen .film-copy { opacity: 1; transform: none; }

/* ---------- Sound / full-screen / progress ---------- */
.round {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: #fff; background: rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .55);
  transition: background .2s, border-color .2s;
}
.round:hover { background: rgba(0, 0, 0, .55); border-color: #fff; }
.round:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 50%; }
.snd .on-ico { display: none; }
.snd[aria-pressed="true"] .on-ico { display: block; }
.snd[aria-pressed="true"] .off-ico { display: none; }
.ctl { position: absolute; right: var(--gutter); bottom: clamp(32px, 7vh, 80px); z-index: 3; display: flex; align-items: center; gap: 12px; }
.snd-label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: rgba(245, 245, 247, .85); margin-right: 4px; }
.ctl .fs { order: -1; }
.ctl .snd-label { order: 0; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 3px; background: rgba(255, 255, 255, .22); opacity: 0; transition: opacity .3s; pointer-events: none; }
.progress i { display: block; width: 100%; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.film.is-film .progress { opacity: 1; }
.bigplay {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  display: none; place-items: center; border-radius: 50%; color: #fff; padding-left: 3px;
  background: rgba(0, 0, 0, .4); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .55); pointer-events: none;
}
.film.paused .bigplay { display: grid; }
.film:fullscreen { height: 100%; cursor: default; }
.film:-webkit-full-screen { height: 100%; }
.film:fullscreen .poster, .film:fullscreen .shade, .film:fullscreen::before, .film:fullscreen .film-copy { display: none; }
.film:fullscreen video, .film:-webkit-full-screen video { object-fit: contain; }
.film:-webkit-full-screen .poster, .film:-webkit-full-screen .shade, .film:-webkit-full-screen::before, .film:-webkit-full-screen .film-copy { display: none; }

/* ---------- Section label ---------- */
.label { font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

/* ---------- Photography: filmstrip ---------- */
.photography {
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--header-h) + 8px) 0 28px; scroll-snap-align: start; scroll-snap-stop: always;
}
.photography .label { padding: 0 var(--gutter); margin-bottom: 20px; }
.strip {
  position: relative; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab; border-radius: 2px;
  -webkit-overflow-scrolling: touch;
}
.strip::-webkit-scrollbar { display: none; }
.strip ul { display: flex; gap: 10px; width: max-content; padding: 0 var(--gutter); }
.strip li { flex: none; scroll-snap-align: start; }
.ph { display: block; height: 70vh; height: 70svh; background: #0a0a0a; overflow: hidden; }
.ph img { height: 100%; width: auto; max-width: none; transition: filter .3s ease; -webkit-user-drag: none; user-select: none; }
.ph:hover img { filter: brightness(1.1); }
.strip.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.strip.dragging .ph { pointer-events: none; }
.strip:focus-visible { outline-offset: 4px; }
.strip-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px var(--gutter) 0; }
.credits { font-size: 14px; color: var(--muted); }
.strip-nav { display: flex; gap: 10px; }
.strip-nav .round[disabled] { opacity: .35; cursor: default; }

/* ---------- About + Contact on one screen ---------- */
.finale {
  min-height: calc(100vh - var(--foot-h)); min-height: calc(100svh - var(--foot-h));
  display: flex; flex-direction: column; justify-content: center; gap: clamp(28px, 6vh, 64px);
  max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto;
  padding: calc(var(--header-h) + 24px) var(--gutter) 24px; scroll-snap-align: start;
}
.about { max-width: 1100px; }
.statement { font-size: clamp(30px, 4.2vw, 60px); font-weight: 600; line-height: 1.06; letter-spacing: -.028em; max-width: 24ch; text-wrap: balance; }
.lede { margin-top: clamp(14px, 2.4vh, 24px); max-width: 62ch; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--muted); text-wrap: pretty; }

.contact-grid {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); gap: clamp(32px, 6vw, 120px); align-items: start;
  border-top: 1px solid var(--line); padding-top: clamp(24px, 4.5vh, 48px); scroll-margin-top: calc(var(--header-h) + 8px);
}
.contact-info h2 { font-size: clamp(34px, 4vw, 56px); font-weight: 600; line-height: 1.02; letter-spacing: -.03em; margin-bottom: clamp(14px, 2.4vh, 24px); }
.contact-info p { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.4; margin-top: 6px; }
.contact-info a { color: var(--accent); }
.contact-info a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-info .muted { margin-top: 18px; font-size: 16px; color: var(--muted); }

.contact-form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; row-gap: clamp(8px, 1.6vh, 18px); }
.field { min-width: 0; }
.field.wide, .form-foot { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.field label span { opacity: .8; }
.field input, .field textarea {
  display: block; width: 100%; background: transparent; color: var(--text);
  border: 0; border-bottom: 1px solid rgba(255, 255, 255, .28); border-radius: 0;
  font: inherit; font-size: 20px; line-height: 1.3; padding: 6px 0 9px;
  transition: border-color .2s; -webkit-appearance: none; appearance: none; resize: none;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 0 var(--accent); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 100px #000 inset; }
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 6px; }
.send {
  height: 48px; padding: 0 36px; border-radius: 980px;
  background: var(--accent); color: #00232d; font-size: 16px; font-weight: 600;
  transition: filter .2s, opacity .2s;
}
.send:hover { filter: brightness(1.1); }
.send[disabled] { opacity: .55; cursor: default; }
.status { font-size: 16px; color: var(--muted); }
.status.ok { color: var(--text); }
.status a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.site-footer { height: var(--foot-h); padding: 0 var(--gutter); scroll-snap-align: end; }
.site-footer p {
  max-width: var(--max); margin: 0 auto; height: 100%; display: flex; align-items: center;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}

/* ---------- Overlay (lightbox) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 90; background: #000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .35s ease, visibility 0s linear .35s;
}
.overlay.open { opacity: 1; visibility: visible; transition-delay: 0s; }
.overlay .x {
  position: absolute; top: 14px; right: 18px; z-index: 2;
  width: 48px; height: 48px; border-radius: 50%;
  font-size: 34px; line-height: 44px; font-weight: 300; color: rgba(245, 245, 247, .9);
  transition: background .2s;
}
.overlay .x:hover { background: rgba(255, 255, 255, .12); }
.lightbox figure { margin: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 64px 72px; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: opacity .25s ease; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-drag: none; }
.lightbox img.fade { opacity: 0; }
.lightbox .nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 56px; height: 72px; font-size: 52px; line-height: 64px; font-weight: 200; color: rgba(245, 245, 247, .85);
  transition: color .2s;
}
.lightbox .nav:hover { color: #fff; }
.lightbox .prev { left: 8px; }
.lightbox .next { right: 8px; }
.lightbox .count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: 13px; letter-spacing: .1em; color: var(--muted); }

body.locked { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .index { display: none; }                       /* the index is for desktop */
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 800px) {
  .snd-label { display: none; }
  .lightbox figure { padding: 64px 12px; }
  .lightbox .nav { width: 44px; font-size: 40px; }
  .finale { min-height: 0; }                       /* taller than one screen on a phone: free scroll */
  .site-footer { scroll-snap-align: none; }
}
@media (max-width: 600px) {
  :root { --header-h: 56px; }
  .brand img { height: 20px; }
  .bar nav { gap: 18px; }
  .film-copy { max-width: calc(100% - var(--gutter) * 2 - 56px); bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
  .ctl { flex-direction: column-reverse; align-items: flex-end; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); gap: 10px; }
  .film-title { font-size: 44px; }
  .film-meta p { font-size: 16px; }
  .counter { font-size: 12px; }
  .ph { height: 62vh; height: 62svh; }
  .strip-foot { flex-wrap: wrap; }
  .contact-form { grid-template-columns: 1fr; }
  .field input, .field textarea { font-size: 18px; }
  .statement { font-size: 32px; }
}
@media (max-height: 800px) and (min-width: 1001px) {
  .finale { gap: 22px; padding-top: calc(var(--header-h) + 12px); padding-bottom: 12px; }
  .statement { font-size: clamp(30px, 3.4vw, 46px); }
  .lede { margin-top: 12px; font-size: 17px; }
  .contact-grid { padding-top: 20px; }
  .contact-info h2 { font-size: 36px; margin-bottom: 10px; }
  .contact-info p { font-size: 18px; margin-top: 4px; }
  .contact-info .muted { margin-top: 10px; font-size: 15px; }
  .contact-form { row-gap: 6px; }
  .field input, .field textarea { font-size: 18px; padding: 4px 0 7px; }
  .send { height: 44px; }
  .form-foot { margin-top: 2px; }
}
@media (max-height: 640px) and (min-width: 801px) {
  .ph { height: 62vh; height: 62svh; }
}

/* Small phones: keep the logo and menu from touching (control, 10 Nov) */
@media (max-width: 400px) {
  .bar nav { gap: 14px; }
  .bar nav a { font-size: 12px; }
  .brand img { height: 18px; }
}
@media (max-width: 340px) {
  .bar nav a[href="#photography"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; transition-delay: 0s !important; }
  .js .film-copy { opacity: 1; transform: none; }
}
