/* ─────────────────────────────────────────────────────────────────────────────
   tensegrity-case-study.css
   Load AFTER css/shared.css.
   ───────────────────────────────────────────────────────────────────────────── */

/* ─── TOKENS ─────────────────────────────────────────────── */
:root {
  --accent:        #6B3FA0;
  --accent-light:  #8B5EC7;
  --accent-dim:    rgba(107,63,160,.12);
  --accent-dim2:   rgba(107,63,160,.06);

  --bg:            #F7F6FB;
  --bg-card:       #FFFFFF;
  --bg-subtle:     #EFECF7;
  --border:        rgba(107,63,160,.15);

  --text-primary:  #18151F;
  --text-secondary:#5A5468;
  --text-muted:    #8E8A9A;

  --radius-sm:     6px;
  --radius:        14px;
  --radius-lg:     22px;

  --shadow-card:   0 2px 16px rgba(107,63,160,.08), 0 1px 3px rgba(0,0,0,.04);
  --shadow-hover:  0 8px 32px rgba(107,63,160,.16), 0 2px 8px rgba(0,0,0,.06);

  --transition:    .22s cubic-bezier(.4,0,.2,1);

  /* shared.css aliases */
  --nav-bg:        rgba(247,246,251,.85);
  --text:          var(--text-primary);
}

[data-theme="dark"] {
  --bg:            #100E18;
  --bg-card:       #18152A;
  --bg-subtle:     #1E1A30;
  --border:        rgba(139,94,199,.18);

  --text-primary:  #EDEAF5;   /* near-white, minimal tint */
  --text-secondary:#B8B3C8;   /* neutral gray, contrast ~9.5:1 */
  --text-muted:    #9490A2;   /* lighter muted, contrast ~6.2:1 — passes WCAG AA */

  --shadow-card:   0 2px 20px rgba(0,0,0,.4);
  --shadow-hover:  0 8px 40px rgba(107,63,160,.25);

  /* accent — lightened for dark-bg contrast (≥4.5:1) */
  --accent:        #9B6FD0;
  --accent-light:  #B899E8;

  /* shared.css aliases */
  --nav-bg:        rgba(16,14,24,.85);
  --text:          var(--text-primary);
}

/* ─── BASE ───────────────────────────────────────────────── */
body {
  font-size: 16px;
  background: var(--bg);
  color: var(--text-primary);
}

a { color: var(--accent); }
a:hover { text-decoration: underline; }

/* ─── LAYOUT ─────────────────────────────────────────────── */
.container { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ─── HERO ───────────────────────────────────────────────── */
.hero {
  padding: 104px 0 60px; /* top: fixed nav height ~58px + 46px breathing room */
  border-bottom: 1px solid var(--border);
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 12px; border-radius: 99px;
  margin-bottom: 24px;
}
.hero-tag::before {
  content: ''; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
}
h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 18px; font-weight: 300;
  color: var(--text-secondary);
  max-width: 560px; line-height: 1.65;
  margin-bottom: 36px;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 16px 0;
}
.meta-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 0 24px;
}
.meta-item:first-child { padding-left: 0; }
.meta-item + .meta-item { border-left: 1px solid var(--border); }
dt.meta-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted);
}
dd.meta-value {
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
}

/* ─── TAGS ───────────────────────────────────────────────── */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; list-style: none; padding: 0; }
.tag {
  font-size: 12px; font-weight: 500;
  padding: 4px 10px; border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-subtle);
}

/* ─── MAIN CONTENT ───────────────────────────────────────── */
main { padding: 72px 0 120px; }

/* ─── SECTION ────────────────────────────────────────────── */
.section { margin-bottom: 72px; }
.section-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700; line-height: 1.2;
  letter-spacing: -.015em;
  margin-bottom: 20px;
}
h3 {
  font-family: 'Syne', sans-serif;
  font-size: 17px; font-weight: 600;
  margin-bottom: 10px;
}
p { color: var(--text-secondary); margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }

