/* ==============================================================
   SWIFT SITES · case.css
   The four case study pages (work/*.html). Loaded AFTER styles.css,
   which supplies the tokens, fonts, buttons, nav, .win browser
   windows and the .ch-bg glow/grid/number from the chapters.
   Each page sets its client colours on <body>:
   --c (accent), --c-rgb, --chip-ink (text on the accent).
   ============================================================== */

.case { --c: #ff4d00; --c-rgb: 255, 77, 0; --chip-ink: #0b0b0a; background: var(--case-bg, var(--bg)); }
.case ::selection { background: var(--c); color: var(--chip-ink); }
/* the page speaks in the client's colour: labels and the reading bar */
.case .mono-tag { color: var(--c); }
.case .progress i { background: var(--c); }

/* nav: brand + two links, no burger menu on these pages */
.case .nav-links { display: flex; }
.case .nav-burger { display: none; }
@media (max-width: 600px) { .case .nav-link { display: none; } }

/* ---------- hero ---------- */
.cs-hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(120px, 17vh, 180px) 0 clamp(40px, 6vw, 80px); }
.cs-hero .ch-glow { top: 34%; }
.cs-back { display: inline-flex; align-items: center; gap: 10px; margin-bottom: clamp(30px, 5vh, 54px); font-family: var(--font-m); font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--ink-faint); transition: color 0.3s, gap 0.4s var(--ease); }
.cs-back:hover { color: var(--c); gap: 16px; }
.cs-count { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-family: var(--font-m); font-size: 11px; letter-spacing: 3px; color: var(--ink-faint); }
.cs-count::before { content: ""; width: 30px; height: 1px; background: var(--c); }
.cs-count span { color: var(--ink); }
.cs-eyebrow { margin-bottom: 18px; font-family: var(--font-m); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--c); }
.cs-title { font-size: clamp(52px, 10vw, 156px); font-weight: 900; line-height: 0.86; letter-spacing: -0.05em; text-transform: uppercase; }
.cs-title em { display: block; margin-top: 0.12em; font-size: 0.5em; line-height: 1.05; color: var(--c); text-transform: none; letter-spacing: -0.01em; }
.cs-lede { max-width: 640px; margin-top: clamp(22px, 3vw, 34px); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-dim); }
.cs-facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 18px clamp(30px, 5vw, 70px); margin-top: clamp(30px, 4vw, 46px); padding-top: 24px; border-top: 1px solid var(--line); }
.cs-facts dt { margin-bottom: 8px; font-family: var(--font-m); font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--c); }
.cs-facts dd { font-size: 15px; line-height: 1.5; color: var(--ink); }
.cs-facts a { border-bottom: 1px solid rgba(var(--c-rgb), 0.5); transition: color 0.3s, border-color 0.3s; }
.cs-facts a:hover { color: var(--c); border-color: var(--c); }
.cs-hero-stage { margin-top: clamp(50px, 7vw, 90px); perspective: 2200px; }
.cs-hero-stage .win { transform-origin: 50% 0%; }
@media (max-width: 760px) {
  .cs-facts { grid-template-columns: 1fr; }
}

