/* CROSLYNK · Case Studies page (case-study.html only).
   Industry tiles filter a grid of study cards; each card can be added to the
   request form at the bottom. Shared hero, form and enquiry styles come from
   style.css and simulation.css. */

.cs-page h1 { max-width: 14ch; }

/* industry filter */
.cs-tiles { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 26px; }
.cs-tile {
  padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.7);
  cursor: pointer; font: 600 0.88rem/1 'Poppins', sans-serif; color: var(--ink);
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s var(--ease-premium);
}
.cs-tile:hover { transform: translateY(-2px); border-color: var(--amber); }
.cs-tile.on { background: var(--ink); border-color: var(--ink); color: #fff8ec; }
.cs-tile:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* hero slideshow */
.cs-show .cs-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.2s ease; }
.cs-show .cs-slide.prev { opacity: 1; transition: none; }
.cs-show .cs-slide.on { opacity: 1; z-index: 1; }
.cs-show .cs-slide img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.04); }
.cs-show .cs-slide.on img, .cs-show .cs-slide.prev img { animation: csKen 7s linear forwards; }
.cs-show .cs-slide:nth-child(even).on img, .cs-show .cs-slide:nth-child(even).prev img { animation-name: csKen2; }
.cs-show .cs-slide::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(20, 13, 4, 0.22) 0%, rgba(20, 13, 4, 0) 28%, rgba(20, 13, 4, 0) 48%, rgba(20, 13, 4, 0.8) 100%); }
@keyframes csKen { from { transform: scale(1.04); } to { transform: scale(1.14) translate(-2%, -1.5%); } }
@keyframes csKen2 { from { transform: scale(1.14) translate(2%, 1%); } to { transform: scale(1.04); } }
.cs-show::after { display: none; }
.cs-show .cs-slide figcaption { position: absolute; left: 18px; right: 120px; bottom: 18px; z-index: 1; opacity: 0; transform: translateY(8px); transition: opacity 0.6s 0.4s, transform 0.6s 0.4s var(--ease-premium); }
.cs-show .cs-slide.on figcaption { opacity: 1; transform: none; }
.cs-show figcaption a { display: block; color: #fff8ec; text-decoration: none; font: 600 1.02rem/1.35 'Poppins', sans-serif; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35); }
.cs-show figcaption a span { display: block; margin-bottom: 6px; font: 600 0.66rem/1 'IBM Plex Mono', monospace; letter-spacing: 0.12em; color: #FFC64A; }
.cs-show figcaption a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cs-show .cs-show-tag { z-index: 4; transition: opacity 0.3s; }
.cs-dots { position: absolute; right: 18px; bottom: 22px; z-index: 4; display: flex; gap: 6px; }
.cs-dot { width: 8px; height: 8px; padding: 0; border-radius: 999px; border: 0; background: rgba(255, 248, 236, 0.45); cursor: pointer; transition: width 0.35s var(--ease-premium), background 0.35s; }
.cs-dot:hover { background: rgba(255, 248, 236, 0.8); }
.cs-dot.on { width: 22px; background: #FFB020; }
.cs-dot:focus-visible { outline: 2px solid #FFB020; outline-offset: 3px; }

/* one study per request */
.cs-one { margin-left: 6px; font: 500 0.66rem/1 'IBM Plex Mono', monospace; letter-spacing: 0.06em; text-transform: none; color: var(--muted); }

/* study cards */
.cs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.cs-card {
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: rgba(255, 255, 255, 0.82); border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 38px rgba(103, 70, 31, 0.09);
  transition: transform 0.35s var(--ease-premium), box-shadow 0.35s;
}
.cs-card:hover { transform: translateY(-5px); box-shadow: 0 24px 48px rgba(103, 70, 31, 0.15); }
.cs-card[hidden] { display: none; }
.cs-img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #2a2014; }
.cs-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.8s var(--ease-premium); }
.cs-card:hover .cs-img img { transform: scale(1.04); }
.cs-code {
  position: absolute; left: 14px; top: 14px; padding: 6px 9px; border-radius: 8px;
  font: 600 0.72rem/1 'IBM Plex Mono', monospace; letter-spacing: 0.08em;
  color: #fff8ec; background: rgba(20, 14, 6, 0.72); backdrop-filter: blur(4px);
}
.cs-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.cs-ind { font: 600 0.66rem/1 'IBM Plex Mono', monospace; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber-dark); margin-bottom: 10px; }
.cs-body h3 { font-size: 1.12rem; line-height: 1.3; margin: 0 0 10px; }
.cs-q { font-size: 0.9rem; line-height: 1.6; color: var(--muted); margin: 0 0 10px; }
.cs-d { font-size: 0.92rem; line-height: 1.6; color: var(--ink); margin: 0 0 16px; padding-left: 12px; border-left: 2px solid var(--amber); }
.cs-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: auto 0 16px; }
.cs-figs div { padding: 10px 12px; border-radius: 12px; background: var(--amber-ghost, rgba(186, 117, 23, 0.07)); }
.cs-figs dt { font: 700 1.05rem/1.15 'Poppins', sans-serif; letter-spacing: -0.01em; color: var(--ink); }
.cs-figs dd { margin: 4px 0 0; font-size: 0.72rem; line-height: 1.4; color: var(--muted); }
.cs-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cs-req {
  font: 600 0.78rem/1 'Poppins', sans-serif; padding: 10px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: #fff; color: var(--amber-dark);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.cs-req:hover { border-color: var(--amber); }
.cs-req.added { background: var(--ink); color: #fff8ec; border-color: var(--ink); }
.cs-req:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.cs-talk { font: 600 0.78rem/1 'Poppins', sans-serif; color: var(--ink); text-decoration: none; }
.cs-talk::after { content: " \2192"; color: var(--amber-dark); }
.cs-talk:hover { color: var(--amber-dark); }

/* method */
.cs-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 28px; counter-reset: s; }
.cs-step { position: relative; padding: 22px 20px; border-radius: 20px; background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(255, 255, 255, 0.95); box-shadow: 0 12px 28px rgba(103, 70, 31, 0.07); }
.cs-step span { font: 600 0.72rem/1 'IBM Plex Mono', monospace; color: var(--amber-dark); letter-spacing: 0.1em; }
.cs-step h3 { font-size: 1.02rem; margin: 12px 0 6px; }
.cs-step p { font-size: 0.86rem; line-height: 1.6; margin: 0; color: var(--muted); }
.cs-demo { margin: 24px 0 0; font-size: 0.92rem; }
.cs-demo a { font-weight: 600; color: var(--amber-dark); }

@media (max-width: 1100px) {
  .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cs-grid, .cs-steps { grid-template-columns: minmax(0, 1fr); }
  .cs-tiles { gap: 8px; }
  .cs-tile { padding: 10px 14px; font-size: 0.82rem; }
  .cs-show .cs-slide figcaption { left: 14px; right: 14px; bottom: 34px; }
  .cs-show figcaption a { font-size: 0.92rem; }
  .cs-dots { left: 14px; right: auto; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-card, .cs-card .cs-img img, .cs-tile { transition: none; }
  .cs-show .cs-slide.on img { animation: none; }
  .cs-show .cs-slide, .cs-show .cs-slide figcaption { transition: none; }
}

/* selected study, shown at the top of the form */
.cs-chosen { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: rgba(186, 117, 23, 0.1); border: 1px solid rgba(186, 117, 23, 0.28); font-size: 0.88rem; }
.cs-chosen[hidden] { display: none; }
.cs-chosen span { font: 600 0.62rem/1 'IBM Plex Mono', monospace; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber-dark); }
.cs-chosen b { color: var(--ink); font-weight: 600; }
.cs-chosen a { margin-left: auto; font-size: 0.8rem; font-weight: 600; color: var(--amber-dark); }
