/* Shared styles for the case study pages (/cas/ and /en/cases/). Mobile first. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0c12;
  --card: #11141d;
  --line: #1d2230;
  --line-strong: #2a3042;
  --ink: #eceef5;
  --soft: #c5cadb;
  --muted: #9ea5ba;
  --faint: #8a91a6;
  --accent: #5b6ef5;
  --accent-ink: #b3bcff;
  --tint: rgba(91, 110, 245, 0.12);
  --radius: 22px;
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  background: var(--bg); color: var(--ink);
  font-family: 'Geist', system-ui, sans-serif; font-size: 16px; line-height: 1.6;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Top bar */
.cs-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 5%; background: rgba(10, 12, 18, 0.9); backdrop-filter: blur(16px);
  border-bottom: 1px solid #1a1e2a;
}
.cs-logo { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; color: var(--ink); }
.cs-logo span { color: var(--accent); }
.cs-nav-right { display: flex; align-items: center; gap: 16px; }
.cs-lang { font-size: 0.85rem; color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; }
.cs-btn-sm {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 10px; background: var(--accent); color: #fff; font-size: 0.9rem; font-weight: 500;
}
.cs-btn-sm:hover { color: #fff; opacity: .9; }

/* Hero */
.cs-hero { padding: 104px 0 40px; }
.cs-crumbs { font-size: 0.82rem; color: var(--muted); margin-bottom: 24px; }
.cs-crumbs a { color: var(--muted); }
.cs-crumbs a:hover { color: var(--ink); }
.cs-crumbs span { margin: 0 6px; }
.cs-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.cs-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.cs-badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 0.75rem; font-weight: 500; padding: 5px 10px; border-radius: 999px;
  color: #0a0c12; background: var(--ink);
}
.cs-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cs-category { font-size: 0.82rem; color: var(--muted); }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; margin-bottom: 16px; }
.cs-lede { font-size: 1.08rem; line-height: 1.5; color: var(--soft); max-width: 640px; }
.cs-note { font-size: 0.8rem; color: var(--faint); margin-top: 14px; }

