/* ============================================================
   THE CREATIVITY LAB — Services (interactive tabs)
   ============================================================ */
.services {
  position: relative;
  padding: clamp(56px, 7vw, 116px) clamp(20px, 4.5vw, 52px) clamp(80px, 11vw, 170px);
  border-top: 1px solid var(--border-subtle);
}
@media (min-width: 1800px) { .services { max-width: 1760px; margin: 0 auto; } }

.sv-body { display: grid; grid-template-columns: 1fr; gap: clamp(34px, 4vw, 56px); margin-top: clamp(40px, 5vw, 76px); }
@media (min-width: 1024px) { .sv-body { grid-template-columns: minmax(220px, 330px) 1fr; gap: clamp(40px, 4vw, 80px); align-items: start; } }

.sv-nav { position: relative; display: flex; flex-direction: column; gap: clamp(2px, 0.4vw, 6px); }
/* gliding glass selector that slides onto the active tab */
.sv-ind {
  position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none;
  width: 0; height: 0; border-radius: 13px; opacity: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,90,44,0.42);
  box-shadow: 0 0 26px -8px rgba(255,90,44,0.45), inset 0 0 24px -12px rgba(255,90,44,0.6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform 0.55s cubic-bezier(0.22,1,0.36,1), width 0.55s cubic-bezier(0.22,1,0.36,1),
              height 0.55s cubic-bezier(0.22,1,0.36,1), opacity 0.4s var(--ease-out);
}
.sv-nav.is-ready .sv-ind { opacity: 1; }
.sv-tab {
  position: relative; z-index: 1; display: block; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer;
  padding: clamp(11px, 1vw, 15px) clamp(16px, 1.5vw, 22px); border-radius: 13px;
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: clamp(1.25rem, 1.8vw, 1.7rem); letter-spacing: -0.02em; line-height: 1.15;
  color: var(--text-faint); opacity: 0.6;
  transition: color 0.45s var(--ease-out), opacity 0.45s var(--ease-out), transform 0.5s cubic-bezier(0.22,1,0.36,1);
}
.sv-nav:has(.sv-tab:hover) .sv-tab:not(:hover) { opacity: 0.4; }
.sv-tab:hover { color: var(--text-secondary); opacity: 0.95; }
.sv-tab.active { color: var(--text-primary); opacity: 1; transform: translateX(3px); }

/* Mobile: horizontal swipeable pill selector above the preview */
@media (max-width: 1023px) {
  .sv-nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding: 2px 1px 8px;
    scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .sv-nav::-webkit-scrollbar { display: none; }
  .sv-tab { width: auto; flex: 0 0 auto; white-space: nowrap; scroll-snap-align: center;
    font-size: 0.95rem; padding: 11px 18px; border: 1px solid var(--border-subtle); border-radius: 999px; opacity: 0.72; }
  .sv-tab.active { transform: none; border-color: transparent; }
  .sv-ind { border-radius: 999px; }
}

.sv-main { min-width: 0; }

/* Locked cinematic 16:9 showcase — the frame controls every dimension, never the media.
   Identical proportions for every service; depth shadow + soft ambient glow. */
.sv-visual {
  position: relative; width: 100%; max-width: 900px; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 28px; background: var(--mg-ink-900);
  box-shadow: 0 44px 96px -44px rgba(0,0,0,0.88), 0 0 70px -18px rgba(255,90,44,0.16);
}
/* thin translucent-white inner border, clipped to the rounded frame */
.sv-visual::after { content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10); }

/* every slide fills the frame; media is absolutely positioned and cover-fit */
.sv-slide { position: absolute; inset: 0; z-index: 1; opacity: 0; transform: scale(1.05);
  transition: opacity 0.7s var(--ease-out), transform 1.3s var(--ease-out); will-change: opacity, transform; }
.sv-slide.show { opacity: 1; transform: scale(1); z-index: 2; }
.sv-slide .sv-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* slow glass reflection drifting across the surface */
.sv-visual__reflection { position: absolute; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: screen; opacity: 0.55;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.10) 48%, rgba(255,255,255,0.03) 55%, transparent 66%);
  background-size: 250% 100%; background-position: 130% 0; animation: svReflect 9s ease-in-out infinite; }
@keyframes svReflect { 0% { background-position: 135% 0; } 100% { background-position: -35% 0; } }

.sv-visual__scrim { position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: inherit;
  background: linear-gradient(180deg, rgba(5,5,5,0.10) 0%, rgba(5,5,5,0) 35%, rgba(5,5,5,0.28) 100%); }

@media (max-width: 600px) { .sv-visual { border-radius: 18px; } }

.sv-detail { display: grid; grid-template-columns: 1fr; gap: clamp(26px, 3vw, 44px); margin-top: clamp(26px, 3vw, 44px); }
@media (min-width: 860px) { .sv-detail { grid-template-columns: 1.25fr 1fr; } }
.sv-detail__title { display: flex; align-items: baseline; gap: 12px; font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: clamp(1.4rem, 2vw, 2rem); letter-spacing: -0.02em; color: var(--text-primary); }
.sv-detail__title .idx { color: var(--text-faint); font-size: 0.78em; }
.sv-desc { margin-top: clamp(14px, 1.6vw, 20px); font-size: clamp(1rem, 1.1vw, 1.18rem); line-height: 1.55; letter-spacing: -0.01em; color: var(--text-secondary); max-width: 44ch; }
.sv-desc p + p { margin-top: 0.8em; }
.sv-cats__label { font-family: var(--font-label); font-size: 12px; font-weight: var(--fw-semibold); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); margin-bottom: clamp(14px, 1.6vw, 20px); }
.sv-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.sv-tag { border: 1px solid var(--border-default); padding: 8px 15px; font-family: var(--font-label); font-size: 13px; letter-spacing: 0.02em; color: var(--text-secondary); transition: border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out); }
.sv-tag:hover { border-color: var(--border-strong); color: var(--text-primary); }

/* Tab-switch motion (freeze-safe: resting visible, tiny delay + forwards) */
.sv-anim { animation: svUp 0.6s var(--ease-out) 0.02s forwards; }
@keyframes svUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.sv-tag-anim { animation: svUp 0.5s var(--ease-out) forwards; }
@media (prefers-reduced-motion: reduce) { .sv-anim, .sv-tag-anim, .sv-visual__reflection { animation: none; } .sv-slide, .sv-ind, .sv-tab { transition: none; } .sv-slide { transform: none; } }
