/* PAGE HEADER */
.work-header { padding: 140px 2rem 80px; border-bottom: 1px solid var(--border); }
.work-header-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 32px; }
.work-header-left {}
.work-label { font-family: var(--sans); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.work-title { font-family: var(--serif); font-size: clamp(48px, 7vw, 96px); font-weight: 300; line-height: 0.95; letter-spacing: -0.025em; }
.work-title em { font-style: italic; color: var(--accent); }
.work-count { display: none; }

/* FILTERS */
.work-filters { max-width: 1280px; margin: 0 auto; padding: 32px 2rem; display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--border); }
.work-filter {
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 7px 18px; border: 1px solid var(--border); background: none;
  color: var(--muted); cursor: pointer; transition: all 0.2s;
}
.work-filter:hover { border-color: var(--accent); color: var(--accent); }
.work-filter.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.work-filter[data-filter="Websites"].active { background: #539e96; border-color: #539e96; color: #fff; }
.work-filter[data-filter="Branding"].active { background: #fffd9c; border-color: #fffd9c; color: #050505; }
.work-filter[data-filter="Social Media"].active { background: #ffdfe8; border-color: #ffdfe8; color: #050505; }

/* GRID */
.work-grid { max-width: 1280px; margin: 0 auto; padding: 64px 2rem 120px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 80px 48px; }
@media (max-width: 900px) { .work-grid { grid-template-columns: 1fr; gap: 64px; } }

/* PROJECT CARD */
.project-card { cursor: pointer; }

.pc-media {
  position: relative; overflow: hidden; aspect-ratio: 16/10;
  background: var(--dark); margin-bottom: 24px;
}
.pc-thumb {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: left top; transition: opacity 0.5s;
}
.pc-video {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: left top; opacity: 0; transition: opacity 0.5s;
}
.pc-media--social .pc-thumb { transform: scale(1); transition: transform 1.4s cubic-bezier(0.22,1,0.36,1); }
.project-card:hover .pc-media--social .pc-thumb { transform: scale(1.12); }
.project-card.playing .pc-video { opacity: 1; }
.pc-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(5,5,5,0.5) 0%, transparent 50%);
  opacity: 0; transition: opacity 0.4s;
  display: flex; align-items: flex-end; padding: 24px;
}
.project-card:hover .pc-overlay { opacity: 1; }
.pc-overlay-cta {
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: #fff;
}
.pc-num { display: none; }
.pc-services { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pc-service {
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); pointer-events: none;
}
.pc-service + .pc-service::before { content: '·'; margin-right: 8px; color: var(--border); }
.pc-title { font-family: var(--serif); font-size: clamp(28px, 3.5vw, 40px); font-weight: 300; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 10px; transition: color 0.2s; }
.project-card:hover .pc-title { color: var(--accent); }
.pc-desc { font-family: var(--sans); font-size: 13px; line-height: 1.7; color: var(--muted); max-width: 400px; }

/* CASE STUDY MODAL */
.modal {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100vw);
  background: var(--cream); overflow-y: auto; z-index: 101;
  transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.22,1,0.36,1);
}
.modal.open { transform: translateX(0); }

.modal-video-wrap { position: relative; background: var(--dark); }
.modal-video-wrap.modal-has-mosaic { aspect-ratio: 16/10; }
.modal-video-wrap video { width: 100%; height: auto; display: block; }
.modal-video-wrap img { width: 100%; height: 100%; object-fit: cover; }

