/* ==========================================================================
   Eli Gramenz — Director of Photography
   ========================================================================== */

:root {
  /* Color */
  --bg: #0a0a0a;
  --surface: #121212;
  --surface-2: #1a1a1a;
  --text: #f5f5f4;
  --muted: #a3a3a3;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.28);

  --accent: #dc2626;          /* fills: buttons, marks */
  --accent-hover: #b91c1c;
  --accent-text: #f05252;     /* red text on dark (5.4:1) */

  /* Type */
  --font-display: "Michroma", "Arial Black", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;

  /* Spacing (8pt) */
  --s-1: 4px; --s-2: 8px; --s-3: 16px; --s-4: 24px; --s-5: 32px;
  --s-6: 48px; --s-7: 64px; --s-8: 96px; --s-9: 128px;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1440px;
  --header-h: 72px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 180ms;
  --t-med: 320ms;
  --t-slow: 700ms;

  /* Layers */
  --z-hud: 10;
  --z-content: 20;
  --z-header: 100;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, figure, blockquote, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-3); top: -100px; z-index: 1000;
  background: var(--accent); color: #fff; padding: var(--s-2) var(--s-3);
}
.skip-link:focus { top: var(--s-3); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.accent { color: var(--accent-text); }

.eyebrow { color: var(--muted); margin-bottom: var(--s-3); }

.section-head { margin-bottom: var(--s-6); }
.section-head--split {
  display: grid; gap: var(--s-4);
  align-items: end;
}
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: 1.4fr 1fr; }
}
.section-title { font-size: clamp(1.75rem, 4.2vw, 3.5rem); }
.section-intro { color: var(--muted); max-width: 46ch; }

section { position: relative; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-4);
  font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid transparent; border-radius: 2px;
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease, transform var(--t-fast) ease;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: rgba(10, 10, 10, 0.25); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--text); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-header);
  height: var(--header-h);
  transition: background-color var(--t-med) ease, border-color var(--t-med) ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.site-header__inner {
  height: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s-4);
}
.site-header__meta { display: flex; flex-direction: column; line-height: 1.5; color: var(--muted); font-size: 0.6875rem; }
.site-header__meta span:first-child { color: var(--text); }

.wordmark {
  font-family: var(--font-display); font-size: 1.125rem; letter-spacing: 0.12em;
  display: inline-flex; align-items: center; gap: 0.45em; white-space: nowrap;
}
.wordmark__dot { width: 0.42em; height: 0.42em; background: var(--accent); border-radius: 50%; }

.nav { justify-self: end; }
.nav__list { display: flex; align-items: center; gap: var(--s-1); }
.nav__list a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3);
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); transition: color var(--t-fast) ease;
}
.nav__list a:hover, .nav__list a[aria-current="true"] { color: var(--text); }
.nav__list a[aria-current="true"]::before { content: ""; width: 6px; height: 6px; background: var(--accent); margin-right: var(--s-2); }
.nav__list .nav__cta { border: 1px solid var(--line-strong); color: var(--text); margin-left: var(--s-2); }
.nav__list .nav__cta:hover { border-color: var(--accent); background: var(--accent); }
.nav__toggle { display: none; }

@media (max-width: 1023px) {
  .site-header__inner { grid-template-columns: 1fr auto; }
  .site-header__meta { display: none; }
  .wordmark { font-size: 1rem; }
  .nav__toggle {
    display: inline-grid; place-items: center; width: 48px; height: 48px;
    background: transparent; border: 1px solid var(--line-strong); border-radius: 2px;
  }
  .nav__list {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: var(--s-2) var(--gutter) var(--s-4);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity var(--t-fast) ease, transform var(--t-fast) ease, visibility 0s linear var(--t-fast);
  }
  .nav__list.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav__list a { display: flex; min-height: 52px; padding: 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; color: var(--text); }
  .nav__list .nav__cta { margin: var(--s-3) 0 0; justify-content: center; border-color: var(--accent); background: var(--accent); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate;
  padding: calc(var(--header-h) + var(--s-6)) 0 var(--s-8);
}
.hero__slides { position: absolute; inset: 0; z-index: -2; }
.hero__slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.4s var(--ease-in-out), transform 8s linear;
}
.hero__slide.is-active { opacity: 1; transform: scale(1); }
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(10,10,10,0.92) 0%, rgba(10,10,10,0.45) 38%, rgba(10,10,10,0.15) 65%, rgba(10,10,10,0.55) 100%),
    linear-gradient(to right, rgba(10,10,10,0.55) 0%, transparent 60%);
}

