/* =============================================================================
   THE LATENT IMAGE
   Engraved-lens design system. Type = Leica barrel engraving (tracked caps,
   tabular numerals); narrative = Spectral serif. One oxide-red index mark.
   ============================================================================= */

:root {
  --ink:      #0B0B0C;
  --carbon:   #141416;
  --graphite: #2A2A2D;
  --steel:    #4A4A4F;
  --silver:   #C8C6C1;
  --paper:    #EDEAE3;
  --oxide:    #A8362A;   /* the single accent — lens index / IR mark */

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Spectral", Georgia, serif;

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --maxw: 1500px;

  /* engraved label treatment */
  --track-wide: 0.32em;
  --track-mid: 0.18em;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--silver);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--oxide); color: var(--paper); }

/* ---- engraved label utility -------------------------------------------- */
.eng {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  font-weight: 600;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}

/* =========================== GRAIN + VIGNETTE =========================== */
.grain {
  position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  opacity: 0.05; mix-blend-mode: screen;
  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.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.6s steps(2) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0,0); }
  50% { transform: translate(-3%, 2%); }
  100% { transform: translate(2%, -2%); }
}
.vignette {
  position: fixed; inset: 0; z-index: 8999; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 42%, transparent 55%, rgba(0,0,0,0.55) 100%);
}

/* ====================== DOF / DISTANCE SCALE (signature) ================ */
.dof {
  position: fixed; top: 50%; right: clamp(0.5rem, 1.6vw, 1.4rem);
  transform: translateY(-50%);
  z-index: 7000; display: flex; align-items: center; gap: 0.55rem;
  pointer-events: none;
}
.dof__rail {
  position: relative; width: 1px; height: 46vh; background: var(--steel);
}
.dof__index {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%);
  width: 16px; height: 2px; background: var(--oxide);
  box-shadow: 0 0 6px rgba(168,54,42,0.8);
}
.dof__index::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%); width: 5px; height: 5px;
  background: var(--oxide); border-radius: 50%;
}
.dof__scale {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  height: 46vh;
  font-family: var(--sans); font-size: 0.6rem; letter-spacing: 0.05em;
  color: var(--steel); font-variant-numeric: tabular-nums;
}
.dof__unit {
  writing-mode: vertical-rl; font-family: var(--sans);
  font-size: 0.52rem; letter-spacing: 0.3em; color: var(--steel);
  text-transform: uppercase;
}
@media (max-width: 900px) { .dof { display: none; } }

/* ============================== TOPBAR ================================= */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 6000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--gutter) 1.5rem;
  /* fade scrim so the nav stays legible over any photo or section below */
  background: linear-gradient(to bottom, rgba(11,11,12,0.82) 0%, rgba(11,11,12,0.55) 45%, rgba(11,11,12,0) 100%);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.wordmark { display: flex; flex-direction: column; line-height: 1; }
.wordmark__name {
  font-weight: 700; letter-spacing: var(--track-mid);
  font-size: 0.92rem; color: var(--paper);
}
.wordmark__sub {
  margin-top: 0.32rem; font-size: 0.55rem; letter-spacing: 0.4em;
  color: var(--paper); opacity: 0.78;
}
.nav { display: flex; gap: clamp(0.8rem, 2vw, 2rem); }
.nav a {
  font-size: 0.62rem; letter-spacing: var(--track-mid); font-weight: 500;
  color: var(--paper); padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}
.nav a:hover { border-color: var(--paper); }
@media (max-width: 620px) {
  .nav { display: none; }
}

/* =============================== HERO ================================== */
.hero {
  position: relative; min-height: 100svh;
  display: grid; align-items: center;
  padding: 0 var(--gutter);
  overflow: hidden;
}
.hero__plate {
  position: absolute; inset: -8% 0 -8% auto; right: 0;
  width: min(58vw, 1040px); height: 116%;
  will-change: transform;
}
.hero__plate img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  filter: contrast(1.06) brightness(0.94);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 24%);
  mask-image: linear-gradient(90deg, transparent, #000 24%);
}
/* very wide screens: let the horizontal frame breathe even more */
@media (min-width: 1600px) {
  .hero__plate { width: min(64vw, 1280px); }
}
.hero__type { position: relative; z-index: 2; }
.hero__eyebrow {
  font-size: 0.62rem; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--oxide); margin: 0 0 1.6rem;
}
.hero__title {
  margin: 0; font-weight: 700;
  font-size: clamp(3.4rem, 13vw, 11rem); line-height: 0.86;
  letter-spacing: 0.02em; color: var(--paper);
  text-transform: uppercase;
}
.hero__tag {
  margin: 1.8rem 0 0; font-family: var(--serif); font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem); color: var(--silver);
  font-weight: 300;
}
.hero__meta {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 1.4rem;
  display: flex; justify-content: space-between;
  font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--steel); z-index: 2;
}
.hero__scroll { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ============================ STATEMENT =============================== */
.statement {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(5rem, 12vh, 9rem) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.1fr);
  gap: clamp(1.5rem, 5vw, 5rem);
}
.statement__label {
  font-size: 0.62rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--oxide); margin: 0; align-self: start;
  border-top: 1px solid var(--graphite); padding-top: 0.9rem;
}
.statement__body {
  margin: 0; font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.3rem, 2.7vw, 2.05rem); line-height: 1.42;
  color: var(--paper);
}
.statement__body em { font-style: italic; color: var(--silver); }
@media (max-width: 760px) {
  .statement { grid-template-columns: 1fr; gap: 1.4rem; }
}

