/* ─────────────────────────────────────────────
   SA-HR — Case Study Template (shared base)
   Used by every /work/ subpage
   Each page sets --accent-client in an inline <style>
   ───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Sora:wght@400;500;600;700&family=Fraunces:ital,wght@0,400;0,500;1,400;1,500&family=JetBrains+Mono:wght@400;500&family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400;1,500&display=swap');

:root {
  --bg: #07090e;
  --surface: rgba(20, 25, 36, 0.6);
  --border: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.88);
  --text-muted: rgba(255, 255, 255, 0.55);
  --text-faint: rgba(255, 255, 255, 0.35);
  --accent: #3ea8ff;
  --accent-bright: #5fc4ff;
  --cyan: #00e5ff;
  --radius: 18px;
  --radius-lg: 28px;
  --t-fast: 180ms;
  --t-med: 420ms;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Fraunces', serif;
  --font-mono: 'JetBrains Mono', monospace;
  --accent-client: #3ea8ff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}
::selection { background: color-mix(in srgb, var(--accent-client) 38%, transparent); color: #fff; }

/* Ambient background glow tinted by client accent */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 80% 15%, color-mix(in srgb, var(--accent-client) 11%, transparent), transparent 60%),
    radial-gradient(ellipse 60% 40% at 15% 85%, color-mix(in srgb, var(--accent-client) 6%, transparent), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.cs-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}
@media (max-width: 720px) { .cs-container { padding: 0 20px; } }

/* ─── NAV ─── */
.cs-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 12px 10px 18px;
  background: rgba(14, 16, 34, 0.55);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.cs-nav-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cs-nav-logo::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 10px var(--accent);
  animation: logoDotPulse 2.8s ease-in-out infinite;
}
@keyframes logoDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}
.cs-nav-divider { width: 1px; height: 18px; background: rgba(255, 255, 255, 0.08); }
.cs-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color var(--t-fast);
}
.cs-nav-back:hover { color: #fff; }
.cs-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #0a0f18;
  background: linear-gradient(135deg, var(--accent-bright), var(--cyan));
  border-radius: 999px;
  text-decoration: none;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.cs-nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(62, 168, 255, 0.35); }

/* ─── HERO ─── */
.cs-hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 0 60px;
  position: relative;
  z-index: 1;
}
.cs-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-client);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cs-eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--accent-client); }
.cs-title {
  font-size: clamp(3.5rem, 10vw, 9rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin-bottom: 36px;
  background: linear-gradient(180deg, #FFFFFF 0%, #DADBFF 55%, color-mix(in srgb, var(--accent-client) 55%, #9B8EE2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 32px color-mix(in srgb, var(--accent-client) 25%, transparent));
  font-weight: 500;
}
.cs-tagline {
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 40px;
  line-height: 1.55;
}
.cs-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}
.cs-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--text);
}
.cs-pill-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.cs-pill-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: inherit;
  animation: pillPulse 2.2s ease-in-out infinite;
}
@keyframes pillPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 0;    transform: scale(2.6); }
}
.cs-pill-live { color: rgba(180, 255, 220, 0.9); }
.cs-pill-live .cs-pill-dot { background: #00D97E; box-shadow: 0 0 8px rgba(0, 217, 126, 0.55); }
.cs-pill-rework { color: rgba(180, 235, 255, 0.9); }
.cs-pill-rework .cs-pill-dot { background: #00E5FF; box-shadow: 0 0 8px rgba(0, 229, 255, 0.5); }
.cs-pill-soon { color: rgba(220, 195, 255, 0.9); }
.cs-pill-soon .cs-pill-dot { background: #C566FF; box-shadow: 0 0 8px rgba(197, 102, 255, 0.5); }
.cs-pill-muted { color: var(--text-muted); }

.cs-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  transition: all var(--t-fast);
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.cs-btn-primary {
  background: linear-gradient(135deg, var(--accent-bright), var(--cyan));
  color: #0a0f18;
}
.cs-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(62, 168, 255, 0.35); }
.cs-btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.cs-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: color-mix(in srgb, var(--accent-client) 55%, transparent);
}
.cs-btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ─── SHOWCASE (hero visual) ─── */
.cs-showcase {
  padding: 40px 0 120px;
  position: relative;
}
.cs-showcase-inner {
  background: linear-gradient(180deg, rgba(20, 25, 36, 0.4), rgba(10, 14, 22, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  padding: 48px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}
.cs-showcase-inner::before {
  content: "";
  position: absolute;
  top: -40%; right: -30%;
  width: 80%; height: 120%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-client) 14%, transparent), transparent 70%);
  pointer-events: none;
}
.cs-showcase svg { width: 100%; height: auto; display: block; position: relative; z-index: 1; }
@media (max-width: 720px) { .cs-showcase-inner { padding: 24px; } }

