@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=general-sans@400,500,600,700&display=swap');

/* ─── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ─── Tokens ─────────────────────────────────────────── */
:root {
  --bg-base:     #07080D;
  --bg-surface:  #0D0F18;
  --bg-elevated: #14172100;
  --bg-card:     #0F1120;

  --border-sub:  rgba(255,255,255,0.05);
  --border-def:  rgba(255,255,255,0.10);
  --border-med:  rgba(255,255,255,0.18);

  --blue:        #3452FF;
  --blue-light:  #7B8FFF;
  --blue-glow:   rgba(52, 82, 255, 0.12);
  --blue-dim:    rgba(52, 82, 255, 0.06);

  --white:       #F3EEE5;
  --muted:       #595E74;
  --muted-light: #7C8396;

  --font-display: 'Manrope', system-ui, sans-serif;
  --font-body:    'General Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;

  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ─── Light Theme ───────────────────────────────────── */
[data-theme="light"] {
  --bg-base:     #F5F4F1;
  --bg-surface:  #EDEBE7;
  --bg-elevated: transparent;
  --bg-card:     #FFFFFF;

  --border-sub:  rgba(0,0,0,0.06);
  --border-def:  rgba(0,0,0,0.10);
  --border-med:  rgba(0,0,0,0.22);

  --blue-light:  #2235CC;

  --white:       #0C0C0E;
  --muted:       #ABABAB;
  --muted-light: #6B6B6B;
}

[data-theme="light"] .hero-bg {
  background:
    radial-gradient(ellipse 60% 50% at 70% 30%, rgba(52,82,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(52,82,255,0.04) 0%, transparent 50%);
}

[data-theme="light"] .hero-grid {
  background-image: radial-gradient(circle, rgba(0,0,0,0.08) 1px, transparent 1px);
}

[data-theme="light"] .cs-hero-bg {
  background: radial-gradient(ellipse 60% 80% at 80% 20%, rgba(52,82,255,0.07) 0%, transparent 60%);
}

[data-theme="light"] .nav {
  background: rgba(245,244,241,0.92);
  border-color: rgba(0,0,0,0.10);
}

[data-theme="light"] .nav-links a:hover {
  background: rgba(0,0,0,0.06);
  color: var(--white);
}

[data-theme="light"] .nav-back {
  background: rgba(0,0,0,0.06);
}

[data-theme="light"] .nav-back:hover {
  background: rgba(0,0,0,0.10);
}

[data-theme="light"] .case-card-preview {
  background: #EAEAE8;
}

[data-theme="light"] .screen-frame {
  background: #E8E8E5;
  border-color: rgba(0,0,0,0.08);
}

[data-theme="light"] .screen-frame.light {
  background: #F8F8F6;
}

[data-theme="light"] .screen-label {
  background: rgba(245,244,241,0.92);
  border-color: rgba(0,0,0,0.08);
  color: #0C0C0E;
}

[data-theme="light"] #lightbox-backdrop {
  background: rgba(245,244,241,0.96);
}

[data-theme="light"] #lightbox-inner {
  background: var(--bg-base);
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 80px rgba(0,0,0,0.15);
}

[data-theme="light"] #lightbox-close,
[data-theme="light"] #lightbox-prev,
[data-theme="light"] #lightbox-next {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.10);
}

[data-theme="light"] #lightbox-close:hover,
[data-theme="light"] #lightbox-prev:hover,
[data-theme="light"] #lightbox-next:hover {
  background: rgba(0,0,0,0.10);
  color: var(--white);
}

[data-theme="light"] #lightbox-browser-chrome,
[data-theme="light"] #lightbox-email-chrome {
  background: #EDEBE7;
  border-color: rgba(0,0,0,0.10);
}

[data-theme="light"] #lightbox-email-topbar {
  border-color: rgba(0,0,0,0.07);
}

[data-theme="light"] #lightbox-browser-url {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.07);
  color: rgba(0,0,0,0.45);
}

