/* ===== Skin Lab case study ===== */

:root {
  --sl-green: #3B5345;
  --sl-lime: #D8FF54;
  --sl-lavender: #E4D1FE;
  --sl-purple: #9747FF;
  --sl-bg: #F2F5F3;
  --sl-pad: clamp(24px, 8.08vw, 124px); /* max was 155px */
  --sl-hero-pad: clamp(24px, 9.01vw, 138.4px); /* max was 173px */
}

.sl-body {
  background: var(--sl-bg);
  color: var(--sl-green);
  font-family: 'Ploni', sans-serif;
  overflow-x: hidden;
}

.sl-wrap { max-width: 1536px; margin: 0 auto; } /* max was 1920px */

/* ===== Header ===== */
.sl-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22.4px var(--sl-pad); /* was 28px */
  z-index: 100;
  background: transparent;
}
.sl-header .logo {
  font-family: 'FuturaMedium', sans-serif;
  font-size: 19.2px; /* was 24px */
  color: var(--sl-green);
}
.sl-nav a { color: var(--sl-green); }

/* ===== Hero ===== */
.sl-hero {
  position: relative;
  width: 100%;
}
.sl-hero-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 1085;
  overflow: hidden;
  background: #000;
}
.sl-hero-img {
  position: absolute;
  left: -25.5%;
  top: -10.33%;
  width: 136.5%;
  height: 112%;
  max-width: none;
  display: block;
}
.sl-hero-caption {
  position: absolute;
  left: calc(var(--sl-hero-pad) + 40px); /* offset was 50px */
  top: 71.3%;
  max-width: 216px; /* was 270px */
  width: 24%;
  color: var(--sl-green);
  font-family: 'FuturaBold', sans-serif;
  font-weight: 700;
  font-size: 12.8px; /* was 16px */
  line-height: 1.5;
  text-transform: uppercase;
}
.sl-hero-meta {
  position: absolute;
  left: calc(var(--sl-hero-pad) + 40px); /* offset was 50px */
  top: 78.6%;
  display: grid;
  grid-template-columns: minmax(140px, 12.35vw) auto;
  column-gap: 38.4px; /* was 48px */
  row-gap: clamp(16px, 3vw, 46.4px); /* max was 58px */
  color: var(--sl-green);
  font-family: 'FuturaMedium', sans-serif;
  font-size: 11.2px; /* was 14px */
  text-transform: uppercase;
}
.sl-hero-meta dt { font-family: 'FuturaBold', sans-serif; font-weight: 700; margin-bottom: 4px; }

.sl-scroll-arrow {
  position: absolute;
  left: calc(var(--sl-hero-pad) * 0.35);
  top: 83.5%;
  transform: translateY(-50%);
  width: clamp(10px, 0.9vw, 12px); /* max was 15px */
  color: var(--sl-green);
  z-index: 5;
  pointer-events: none;
}
.sl-scroll-arrow svg { display: block; width: 100%; height: auto; animation: scroll-arrow-bounce 1.8s ease-in-out infinite; }

/* ===== Section shell ===== */
.sl-section { padding: 0 var(--sl-pad); }
.sl-h2 {
  font-family: 'Ploni', sans-serif;
  font-weight: 600;
  font-size: 16px; /* was 20px */
  color: var(--sl-green);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.sl-body-text {
  font-size: 12.8px; /* was 16px */
  line-height: 1.63;
  max-width: 576px; /* was 720px */
  color: var(--sl-green);
  text-transform: uppercase;
}
.sl-body-text--wide { max-width: 640px; } /* was 800px */

.sl-about { margin-top: clamp(40px, 4.5vw, 68.8px); } /* max was 86px */
.sl-research { margin-top: clamp(50px, 5.9vw, 90.4px); } /* max was 113px */

/* ===== Pills ===== */
.sl-pills {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 2vw, 28.8px); /* max was 36px */
  margin-top: clamp(40px, 4.5vw, 68.8px); /* max was 86px */
}
.sl-pill {
  flex: 1 1 300px;
  max-width: 304px; /* max was 380px */
  min-height: 111.2px; /* was 139px; this floor is the pill's operative height at desktop, so it scales with the box */
  background: var(--sl-lime);
  border-radius: 32.8px; /* was 41px */
  padding: 24px 25.6px; /* was 30px 32px */
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.sl-pill-title {
  font-family: 'Ploni', sans-serif;
  font-weight: 600;
  font-size: 12.8px; /* was 16px */
  text-transform: uppercase;
  color: var(--sl-green);
  margin-bottom: 6px;
}
.sl-pill-text {
  font-size: 12.8px; /* was 16px */
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--sl-green);
}

/* ===== Inspiration ===== */
.sl-inspiration { margin-top: clamp(40px, 4.5vw, 68.8px); } /* max was 86px */

/* ===== Diagram ===== */
.sl-diagram {
  max-width: 784px; /* max was 980px */
  margin: clamp(40px, 4.5vw, 68.8px) auto 0; /* max was 86px */
}
.sl-diagram img { width: 100%; height: auto; display: block; }

/* ===== Information Architecture ===== */
.sl-ia { margin-top: clamp(80px, 9.34vw, 144px); } /* max was 180px */
.sl-ia-flow {
  max-width: 1024px; /* max was 1280px */
  margin: clamp(30px, 2.1vw, 32.8px) auto 0; /* max was 41px */
}
.sl-ia-flow img { width: 100%; height: auto; display: block; }

/* ===== Design system ===== */
.sl-design-system { margin-top: clamp(80px, 9.34vw, 144px); } /* max was 180px */
.sl-ds-panel { margin: 16px auto 0; text-align: center; } /* was 20px */
.sl-ds-panel img {
  display: inline-block;
  width: auto;
  height: auto;
  max-width: min(1200px, 92vw); /* fixed ceiling was 1500px */
  max-height: 86vh;
  border-radius: 19.2px; /* was 24px */
}

