/* Flowform v3 — case-study + all-works overlays (light theme). Markup rendered by assets/work.js */

html.ffw-locked, html.ffw-locked body { overflow: hidden; }

.ffw-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #ffffff;
  color: #0b0b0c;
  opacity: 0;
  transition: opacity 0.24s ease;
}
.ffw-overlay.is-open { opacity: 1; }
.ffw-overlay[hidden] { display: none; }

.ffw-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.ffw-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(20px, 5vw, 80px);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e7e7ea;
}
.ffw-tag {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8a92;
}
.ffw-close {
  background: none;
  border: 1px solid #0b0b0c;
  border-radius: 999px;
  padding: 10px 18px;
  color: #0b0b0c;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.ffw-close:hover { background: #0b0b0c; color: #fff; }
.ffw-close span { color: inherit; opacity: 0.5; margin-left: 6px; font-size: 12px; }

/* ---------- case study ---------- */
.ffw-case {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 80px) clamp(80px, 10vw, 140px);
  text-align: left;
}
.ffw-title {
  margin: 0 0 14px;
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  font-size: clamp(2.6rem, 6.5vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.ffw-casemeta {
  margin: 0 0 clamp(32px, 5vw, 56px);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8a92;
}
.ffw-about {
  margin: 0 0 clamp(32px, 5vw, 56px);
  max-width: 62ch;
  color: #4a4a50;
  font-size: 18px;
  line-height: 1.6;
}

.ffw-story { margin-bottom: clamp(48px, 6vw, 88px); }
.ffw-section {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px 48px;
  padding: clamp(24px, 3vw, 36px) 0;
  border-top: 1px solid #e7e7ea;
}
.ffw-section:last-child { border-bottom: 1px solid #e7e7ea; }
.ffw-label {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8a92;
}
.ffw-body p { margin: 0 0 16px; max-width: 62ch; font-size: 18px; line-height: 1.6; color: #0b0b0c; }
.ffw-body p:last-child { margin-bottom: 0; }
.ffw-skills { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ffw-skills li { padding: 8px 14px; border: 1px solid #e7e7ea; border-radius: 999px; font-size: 14px; color: #4a4a50; }
@media (max-width: 720px) { .ffw-section { grid-template-columns: 1fr; gap: 10px; } }

.ffw-shots { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 40px); }
.ffw-shot { margin: 0; border-radius: 6px; overflow: hidden; background: #f2f2f4; }
.ffw-shot img { width: 100%; display: block; }
.ffw-shot--video { aspect-ratio: 16 / 9; }
.ffw-shot--video iframe { display: block; width: 100%; height: 100%; border: 0; }

.ffw-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(48px, 7vw, 88px);
  padding-top: 28px;
  border-top: 1px solid #e7e7ea;
}
.ffw-nav { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 6px; }
.ffw-nav span { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #8a8a92; }
.ffw-nav strong { font-family: 'Inter Tight', 'Inter', system-ui, sans-serif; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.ffw-nav--next { text-align: right; align-items: flex-end; }
.ffw-nav:hover strong { text-decoration: underline; }

/* ---------- all-works gallery ---------- */
.ffw-gallery-body {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 80px) clamp(80px, 10vw, 140px);
}
.ffw-gallery-title {
  margin: 0 0 clamp(32px, 5vw, 64px);
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  font-size: clamp(2.6rem, 6.5vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.ffw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
@media (max-width: 991px) { .ffw-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .ffw-grid { grid-template-columns: 1fr; } }

.ffw-item { display: block; text-decoration: none; color: inherit; }
.ffw-media { display: block; overflow: hidden; aspect-ratio: 1 / 1; border-radius: 6px; background: #f2f2f4; }
.ffw-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s cubic-bezier(.2,.8,.2,1); }
.ffw-item:hover .ffw-media img { transform: scale(1.03); }
.ffw-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 12px; }
.ffw-name { font-family: 'Inter Tight', 'Inter', system-ui, sans-serif; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; }
.ffw-meta { font-size: 13px; color: #8a8a92; text-align: right; }
@media (max-width: 600px) { .ffw-caption { flex-direction: column; gap: 4px; } .ffw-meta { text-align: left; } }

@media (prefers-reduced-motion: reduce) {
  .ffw-overlay, .ffw-media img { transition: none; }
}