.modal-body { padding: 48px; }
@media (max-width: 600px) { .modal-body { padding: 32px 24px; } }
.modal-close-bottom {
  display: none;
  width: 100%;
  margin-top: 32px;
  padding: 14px;
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.modal-close-bottom:hover { color: var(--dark); border-color: var(--dark); }
@media (max-width: 1024px) {
  .modal-close-bottom { display: block; }
  .pc-overlay { opacity: 1; }
  /* Default sg layout */
  .project-card.in-view .sg-crop:nth-child(1) img { transform: translate(-4px, -5px) scale(1.1); }
  .project-card.in-view .sg-crop:nth-child(2) img { transform: translate(5px,  -4px) scale(1.1); }
  .project-card.in-view .sg-crop:nth-child(3) img { transform: translate(4px,   5px) scale(1.1); }
  .project-card.in-view .sg-crop:nth-child(4) img { transform: translate(-3px,  4px) scale(1.1); }
  .project-card.in-view .sg-crop:nth-child(5) img { transform: translate(4px,  -3px) scale(1.1); }
  /* PNG layout */
  .project-card.in-view .sg-mosaic--png-layout .sg-crop:nth-child(1) img { transform: translate(-5px, -5px) scale(1.1); }
  .project-card.in-view .sg-mosaic--png-layout .sg-crop:nth-child(2) img { transform: translate( 5px, -5px) scale(1.1); }
  .project-card.in-view .sg-mosaic--png-layout .sg-crop:nth-child(3) img { transform: translate(-5px,  5px) scale(1.1); }
  .project-card.in-view .sg-mosaic--png-layout .sg-crop:nth-child(4) img { transform: translate( 5px,  5px) scale(1.1); }
  /* PV layout */
  .project-card.in-view .sg-mosaic--pv-layout .sg-crop:nth-child(1) img { transform: translate(-4px, -4px) scale(1.1); }
  .project-card.in-view .sg-mosaic--pv-layout .sg-crop:nth-child(2) img { transform: translate( 4px, -4px) scale(1.1); }
  .project-card.in-view .sg-mosaic--pv-layout .sg-crop:nth-child(3) img { transform: translate(-4px,  4px) scale(1.1); }
  .project-card.in-view .sg-mosaic--pv-layout .sg-crop:nth-child(4) img { transform: translate( 0px,  4px) scale(1.1); }
  .project-card.in-view .sg-mosaic--pv-layout .sg-crop:nth-child(5) img { transform: translate( 4px,  4px) scale(1.1); }
  /* Amigone layout */
  .project-card.in-view .sg-mosaic--amigone-layout .sg-crop:nth-child(1) img { transform: translateY(-4px) scale(1.1); }
  .project-card.in-view .sg-mosaic--amigone-layout .sg-crop:nth-child(2) img { transform: translate(-4px, 4px) scale(1.1); }
  .project-card.in-view .sg-mosaic--amigone-layout .sg-crop:nth-child(3) img { transform: translateY(4px) scale(1.1); }
  .project-card.in-view .sg-mosaic--amigone-layout .sg-crop:nth-child(4) img { transform: translate(4px, 4px) scale(1.1); }
  .project-card.in-view .pc-media--social .pc-thumb { transform: scale(1.12); }
  /* Footer centering on mobile */
  .footer-inner {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 24px;
  }
  .footer-links { justify-content: center; width: 100%; }
  .footer-center { width: 100%; align-items: center; }
  .footer-nl-label, .footer-copy { text-align: center; width: 100%; }
  .footer-nl-form { margin: 0 auto; }
}

.modal-close-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.modal-close-btn { background: none; border: none; cursor: pointer; font-family: var(--sans); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); transition: color 0.2s; }
.modal-close-btn:hover { color: var(--dark); }
.modal-live-link { font-family: var(--sans); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 2px; transition: opacity 0.2s; }
.modal-live-link:hover { opacity: 0.7; }

