:root{
  --bg-warm: #d4cbc2;
  --ink: #121212;
  --muted: rgba(18,18,18,.68);
  --dark: #121212;
  --dark-2: #0f0f0f;
  --light: #f3f1ee;
  --radius: 28px;
  --shadow: 0 18px 50px rgba(0,0,0,.18);
}

*{ box-sizing: border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img{
  width:100%;
  height:100%;
  display:block;
  object-fit: cover;
}

.wrap{
  width:min(1100px, 92vw);
  margin:0 auto;
}

/* ---------- GLOBAL HEADER ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18,18,18,.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.site-nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.site-logo{
  font-size: 15px;
  letter-spacing: .12em;
  text-decoration: none;
  color: var(--light);
  opacity: .85;
}

.site-links{
  display: flex;
  gap: 28px;
}

.site-links a{
  font-size: 12px;
  text-decoration: none;
  color: var(--light);
  opacity: .65;
  transition: opacity .15s ease;
}

.site-links a:hover{ opacity: 1; }

@media (max-width: 720px){
  .site-links{ gap: 18px; }
}

/* ---------- HERO ---------- */
.hero{
  background: var(--bg-warm);
  padding: 56px 0 64px;
}

.hero-grid{
  display:grid;
  grid-template-columns: 1.1fr 1fr 0.95fr;
  gap: 40px;
  align-items: start;
}

.hero-title{
  font-size: clamp(42px, 5vw, 64px);
  line-height: 0.98;
  margin: 0 0 18px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.hero-copy{ padding-top: 8px; }

.lead{
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(18,18,18,.7);
  max-width: 32ch;
}

.sublead{
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(18,18,18,.65);
  max-width: 44ch;
  margin-top: 210px;
}

.tiny-bottom{
  margin-top: 180px;
  font-size: 12px;
  color: rgba(18,18,18,.8);
}

.dot{
  font-size: 10px;
  margin-left: 8px;
  opacity: .75;
}

.hero-right{
  display:flex;
  justify-content: flex-end;
}

.portrait-card{
  width: min(320px, 100%);
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  background: rgba(255,255,255,.15);
}

/* ---------- BUTTONS ---------- */
.pill{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(18,18,18,.92);
  color: #fff;
  text-decoration:none;
  font-size: 12px;
  letter-spacing: .01em;
  width: fit-content;
  box-shadow: 0 10px 20px rgba(0,0,0,.12);
  transition: transform .15s ease, filter .15s ease, opacity .15s ease;
}

.pill:hover{ transform: translateY(-1px); }
.arrow{ opacity: .9; }

.pill-light{
  background: rgba(255,255,255,.12);
  color: var(--light);
  box-shadow: none;
  border: 1px solid rgba(255,255,255,.12);
}

/* ---------- COLLECTIONS (requires .wrap.collections-grid in HTML) ---------- */
.collections{
  background: var(--dark);
  color: var(--light);
  padding: 120px 0;
}

/* put this on: <div class="wrap collections-grid"> */
.collections-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 80px;
  align-items: start;
}

.collection{ width: 100%; }

.collection .work-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
}

.collection .work-left{ max-width: 44ch; }

/* ---------- WORK TEXT STYLES (inside each collection) ---------- */
.work-title{
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
  opacity: .9;
}

.meta{
  font-size: 10px;
  letter-spacing: .08em;
  opacity: .65;
  margin-bottom: 16px;
}

.work-subtitle{
  font-size: 14px;
  margin: 0 0 10px;
  font-weight: 600;
}

.work-text{
  margin: 0 0 18px;
  font-size: 11px;
  line-height: 1.7;
  opacity: .72;
  max-width: 44ch;
}

.mini-shot-link{
  display: block;
  width: fit-content;
}

.mini-shot{
  margin-top: 26px;
  width: 210px;
  aspect-ratio: 4/3;
  border-radius: 18px;
  overflow:hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  opacity: .95;
  transition: transform .15s ease, filter .15s ease;
}