/* ─── Theme Switcher ─────────────────────────────────── */
.theme-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-left: 10px;
  margin-left: 6px;
  border-left: 1px solid rgba(255,255,255,0.10);
  flex-shrink: 0;
}

[data-theme="light"] .theme-switcher {
  border-left-color: rgba(0,0,0,0.10);
}

.theme-btn .material-symbols-outlined {
  font-size: inherit;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20;
  user-select: none;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--muted-light);
  border-radius: 100px;
  cursor: pointer;
  font-size: 18px;
  transition: color var(--transition), background var(--transition);
}

.theme-btn:hover {
  color: var(--white);
  background: rgba(255,255,255,0.07);
}

[data-theme="light"] .theme-btn:hover {
  background: rgba(0,0,0,0.06);
}

.theme-btn.active {
  color: var(--white);
  background: rgba(255,255,255,0.12);
}

[data-theme="light"] .theme-btn.active {
  background: rgba(0,0,0,0.08);
}

/* ─── Base ───────────────────────────────────────────── */
body {
  background: var(--bg-base);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* ─── Nav ────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 12px 10px 12px 24px;
  background: rgba(7, 8, 13, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 100px;
  max-width: calc(100vw - 48px);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white);
  white-space: nowrap;
}

.nav-logo span {
  color: var(--white);
}

.nav-links {
  display: flex;
  gap: 2px;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-light);
  border-radius: 100px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.07);
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-light);
  background: rgba(255,255,255,0.06);
  border-radius: 100px;
  transition: color var(--transition), background var(--transition);
}
.nav-back:hover {
  color: var(--white);
  background: rgba(255,255,255,0.10);
}
.nav-back svg { transition: transform var(--transition); }
.nav-back:hover svg { transform: translateX(-3px); }

/* ─── Hero ───────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 48px 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 30%, rgba(52,82,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(52,82,255,0.05) 0%, transparent 50%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 70%);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 24px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.hero-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--blue);
  opacity: 0.5;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 100px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--white);
  position: relative;
  margin-bottom: 40px;
}

.hero-title em {
  font-style: italic;
  color: var(--blue);
}

.hero-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  position: relative;
}

.hero-desc {
  max-width: 480px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--muted-light);
}

.hero-stats {
  display: flex;
  gap: 48px;
  flex-shrink: 0;
}

.stat-item {
  text-align: right;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 300;
  line-height: 1;
  color: var(--white);
}

.stat-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

/* ─── Section ────────────────────────────────────────── */
.section {
  padding: 120px 48px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.section-label::after {
  content: '';
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: var(--border-def);
}

/* ─── Case Study Cards ───────────────────────────────── */
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: start;
}

.case-grid > .case-card:nth-child(even) {
  margin-top: 80px;
}

.case-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-sub);
  padding: 0;
  overflow: hidden;
  transition: border-color var(--transition), background var(--transition);
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}

.case-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--blue-dim);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 1;
  pointer-events: none;
}

.case-card:hover {
  border-color: var(--border-med);
  background: var(--bg-card);
}

.case-card:hover::before { opacity: 1; }

/* Card preview image */
.case-card-preview {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #0A0D18;
  border-bottom: 1px solid var(--border-sub);
  position: relative;
}

.case-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.case-card:hover .case-card-preview img {
  transform: scale(1.03);
}

.case-card-body {
  padding: 36px 48px 48px;
  position: relative;
  z-index: 2;
}

.case-card-index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.case-role-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--blue-dim);
  border: 1px solid rgba(201,169,110,0.2);
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

.case-card-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 20px;
  transition: color var(--transition);
}

.case-card:hover .case-card-title { color: var(--blue-light); }

.case-card-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted-light);
  margin-bottom: 40px;
}

.case-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
}

.tag {
  padding: 4px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-def);
  border-radius: 100px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted-light);
}