/* ===== Final UI screens ===== */
.sl-final-ui { margin-top: clamp(80px, 9.34vw, 144px); } /* max was 180px */
.sl-ui-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 51.2px) clamp(20px, 3.5vw, 54.4px); /* maxes were 64px, 68px */
  margin-top: clamp(30px, 4.2vw, 64px); /* max was 80px */
}
.sl-ui-cell { position: relative; overflow: hidden; }
.sl-ui-cell img { width: 100%; height: auto; display: block; }
.sl-ui-cell--overlay { display: flex; align-items: center; justify-content: center; }
.sl-ui-overlay-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.2);
}
.sl-ui-overlay-modal {
  position: absolute !important;
  width: 82.6% !important;
  height: auto !important;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

/* ===== In Context / Prototype videos ===== */
.sl-in-context { margin-top: clamp(80px, 9.34vw, 144px); } /* max was 180px */
.sl-prototype { margin-top: clamp(80px, 9.34vw, 144px); } /* max was 180px */

.sl-media {
  position: relative;
  margin-top: clamp(30px, 2.6vw, 39.2px); /* max was 49px */
  border-radius: 19.2px; /* was 24px */
  overflow: hidden;
  background: #000;
  border: none;
  outline: none;
}
.sl-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
  outline: none;
}
.sl-media--context { aspect-ratio: 1738 / 977; max-width: 1080px; margin-left: auto; margin-right: auto; } /* max was 1350px */
.sl-media--prototype { aspect-ratio: 1667 / 934; max-width: 1040px; margin-left: auto; margin-right: auto; } /* max was 1300px */

/* Strip native video-controls chrome: no gray hover panel, no center overlay circle */
.sl-media video::-webkit-media-controls-panel,
.sl-media video::-webkit-media-controls-enclosure,
.sl-media video::-webkit-media-controls-overlay-enclosure {
  background: transparent !important;
}
.sl-media video::-webkit-media-controls-overlay-play-button {
  display: none !important;
}

/* Custom play/pause button (used instead of native controls on the In Context video) */
.sl-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 57.6px; /* was 72px */
  height: 57.6px; /* was 72px */
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 1;
  transition: opacity 0.2s ease;
}
/* Play icon (triangle) — shown while paused */
.sl-play-btn::before {
  content: '';
  width: 0;
  height: 0;
  margin-left: 4px; /* was 5px */
  border-style: solid;
  border-width: 10.4px 0 10.4px 16.8px; /* was 13px 0 13px 21px */
  border-color: transparent transparent transparent #fff;
}
.sl-play-btn::after { content: none; }

/* Pause icon (two bars) — shown while playing */
.sl-media.is-playing .sl-play-btn::before {
  content: none;
}
.sl-media.is-playing .sl-play-btn::after {
  content: '';
  display: block;
  width: 17.6px; /* was 22px */
  height: 20.8px; /* was 26px */
  background:
    linear-gradient(#fff, #fff) 0 0 / 5.6px 20.8px no-repeat,
    linear-gradient(#fff, #fff) 100% 0 / 5.6px 20.8px no-repeat;
}

.sl-media.is-playing .sl-play-btn { opacity: 0; }
.sl-media.is-playing:hover .sl-play-btn { opacity: 0.9; }

.sl-prototype { padding-bottom: clamp(60px, 8vw, 120px); } /* max was 150px */

.sl-try-link {
  display: block;
  max-width: 1040px; /* max was 1300px */
  margin: 16px auto 0; /* was 20px */
  font-family: 'Ploni', sans-serif;
  font-size: 12.8px; /* was 16px */
  color: var(--sl-green);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-transform: uppercase;
}

/* In-context photo grid */
.sl-context-grid {
  max-width: 1080px; /* max was 1350px */
  margin: clamp(50px, 6.76vw, 104px) auto 0; /* max was 130px */
}
.sl-context-row {
  display: flex;
  gap: clamp(24px, 2.86vw, 44px); /* max was 55px */
}
.sl-context-row + .sl-context-row { margin-top: clamp(24px, 2.86vw, 44px); } /* max was 55px */
.sl-context-photo { border-radius: 19.2px; overflow: hidden; background: #eee; } /* was 24px */
.sl-context-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sl-context-photo--sm { flex: 0.264 1 0; aspect-ratio: 0.7467; }
.sl-context-photo--lg { flex: 0.472 1 0; aspect-ratio: 1.339; }

@media (max-width: 700px) {
  .sl-header.is-scrolled { background: var(--sl-bg); }
}

@media (max-width: 900px) {
  .sl-ui-grid { grid-template-columns: 1fr; }
  .sl-pills { flex-direction: column; align-items: flex-start; }
  .sl-pill { max-width: none; flex: 0 0 auto; width: fit-content; min-height: 0; }
  .sl-context-row { flex-wrap: wrap; }
  .sl-context-photo--sm, .sl-context-photo--lg { flex-basis: 100%; }
}

@media (max-width: 760px) {
  .sl-hero-caption {
    position: static;
    margin: 20px var(--sl-pad) 0;
    width: auto;
    max-width: none;
  }
  .sl-hero-meta {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px var(--sl-pad) 28px;
  }
  .sl-ds-panel img { max-width: min(1200px, 100%); }
}

/* ===== Footer spacing normalization =====
   The project-nav bar (prev/next case study) now sits directly above
   the footer, with its own bottom padding providing the gap — so the
   shared footer top margin is not needed here. */
.site-footer { margin-top: 32px; } /* was 40px */