.mini-shot-link:hover .mini-shot{
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* ---------- CASE STUDY PAGES ---------- */
.case{
  background: var(--dark);
  color: var(--light);
}

.case a{ color: inherit; }

.case-top{
  padding: 26px 0 18px;
  position: sticky;
  top: 0;
  background: rgba(18,18,18,.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  z-index: 20;
}

.case-topbar{
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 18px;
  align-items: center;
}

.case-back{
  text-decoration: none;
  font-size: 12px;
  opacity: .82;
}
.case-back:hover{ opacity: 1; }

.case-kicker{
  font-size: 10px;
  letter-spacing: .14em;
  opacity: .6;
  margin-bottom: 6px;
}

.case-title{
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.case-meta{
  text-align: right;
  font-size: 11px;
  opacity: .72;
  line-height: 1.5;
}

.case-intro{ padding: 44px 0 18px; }

.case-introgrid{
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 34px;
  align-items: start;
}

.case-lead{
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.7;
  max-width: 54ch;
  opacity: .9;
}

.case-sub{
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  max-width: 62ch;
  opacity: .68;
}

.case-hero{
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  background: var(--dark-2);
  aspect-ratio: 16 / 10;
}

.case-gallery{ padding: 28px 0 90px; }

.gallery-head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 18px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 18px;
}

.gallery-title{
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  opacity: .9;
}

.gallery-note{
  margin: 0;
  font-size: 15px;
  opacity: .55;
}

/* Gallery grid */
.grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.tile{
  display: block;
  border-radius: 18px;
  overflow: hidden;
  background: var(--dark-2);
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  aspect-ratio: 4 / 3;
  outline: 1px solid rgba(255,255,255,.06);
  transition: transform .18s ease, outline-color .18s ease, filter .18s ease;
}

.tile img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
}

.tile:hover{
  transform: translateY(-2px);
  outline-color: rgba(255,255,255,.14);
  filter: brightness(1.03);
}

/* ---------- FOOTER (same everywhere) ---------- */
.case-footer{
  background: var(--dark);
  color: var(--light);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 22px 0;
}

.case-footer a{
  color: inherit;
  text-decoration: none;
  opacity: .82;
}
.case-footer a:hover{ opacity: 1; }

.case-foot{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  opacity: .78;
}

/* ---------- IMAGE VIEWER ---------- */
.viewer{
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 18px;
  padding: 26px 0 40px;
}

.viewer-frame{
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #0f0f0f;
  box-shadow: 0 18px 70px rgba(0,0,0,.6);
  outline: 1px solid rgba(255,255,255,.08);
  position: relative;
  cursor: zoom-in;
}

.viewer-frame img{
  width: 100%;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  transition: transform .18s ease;
  will-change: transform;
}

.nav-btn{
  height: 48px;
  width: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: var(--light);
  cursor: pointer;
  opacity: .85;
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
}

.nav-btn:hover{
  transform: translateY(-1px);
  opacity: 1;
  background: rgba(255,255,255,.12);
}

.viewer-foot{
  display:flex;
  justify-content: center;
  gap: 12px;
  padding: 0 0 36px;
}

/* viewer should own touch gestures */
.viewer-frame{
  touch-action: pan-x;          /* allow horizontal swipes, block double-tap/pinch zoom */
  -webkit-user-select: none;
  user-select: none;
}

/* zoom state */
.viewer-frame.is-zoomed{ cursor: grab; }
.viewer-frame.is-zoomed:active{ cursor: grabbing; }
.viewer-frame.is-zoomed img{ transform: scale(2); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px){
  .hero-grid{
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .hero-right{ justify-content: flex-start; }
  .sublead{ margin-top: 18px; }
  .tiny-bottom{ margin-top: 22px; }

  .collections{ padding: 80px 0; }
  .collections-grid{
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .case-topbar{
    grid-template-columns: 1fr;
    text-align: left;
  }
  .case-meta{ text-align: left; }

  .case-introgrid{
    grid-template-columns: 1fr;
  }

  .grid{
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .tile{ aspect-ratio: 16 / 10; }

  .viewer{
    grid-template-columns: 1fr;
    padding: 18px 0 24px;
  }
  .nav-btn{ display:none; }
  .viewer-foot{ padding-bottom: 26px; }
}

@media (max-width: 980px){
  .collections{
    grid-template-columns: 1fr;
    justify-items: center;   /* ⬅️ centers each collection */
  }

  .collection{
    max-width: 520px;        /* keeps a readable column width */
    width: 100%;
  }

  .collections .work-left{
    margin: 0 auto;          /* centers inner content */
  }
}
@media (max-width: 980px){
  .mini-shot-link{
    margin-left: auto;
    margin-right: auto;
  }

  .pill{
    margin-left: auto;
    margin-right: auto;
  }
}