.case-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.case-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  transition: gap var(--transition);
}
.case-card:hover .case-cta { gap: 16px; }

.case-year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* ─── Case Study Page ────────────────────────────────── */
.cs-hero {
  padding: 120px 48px 80px;
  border-bottom: 1px solid var(--border-sub);
  position: relative;
  overflow: hidden;
}

.cs-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 80% 20%, var(--blue-glow) 0%, transparent 60%);
  pointer-events: none;
}

.cs-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 65%);
  pointer-events: none;
}

[data-theme="light"] .cs-hero-bg::after {
  background-image: radial-gradient(circle, rgba(0,0,0,0.08) 1px, transparent 1px);
}

.cs-header {
  max-width: 1200px;
  margin: 0 auto;
}

.cs-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.cs-number {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.cs-breadcrumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
}

.cs-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 80px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 48px;
}

.cs-title em { font-style: italic; color: var(--blue); }

.cs-meta-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 48px;
  border-top: 1px solid var(--border-sub);
}

.cs-meta-item label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.cs-meta-item p {
  font-size: 14px;
  color: var(--white);
  line-height: 1.5;
}

/* ─── Content sections ───────────────────────────────── */
.cs-body {
  max-width: 1200px;
  margin: 0 auto;
}

.cs-section {
  padding: 80px 48px;
  border-bottom: 1px solid var(--border-sub);
}

.cs-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 32px;
}

.cs-section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 32px;
}

.cs-section-title em { font-style: italic; color: var(--blue); }

.cs-text {
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted-light);
  max-width: 700px;
}

.cs-text + .cs-text { margin-top: 20px; }

.cs-text strong { color: var(--white); font-weight: 600; }

/* ─── Two-col layout ─────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.two-col-wide {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 64px;
  align-items: start;
}

/* ─── Process steps ──────────────────────────────────── */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border-sub);
  position: relative;
}

.step:last-child { border-bottom: none; }

.step-num {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 300;
  color: var(--border-def);
  line-height: 1;
  padding-top: 4px;
  transition: color var(--transition);
}

.step:hover .step-num { color: var(--blue-glow); }

.step-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 12px;
}

.step-content p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted-light);
}

/* ─── Decision cards ─────────────────────────────────── */
.decisions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.decision-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-sub);
  padding: 36px;
  transition: border-color var(--transition);
}

.decision-card:hover { border-color: var(--border-med); }

.decision-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 20px;
}

.decision-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 12px;
  line-height: 1.3;
}

.decision-card p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted-light);
}

/* ─── Screen mockup ──────────────────────────────────── */
.screens-section {
  padding: 80px 48px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-sub);
  border-bottom: 1px solid var(--border-sub);
}

.screens-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.screens-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.screen-frame {
  position: relative;
  background: #0A0E1A;
  border: 1px solid var(--border-def);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen-frame.tall { aspect-ratio: 3/4; }
.screen-frame.wide { aspect-ratio: 16/9; }
.screen-frame.square { aspect-ratio: 1; }

.screen-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.screen-frame:hover img { transform: scale(1.02); }

/* Light-background screenshots get a subtle inset shadow */
.screen-frame.light {
  background: #F5F5F5;
}

/* Full-fit: show entire image without cropping (for diagrams, docs) */
.screen-frame.contain img {
  object-fit: contain;
  object-position: center;
}

/* 4-up step grid */
.screens-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.screen-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
}

.screen-placeholder .icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-def);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.screen-placeholder p {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

.screen-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-transform: uppercase;
  background: rgba(7, 8, 13, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 10px;
  border-radius: 4px;
}

/* ─── Outcomes ───────────────────────────────────────── */
.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 48px;
}

.outcome-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-sub);
  padding: 36px 28px;
}

.outcome-value {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 300;
  color: var(--blue);
  line-height: 1;
  margin-bottom: 8px;
}

.outcome-label {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted-light);
}