/* ─── CALLOUT ────────────────────────────────────────────── */
.callout {
  border-left: 3px solid var(--accent);
  padding: 18px 22px;
  background: var(--accent-dim2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 28px 0;  /* reset blockquote/aside browser defaults */
  margin-left: 0; margin-right: 0;
}
.callout p { margin-bottom: 0; font-style: italic; }

/* ─── USER CARDS ─────────────────────────────────────────── */
.user-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin: 28px 0;
  list-style: none; padding: 0;
}
@media (max-width: 560px) { .user-grid { grid-template-columns: 1fr; } }

.user-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}
.user-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.user-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 16px; font-weight: 700;
  color: var(--accent); margin-bottom: 14px;
}
.user-name {
  font-family: 'Syne', sans-serif;
  font-size: 15px; font-weight: 700;
  margin-bottom: 2px;
}
.user-role {
  font-size: 12px; color: var(--text-muted);
  margin-bottom: 14px;
}
.user-trait {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.55; margin-bottom: 0;
}
.user-quote {
  margin: 14px 0 0; padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 13px; font-style: italic;
  color: var(--text-muted);
}
.user-quote p { color: inherit; font-size: inherit; font-style: inherit; margin-bottom: 0; }

/* ─── FRICTION MAP ───────────────────────────────────────── */
.friction-map { margin: 28px 0; list-style: none; padding: 0; }
.friction-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px 16px; align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.friction-row:last-child { border-bottom: none; }
.step-badge {
  font-family: 'Syne', sans-serif;
  font-size: 11px; font-weight: 700;
  text-align: center;
  padding: 4px 8px; border-radius: var(--radius-sm);
  letter-spacing: .04em;
}
.step-badge.high   { background: rgba(220,53,69,.12); color: #DC3545; }
.step-badge.medium { background: rgba(255,153,0,.12);  color: #E07C00; }
.step-badge.low    { background: rgba(107,63,160,.1);  color: var(--accent); }

.friction-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 0; }
.friction-desc strong { color: var(--text-primary); font-weight: 600; }
.friction-affected {
  font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted); white-space: nowrap;
}

/* ─── FINDING CARDS ──────────────────────────────────────── */
.finding-list { display: flex; flex-direction: column; gap: 16px; margin: 24px 0; list-style: none; padding: 0; }
.finding-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex; gap: 18px; align-items: flex-start;
  box-shadow: var(--shadow-card);
}.finding-body h3 { margin-bottom: 6px; font-size: 15px; }
.finding-body p  { font-size: 14px; margin-bottom: 0; }

/* ─── BEFORE / AFTER ─────────────────────────────────────── */
.ba-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2px; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border);
  margin: 28px 0;
}
@media (max-width: 560px) { .ba-grid { grid-template-columns: 1fr; } }

.ba-col { padding: 26px 24px; background: var(--bg-card); }
.ba-col ul { list-style: none; padding: 0; margin: 0; }
.ba-col + .ba-col { border-left: 1px solid var(--border); }
@media (max-width: 560px) { .ba-col + .ba-col { border-left: none; border-top: 1px solid var(--border); } }

.ba-header {
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 14px;
}
.ba-header.before { color: #DC3545; }
.ba-header.after  { color: #1A9957; }
.ba-item {
  font-size: 14px; color: var(--text-secondary);
  padding: 8px 0; border-bottom: 1px solid var(--border);
  display: flex; gap: 10px; align-items: flex-start;
}
.ba-item:last-child { border-bottom: none; }
.ba-item::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0; margin-top: 8px;
}
.ba-col:first-child .ba-item::before { background: #DC3545; }
.ba-col:last-child  .ba-item::before { background: #1A9957; }

/* ─── REFLECTION ─────────────────────────────────────────── */
.reflection-card {
  background: var(--accent-dim2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-top: 28px;
}
.reflection-card p { color: var(--text-secondary); }

/* ─── DIVIDER ────────────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 56px 0;
}

/* ─── DOC LINK ───────────────────────────────────────────── */
.doc-link {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 32px; margin-bottom: 4px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  text-decoration: none;
}
.doc-link:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--accent);
}
.doc-link svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.doc-link-badge {
  font-size: 10px; font-weight: 700;
  letter-spacing: .08em;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 2px 7px; border-radius: 99px;
}