/* ─── SECTIONS ─── */
.cs-section { padding: 100px 0; position: relative; z-index: 1; }
.cs-section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cs-section-label::before { content: ""; width: 24px; height: 1px; background: var(--accent); }
.cs-section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 500;
  max-width: 900px;
  margin-bottom: 28px;
  color: #fff;
}
.cs-section-intro {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.65;
}
.cs-section-intro + .cs-section-intro { margin-top: 16px; }

/* ─── FEATURE GRID ─── */
.cs-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 56px;
}
.cs-feature {
  padding: 30px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  transition: transform var(--t-med), border-color var(--t-med), background var(--t-med);
  position: relative;
  overflow: hidden;
}
.cs-feature:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent-client) 30%, var(--border));
  background: rgba(255, 255, 255, 0.05);
}
.cs-feature-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-client);
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}
.cs-feature-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.cs-feature-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ─── STATS ─── */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  margin-top: 48px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cs-stat-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.6rem, 4.5vw, 3.8rem);
  line-height: 1;
  background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--accent-client) 60%, #999));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.cs-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ─── STACK ─── */
.cs-stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}
.cs-chip {
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  transition: all var(--t-fast);
}
.cs-chip:hover {
  border-color: color-mix(in srgb, var(--accent-client) 45%, transparent);
  color: color-mix(in srgb, var(--accent-client) 80%, #fff);
  background: color-mix(in srgb, var(--accent-client) 8%, transparent);
  transform: translateY(-1px);
}

/* ─── MORE WORK ─── */
.cs-more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 48px;
}
.cs-more-card {
  padding: 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  text-decoration: none;
  color: inherit;
  transition: all var(--t-med);
  position: relative;
}
.cs-more-card:hover {
  transform: translateY(-4px);
  border-color: rgba(62, 168, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}
.cs-more-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.cs-more-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.02em;
}
.cs-more-arrow {
  position: absolute;
  top: 22px; right: 22px;
  color: var(--text-muted);
  transition: color var(--t-fast), transform var(--t-fast);
}
.cs-more-card:hover .cs-more-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ─── CTA ─── */
.cs-cta-section {
  padding: 120px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.cs-cta-section::before {
  content: "";
  position: absolute;
  top: -20%; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-client) 14%, transparent), transparent 60%);
  pointer-events: none;
}
.cs-cta-section > * { position: relative; z-index: 1; }
.cs-cta-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  color: #fff;
}
.cs-cta-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 36px;
}

/* ─── FOOTER ─── */
.cs-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  position: relative;
  z-index: 1;
}
.cs-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

/* ─── REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 760ms ease, transform 760ms cubic-bezier(.2,.7,.3,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ─── RESPONSIVE ─── */
@media (max-width: 720px) {
  .cs-hero { padding: 110px 0 40px; }
  .cs-showcase { padding: 20px 0 70px; }
  .cs-section { padding: 70px 0; }
  .cs-nav { padding: 8px 10px 8px 14px; gap: 12px; }
  .cs-nav-divider, .cs-nav-cta { display: none; }
  .cs-feature { padding: 24px; }
  .cs-cta-section { padding: 80px 0; }
  .cs-title { font-size: clamp(2.8rem, 12vw, 4rem); line-height: 1; }
  .cs-tagline { font-size: clamp(0.98rem, 2.2vw, 1.1rem); }
  .cs-meta-row { gap: 8px; }
  .cs-pill { padding: 6px 11px; font-size: 11px; }
  .cs-btn-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .cs-btn { width: 100%; justify-content: center; padding: 13px 22px; }
}
@media (max-width: 480px) {
  .cs-hero { padding: 90px 0 32px; }
  .cs-section { padding: 56px 0; }
  .cs-cta-section { padding: 64px 0; }
  .cs-title { font-size: clamp(2.4rem, 13vw, 3.2rem); letter-spacing: -0.04em; }
  .cs-tagline { font-size: 0.95rem; line-height: 1.55; }
  .cs-feature { padding: 20px 18px; }
}