/* ====================== APERTURE DIVIDER ============================== */
.divider {
  display: flex; justify-content: center; gap: clamp(1rem, 5vw, 4rem);
  padding: 1.6rem var(--gutter);
  border-top: 1px solid var(--graphite); border-bottom: 1px solid var(--graphite);
  font-size: 0.64rem; letter-spacing: 0.2em; color: var(--steel);
  font-variant-numeric: tabular-nums; flex-wrap: wrap;
}
.divider__mark { color: var(--oxide); position: relative; }
.divider__mark::after {
  content: ""; position: absolute; left: 50%; bottom: -0.7rem;
  transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%;
  background: var(--oxide);
}

/* =============================== WORK ================================= */
.work { padding: clamp(4rem, 9vh, 7rem) var(--gutter) 2rem; }
.work__head {
  max-width: var(--maxw); margin: 0 auto clamp(2.5rem, 6vh, 4.5rem);
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 1rem;
}
.work__head h2 {
  margin: 0; font-weight: 700; font-size: clamp(1.6rem, 4vw, 3rem);
  letter-spacing: 0.06em; color: var(--paper); text-transform: uppercase;
}
.work__head p {
  margin: 0; font-family: var(--serif); font-style: italic; font-weight: 300;
  color: var(--steel); font-size: clamp(0.95rem, 1.6vw, 1.15rem); max-width: 36ch;
}
.work__link {
  font-family: var(--sans); font-style: normal; font-weight: 600;
  font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--oxide); white-space: nowrap;
  border-bottom: 1px solid transparent; transition: border-color 0.25s;
}
.work__link:hover { border-color: var(--oxide); }

/* gallery grid */
.gallery {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 4vw, 4.5rem);
  align-items: start;
}
.plate { position: relative; cursor: zoom-in; }
.plate--wide { grid-column: 1 / -1; }
/* stagger vertical rhythm so the contact-sheet feels hand-laid */
.plate--frame:nth-of-type(4n) { margin-top: clamp(0rem, 6vw, 5rem); }
.plate--square:nth-of-type(4n+3) { margin-top: clamp(0rem, 4vw, 3.5rem); }

.plate__frame {
  position: relative; overflow: hidden; background: var(--carbon);
}
.plate__img {
  width: 100%; height: 100%; object-fit: cover;
  filter: contrast(1.04);
  transition: transform 1.1s cubic-bezier(.16,.84,.36,1), filter 0.6s;
  will-change: transform;
}
.plate:hover .plate__img { filter: contrast(1.08) brightness(1.03); }

/* engraved barrel caption */
.plate__cap {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; margin-top: 0.85rem; padding-top: 0.7rem;
  border-top: 1px solid var(--graphite);
}
.plate__title {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 1.02rem; color: var(--paper); white-space: nowrap;
}
.plate__gear {
  font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--steel); text-align: right; font-variant-numeric: tabular-nums;
}
.plate__gear b {
  display: block; color: var(--oxide); font-weight: 600; letter-spacing: 0.22em;
  margin-bottom: 0.2rem;
}
@media (max-width: 680px) {
  .gallery { grid-template-columns: 1fr; }
  .plate--frame:nth-of-type(4n), .plate--square:nth-of-type(4n+3) { margin-top: 0; }
}

/* ============================= PROCESS =============================== */
.process {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(5rem, 12vh, 9rem) var(--gutter);
}
.process__grid {
  margin-top: 2.6rem;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.process__grid h3 {
  margin: 0 0 0.9rem; font-size: 0.8rem; letter-spacing: 0.3em;
  color: var(--paper); border-bottom: 1px solid var(--oxide);
  padding-bottom: 0.7rem; display: inline-block;
}
.process__grid p {
  margin: 0; font-family: var(--serif); font-weight: 300;
  font-size: 1.05rem; line-height: 1.55; color: var(--silver);
}
@media (max-width: 760px) { .process__grid { grid-template-columns: 1fr; } }

/* ============================= CONTACT =============================== */
.contact {
  border-top: 1px solid var(--graphite);
  padding: clamp(5rem, 14vh, 10rem) var(--gutter);
}
.contact__inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.contact__big {
  margin: 0; font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.4rem, 4vw, 2.6rem); letter-spacing: 0.12em;
  color: var(--paper);
}
.contact__line { margin: 1.4rem 0 0; }
.contact__line a {
  font-size: clamp(1rem, 2.4vw, 1.5rem); letter-spacing: 0.14em;
  color: var(--oxide); border-bottom: 1px solid transparent; transition: border-color 0.25s;
}
.contact__line a:hover { border-color: var(--oxide); }
.contact__fine {
  margin: 2.6rem 0 0; font-size: 0.56rem; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--steel); line-height: 2;
}