/* ---------- numbers ---------- */
.cs-numbers { padding: clamp(60px, 8vw, 110px) 0; border-block: 1px solid var(--line); }
.cs-num-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 30px; }
.cs-num b { display: flex; align-items: baseline; gap: 0.1em; font-size: clamp(40px, 5.4vw, 84px); font-weight: 900; line-height: 0.95; letter-spacing: -0.045em; white-space: nowrap; }
.cs-num b i { font-style: normal; font-size: 0.5em; font-weight: 700; letter-spacing: 0; color: var(--c); }
.cs-num > span { display: block; max-width: 230px; margin-top: 14px; font-family: var(--font-m); font-size: 10.5px; letter-spacing: 1.6px; line-height: 1.6; text-transform: uppercase; color: var(--ink-faint); }
.cs-note { margin-top: 34px; font-family: var(--font-m); font-size: 10.5px; letter-spacing: 0.5px; line-height: 1.7; color: var(--ink-faint); }
@media (max-width: 900px) { .cs-num-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- the whole site, played top to bottom ----------
   Static (phones, reduced motion, no JS): the full page as one long stack.
   Desktop (html.cs-live): the window sticks and scrolling plays the site,
   the list on the left follows along. */
.cs-sec-head { margin-bottom: clamp(36px, 5vw, 64px); }
.cs-reel-grid { display: grid; grid-template-columns: minmax(0, 230px) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.cs-reel-list { list-style: none; counter-reset: rl; }
.cs-reel-list li {
  counter-increment: rl; display: flex; align-items: baseline; gap: 12px; padding: 9px 0;
  border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; color: var(--ink-faint);
  transition: color 0.4s, padding-left 0.5s var(--ease);
}
.cs-reel-list li::before { content: counter(rl, decimal-leading-zero); font-family: var(--font-m); font-size: 10px; font-weight: 400; color: var(--ink-faint); }
.cs-reel-list li.on { color: var(--ink); padding-left: 10px; }
.cs-reel-list li.on::before { color: var(--c); }
.cs-reel-win .win-view { aspect-ratio: auto; }
.cs-reel-win .win-page { position: relative; }
.cs-live .cs-reel { height: calc(var(--n, 8) * 42vh + 100vh); }
.cs-live .cs-reel-sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
.cs-live .cs-reel-sticky .wrap { width: min(1280px, 92vw); }
.cs-live .cs-reel-win { width: min(100%, calc((100vh - 150px) * 1.9)); justify-self: center; }
.cs-live .cs-reel-win .win-view { aspect-ratio: 1600 / 834; }
.cs-live .cs-reel-win .win-page { position: absolute; }
@media (max-width: 1099px), (max-height: 599px) {
  .cs-reel-grid { grid-template-columns: minmax(0, 1fr); }
  .cs-reel-list { display: none; }
}

/* ---------- details: three moments from the site ---------- */
.cs-feat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); }
.cs-feat:first-child { grid-column: 1 / -1; }
.cs-feat figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 16px; }
.cs-feat figcaption b { font-size: clamp(19px, 2vw, 26px); font-weight: 800; letter-spacing: -0.02em; }
.cs-feat figcaption span { font-size: 14.5px; color: var(--ink-dim); }
.cs-feat .win-view img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (max-width: 760px) { .cs-feat-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- the panel tour: tabs switch the screen ---------- */
.cs-tour { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: start; }
.cs-tabs { display: flex; flex-direction: column; gap: 6px; }
.cs-tab {
  position: relative; overflow: hidden; display: flex; align-items: baseline; gap: 12px; width: 100%;
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: transparent;
  font-size: 15px; font-weight: 700; text-align: left; color: var(--ink-dim);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}
.cs-tab b { font-family: var(--font-m); font-size: 10px; font-weight: 400; color: var(--ink-faint); }
.cs-tab:hover { color: var(--ink); border-color: rgba(var(--c-rgb), 0.5); }
.cs-tab[aria-selected="true"] { color: var(--ink); border-color: var(--c); background: rgba(var(--c-rgb), 0.1); }
.cs-tab[aria-selected="true"] b { color: var(--c); }
/* auto-play timer under the active tab */
.cs-tab::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--c); transform: scaleX(0); transform-origin: left; }
.cs-tour.playing .cs-tab[aria-selected="true"]::after { animation: tabTimer 4.2s linear forwards; }
@keyframes tabTimer { to { transform: scaleX(1); } }
.cs-shot { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease), visibility 0.5s; }
.cs-shot.on { opacity: 1; visibility: visible; }
.cs-shot img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.cs-shot.fit img { object-fit: contain; object-position: center; background: #070709; }
.cs-tour-cap { min-height: 3.2em; margin-top: 18px; font-size: 16px; line-height: 1.6; color: var(--ink-dim); }
.cs-tour-cap b { color: var(--ink); }
@media (max-width: 900px) {
  .cs-tour { grid-template-columns: minmax(0, 1fr); }
  .cs-tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .cs-tabs::-webkit-scrollbar { display: none; }
  .cs-tab { flex: none; width: auto; padding: 11px 14px; font-size: 14px; }
}

/* ---------- the receipts ---------- */
/* a justified row: each figure grows by its image's aspect ratio (--ar = width / height),
   so every picture in the row ends up the same height */
.cs-proof-grid { display: flex; gap: clamp(16px, 2vw, 26px); align-items: flex-start; }
.cs-pf { flex: var(--ar, 1) 1 0; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--card); transition: transform 0.5s var(--ease), border-color 0.4s; }
.cs-pf:hover { transform: translateY(-5px); border-color: rgba(var(--c-rgb), 0.6); }
.cs-pf img, .cs-pf video { display: block; width: 100%; height: auto; background: #0f0f0d; }
.cs-pf figcaption { padding: 14px 18px; font-family: var(--font-m); font-size: 10.5px; letter-spacing: 1px; line-height: 1.6; color: var(--ink-faint); }
@media (max-width: 760px) { .cs-proof-grid { flex-direction: column; align-items: stretch; } .cs-pf { flex: none; } }

/* ---------- the client, in their words ---------- */
.cs-quote blockquote { font-family: var(--font-s); font-style: italic; font-size: clamp(30px, 4.4vw, 62px); line-height: 1.12; letter-spacing: -0.01em; }
.cs-quote blockquote::before { content: "\201C"; display: block; height: 0.55em; font-size: 1.6em; line-height: 1; color: var(--c); }
.cs-quote-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 28px; }
.cs-quote-who b { font-size: 17px; }
.cs-quote-who span { font-family: var(--font-m); font-size: 11px; letter-spacing: 1px; color: var(--ink-faint); }
.cs-quote-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.case .btn-solid:hover { background: var(--c); color: var(--chip-ink); box-shadow: 0 10px 40px rgba(var(--c-rgb), 0.4); }
.case .btn-line:hover { border-color: var(--c); color: var(--c); }