.cs-key { background: var(--card); border: 1px solid #232838; border-radius: var(--radius); padding: 22px; }
.cs-key strong { display: block; font-size: 3.25rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; color: #fff; }
.cs-key-label { display: block; font-size: 1rem; color: var(--soft); margin-top: 8px; }
.cs-facts { list-style: none; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.cs-facts li, .cs-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; line-height: 1.45; }
.cs-facts li::before {
  content: ''; flex: none; width: 16px; height: 16px; margin-top: 3px;
  background: var(--accent-ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Cpath d='M5 12l4 4 10-10'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Cpath d='M5 12l4 4 10-10'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Sections */
.cs-section { padding: 28px 0; }
.cs-section h2 { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; margin-bottom: 16px; }
.cs-prose p { font-size: 1rem; line-height: 1.65; color: var(--soft); margin-bottom: 14px; }
.cs-prose p:last-child { margin-bottom: 0; }
.cs-prose strong { color: var(--ink); font-weight: 600; }
.cs-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.cs-list li { color: var(--soft); font-size: 1rem; line-height: 1.6; }
.cs-list li::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; margin-top: 10px; background: #4a5068; }
.cs-quote {
  margin: 18px 0; padding: 18px 20px; border-radius: 16px; background: var(--card);
  border: 1px solid var(--line); font-size: 1.05rem; line-height: 1.55; color: var(--ink);
}

/* Before / after */
.cs-compare { display: flex; flex-direction: column; }
.cs-compare-head { display: none; }
.cs-row { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; border-bottom: 1px solid #1a1e2a; }
.cs-row-label { font-size: 0.82rem; font-weight: 500; color: var(--muted); }
.cs-before, .cs-after { display: flex; gap: 10px; align-items: baseline; font-size: 0.98rem; line-height: 1.45; }
.cs-before { color: var(--faint); }
.cs-before::before, .cs-after::before { flex: none; width: 52px; font-size: 0.75rem; }
.cs-before::before { content: attr(data-tag); color: var(--faint); }
.cs-after::before { content: attr(data-tag); color: var(--accent-ink); font-weight: 500; }

/* Steps */
.cs-steps { list-style: none; counter-reset: cs-step; display: flex; flex-direction: column; margin-top: 8px; }
.cs-steps > li { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; padding-bottom: 22px; }
.cs-steps > li::before {
  counter-increment: cs-step; content: counter(cs-step);
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700; color: #fff; background: var(--accent);
}
.cs-steps > li:not(:last-child)::after { content: ''; position: absolute; left: 15.5px; top: 40px; bottom: 6px; width: 1px; background: var(--line-strong); }
.cs-steps h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.3; margin: 4px 0 6px; }
.cs-steps p { font-size: 0.98rem; line-height: 1.6; color: var(--soft); margin-bottom: 10px; }
.cs-steps p:last-child { margin-bottom: 0; }

.cs-hand { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--tint); margin-top: 6px; }
.cs-hand svg { flex: none; color: var(--accent-ink); margin-top: 2px; }
.cs-hand b { display: block; font-size: 0.82rem; font-weight: 500; color: var(--accent-ink); margin-bottom: 2px; }
.cs-hand p { font-size: 0.98rem; line-height: 1.55; color: var(--ink); }

.cs-figure { margin-top: 8px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #0d0f1a; }
.cs-figure img { display: block; width: 100%; height: auto; }
.cs-figure figcaption { font-size: 0.82rem; color: var(--muted); padding: 12px 16px; border-top: 1px solid var(--line); }

/* Aside: tools and call to action */
.cs-aside { display: flex; flex-direction: column; gap: 16px; padding: 28px 0; }
.cs-box { padding: 20px; border-radius: 18px; border: 1px solid var(--line); }
.cs-box-label { font-size: 0.82rem; font-weight: 500; color: var(--muted); margin-bottom: 12px; }
.cs-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.cs-chips li { font-size: 0.82rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--soft); }
.cs-cta { padding: 22px; border-radius: 20px; background: var(--tint); border: 1px solid rgba(91, 110, 245, 0.4); display: flex; flex-direction: column; gap: 14px; }
.cs-cta h2 { font-size: 1.3rem; font-weight: 700; line-height: 1.25; margin: 0; }
.cs-cta p { font-size: 0.95rem; line-height: 1.55; color: var(--soft); }
.cs-btn {
  display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px;
  border-radius: 12px; background: var(--accent); color: #fff; font-size: 1rem; font-weight: 500;
}
.cs-btn:hover { color: #fff; opacity: .9; }

/* Related cases */
.cs-related { padding: 32px 0 72px; }
.cs-related h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 14px; }
.cs-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.cs-card {
  display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink); transition: border-color .2s;
}
.cs-card:hover { border-color: var(--accent); color: var(--ink); }
.cs-card-cat { font-size: 0.78rem; color: var(--muted); }
.cs-card h3 { font-size: 1.02rem; font-weight: 600; line-height: 1.35; }
.cs-card p { font-size: 0.92rem; line-height: 1.5; color: var(--soft); }
.cs-card-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 10px; margin-top: auto; border-top: 1px solid var(--line); }
.cs-card-foot strong { font-size: 1.1rem; font-weight: 700; }
.cs-card-foot span { font-size: 0.85rem; color: var(--accent-ink); white-space: nowrap; }
.cs-nearby { margin-top: 18px; font-size: 0.9rem; color: var(--muted); }
.cs-nearby a { margin-right: 4px; }

/* Index page */
.cs-index-cta { margin: 8px 0 72px; max-width: 640px; }

footer { border-top: 1px solid var(--line); padding: 30px 20px; text-align: center; color: var(--muted); font-size: 0.85rem; line-height: 1.8; }
footer a { color: var(--accent-ink); }
footer .pf-logo { width: 12px; height: 12px; padding: 2px; margin-right: 6px; vertical-align: -3px; border-radius: 4px; background: #fff; box-sizing: content-box; }

/* Privacy tray */
.ng-tray { position: fixed; bottom: 20px; left: 20px; right: 20px; z-index: 9999; max-width: 460px; margin: 0 auto; background: #0d0f1a; border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); transform: translateY(150%); opacity: 0; transition: transform .4s cubic-bezier(0.16,1,0.3,1), opacity .4s; }
.ng-tray.ng-on { transform: translateY(0); opacity: 1; }
.ng-tray-h { font-size: 1rem; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.ng-tray-p { font-size: .85rem; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.ng-tray-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ng-tray-btn { flex: 1; min-width: 120px; min-height: 44px; padding: 11px 18px; font-size: .85rem; font-weight: 600; border-radius: 9px; cursor: pointer; border: none; font-family: inherit; text-align: center; }
.ng-tray-btn-y { background: var(--accent); color: #fff; }
.ng-tray-btn-n { background: #12152a; color: var(--ink); border: 1px solid var(--line); }
.ng-tray-link { background: none; border: none; color: var(--muted); font-size: .78rem; cursor: pointer; font-family: inherit; text-decoration: underline; margin-top: 12px; padding: 0; display: block; }
.ng-pill { position: fixed; bottom: 18px; left: 18px; z-index: 9998; width: 44px; height: 44px; border-radius: 50%; background: #0d0f1a; border: 1px solid var(--line); cursor: pointer; font-size: 1.1rem; display: none; align-items: center; justify-content: center; }
.ng-pill.ng-on { display: flex; }

@media (min-width: 720px) {
  .wrap { padding: 0 32px; }
  .cs-index-cta .cs-btn { align-self: flex-start; }
  .cs-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-compare-head, .cs-row { display: grid; grid-template-columns: 160px minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
  .cs-compare { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
  .cs-compare-head { display: grid; }
  .cs-compare-head div { padding: 12px 18px; font-size: 0.82rem; font-weight: 500; color: var(--muted); background: #0d1018; }
  .cs-compare-head div:last-child { color: var(--accent-ink); background: var(--tint); }
  .cs-row { padding: 0; border-bottom: 0; border-top: 1px solid var(--line); }
  .cs-row > * { padding: 16px 18px; }
  .cs-row-label { font-size: 0.95rem; color: var(--ink); }
  .cs-before::before, .cs-after::before { display: none; }
}

@media (min-width: 1000px) {
  .cs-hero { padding: 128px 0 48px; }
  .cs-hero-grid { grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; align-items: end; }
  .cs-key { padding: 28px; }
  .cs-key strong { font-size: 3.5rem; }
  .cs-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 64px; align-items: start; }
  .cs-aside { position: sticky; top: 96px; padding-top: 28px; }
  .cs-section { padding: 36px 0; }
  .cs-section h2 { font-size: 1.75rem; }
  .cs-prose p, .cs-list li { font-size: 1.06rem; }
  .cs-steps p { font-size: 1.02rem; }
  .cs-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
