
/* ═══════════════════════════════════════════════════════
   STICKY WORK SHOWCASE (.sw-*)
   Desktop: sticky split — text left, screenshot right
   Mobile: stacked cards with thumbnail
═══════════════════════════════════════════════════════ */

.sw-section {
  position: relative;
  height: 750vh;
  /* Break out of work-grid-section's 48px side padding */
  margin-left: -48px;
  margin-right: -48px;
}
.sw-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  background: var(--cream);
}

/* ── Left Panel ── */
.sw-left {
  position: relative;
  border-right: 1px solid rgba(30,30,47,0.07);
}
.sw-progress-track {
  position: absolute;
  left: 32px;
  top: 18%;
  bottom: 18%;
  width: 1.5px;
  background: rgba(30,30,47,0.1);
  border-radius: 2px;
  z-index: 2;
}
.sw-progress-fill {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 0%;
  background: var(--terra);
  border-radius: 2px;
  transition: height 0.08s linear;
}
.sw-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 64px 0 88px;
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.55s cubic-bezier(0.4,0,0.2,1),
              transform 0.55s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}
.sw-info.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.sw-mobile-thumb { display: none; }
.sw-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.sw-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--terra);
  letter-spacing: 0.04em;
}
.sw-tag {
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--body);
  font-weight: 500;
}
.sw-year-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.72rem;
  color: var(--terra);
  letter-spacing: 0.04em;
  background: rgba(200,84,46,0.08);
  border: 1px solid rgba(200,84,46,0.18);
  padding: 1px 8px;
  border-radius: 3px;
  margin-left: auto;
}
.sw-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 3.2vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 20px;
}
.sw-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--body);
  max-width: 420px;
  margin-bottom: 22px;
}
.sw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
}
.sw-chips span {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(30,30,47,0.06);
  border: 1px solid rgba(30,30,47,0.09);
  padding: 4px 10px;
  border-radius: 4px;
}
.sw-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--terra);
  text-decoration: none;
  letter-spacing: 0.01em;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
  align-self: flex-start;
  transition: gap 0.2s ease, opacity 0.2s;
}
.sw-link:hover { gap: 12px; opacity: 0.8; }

/* ── Right Panel ── */
.sw-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 52px;
  background: var(--ink);
}
.sw-right::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.sw-dots {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 9px;
  z-index: 3;
}
.sw-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.sw-dot.is-active {
  background: var(--terra);
  transform: scale(1.5);
}

/* Browser chrome */
.sw-frame {
  position: relative;
  width: 100%;
  max-width: 600px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.07),
    0 24px 64px rgba(0,0,0,0.5),
    0 4px 16px rgba(0,0,0,0.3);
  background: #1e1e30;
  z-index: 1;
}
.sw-frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #252538;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  position: relative;
}
.sw-frame-bar > span {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sw-frame-bar > span:nth-child(1) { background: #FF5F57; }
.sw-frame-bar > span:nth-child(2) { background: #FEBC2E; }
.sw-frame-bar > span:nth-child(3) { background: #28C840; }
.sw-frame-url {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'SF Mono','Fira Mono',monospace;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.3);
  white-space: nowrap;
  transition: opacity 0.3s;
  pointer-events: none;
}
.sw-frame-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #141420;
}
.sw-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  clip-path: inset(5% 0 0 0);
  transition:
    opacity 0.65s cubic-bezier(0.4,0,0.2,1),
    clip-path 0.65s cubic-bezier(0.4,0,0.2,1);
}
.sw-img.is-active {
  opacity: 1;
  clip-path: inset(0% 0 0 0);
}

/* Parent padding drops from 48px → 28px at ≤1100px */
@media (max-width: 1100px) {
  .sw-section { margin-left: -28px; margin-right: -28px; }
}

/* ═══════════════════════════════════════════════════════
   SCROLL HINT + COUNTER — clarifies that scroll drives content
═══════════════════════════════════════════════════════ */

/* Scroll-wheel hint — sits top-right, fades out after first transition */
.sw-scroll-hint {
  position: absolute;
  top: 32px;
  right: 32px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  background: rgba(30, 30, 47, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.sw-section.is-entering .sw-scroll-hint {
  opacity: 1;
  transform: translateY(0);
}
.sw-section.is-scrolled .sw-scroll-hint {
  opacity: 0;
  transform: translateY(-8px);
}
.sw-scroll-wheel {
  position: relative;
  width: 22px;
  height: 32px;
  border: 1.5px solid rgba(250,247,242,0.55);
  border-radius: 12px;
  flex-shrink: 0;
}
.sw-scroll-dot {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 3px;
  height: 6px;
  background: var(--terra);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: sw-scroll-dot-bounce 1.6s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes sw-scroll-dot-bounce {
  0%   { top: 6px; opacity: 1; }
  40%  { top: 16px; opacity: 1; }
  60%  { top: 16px; opacity: 0; }
  61%  { top: 6px; opacity: 0; }
  100% { top: 6px; opacity: 1; }
}
.sw-scroll-text {
  font-family: 'SF Mono','Fira Mono',monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250,247,242,0.8);
  white-space: nowrap;
}

/* Big project counter — fixed top-left, animates on project change */
.sw-counter {
  position: absolute;
  top: 32px;
  left: 32px;
  z-index: 10;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--display);
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.sw-section.is-entering .sw-counter,
.sw-section.is-scrolled .sw-counter {
  opacity: 1;
  transform: translateY(0);
}
.sw-counter-current {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  display: inline-block;
  min-width: 56px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.sw-counter-current.is-flipping {
  animation: sw-counter-flip 0.55s cubic-bezier(0.65, 0, 0.35, 1);
}
@keyframes sw-counter-flip {
  0%   { transform: translateY(0); opacity: 1; }
  40%  { transform: translateY(-14px); opacity: 0; }
  41%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.sw-counter-divider {
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--terra);
  transform: translateY(-10px);
}
.sw-counter-total {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--terra);
}

/* Make the side progress track more visible so users see it filling */
.sw-progress-track {
  width: 2px !important;
  background: rgba(30,30,47,0.08) !important;
}
.sw-progress-fill {
  background: var(--terra) !important;
  box-shadow: 0 0 0 2px rgba(200, 84, 46, 0.18);
}

/* Right-side dots — bigger active state for clearer feedback */
.sw-dot {
  width: 7px !important;
  height: 7px !important;
  transition: background 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease !important;
}
.sw-dot.is-active {
  background: var(--terra) !important;
  transform: scale(1.8) !important;
  box-shadow: 0 0 0 3px rgba(200, 84, 46, 0.18);
}


/* ── Mobile ── */
@media (max-width: 1023px) {
  .sw-section { height: auto; }
  .sw-scroll-hint, .sw-counter { display: none; }
  .sw-sticky {
    position: relative;
    height: auto;
    grid-template-columns: 1fr;
  }
  .sw-right { display: none; }
  .sw-left {
    height: auto;
    padding: 0;
    border-right: none;
  }
  .sw-info {
    position: relative;
    inset: auto;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    padding: 40px 24px 36px;
    border-bottom: 1px solid rgba(30,30,47,0.08);
  }
  .sw-mobile-thumb {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    aspect-ratio: 16/9;
  }
  .sw-mobile-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
  }
  .sw-progress-track { display: none; }
  .sw-dots { display: none; }
  .sw-title { font-size: 1.9rem; }
}
@media (max-width: 768px) {
  .sw-section { margin-left: -20px; margin-right: -20px; }
}