/* Viewfinder HUD */
.hud { position: absolute; inset: calc(var(--header-h) + var(--s-3)) var(--gutter) var(--s-4); z-index: var(--z-hud); pointer-events: none; }
.hud__corner { position: absolute; width: 22px; height: 22px; border: 0 solid rgba(255,255,255,0.55); }
.hud__corner--tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.hud__corner--tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.hud__corner--bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.hud__corner--br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.hud__cross { position: absolute; top: 50%; color: rgba(255,255,255,0.5); font-family: var(--font-mono); font-size: 1rem; transform: translateY(-50%); }
.hud__cross--l { left: var(--s-3); }
.hud__cross--r { right: var(--s-3); }
.hud__top {
  position: absolute; top: var(--s-2); left: 50%; transform: translateX(-50%);
  display: flex; gap: var(--s-4); color: rgba(255,255,255,0.8); font-size: 0.6875rem;
}
.hud__rec { display: inline-flex; align-items: center; gap: 6px; }
.hud__rec i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hud__bottom {
  position: absolute; bottom: var(--s-2); right: var(--s-6);
  display: flex; gap: var(--s-4); color: rgba(255,255,255,0.7); font-size: 0.6875rem;
}
.reticle {
  position: absolute; left: 58%; top: 42%; transform: translate(-50%, -50%);
  width: clamp(120px, 16vw, 240px); aspect-ratio: 4 / 5;
  --c: var(--accent); --l: 18px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) 1.5px,
    linear-gradient(var(--c), var(--c)) top left / 1.5px var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) 1.5px,
    linear-gradient(var(--c), var(--c)) top right / 1.5px var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) 1.5px,
    linear-gradient(var(--c), var(--c)) bottom left / 1.5px var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) 1.5px,
    linear-gradient(var(--c), var(--c)) bottom right / 1.5px var(--l);
  background-repeat: no-repeat;
  animation: focus-pull 5s var(--ease-in-out) infinite;
}
@keyframes focus-pull {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(0.94); }
}

.id-card {
  position: absolute; z-index: var(--z-content);
  top: calc(var(--header-h) + var(--s-6)); left: calc(var(--gutter) + var(--s-5));
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-2); padding-right: var(--s-4);
  background: rgba(18, 18, 18, 0.7); border: 1px solid var(--line); backdrop-filter: blur(10px);
}
.id-card img { width: 56px; height: 56px; object-fit: cover; }
.id-card__name { font-family: var(--font-display); font-size: 0.8125rem; text-transform: uppercase; }
.id-card__role { color: var(--muted); font-size: 0.625rem; }

.hero__content {
  position: relative; z-index: var(--z-content);
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: calc(var(--gutter) + var(--s-5));
}
.hero__title { font-size: clamp(1.75rem, 4.4vw, 4rem); max-width: 16ch; }
.hero__lede { margin-top: var(--s-4); max-width: 44ch; color: rgba(245,245,244,0.86); font-size: clamp(1rem, 1.3vw, 1.125rem); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }

.hero__pause {
  position: absolute; z-index: var(--z-content); left: calc(var(--gutter) + var(--s-5)); bottom: var(--s-5);
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 32px; padding: 0 var(--s-2); background: transparent; border: 0;
  color: rgba(255,255,255,0.7); font-size: 0.6875rem;
}
.hero__pause:hover { color: #fff; }
.hero__pause .icon-play { display: none; }
.hero__pause[aria-pressed="true"] .icon-play { display: block; }
.hero__pause[aria-pressed="true"] .icon-pause { display: none; }

@media (max-width: 767px) {
  .hud__bottom, .hud__cross, .id-card { display: none; }
  .hud { inset: calc(var(--header-h) + var(--s-2)) var(--s-3) var(--s-3); }
  .reticle { left: 50%; top: 36%; }
  .hero__content { padding-inline: var(--gutter); }
  .hero__pause { left: var(--gutter); bottom: var(--s-3); }
  .hero { padding-bottom: var(--s-8); }
}

/* ---------- Reel ---------- */
.reel { padding: var(--s-9) 0 var(--s-8); }
.reel__frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000;
  border: 1px solid var(--line);
}
.reel__poster { width: 100%; height: 100%; object-fit: cover; opacity: 0.75; transition: opacity var(--t-med) ease, transform var(--t-slow) var(--ease-out); }
.reel__frame:hover .reel__poster { opacity: 0.9; transform: scale(1.02); }
.reel__play {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-3);
  background: transparent; border: 0; color: #fff;
}
.reel__play-icon {
  width: clamp(72px, 9vw, 112px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent);
  transition: transform var(--t-med) var(--ease-out), background-color var(--t-fast) ease;
}
.reel__play-icon svg { margin-left: 4px; }
.reel__play:hover .reel__play-icon { transform: scale(1.06); background: var(--accent-hover); }
.reel__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reel__note {
  position: absolute; left: 50%; bottom: var(--s-4); transform: translateX(-50%);
  background: rgba(10,10,10,0.85); padding: var(--s-2) var(--s-3); border: 1px solid var(--line);
  text-align: center; width: max-content; max-width: calc(100% - 32px);
}
.reel__note a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Work: stills gallery ---------- */
.work { padding: var(--s-8) 0 var(--s-9); }
/* Phone: 2 columns, large frames full width, small frames in pairs.
   Tablet: same, more breathing room. Desktop: 12-column editorial grid driven by --span. */
.gallery {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--s-5) var(--s-3); align-items: start;
}
.gallery__item { grid-column: span 1; min-width: 0; }
.gallery__item--full, .gallery__item--large, .gallery__item--solo { grid-column: 1 / -1; }
@media (min-width: 600px) {
  .gallery { gap: var(--s-6) var(--s-4); }
  .gallery__item--drop { margin-top: var(--s-7); }
}
@media (min-width: 1024px) {
  .gallery { grid-template-columns: repeat(12, 1fr); gap: var(--s-7) var(--s-4); }
  .gallery__item, .gallery__item--large, .gallery__item--solo { grid-column: span var(--span); }
  .gallery__item--full { grid-column: 1 / -1; }
  .gallery__item--drop { margin-top: var(--s-9); }
}

.gallery__btn {
  position: relative; display: block; width: 100%; padding: 0;
  background: #000; border: 0; overflow: hidden; cursor: zoom-in;
}
.gallery__btn img {
  width: 100%; height: auto; /* natural aspect ratio: stills are never cropped */
  transition: transform 1.2s var(--ease-out), filter var(--t-med) ease;
}
.gallery:hover .gallery__btn img { filter: brightness(0.6) saturate(0.85); }
.gallery .gallery__btn:hover img,
.gallery .gallery__btn:focus-visible img { filter: none; }
@media (hover: none) { .gallery:hover .gallery__btn img { filter: none; } }

.gallery__caption {
  display: flex; gap: var(--s-2); margin-top: var(--s-2);
  font-size: 0.6875rem; color: var(--muted);
}
.gallery__caption span:first-child { color: var(--accent-text); }
.gallery__btn::before, .gallery__btn::after {
  content: ""; position: absolute; width: 18px; height: 18px; z-index: 1;
  border: 0 solid var(--accent); opacity: 0;
  transition: opacity var(--t-fast) ease;
}
.gallery__btn::before { top: var(--s-3); left: var(--s-3); border-top-width: 1.5px; border-left-width: 1.5px; }
.gallery__btn::after { top: var(--s-3); right: var(--s-3); border-top-width: 1.5px; border-right-width: 1.5px; }
.gallery__btn:hover::before, .gallery__btn:hover::after,
.gallery__btn:focus-visible::before, .gallery__btn:focus-visible::after { opacity: 1; }