/* ─── Reading Progress Bar ───────────────────────── */
#cs-read-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--blue);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 200;
  pointer-events: none;
}

/* ─── Section Dot Nav ─────────────────────────────── */
#cs-dot-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

#cs-dot-header {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  margin-bottom: 10px;
  padding-right: 1px;
}

.cs-dot {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 0;
  color: inherit;
  line-height: 1;
}

.cs-dot-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(5px);
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s;
  pointer-events: none;
}

.cs-dot-pip {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  flex-shrink: 0;
  transition: width 0.25s ease, height 0.25s ease, background 0.25s ease, border-radius 0.25s ease, box-shadow 0.25s ease;
  display: block;
}

.cs-dot:hover .cs-dot-label {
  opacity: 1;
  transform: translateX(0);
  color: var(--muted-light);
}

.cs-dot.active .cs-dot-label {
  opacity: 1;
  transform: translateX(0);
  color: var(--white);
}

.cs-dot.active .cs-dot-pip {
  width: 6px;
  height: 6px;
  background: var(--blue);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(52, 82, 255, 0.5);
}

.cs-dot:hover:not(.active) .cs-dot-pip {
  background: var(--muted);
}

[data-theme="light"] .cs-dot-pip {
  background: rgba(0,0,0,0.15);
}

@media (max-width: 1280px) {
  #cs-dot-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  #cs-read-bar { transition: none; }
  .cs-dot-label { transition: none; }
  .cs-dot-pip { transition: none; }
}

/* ─── Team Setup ─────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 48px;
}

.team-card {
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-def);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-card.mine {
  background: var(--blue-dim);
  border-color: rgba(52, 82, 255, 0.2);
}

.team-card-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.team-card-icon .material-symbols-outlined {
  font-size: 16px;
  color: var(--muted);
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20;
}

.team-card.mine .team-card-icon {
  background: rgba(52, 82, 255, 0.15);
}

.team-card.mine .team-card-icon .material-symbols-outlined {
  color: var(--blue-light);
}

.team-card-role {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.team-card-track {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.team-card.mine .team-card-track {
  color: var(--blue-light);
  opacity: 0.7;
}

.team-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.team-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--blue-dim);
  border: 1px solid rgba(52, 82, 255, 0.3);
  flex-shrink: 0;
}

/* ─── Next Case Study ────────────────────────────────── */
.cs-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 64px 48px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-sub);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}

.cs-next:hover { background: var(--bg-card); }

.cs-next-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.cs-next-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 300;
  color: var(--white);
  transition: color var(--transition);
}

.cs-next:hover .cs-next-title { color: var(--blue-light); }

.cs-next-arrow {
  width: 56px;
  height: 56px;
  border: 1px solid var(--border-def);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-light);
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}

.cs-next:hover .cs-next-arrow {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateX(8px);
}

/* ─── Pill lists ─────────────────────────────────────── */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.pill {
  padding: 6px 14px;
  border: 1px solid var(--border-def);
  border-radius: 100px;
  font-size: 12px;
  color: var(--muted-light);
}

/* ─── Divider ────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border-sub);
  margin: 0 48px;
}

/* ─── Footer ─────────────────────────────────────────── */
.footer {
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-sub);
}

.footer-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  color: var(--muted-light);
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer-linkedin {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-light);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.footer-linkedin:hover { opacity: 1; color: var(--white); }
.footer-linkedin svg { flex-shrink: 0; }

/* ─── Lightbox Modal ─────────────────────────────────── */

#lightbox {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
}

#lightbox.active {
  visibility: visible;
  pointer-events: auto;
}

#lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 8, 13, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#lightbox.active #lightbox-backdrop { opacity: 1; }

#lightbox-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(90vw, 1200px);
  max-height: 92vh;
  transform: scale(0.94) translateY(12px);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.32s ease;
}

#lightbox.active #lightbox-inner {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* ── Top bar: title left, close button right ── */
#lightbox-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
}

