/* ============================================================
   MICHAEL BELFATTO — PORTFOLIO
   styles.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@300;400&family=Caveat:wght@400;500&display=swap');

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:          #F8F6F2;
  --surface:     #FDFCF9;
  --ink:         #1C1917;
  --ink-2:       #6B6560;
  --ink-3:       #A09C97;
  --accent:      #3D35F0;
  --accent-dim:  rgba(61,53,240,0.08);
  --blue:        #1D4E8F;
  --blue-dim:    rgba(29,78,143,0.08);
  --border:      rgba(20,15,8,0.09);
  --border-med:  rgba(20,15,8,0.16);

  --f-display:   'Instrument Serif', Georgia, serif;
  --f-body:      'Inter', system-ui, sans-serif;
  --f-mono:      'JetBrains Mono', 'Courier New', monospace;

  --radius-sm:   4px;
  --radius:      8px;
  --radius-lg:   12px;

  --max-w:       1120px;
  --case-w:      760px;

  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--f-body); }

/* ── TYPE SCALE ─────────────────────────────────────────── */
.t-label {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.t-label--accent { color: var(--ink-3); }
.t-label--blue   { color: var(--blue); }

h1, .h1 {
  font-family: var(--f-display);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

h2, .h2 {
  font-family: var(--f-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h3, .h3 {
  font-family: var(--f-display);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 400;
  line-height: 1.2;
}

h4, .h4 {
  font-family: var(--f-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.lead {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-2);
}

.body-sm {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink-2);
}

/* ── LAYOUT ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

.case-container {
  width: 100%;
  max-width: var(--case-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── NAV ────────────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 56px;
  display: flex;
  align-items: center;
  background: rgba(248,246,242,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--f-body);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.6; }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }

.nav-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color 0.2s;
}
.nav-back:hover { color: var(--ink); }
.nav-back svg { width: 14px; height: 14px; }

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  padding-top: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 2rem 3rem;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  margin-bottom: 2rem;
}

/* ── iMESSAGE BUBBLE ─────────────────────────────────── */
.imessage-bubble {
  display: inline-flex;
  align-items: center;
  background: #1A8DF1;
  color: #fff;
  border-radius: 20px;
  border-bottom-left-radius: 5px;
  padding: 8px 14px;
  min-height: 36px;
}

.bubble-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 38px;
  transition: opacity 0.25s ease, max-width 0.3s ease 0.25s, gap 0.3s ease 0.25s;
}

.bubble-dots span {
  display: block;
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  animation: imsg-dot 1.4s infinite ease-in-out;
}
.bubble-dots span:nth-child(2) { animation-delay: 0.18s; }
.bubble-dots span:nth-child(3) { animation-delay: 0.36s; }

@keyframes imsg-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.55; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.bubble-msg {
  font-family: var(--f-body);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  white-space: nowrap;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity 0.5s ease 0.3s, max-width 0.4s ease;
}

.imessage-bubble.is-revealed .bubble-dots {
  opacity: 0;
  max-width: 0;
  gap: 0;
}
.imessage-bubble.is-revealed .bubble-msg {
  opacity: 1;
  max-width: 220px;
}

.hero-headline {
  max-width: 820px;
  margin-bottom: 2rem;
}

.hero-headline em {
  font-style: italic;
  color: var(--ink-2);
}
.hero-headline .highlight {
  color: var(--accent);
}

/* ── YELLOW HIGHLIGHT SWEEP ──────────────────────────────── */
.highlight {
  position: relative;
  display: inline;
}
.highlight::after {
  content: '';
  position: absolute;
  left: -4px; right: -4px; top: 18%; height: 62%;
  z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' viewBox='0 0 200 22'%3E%3Cpath d='M4 7 Q55 3 100 6 Q148 9 196 4 Q198 16 194 18 Q148 20 100 17 Q52 14 4 19 Q2 14 4 7Z' fill='%23FDE047' fill-opacity='0.58'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.highlight.is-active::after {
  clip-path: inset(0 0% 0 0);
}

.hero-sub {
  max-width: 540px;
  margin-bottom: 3rem;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.pill {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border-med);
  color: var(--ink-2);
  border-radius: var(--radius-sm);
  background: transparent;
  transition: border-color 0.2s, color 0.2s;
}
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill--accent {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.hero-foot {
  border-top: 1px solid var(--border);
  padding: 1.25rem 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.stat .t-label {
  font-family: var(--f-body);
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-2);
}

.stat-val {
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
}

/* ── SECTION COMMON ─────────────────────────────────────── */
.section { padding: 6rem 0; }
.section--alt { background: var(--surface); }
.section--dark {
  background: var(--ink);
  color: var(--bg);
}
.section--dark .t-label { color: rgba(243,241,236,0.4); }
.section--dark .lead { color: rgba(243,241,236,0.65); }
.section--dark .body-sm { color: rgba(243,241,236,0.55); }

.section-header {
  margin-bottom: 3.5rem;
}

.section-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ── WORK GRID ──────────────────────────────────────────── */
.work-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.work-card {
  background: var(--surface);
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 2rem;
  padding: 2.5rem;
  border-left: 3px solid transparent;
  transition: border-color 0.2s var(--ease), background 0.2s;
  text-decoration: none;
  color: inherit;
  align-items: start;
}

.work-card:hover {
  border-left-color: var(--accent);
  background: #FAFAFA;
}

.work-card:hover .card-arrow { transform: translateX(4px); color: var(--accent); }

.card-meta { padding-top: 3px; }

.card-year {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-bottom: 0.75rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--border);
  color: var(--ink-3);
  border-radius: var(--radius-sm);
}

.card-body {}

.card-title {
  font-family: var(--f-display);
  font-size: 1.65rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.6rem;
  color: var(--ink);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.7;
  font-weight: 300;
  max-width: 480px;
  margin-bottom: 1.25rem;
}

.card-signal {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-left: 1px solid var(--border-med);
  padding: 0.65rem 0.85rem;
  max-width: 480px;
}

.card-signal-label {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  padding-top: 0.1rem;
}

.card-signal-text {
  font-size: 0.82rem;
  color: var(--ink-2);
  line-height: 1.55;
  font-weight: 300;
  font-style: italic;
}

.card-metrics {
  display: flex;
  gap: 2rem;
  margin-top: 1.25rem;
}

.card-metric-val {
  font-family: var(--f-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink);
}

.card-metric-desc {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 0.25rem;
  max-width: 80px;
}

.card-arrow {
  font-size: 1.25rem;
  color: var(--ink-3);
  align-self: center;
  transition: transform 0.2s var(--ease), color 0.2s;
}

/* ── CREDIBILITY STRIP ──────────────────────────────────── */
.cred-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.cred-item {
  padding: 2.5rem 2rem;
  border-right: 1px solid rgba(243,241,236,0.1);
}
.cred-item:last-child { border-right: none; }

.cred-val {
  font-family: var(--f-display);
  font-size: 2.75rem;
  font-weight: 400;
  color: var(--bg);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.cred-desc {
  font-size: 0.85rem;
  color: rgba(243,241,236,0.5);
  font-weight: 300;
  line-height: 1.5;
}

/* ── ABOUT STRIP ────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.principles {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}

.principle {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.principle-num {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  padding-top: 0.15rem;
}

.principle-text { font-size: 0.9rem; font-weight: 300; color: var(--ink-2); line-height: 1.6; }
.principle-text strong { color: var(--ink); font-weight: 500; display: block; margin-bottom: 0.2rem; font-size: 0.92rem; }

/* ── SECTION PURPLE ─────────────────────────────────────── */
.section--purple {
  background: #0D0B38;
  color: var(--bg);
}
.section--purple .t-label { color: rgba(243,241,236,0.4); }
.section--purple .t-label--accent { color: #A8A4FF; }
.section--purple .lead { color: rgba(243,241,236,0.65); }
.section--purple h2 { color: var(--bg); }
.section--purple h2 em { color: #A8A4FF; font-style: italic; }
.section--purple .btn--ghost {
  color: rgba(243,241,236,0.7);
  border-color: rgba(243,241,236,0.25);
}
.section--purple .btn--ghost:hover {
  color: var(--bg);
  border-color: rgba(243,241,236,0.6);
}

/* ── CONTACT ────────────────────────────────────────────── */
.contact-inner {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.contact-inner h2 em { font-style: italic; color: var(--accent); }

.contact-inner .lead { margin: 1.5rem 0 2.5rem; }

.btn-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 1.75rem;
  border: 1px solid;
  transition: background 0.2s, color 0.2s, transform 0.15s var(--ease);
  border-radius: var(--radius-sm);
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn--primary:hover { background: var(--accent); border-color: var(--accent); }

.btn--ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--border-med);
}
.btn--ghost:hover { color: var(--ink); border-color: var(--ink); }

/* ── SITE FOOTER ────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ============================================================
   CASE STUDY PAGES
   ============================================================ */

/* ── CASE HERO ──────────────────────────────────────────── */
.case-hero {
  padding-top: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.case-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 4rem;
  align-items: start;
}

.case-eyebrow { margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1rem; }
.case-eyebrow-line { width: 32px; height: 1px; background: var(--accent); }

.case-title {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 4.5vw, 3.75rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 1.5rem;
}

.case-title em { font-style: italic; color: var(--ink-2); }

.case-summary { max-width: 520px; }

.case-meta-panel {
  background: var(--bg);
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 0.5rem;
}

.meta-row {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.meta-row:last-child { border-bottom: none; padding-bottom: 0; }
.meta-row:first-child { padding-top: 0; }

.meta-label {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.meta-val { font-size: 0.88rem; font-weight: 400; color: var(--ink); line-height: 1.4; }

/* ── CASE BODY ──────────────────────────────────────────── */
.case-body {
  padding: 5rem 0;
}

.case-section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--border);
}

.case-section:first-child { border-top: none; padding-top: 0; }

.case-section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.section-num {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  background: var(--bg);
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.case-section h3 {
  margin-bottom: 1rem;
}

.case-section p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink-2);
  font-weight: 300;
  margin-bottom: 1rem;
}

.case-section p:last-child { margin-bottom: 0; }

.case-section p strong {
  color: var(--ink);
  font-weight: 500;
}

/* ── DECISION BLOCKS ────────────────────────────────────── */
.decisions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.decision-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: clip;
  background: var(--surface);
  transition: border-color 0.2s;
}

.decision-block.is-open { border-color: var(--border-med); }

.decision-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.35rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: background 0.15s;
}
.decision-trigger:hover { background: rgba(27,26,24,0.03); }

.decision-trigger-inner { display: flex; flex-direction: column; gap: 0.4rem; }

.decision-q {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  text-align: left;
}

.decision-chosen {
  font-family: var(--f-body);
  font-size: 0.9rem;
  color: #6B6560;
}

.decision-icon {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease), border-color 0.2s;
  color: var(--ink-3);
  font-size: 0.75rem;
}

.decision-block.is-open .decision-icon {
  transform: rotate(45deg);
  border-color: var(--accent);
  color: var(--accent);
}

.decision-panel {
  display: none;
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
}

.decision-block.is-open .decision-panel { display: block; }

/* ── SCROLL-DRIVEN OPTIONS ──────────────────────────────── */
.options-scroll-track {
  position: relative;
  margin: 0;
  padding: 0;
}

.options-sticky-pane {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 0;
  margin: 0;
}

.decision-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  align-items: start;
  background: var(--bg);
  transform-origin: top center;
  will-change: transform, opacity, filter;
  margin: 0;
}

