/* ============================================
   JCA — PROJECT DETAIL PAGE STYLES
   Extends the editorial language of the homepage
   ============================================ */

:root {
  --bone:      #F2EEE5;
  --bone-2:    #EAE4D6;
  --ink:       #141312;
  --ink-2:     #2A2826;
  --muted:     #6E6A62;
  --rule:      #C9C2B2;
  --ochre:     #A8702A;
  --ochre-2:   #8E5C20;

  --max:       1480px;
  --max-narrow: 1080px;
  --gutter:    clamp(20px, 4vw, 56px);

  --serif:     'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans:      'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --ease:      cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 1.05vw, 1.075rem);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--ink); color: var(--bone); }

/* ============================================
   NAVIGATION (mirrors homepage)
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 22px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background .35s var(--ease), backdrop-filter .35s var(--ease), padding .35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
  background: rgba(242, 238, 229, 0.86);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--rule);
}
.nav.is-scrolled { padding-top: 14px; padding-bottom: 14px; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  font-variation-settings: 'opsz' 60, 'SOFT' 50;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--bone-2);
  box-shadow: 0 0 0 1px rgba(20,19,18,.08);
}
.brand-text small {
  display: block;
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: -2px;
}
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-links a {
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  gap: 4px;
  flex-direction: column;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 1px;
  background: var(--ink);
  transition: transform .35s var(--ease), opacity .25s var(--ease);
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(2.5px) rotate(45deg); }
  .nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-2.5px) rotate(-45deg); }
}

.nav-mobile {
  position: fixed;
  inset: 0;
  background: var(--bone);
  z-index: 40;
  padding: 100px var(--gutter) var(--gutter);
  display: flex; flex-direction: column;
  gap: 18px;
  transform: translateY(-100%);
  transition: transform .5s var(--ease);
}
.nav-mobile.is-open { transform: translateY(0); }
.nav-mobile a {
  font-family: var(--serif);
  font-size: clamp(2rem, 9vw, 3.5rem);
  font-weight: 400;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  letter-spacing: -0.02em;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}
.nav-mobile-meta {
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex; flex-direction: column; gap: 6px;
}

/* ============================================
   PROJECT HEAD
   ============================================ */
.project-head {
  padding: 140px var(--gutter) 0;
  max-width: var(--max);
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 56px;
  transition: color .25s var(--ease), gap .3s var(--ease);
}
.back-link:hover { color: var(--ink); gap: 14px; }
.back-link svg { width: 14px; height: 14px; }

.project-head-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: end;
  margin-bottom: 64px;
}
@media (min-width: 880px) {
  .project-head-grid { grid-template-columns: 1.4fr 1fr; gap: 80px; }
}

.project-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}
.project-eyebrow::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--muted);
}

.project-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0;
  font-variation-settings: 'opsz' 144, 'SOFT' 20;
}
.project-title em {
  font-style: italic;
  color: var(--ochre);
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}

.project-lede {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  font-variation-settings: 'opsz' 36, 'SOFT' 50;
  color: var(--ink-2);
  margin: 0;
}

/* Meta strip */
.project-meta-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 80px;
}
@media (min-width: 760px) {
  .project-meta-strip { grid-template-columns: repeat(4, 1fr); gap: 32px; }
}
.meta-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.meta-label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.meta-value {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-variation-settings: 'opsz' 36, 'SOFT' 50;
}

/* ============================================
   HERO IMAGE
   ============================================ */
.project-hero {
  max-width: var(--max);
  margin: 0 auto 100px;
  padding: 0 var(--gutter);
}
.project-hero img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bone-2);
}

/* ============================================
   PHOTO SEQUENCE
   ============================================ */
.gallery {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 120px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 80px 32px;
}

.shot {
  position: relative;
}

/* Width variants */
.shot--full   { grid-column: 1 / -1; }
.shot--wide   { grid-column: 1 / span 9; }
.shot--right  { grid-column: 4 / -1; }
.shot--narrow { grid-column: 1 / span 6; }
.shot--narrow-right { grid-column: 7 / -1; }
.shot--center { grid-column: 3 / span 8; }

@media (max-width: 760px) {
  .gallery { gap: 60px 16px; }
  .shot--full,
  .shot--wide,
  .shot--right,
  .shot--narrow,
  .shot--narrow-right,
  .shot--center { grid-column: 1 / -1; }
}

.shot img {
  width: 100%;
  height: auto;
  background: var(--bone-2);
}

.shot figcaption {
  margin-top: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: baseline;
}
.shot-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--muted);
  font-variation-settings: 'opsz' 36, 'SOFT' 80;
  white-space: nowrap;
}
.shot-cap {
  font-size: 0.92rem;
  color: var(--ink-2);
  margin: 0;
  max-width: 60ch;
  line-height: 1.5;
}

/* Pull-quote interleave option */
.pull-quote {
  grid-column: 2 / -2;
  text-align: center;
  padding: 40px 0;
}
@media (max-width: 760px) {
  .pull-quote { grid-column: 1 / -1; padding: 20px 0; }
}
.pull-quote p {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.3;
  font-weight: 300;
  letter-spacing: -0.015em;
  font-variation-settings: 'opsz' 144, 'SOFT' 40;
  color: var(--ink-2);
  margin: 0;
  max-width: 28ch;
  margin: 0 auto;
}
.pull-quote em {
  font-style: italic;
  color: var(--ochre);
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}

/* ============================================
   NEXT PROJECT
   ============================================ */
.next-project {
  background: var(--ink);
  color: var(--bone);
  padding: clamp(80px, 12vh, 140px) var(--gutter);
  text-align: center;
}
.next-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(242,238,229,.6);
  margin-bottom: 24px;
}
.next-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 36px;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
}
.next-title em {
  font-style: italic;
  color: #D9A55E;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}
.next-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px 16px 28px;
  background: var(--bone);
  color: var(--ink);
  border-radius: 999px;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  transition: transform .3s var(--ease), background .3s var(--ease), gap .3s var(--ease);
}
.next-cta:hover { background: #D9A55E; color: var(--ink); transform: translateY(-2px); gap: 18px; }
.next-cta svg { width: 16px; height: 16px; }

/* ============================================
   FOOTER
   ============================================ */
footer {
  padding: 40px var(--gutter) 32px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--muted);
}
footer a { transition: color .25s var(--ease); }
footer a:hover { color: var(--ink); }

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

.project-eyebrow,
.project-title,
.project-lede,
.project-meta-strip,
.project-hero {
  opacity: 0;
  animation: rise 1s var(--ease) forwards;
}
.project-eyebrow { animation-delay: .1s; }
.project-title { animation-delay: .25s; }
.project-lede { animation-delay: .4s; }
.project-meta-strip { animation-delay: .55s; }
.project-hero { animation-delay: .7s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