/* ---------- next case ---------- */
.cs-next {
  position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(20px, 4vw, 60px);
  padding: clamp(60px, 9vw, 130px) clamp(20px, 4vw, 46px);
  border-top: 1px solid var(--line); background: var(--next-bg, #0b0b0a); color: #ede9dc;
}
.cs-next::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 80% at 80% 50%, rgba(var(--c-rgb), 0.26), transparent 70%); opacity: 0.6; transition: opacity 0.6s; }
.cs-next:hover::before { opacity: 1; }
.cs-next-label { display: block; margin-bottom: 18px; font-family: var(--font-m); font-size: 11px; letter-spacing: 3px; color: var(--c); }
.cs-next-name { display: block; font-size: clamp(42px, 7vw, 110px); font-weight: 900; line-height: 0.88; letter-spacing: -0.05em; text-transform: uppercase; transition: transform 0.7s var(--ease); }
.cs-next-name em { display: block; margin-top: 0.12em; font-size: 0.5em; color: var(--c); text-transform: none; letter-spacing: -0.01em; }
.cs-next:hover .cs-next-name { transform: translateX(14px); }
.cs-next-img { display: block; overflow: hidden; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8), 0 20px 80px -30px rgba(var(--c-rgb), 0.5); transform: rotate(-2deg); transition: transform 0.8s var(--ease); }
.cs-next:hover .cs-next-img { transform: rotate(0deg) scale(1.03); }
.cs-next-img img { width: 100%; height: auto; }
.cs-next-go { display: inline-flex; align-items: center; gap: 12px; margin-top: 28px; font-family: var(--font-m); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: #ede9dc; }
.cs-next-go i { font-style: normal; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--c); color: var(--chip-ink); font-size: 18px; transition: transform 0.5s var(--ease); }
.cs-next:hover .cs-next-go i { transform: translateX(6px); }
@media (max-width: 760px) { .cs-next { grid-template-columns: minmax(0, 1fr); } }

/* ---------- the end ---------- */
.cs-end { padding: clamp(90px, 12vw, 170px) 0 40px; text-align: left; }
.cs-end-title { font-size: clamp(42px, 7vw, 104px); font-weight: 900; line-height: 0.92; letter-spacing: -0.045em; text-transform: uppercase; }
.cs-end-title em { display: block; font-size: 0.62em; color: var(--c); text-transform: none; letter-spacing: -0.01em; margin-top: 0.1em; }
.cs-end-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(30px, 4vw, 46px); }
.cs-end-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 30px; margin-top: clamp(70px, 10vw, 130px); padding-top: 26px; border-top: 1px solid var(--line); font-family: var(--font-m); font-size: 10.5px; letter-spacing: 1px; color: var(--ink-faint); }
.cs-end-foot a:hover { color: var(--c); }

/* the light page (AD Education) */
.case.tone-light .win { background: #fff; border-color: rgba(29, 20, 24, 0.12); box-shadow: 0 60px 120px -40px rgba(70, 20, 45, 0.35), 0 30px 110px -40px rgba(var(--c-rgb), 0.3); }
.case.tone-light .win-bar { background: linear-gradient(180deg, #f8f4f6, #efe8ec); border-bottom-color: rgba(29, 20, 24, 0.08); }
.case.tone-light .win-url { background: rgba(29, 20, 24, 0.06); color: rgba(29, 20, 24, 0.62); }
.case.tone-light .cs-pf { background: #fff; }
.case.tone-light .cs-shot.fit img { background: #f3edf1; }
