/* ============================================================
   JJ Photography — shared editorial styles
   B&W magazine-style with mixed scale, generous whitespace.
   ============================================================ */

:root {
  --ink: #0a0a0a;
  --paper: #f4f2ed;
  --muted: #8a857c;
  --hair: #1c1c1c;
  --rule: rgba(10, 10, 10, 0.18);

  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-body: "Geist", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --pad-x: clamp(20px, 4vw, 56px);
  --pad-y: clamp(20px, 3vw, 36px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.dark {
  background: var(--ink);
  color: var(--paper);
  --rule: rgba(244, 242, 237, 0.18);
  --muted: #6a655c;
}

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

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

/* ------------------------------------------------------------
   Top nav — centered monogram with links split left/right
------------------------------------------------------------ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px var(--pad-x);
  background: linear-gradient(180deg, var(--paper) 60%, transparent);
  pointer-events: none;
  transition: padding 0.35s ease;
}
body.dark .topbar {
  background: linear-gradient(180deg, var(--ink) 60%, transparent);
}
.topbar > * { pointer-events: auto; }

.nav-links {
  display: flex;
  gap: clamp(18px, 3vw, 40px);
  font-family: var(--font-mono);
  font-size: clamp(11px, 2.8vw, 26px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav-links.right { justify-content: flex-end; }
.nav-links a {
  position: relative;
  padding: 6px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.7, 0, 0.2, 1);
}
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }
.nav-links a.is-active { font-weight: 500; }

.monogram {
  height: 224px;
  width: auto;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  transition: opacity 0.3s;
}
.monogram img {
  height: 100%;
  width: auto;
  display: block;
}
body.dark .monogram img {
  filter: invert(1);
}
.monogram:hover { opacity: 0.7; }

/* ------------------------------------------------------------
   Footer
------------------------------------------------------------ */
.foot {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 24px;
  padding: 80px var(--pad-x) 28px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-top: 1px solid var(--rule);
  margin-top: 120px;
}
.foot .yr {
  display: flex;
  justify-content: center;
  align-items: center;
}
.foot .yr img {
  height: 120px;
  width: auto;
  display: block;
}
body.dark .foot .yr img { filter: invert(1); }
.foot .right { text-align: right; }

/* ------------------------------------------------------------
   Type helpers
------------------------------------------------------------ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.display .it { font-style: italic; }

.section-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
}

/* image-slot defaults */
image-slot {
  background: #e8e5de;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
}
body.dark image-slot {
  background: #1a1a1a;
  color: #555;
}

/* tiny utility */
.hairline { height: 1px; background: var(--rule); width: 100%; }
.spacer-l { height: clamp(80px, 14vh, 180px); }
.spacer-m { height: clamp(48px, 8vh, 96px); }

/* Page enter fade */
.page-enter {
  animation: pageIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Custom cursor — used on hover-preview lists */
.cursor-img {
  position: fixed;
  pointer-events: none;
  width: 320px;
  height: 420px;
  z-index: 80;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.96);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}
.cursor-img.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.cursor-img image-slot {
  width: 100%;
  height: 100%;
}

/* Footer contact block */
html { scroll-behavior: smooth; }
.foot .contact-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.foot .contact-block::before {
  content: "Contact";
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot .contact-block a {
  font-size: 20px;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.foot .foot-mark {
  height: 48px;
  width: auto;
  display: block;
}
body.dark .foot .foot-mark { filter: invert(1); }
.foot-mark { display: none; }

@media (max-width: 720px) {
  .monogram { height: 100px; }
  .foot {
    grid-template-columns: 1fr;
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
  }
  .foot .yr { justify-content: center; }
  .foot .right { text-align: center; }
  .foot .contact-block { align-items: center; text-align: center; }
}