#lightbox-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-light);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#lightbox-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-def);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

#lightbox-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

/* ── Browser chrome ── */
#lightbox-browser-chrome {
  display: none;
  align-items: center;
  gap: 12px;
  background: #16181F;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 9px 14px;
}

#lightbox-browser-chrome.visible { display: flex; }

#lightbox-browser-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.lb-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.lb-dot-red    { background: #FF5F57; }
.lb-dot-yellow { background: #FFBD2E; }
.lb-dot-green  { background: #28C840; }

#lightbox-browser-url {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Email chrome ── */
#lightbox-email-chrome {
  display: none;
  flex-direction: column;
  background: #16181F;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

#lightbox-email-chrome.visible { display: flex; }

#lightbox-email-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#lightbox-email-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

#lightbox-email-inbox {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
}

#lightbox-email-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  color: rgba(255, 255, 255, 0.3);
}

#lightbox-email-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
}

#lightbox-email-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 193, 7, 0.15);
  border: 1px solid rgba(255, 193, 7, 0.25);
  color: #FFC107;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#lightbox-email-fields {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

#lightbox-email-from {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

#lightbox-email-from strong {
  font-weight: 500;
  color: #fff;
}

#lightbox-email-from span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  margin-left: 4px;
}

#lightbox-email-subject {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Connect chrome to image seamlessly */
#lightbox-img-wrap.below-chrome {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* ── Image ── */
#lightbox-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: calc(92vh - 120px);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7);
}

#lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
}

#lightbox-img:hover { transform: none; }

/* ── Bottom nav: prev · counter · next ── */
#lightbox-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding-top: 16px;
}

#lightbox-prev,
#lightbox-next {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-def);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
}

#lightbox-prev:hover,
#lightbox-next:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

#lightbox-prev:disabled,
#lightbox-next:disabled {
  opacity: 0.2;
  cursor: default;
  pointer-events: none;
}

#lightbox-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--muted);
  min-width: 40px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  #lightbox-backdrop,
  #lightbox-inner { transition: none; }
}

/* ─── Animations ─────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.anim { opacity: 0; }
.anim.visible { animation: fadeUp 0.7s var(--transition) forwards; }
.anim-d1 { animation-delay: 0.1s; }
.anim-d2 { animation-delay: 0.2s; }
.anim-d3 { animation-delay: 0.3s; }
.anim-d4 { animation-delay: 0.4s; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .case-grid { grid-template-columns: 1fr; }
  .case-grid > .case-card:nth-child(even) { margin-top: 0; }
  .decisions-grid { grid-template-columns: 1fr 1fr; }
  .outcomes-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .cs-meta-row { grid-template-columns: 1fr 1fr; }
  .two-col, .two-col-wide { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .nav { top: 12px; padding: 10px 8px 10px 18px; gap: 16px; }
  .hero { padding: 0 24px 64px; }
  .section { padding: 80px 24px; }
  .cs-hero { padding: 100px 24px 60px; }
  .cs-section { padding: 60px 24px; }
  .screens-section { padding: 60px 24px; }
  .cs-next { padding: 48px 24px; flex-direction: column; align-items: flex-start; gap: 32px; }
  .footer { padding: 32px 24px; flex-direction: column; gap: 12px; text-align: center; }
  .decisions-grid { grid-template-columns: 1fr; }
  .outcomes-grid { grid-template-columns: 1fr 1fr; }
  .screens-grid { grid-template-columns: 1fr; }
  .screens-grid-2 { grid-template-columns: 1fr; }
  .hero-meta { flex-direction: column; align-items: flex-start; gap: 32px; }
  .hero-stats { gap: 32px; }
  .nav-links { display: none; }
  .cs-meta-row { grid-template-columns: 1fr; gap: 20px; }
  .divider { margin: 0 24px; }
}

/* ─── Page Transition Curtain ────────────────────────── */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-base);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
