/* ============================================================
   U.N. Luggage case study (case-study/index.html).
   Loaded after home.css and service.css; reuses their hero,
   buttons, highlight blobs, stat card, stickers and navy CTA.
   Only the pieces unique to this page live here. Behaviour for
   the email stack, lightbox and scrolling browser is in
   case-study.js.
   ============================================================ */

.cs-kicker {
  display: block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 600;
  color: var(--hp-label);
  margin-bottom: 18px;
}
.hp-navy .cs-kicker { color: rgba(255,255,255,.72); }
.cs-section { overflow: hidden; }

/* ---------- 1. Hero chart ---------- */
.cs-chart { position: relative; width: 100%; max-width: 560px; margin: 0 auto; padding-top: 36px; }
.cs-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.cs-chart .hp-stat { top: 0; bottom: auto; }
.cs-chart .hp-stat:hover { transform: none; }
.cs-chart [data-chart-line] { stroke-dasharray: 1; stroke-dashoffset: 1; animation: csDrawIn 1.6s ease .3s forwards; }
.cs-chart [data-chart-labels] { opacity: 0; animation: csFadeUp .6s ease .2s forwards; }
.cs-chart [data-chart-after] { opacity: 0; animation: csFadeUp .5s ease 1.7s forwards; }

/* ---------- Fact strip ---------- */
.cs-facts { border-top: 2px dashed #cbd5e1; border-bottom: 2px dashed #cbd5e1; }
.cs-facts dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.cs-fact { padding: 22px clamp(16px, 2.5vw, 32px); }
.cs-fact:first-child { padding-left: 0; }
.cs-fact:last-child { padding-right: 0; }
.cs-fact + .cs-fact { border-left: 2px dashed #cbd5e1; }
.cs-fact dt { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 600; color: var(--hp-label); margin-bottom: 6px; }
.cs-fact dd { font-family: var(--hp-serif); font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
@media (max-width: 760px) {
  .cs-fact { padding-left: 0; padding-right: 0; }
  .cs-fact + .cs-fact { border-left: 0; border-top: 2px dashed #cbd5e1; }
}

/* ---------- 2. The situation ---------- */
.cs-split { --col: 460px; gap: clamp(40px, 6vw, 80px); align-items: center; }
.cs-split .hp-h2 { margin-bottom: 22px; }
.cs-story { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.cs-story p { font-size: 18px; line-height: 1.6; color: var(--hp-body); text-wrap: pretty; }
.cs-story .cs-came-in { font-family: var(--hp-serif); font-style: italic; font-size: 24px; color: var(--hp-blue); margin-top: 8px; }
.cs-before {
  width: min(100%, 380px);
  margin: 0 auto;
  background: #fff;
  border: 3px solid var(--hp-navy);
  border-radius: 22px;
  padding: 22px 24px 18px;
  box-shadow: 0 18px 30px -18px rgba(10,37,64,.5);
}
.cs-before .cs-kicker { font-size: 11px; margin-bottom: 14px; }
.cs-before svg { display: block; width: 100%; height: auto; }
.cs-before-cap { font-family: var(--hp-serif); font-style: italic; font-size: 17px; color: var(--hp-body); margin-top: 14px; }

/* ---------- 3. Phase 1: email ---------- */
.cs-email { padding: var(--hp-pad) 0 0; }
.cs-email-head { max-width: 720px; }
.cs-email-head .hp-h2 { margin-bottom: 18px; }
.cs-email-intro { font-size: 19px; line-height: 1.55; color: rgba(255,255,255,.85); text-wrap: pretty; }
.cs-points {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  column-gap: clamp(32px, 5vw, 64px);
  margin-top: 44px;
}
.cs-point { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 24px 0; border-top: 2px dashed rgba(255,255,255,.3); }
.cs-point:nth-child(n+3) { border-bottom: 2px dashed rgba(255,255,255,.3); }
.cs-point .hp-num { font-size: 30px; line-height: 1.1; }
.cs-point .hp-h3 { font-size: 22px; margin-bottom: 8px; }
.cs-point p { font-size: 16px; line-height: 1.6; color: rgba(255,255,255,.85); }
.cs-stack-cap { margin-top: 48px; font-size: 14px; color: rgba(255,255,255,.72); }

/* Staggered email stack: frames are taller than the stack, so their bottoms are cut off */
.cs-stack {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 440px;
  overflow: hidden;
  padding: 0 var(--hp-gutter);
  margin-top: 16px;
}
.cs-mail {
  --r: 0deg;
  position: relative;
  flex: 0 1 220px;
  min-width: 168px;
  height: 520px;
  margin-left: -28px;
  padding: 0;
  background: #fff;
  border: 3px solid var(--hp-navy);
  border-radius: 14px;
  cursor: zoom-in;
  box-shadow: 0 18px 30px -18px rgba(0,0,0,.6);
  transform: rotate(var(--r));
  transition: transform .3s ease;
  font: inherit;
  color: var(--hp-navy);
}
.cs-mail:first-child { margin-left: 0; }
.cs-mail-clip { position: absolute; inset: 0; border-radius: 11px; overflow: hidden; }
.cs-mail-clip img { display: block; width: 100%; height: auto; will-change: transform; }
.cs-mail .cs-tag {
  --t: 0deg;
  position: absolute;
  left: 12px;
  top: -12px;
  max-width: calc(100% - 44px);
  background: #fff;
  border: 2px solid var(--hp-navy);
  border-radius: 10px;
  padding: 5px 10px;
  font-family: var(--hp-serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.2;
  text-align: left;
  transform: rotate(var(--t));
}
/* Per-frame stagger: drop and tilt, plus the sticker's tilt */
.cs-mail:nth-child(1) { margin-top: 40px;  --r: -2deg; }
.cs-mail:nth-child(2) { margin-top: 88px;  --r: 1.5deg; }
.cs-mail:nth-child(3) { margin-top: 52px;  --r: -1deg; }
.cs-mail:nth-child(4) { margin-top: 104px; --r: 2deg; }
.cs-mail:nth-child(5) { margin-top: 44px;  --r: -1.5deg; }
.cs-mail:nth-child(6) { margin-top: 92px;  --r: 1deg; }
.cs-mail:nth-child(7) { margin-top: 60px;  --r: -2deg; }
.cs-mail:nth-child(odd) .cs-tag { --t: -3deg; }
.cs-mail:nth-child(even) .cs-tag { --t: 2deg; }
@media (hover: hover) {
  .cs-mail:hover { transform: translateY(-16px) rotate(0deg); z-index: 10; }
}
.cs-mail:focus-visible { outline: 3px solid var(--hp-blue); outline-offset: 4px; z-index: 10; }
@media (max-width: 760px) {
  .cs-stack {
    height: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding: 20px 20px 28px;
    justify-content: flex-start;
    scrollbar-width: none;
  }
  .cs-stack::-webkit-scrollbar { display: none; }
  .cs-mail { flex: 0 0 232px; height: 300px; margin-left: 0; transform: none; scroll-snap-align: center; }
  .cs-mail:nth-child(odd) { margin-top: 0; }
  .cs-mail:nth-child(even) { margin-top: 24px; }
}
.cs-email-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.cs-email-cta-row { border-top: 2px dashed rgba(255,255,255,.3); }
.cs-email-cta span { font-family: var(--hp-serif); font-style: italic; font-size: 19px; }
.hp .cs-email-cta a,
.hp .cs-email-cta a:hover { color: #fff; display: inline-block; padding: 12px 0; }

/* Lightbox for a full email */
.cs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10,37,64,.94);
  overflow-y: auto;
  padding: 72px 20px 40px;
}
.cs-lightbox[hidden] { display: none; }
.cs-lightbox-label { position: fixed; top: 26px; left: 20px; right: 80px; font-family: var(--hp-serif); font-style: italic; font-size: 17px; color: #fff; }
.cs-lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--hp-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.cs-lightbox-close:focus-visible { outline: 3px solid var(--hp-blue); outline-offset: 3px; }
.cs-lightbox-mail { width: min(100%, 600px); margin: 0 auto; background: #fff; border: 3px solid var(--hp-navy); border-radius: 14px; overflow: hidden; }
.cs-lightbox-mail img { display: block; width: 100%; height: auto; }
body.cs-locked { overflow: hidden; }

/* ---------- 4. Phase 2: the store ---------- */
.cs-store-intro { font-size: 19px; line-height: 1.55; color: var(--hp-body); max-width: 520px; margin-bottom: 24px; text-wrap: pretty; }
.cs-rows { list-style: none; }
.cs-rows li { padding: 20px 0; border-top: 2px dashed #cbd5e1; }
.cs-rows li:last-child { border-bottom: 2px dashed #cbd5e1; }
.cs-rows .hp-h3 { font-size: 21px; margin-bottom: 6px; }
.cs-rows p { font-size: 16px; color: var(--hp-body); }
.cs-site { position: relative; width: 100%; max-width: 560px; margin: 0 auto; padding-top: 14px; }
.cs-browser {
  background: #fff;
  border: 3px solid var(--hp-navy);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 24px rgba(10,37,64,.16);
  cursor: pointer;
}
.cs-browser:focus-visible { outline: 3px solid var(--hp-blue); outline-offset: 4px; }
.cs-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 3px solid var(--hp-navy); }
.cs-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--hp-navy); flex-shrink: 0; }
.cs-bar i:nth-child(2) { background: var(--hp-blue); }
.cs-bar i:nth-child(3) { background: none; border: 2px solid var(--hp-navy); }
.cs-address {
  flex: 1;
  max-width: 260px;
  height: 20px;
  border-radius: 999px;
  background: #eef6ff;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  color: var(--hp-label);
  margin-left: 8px;
}
.cs-vp { aspect-ratio: 4 / 3; overflow: hidden; background: var(--hp-tint); }
.cs-vp img { display: block; width: 100%; height: auto; will-change: transform; }
.cs-hint {
  position: absolute;
  right: -8px;
  top: 0;
  z-index: 2;
  background: var(--hp-blue);
  color: var(--hp-navy);
  border: 3px solid var(--hp-navy);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--hp-serif);
  font-style: italic;
  font-size: 16px;
  transform: rotate(3deg);
  pointer-events: none;
  transition: opacity .4s;
}
.cs-site-cap { margin-top: 18px; font-size: 14px; color: var(--hp-label); text-align: center; }
.cs-site-cap a { display: inline-block; padding: 12px 0; }

/* ---------- 5. The results ---------- */
.cs-results { background: var(--hp-tint); }
.cs-center-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.cs-center-head .hp-h2 { margin-bottom: 16px; }
.cs-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 24px; }
.cs-card { background: #fff; border: 3px solid var(--hp-navy); border-radius: 22px; padding: clamp(24px, 3vw, 40px); }
.cs-card-wide { grid-column: 1 / -1; }
.cs-card .hp-h3 { font-size: 24px; margin-bottom: 6px; }
.cs-card-desc { font-size: 16px; color: var(--hp-body); margin-bottom: 32px; }
.cs-nums { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 28px 24px; }
.cs-card-wide .cs-nums { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) {
  .cs-nums, .cs-card-wide .cs-nums { grid-template-columns: repeat(2, 1fr); }
}
.cs-num {
  font-family: var(--hp-serif);
  font-variation-settings: 'opsz' 144;
  font-weight: 700;
  font-size: clamp(34px, 3.4vw, 48px);
  line-height: 1;
  letter-spacing: -.04em;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
.cs-card-wide .cs-num { font-size: clamp(36px, 4vw, 56px); }
.cs-nums li:nth-child(even) .cs-num { color: var(--hp-blue); }
.cs-num-label { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; font-weight: 600; color: var(--hp-label); }
.cs-note { font-size: 14px; color: var(--hp-label); margin-top: 28px; padding-top: 18px; border-top: 2px dashed #cbd5e1; }
.cs-footnote { margin-top: 28px; font-size: 14px; color: var(--hp-label); text-align: center; }

/* ---------- 6. What's next ---------- */
.cs-next-head { max-width: 680px; margin-bottom: 44px; }
.cs-next-head .hp-h2 { margin-bottom: 16px; }
.cs-next-head .hp-sub a { display: inline-block; padding: 9px 0; }
.cs-next { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); column-gap: clamp(32px, 4vw, 56px); }
.cs-next li { padding: 24px 0; border-top: 2px dashed #cbd5e1; }
.cs-next .hp-h3 { font-size: 21px; margin-bottom: 8px; }
.cs-next p { font-size: 16px; color: var(--hp-body); }
.cs-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 14px;
  background: rgba(30,144,255,.3);
  border: 2px solid var(--hp-blue);
  color: var(--hp-navy);
}
.cs-pill-week { background: #fff; border-color: var(--hp-green); color: var(--hp-green); }

/* ---------- Motion ---------- */
@keyframes csDrawIn { to { stroke-dashoffset: 0; } }
@keyframes csFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .cs *, .cs *::before, .cs *::after { animation: none !important; transition: none !important; }
  .cs-chart [data-chart-line] { stroke-dashoffset: 0; }
  .cs-chart [data-chart-labels],
  .cs-chart [data-chart-after] { opacity: 1; }
  .cs-vp { overflow-y: auto; }
  .cs-browser { cursor: default; }
  .cs-hint { display: none; }
}