@keyframes rejectedFadeOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: grayscale(0);
  }
  100% {
    opacity: 0.8;
    transform: translateY(0) scale(0.98);
    filter: grayscale(0.3);
  }
}

@keyframes chosenFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.option--rejected {
  background: white;
  opacity: 1;
  transform: translateY(0);
}

.options-scroll-track.is-visible .option--rejected {
  animation: rejectedFadeOut 1.3s ease-out 0.2s forwards;
}

.option--chosen {
  border-color: #5254c8;
  background: #eef0fe;
  opacity: 0;
  transform: translateY(20px);
}

.options-scroll-track.is-visible .option--chosen {
  animation: chosenFadeIn 1.3s ease-out 0.7s forwards;
}

.option-marker {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border-med);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.option--chosen .option-marker {
  background: #5254c8;
  border-color: #5254c8;
}

.option--chosen .option-marker::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
}

.option-text {
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.55;
  font-weight: 300;
}

.option--rejected .option-text {
  color: var(--ink-2);
}

.option--chosen .option-text {
  color: #2d2e6f;
}

.option-badge {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.option-badge--chosen { background: #5254c8; color: white; }
.option-badge--rejected { background: #e8e8e8; color: #999; }

.decision-rationale {
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.7;
  font-weight: 300;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

.decision-rationale strong { color: var(--ink); font-weight: 500; }

/* ── TRADEOFFS ──────────────────────────────────────────── */
.tradeoff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.tradeoff-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tradeoff-type {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
}

.tradeoff-card--gain   .tradeoff-type { background: #e6f4ec; color: #22843A; }
.tradeoff-card--loss   .tradeoff-type { background: #fbeee9; color: #C2522D; }
.tradeoff-card--tension .tradeoff-type { background: #eef2fc; color: #1D4E8F; }

.tradeoff-card h4 { margin-bottom: 0.5rem; }
.tradeoff-card p { font-size: 0.875rem; color: var(--ink-2); font-weight: 300; line-height: 1.6; }

/* ── CONSTRAINT CALLOUT ─────────────────────────────────── */
.constraint {
  border-left: 1px solid var(--border-med);
  padding: 0.15rem 1.25rem;
  margin: 1.25rem 0;
}

.constraint-label {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.35rem;
}

.constraint p {
  font-size: 0.875rem !important;
  color: var(--ink-2) !important;
  margin: 0 !important;
}

/* ── OUTCOME METRICS ────────────────────────────────────── */
.outcome-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.outcome-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.outcome-val {
  font-family: var(--f-display);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.outcome-val--pos { color: #22843A; }
.outcome-val--neg { color: var(--accent); }

.outcome-desc {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.4;
}

/* ── LEARNING / WHAT DIDN'T WORK ────────────────────────── */
.learning-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.learning-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.learning-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
  flex-shrink: 0;
}

.learning-item p {
  font-size: 0.9rem !important;
  margin: 0 !important;
}

/* ── ARTIFACT PLACEHOLDER ───────────────────────────────── */
.artifact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.artifact-placeholder {
  aspect-ratio: 16/9;
  background: var(--surface);
  border: 1.5px dashed var(--border-med);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.artifact-placeholder:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.artifact-icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-med);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
}

.artifact-label { font-size: 0.82rem; color: var(--ink-3); font-weight: 300; }
.artifact-sub { font-family: var(--f-mono); font-size: 0.6rem; color: var(--ink-3); letter-spacing: 0.08em; }

/* ── CASE NAV FOOTER ────────────────────────────────────── */
.case-nav-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.case-nav-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-decoration: none;
  color: inherit;
  max-width: 280px;
}

.case-nav-item:hover .case-nav-title { color: var(--accent); }

.case-nav-dir {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.case-nav-title { font-family: var(--f-display); font-size: 1.1rem; color: var(--ink); transition: color 0.2s; }

/* ── ANIMATIONS ─────────────────────────────────────────── */
.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

/* JS adds .js-ready to <body> before animating — no JS = always visible */
.js-ready .fade-in {
  opacity: 0;
  transform: translateY(16px);
}

.js-ready .fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .work-card { grid-template-columns: 1fr; }
  .card-meta { display: flex; gap: 1rem; align-items: center; }
  .card-arrow { display: none; }
  .cred-grid { grid-template-columns: 1fr 1fr; }
  .cred-item { border-right: none; border-bottom: 1px solid rgba(243,241,236,0.1); }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .case-hero-inner { grid-template-columns: 1fr; }
  .case-meta-panel { margin-top: 0; }
  .tradeoff-grid { grid-template-columns: 1fr; }
  .outcome-grid { grid-template-columns: 1fr; }
  .artifact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  h1, .h1 { font-size: 2.5rem; }
  .nav-links { display: none; }
  .hero-foot { flex-wrap: wrap; gap: 1.25rem; }
  .case-nav-footer { flex-direction: column; }
  .container { padding: 0 1.25rem; }
  .case-container { padding: 0 1.25rem; }
  .work-card { padding: 1.5rem; }
  .cred-grid { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }

  /* Options scroll track: simplify on mobile */
  .options-scroll-track {
    height: auto;
  }

  .options-sticky-pane {
    position: static;
    height: auto;
    justify-content: flex-start;
  }
}