/* ============================= LIGHTBOX ============================== */
.lightbox {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(8,8,9,0.96);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  opacity: 0; visibility: hidden; transition: opacity 0.4s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__fig {
  margin: 0; max-width: 100%; max-height: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.lightbox__fig img {
  max-width: 100%; max-height: 80vh; object-fit: contain;
  filter: contrast(1.04);
  box-shadow: 0 40px 120px rgba(0,0,0,0.7);
}
.lightbox__fig figcaption {
  font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--silver); text-align: center; font-variant-numeric: tabular-nums;
}
.lightbox__close {
  position: absolute; top: clamp(1rem,3vw,2rem); right: clamp(1rem,3vw,2rem);
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); font-size: 0.64rem; letter-spacing: 0.2em;
  color: var(--silver); padding: 0.5rem;
}
.lightbox__close:hover { color: var(--oxide); }

/* ====================== reveal-on-scroll ============================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.16,.84,.36,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* keyboard focus + reduced motion floor */
a:focus-visible, button:focus-visible, .plate:focus-visible {
  outline: 2px solid var(--oxide); outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .plate__img { transition: none; }
}

/* =============================================================================
   LIGHT "LIGHT-TABLE" THEME  (color.html, <body class="light">)
   Cool, backlit neutral surface — a film light table, not warm paper.
   Remaps the semantic palette so shared rules adapt; a few targeted overrides
   handle elements that assumed a dark background.
   ============================================================================= */
body.light {
  --ink:      #E7E9EC;   /* page surface (backlit cool white) */
  --carbon:   #DCDFE3;   /* panels / plate frame */
  --graphite: #BCC1C8;   /* hairlines */
  --steel:    #71757C;   /* muted text */
  --silver:   #2C2F34;   /* body text (dark on light) */
  --paper:    #15171B;   /* strong headings / wordmark */
  /* --oxide stays the studio thread */
  background:
    radial-gradient(120% 90% at 50% 0%, #F1F2F4 0%, #E7E9EC 55%, #DDE0E4 100%);
}

/* grain: screen-blend is invisible on light; switch to multiply specks */
body.light .grain { mix-blend-mode: multiply; opacity: 0.045; }

/* vignette: a light table is evenly lit — soften to a faint cool edge */
body.light .vignette {
  background: radial-gradient(120% 100% at 50% 45%, transparent 60%, rgba(40,52,70,0.10) 100%);
}

/* topbar: light fade scrim with dark ink text — legible over the light
   surface and over bright hero photos alike */
body.light .topbar {
  background: linear-gradient(to bottom, rgba(231,233,236,0.90) 0%, rgba(231,233,236,0.6) 45%, rgba(231,233,236,0) 100%);
}
body.light .wordmark__name,
body.light .wordmark__sub,
body.light .nav a { color: var(--paper); }
body.light .wordmark__sub { opacity: 0.6; }
body.light .nav a:hover { border-color: var(--paper); }

/* Color hero: full-bleed cinematic panorama (the one horizontal color frame).
   Fills the whole hero, type set light over a soft scrim. */
body.light .hero__plate {
  inset: -4% 0 -4% 0; width: 100%; height: 108%;
}
body.light .hero__plate img {
  object-position: 50% 56%;
  filter: contrast(1.04) saturate(1.04) brightness(0.97);
  -webkit-mask-image: none; mask-image: none;
}
/* scrim so the title stays legible over the bright golden frame */
body.light .hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(102deg, rgba(12,13,17,0.74) 0%, rgba(12,13,17,0.34) 40%, rgba(12,13,17,0) 72%),
    linear-gradient(to top, rgba(12,13,17,0.45) 0%, rgba(12,13,17,0) 32%);
}
/* light type over the photographic hero (overrides the dark light-theme ink) */
body.light .hero__eyebrow {
  color: #F08A5B; text-shadow: 0 1px 14px rgba(0,0,0,0.55);
}
body.light .hero__title,
body.light .hero__tag {
  color: #F4F2EC; text-shadow: 0 2px 28px rgba(0,0,0,0.35);
}
body.light .hero__meta { color: rgba(244,242,236,0.82); }
body.light .hero__meta .hero__scroll { color: #F4F2EC; }

/* DoF scale ticks read against light */
body.light .dof__rail { background: var(--graphite); }

/* plate frame: a slide mount on the table */
body.light .plate__frame {
  background: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.8), 0 18px 40px rgba(30,40,60,0.12);
}
body.light .plate__img { filter: contrast(1.02) saturate(1.02); }
body.light .plate:hover .plate__img { filter: contrast(1.05) saturate(1.06) brightness(1.02); }

/* keep the lightbox a dark loupe so color frames pop (intentional, both themes) */