/* ---------- Contact ---------- */
.contact { padding: var(--s-9) 0; overflow: hidden; isolation: isolate; border-top: 1px solid var(--line); }
.contact__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: 0.35; }
.contact::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to right, rgba(10,10,10,0.95) 30%, rgba(10,10,10,0.8)); }
.contact__grid { display: grid; gap: var(--s-7); }
@media (min-width: 900px) { .contact__grid { grid-template-columns: 1fr 1fr; gap: var(--s-8); } }
.contact__title { font-size: clamp(1.75rem, 4vw, 3.25rem); }
.contact__details { margin-top: var(--s-6); display: grid; gap: var(--s-3); }
.contact__details li { display: grid; grid-template-columns: 88px 1fr; gap: var(--s-3); align-items: baseline; padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); }
.contact__details .mono { color: var(--muted); }
.contact__details a { transition: color var(--t-fast) ease; overflow-wrap: anywhere; }
.contact__details a:hover { color: var(--accent-text); }
.form { display: grid; gap: var(--s-4); align-content: start; }
.form__row { display: grid; gap: var(--s-4); }
@media (min-width: 600px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: var(--s-2); }
.field label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field label span { color: var(--accent-text); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: var(--s-3);
  font: inherit; font-size: 1rem; color: var(--text);
  background: rgba(18,18,18,0.8); border: 1px solid var(--line-strong); border-radius: 2px;
  transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease;
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(255,255,255,0.5); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--text); background: var(--surface-2); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--accent-text); }
.field__error { color: var(--accent-text); font-size: 0.875rem; }
.field__error:empty { display: none; }
.field__help { color: var(--muted); font-size: 0.8125rem; }
.form__req { color: var(--muted); }
.form__req span { color: var(--accent-text); }
.form__submit { justify-self: start; min-width: 200px; }
.form__status { font-size: 0.9375rem; }
.form__status.is-success { color: #4ade80; }
.form__status.is-error { color: var(--accent-text); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: var(--s-7) 0 var(--s-5); overflow: hidden; }
.wordmark--lg { font-size: clamp(1.75rem, 8.4vw, 8.5rem); letter-spacing: 0.04em; display: flex; justify-content: space-between; width: 100%; line-height: 1; }
.wordmark--lg .wordmark__dot { width: 0.22em; height: 0.22em; }
.footer__meta { margin-top: var(--s-5); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); color: var(--muted); }
.footer__meta a { display: inline-flex; align-items: center; min-height: 44px; }
.footer__meta a:hover { color: var(--text); }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0;
  padding: var(--s-7) var(--gutter) var(--s-3); border: 0;
  background: rgba(5, 5, 5, 0.96); color: var(--text);
}
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; gap: var(--s-3); animation: lightbox-in var(--t-med) var(--ease-out); }
.lightbox::backdrop { background: rgba(0, 0, 0, 0.6); }
@keyframes lightbox-in { from { opacity: 0; } }
.lightbox__img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.lightbox__close {
  position: absolute; top: var(--s-3); right: var(--gutter);
  width: 44px; height: 44px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line-strong); border-radius: 50%;
}
.lightbox__close:hover { background: var(--accent); border-color: var(--accent); }
.lightbox__bar { display: flex; align-items: center; justify-content: center; gap: var(--s-4); color: var(--muted); }
.lightbox__bar button {
  width: 48px; height: 48px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line-strong); border-radius: 50%;
}
.lightbox__bar button:hover { border-color: var(--text); }

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .hero__slide { transform: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