.modal-services { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.modal-service { font-family: var(--sans); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.modal-service + .modal-service::before { content: '·'; margin-right: 8px; color: var(--border); }

.modal-client { font-family: var(--serif); font-size: clamp(32px, 5vw, 52px); font-weight: 300; line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 6px; }
.modal-location { font-family: var(--sans); font-size: 12px; color: var(--muted); letter-spacing: 0.06em; margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }

.modal-section-label { font-family: var(--sans); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.modal-section-text { font-family: var(--sans); font-size: 14px; line-height: 1.8; color: #444; margin-bottom: 40px; }

.modal-quote { border-left: 2px solid var(--accent); padding-left: 24px; margin-bottom: 40px; }
.modal-quote blockquote { font-family: var(--serif); font-size: clamp(20px, 2.5vw, 26px); font-weight: 300; line-height: 1.4; color: var(--dark); margin-bottom: 12px; }
.modal-quote cite { font-family: var(--sans); font-size: 12px; color: var(--muted); font-style: normal; }

.modal-cta-wrap { padding-top: 32px; border-top: 1px solid var(--border); text-align: center; }
.modal-cta-label { font-family: var(--serif); font-size: 22px; font-weight: 300; margin-bottom: 20px; }
.modal-cta-btn { font-family: var(--sans); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; background: var(--accent); color: #fff; border: none; padding: 14px 32px; cursor: pointer; transition: background 0.2s; }
.modal-cta-btn:hover { background: #427d77; }

/* EMPTY STATE */
.work-empty { grid-column: 1/-1; padding: 80px 0; text-align: center; font-family: var(--serif); font-size: 28px; font-weight: 300; color: var(--muted); }

/* STYLE GUIDE MOSAIC */
.sg-mosaic {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: 44fr 33fr 23fr;
  grid-template-rows: 55fr 45fr;
  gap: 1px;
  background: #d8d8d8;
}
.sg-crop { overflow: hidden; }
.sg-crop img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.sg-crop:nth-child(1) { grid-row: 1 / 3; }

/* Default layout hover (tall left column) */
.project-card:hover .sg-crop:nth-child(1) img { transform: translate(-4px, -5px) scale(1.05); }
.project-card:hover .sg-crop:nth-child(2) img { transform: translate(5px,  -4px) scale(1.05); }
.project-card:hover .sg-crop:nth-child(3) img { transform: translate(4px,   5px) scale(1.05); }
.project-card:hover .sg-crop:nth-child(4) img { transform: translate(-3px,  4px) scale(1.05); }
.project-card:hover .sg-crop:nth-child(5) img { transform: translate(4px,  -3px) scale(1.05); }

/* PNG-layout: 2×2 grid matching the five-elements PNG */
.sg-mosaic--png-layout {
  grid-template-columns: 43fr 57fr;
  grid-template-rows: 49fr 51fr;
}
.sg-mosaic--png-layout .sg-crop:nth-child(1) { grid-column: 1; grid-row: 1; }
.sg-mosaic--png-layout .sg-crop:nth-child(2) { grid-column: 2; grid-row: 1; }
.sg-mosaic--png-layout .sg-crop:nth-child(3) { grid-column: 1; grid-row: 2; }
.sg-mosaic--png-layout .sg-crop:nth-child(4) { grid-column: 2; grid-row: 2; }

/* PNG-layout hover: each corner drifts outward */
.project-card:hover .sg-mosaic--png-layout .sg-crop:nth-child(1) img { transform: translate(-5px, -5px) scale(1.06); }
.project-card:hover .sg-mosaic--png-layout .sg-crop:nth-child(2) img { transform: translate( 5px, -5px) scale(1.05); }
.project-card:hover .sg-mosaic--png-layout .sg-crop:nth-child(3) img { transform: translate(-5px,  5px) scale(1.05); }
.project-card:hover .sg-mosaic--png-layout .sg-crop:nth-child(4) img { transform: translate( 5px,  5px) scale(1.05); }

/* PV-layout: 3-col 2-row grid from brand guide last page */
.sg-mosaic--pv-layout {
  grid-template-columns: 705fr 908fr 1387fr;
  grid-template-rows: 878fr 810fr;
}
.sg-mosaic--pv-layout .sg-crop:nth-child(1) { grid-column: 1 / 3; grid-row: 1; }
.sg-mosaic--pv-layout .sg-crop:nth-child(2) { grid-column: 3;     grid-row: 1; }
.sg-mosaic--pv-layout .sg-crop:nth-child(3) { grid-column: 1;     grid-row: 2; }
.sg-mosaic--pv-layout .sg-crop:nth-child(4) { grid-column: 2;     grid-row: 2; }
.sg-mosaic--pv-layout .sg-crop:nth-child(5) { grid-column: 3;     grid-row: 2; }

/* PV-layout hover */
.project-card:hover .sg-mosaic--pv-layout .sg-crop:nth-child(1) img { transform: translate(-4px, -4px) scale(1.06); }
.project-card:hover .sg-mosaic--pv-layout .sg-crop:nth-child(2) img { transform: translate( 4px, -4px) scale(1.05); }
.project-card:hover .sg-mosaic--pv-layout .sg-crop:nth-child(3) img { transform: translate(-4px,  4px) scale(1.05); }
.project-card:hover .sg-mosaic--pv-layout .sg-crop:nth-child(4) img { transform: translate( 0px,  4px) scale(1.05); }
.project-card:hover .sg-mosaic--pv-layout .sg-crop:nth-child(5) img { transform: translate( 4px,  4px) scale(1.05); }

/* Amigone layout: person wide top, three WNY images bottom */
.sg-mosaic--amigone-layout {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 40fr 60fr;
}
.sg-mosaic--amigone-layout .sg-crop:nth-child(1) { grid-column: 1 / 4; grid-row: 1; }
.sg-mosaic--amigone-layout .sg-crop:nth-child(2) { grid-column: 1;     grid-row: 2; }
.sg-mosaic--amigone-layout .sg-crop:nth-child(3) { grid-column: 2;     grid-row: 2; }
.sg-mosaic--amigone-layout .sg-crop:nth-child(4) { grid-column: 3;     grid-row: 2; }
.sg-mosaic--amigone-layout .sg-crop:nth-child(4) img { object-position: right center; }

/* Amigone hover */
.project-card:hover .sg-mosaic--amigone-layout .sg-crop:nth-child(1) img { transform: translateY(-4px) scale(1.05); }
.project-card:hover .sg-mosaic--amigone-layout .sg-crop:nth-child(2) img { transform: translate(-4px, 4px) scale(1.06); }
.project-card:hover .sg-mosaic--amigone-layout .sg-crop:nth-child(3) img { transform: translateY(4px) scale(1.05); }
.project-card:hover .sg-mosaic--amigone-layout .sg-crop:nth-child(4) img { transform: translate(4px, 4px) scale(1.05); }

/* SOCIAL CARD — full-bleed hero + handle overlay */
.pc-social-tag {
  position: absolute; bottom: 20px; left: 24px; z-index: 2;
  font-family: var(--serif); font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 300; color: #fff; letter-spacing: -0.01em;
  text-shadow: 0 1px 10px rgba(0,0,0,0.45);
  pointer-events: none;
}
/* EMAIL DISPLAY — side-by-side email columns, natural height */
.modal-video-wrap--email { aspect-ratio: unset; background: #f4f0eb; padding: 32px 24px; }
.email-display { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.email-col { display: flex; flex-direction: column; gap: 0; box-shadow: 0 4px 24px rgba(0,0,0,0.12); border-radius: 2px; overflow: hidden; }
.email-col img { width: 100%; height: auto; display: block; }

/* INSTAGRAM MOSAIC — used inside social modal only */
.ig-mosaic {
  position: absolute; inset: 0;
  display: grid; gap: 1px; background: #d8d8d8;
}
.ig-mosaic--3x2 { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.ig-mosaic--3x1 { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr; }
.ig-mosaic--2x2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.ig-mosaic .ig-crop { overflow: hidden; }
.ig-mosaic .ig-crop img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* COPY CARD — typographic treatment for text-based work */
.pc-copy-card {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  justify-content: flex-end; padding: 28px 24px;
}
.pc-copy-label {
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 12px;
}
.pc-copy-words {
  font-family: var(--serif); font-size: clamp(19px, 2.2vw, 28px);
  font-weight: 300; color: #fff; line-height: 1.28;
}
/* COPY MODAL DISPLAY — typographic header in modal media area */
.copy-modal-display {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  justify-content: flex-end; padding: 40px 48px;
}
.copy-modal-display .pc-copy-label { font-size: 11px; margin-bottom: 14px; }
.copy-modal-display .pc-copy-words { font-size: clamp(26px, 3vw, 40px); }
/* COPY ENTRIES in modal body */
.copy-entries { display: flex; flex-direction: column; gap: 28px; margin-top: 8px; }
.copy-entry-name {
  font-family: var(--sans); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.copy-entry-body {
  font-family: var(--serif); font-size: 19px; font-weight: 300;
  line-height: 1.65; color: var(--dark); white-space: pre-line;
}

/* PRINT IMAGES */
.modal-print { margin-bottom: 40px; }
.modal-print-label { font-family: var(--sans); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.modal-print-grid { display: grid; grid-template-columns: 2fr 3fr; gap: 8px; }
.modal-print-cell { overflow: hidden; border-radius: 2px; box-shadow: 0 6px 24px rgba(0,0,0,0.12); height: 300px; }
.modal-print-cell img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transition: transform 0.5s ease; }
.modal-print-cell img:hover { transform: scale(1.03); }
/* Stacked cards */
.modal-print-stack { position: relative; width: 100%; padding-bottom: calc(57.15% + 16px); cursor: pointer; }
.modal-print-stack-item { position: absolute; width: calc(100% - 16px); border-radius: 2px; transition: top 0.45s cubic-bezier(0.22,1,0.36,1), left 0.45s cubic-bezier(0.22,1,0.36,1), box-shadow 0.4s ease; }
.modal-print-stack-item img { width: 100%; height: auto; display: block; border-radius: 2px; }
.modal-print-stack-item:first-child { top: 0; left: 0; z-index: 2; box-shadow: 0 8px 28px rgba(0,0,0,0.15); }
.modal-print-stack-item:last-child  { top: 12px; left: 12px; z-index: 1; box-shadow: 0 3px 12px rgba(0,0,0,0.08); }
.modal-print-stack.flipped .modal-print-stack-item:first-child { top: 12px; left: 12px; z-index: 1; box-shadow: 0 3px 12px rgba(0,0,0,0.08); }
.modal-print-stack.flipped .modal-print-stack-item:last-child  { top: 0; left: 0; z-index: 2; box-shadow: 0 8px 28px rgba(0,0,0,0.15); }
.modal-print-flip-hint { font-family: var(--sans); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }

/* Footer newsletter form variant used on portfolio/blog */
.footer-nl-label { font-family: var(--sans); font-size: 13px; line-height: 1.7; }
.footer-nl-form { display: flex; width: 280px; border: 1px solid var(--border); }
.footer-nl-form input { flex: 1; padding: 10px 14px; font-family: var(--sans); font-size: 13px; border: none; outline: none; background: transparent; color: var(--dark); }
.footer-nl-form button { padding: 10px 16px; font-family: var(--sans); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; background: var(--dark); color: var(--cream); border: none; cursor: pointer; }
