/* ===== cases ===== */
.case { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(32px, 5vw, 64px) 0; border-top: 1px solid var(--line); }
.case:first-of-type { border-top: 0; padding-top: 0; }
.case:nth-of-type(even) .case-visual { order: 2; }
.case-visual { position: relative; }
.case-visual::before { content: ""; position: absolute; inset: 8% -6% -8% 6%; background: radial-gradient(ellipse at 30% 30%, rgba(255,77,46,.28), transparent 65%); filter: blur(30px); z-index: 0; transition: opacity .5s ease; opacity: .6; }
.case:hover .case-visual::before { opacity: 1; }
.frame { position: relative; z-index: 1; border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: #0a0a0a; box-shadow: 0 30px 80px rgba(0,0,0,.6); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.case:hover .frame { transform: translateY(-6px) rotate(-.4deg); }
.frame-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; background: #101010; border-bottom: 1px solid var(--line); }
.frame-bar span { width: 9px; height: 9px; border-radius: 50%; background: #2a2a2a; }
.frame-bar span:first-child { background: #ff5f57; }
.frame-bar span:nth-child(2) { background: #febc2e; }
.frame-bar span:nth-child(3) { background: #28c840; }
.frame-bar em { margin-left: 10px; font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); background: #181818; padding: 4px 12px; border-radius: 999px; }
.frame img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; object-position: top left; display: block; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.case:hover .frame img { transform: scale(1.04); }
.case-body { display: flex; flex-direction: column; }
.case-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.case-no { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.case-body h3 { font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.04em; line-height: 1.08; margin-top: 18px; }
.case-sum { margin-top: 16px; color: #cfcfca; font-size: 17px; }
.case-cols { display: grid; grid-template-columns: .8fr 1.2fr; gap: 24px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.case-cols h4 { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.case-cols p, .case-cols li { color: var(--muted); font-size: 15px; line-height: 1.5; }
.case-cols ul { list-style: none; display: grid; gap: 8px; }
.case-cols li { padding-left: 16px; position: relative; }
.case-cols li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 1px; background: var(--accent); }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; }
.flow .node { font-family: var(--mono); font-size: 11.5px; padding: 7px 11px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); color: #cfcfca; animation: nodeglow 6s ease-in-out infinite; animation-delay: calc(var(--n, 0) * .9s); }
.flow i { font-style: normal; color: var(--accent); font-family: var(--mono); }
@keyframes nodeglow { 0%, 70%, 100% { border-color: var(--line-2); color: #cfcfca; box-shadow: none; } 12%, 30% { border-color: var(--accent); color: #fff; box-shadow: 0 0 18px rgba(255,77,46,.25); } }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.stack span { font-size: 13px; color: var(--muted); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; transition: color .2s ease, border-color .2s ease; }
.stack span:hover { color: #fff; border-color: var(--accent); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 26px; border: 1px solid var(--line); border-radius: 12px; }
.metrics > div { padding: 16px 16px 18px; border-right: 1px solid var(--line); display: grid; gap: 6px; }
.metrics > div:last-child { border-right: 0; }
.metrics b { font-size: 28px; font-weight: 500; letter-spacing: -0.04em; }
.metrics span { font-size: 13px; color: var(--muted); line-height: 1.3; }
.metrics.draft::after { top: -22px; right: 0; }
.case-link { display: inline-flex; gap: 8px; margin-top: 22px; font-size: 15px; color: #fff; border-bottom: 1px solid var(--line-2); padding-bottom: 3px; width: fit-content; transition: border-color .2s ease, color .2s ease; }
.case-link:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 980px) {
  .case { grid-template-columns: 1fr; }
  .case:nth-of-type(even) .case-visual { order: 0; }
  .case-cols { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .metrics { grid-template-columns: 1fr; }
  .metrics > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .metrics > div:last-child { border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .flow .node { animation: none; }
  .case:hover .frame, .case:hover .frame img { transform: none; }
}

/* v2: compact developer-focused cases */
.case-list { list-style: none; display: grid; gap: 9px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.case-list li { position: relative; padding-left: 18px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.case-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 1px; background: var(--accent); }
.stack-rows { display: grid; gap: 10px; margin-top: 22px; }
.stack-row { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: baseline; }
.stack-row em { font-style: normal; font-family: var(--mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--dim); }
.stack-row div { display: flex; flex-wrap: wrap; gap: 7px; }
.stack-row span { font-family: var(--mono); font-size: 12px; color: #d4d4cf; border: 1px solid var(--line-2); padding: 4px 10px; border-radius: 6px; background: var(--bg-2); transition: color .2s ease, border-color .2s ease; }
.stack-row span:hover { color: #fff; border-color: var(--accent); }
.case-format { margin-top: 20px; font-size: 13.5px; color: var(--muted); padding: 11px 14px; border-left: 2px solid var(--accent); background: rgba(255,77,46,.06); border-radius: 0 8px 8px 0; line-height: 1.45; }
.case-format b { color: #fff; font-weight: 500; }
.case-body h3 { font-size: clamp(24px, 2.6vw, 34px); }
@media (max-width: 560px) { .stack-row { grid-template-columns: 1fr; gap: 6px; } }

.frame img { height: auto; }

/* v3: client-first cases */
.case-body h3.client { font-size: clamp(30px, 3.6vw, 48px); letter-spacing: -0.045em; line-height: 1.04; margin-top: 18px; }
.case-role { margin-top: 12px; color: var(--muted); font-size: 16px; }
.case-example { margin-top: 26px; padding: 22px 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,.025), transparent), var(--bg-2); }
.ex-label { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.ex-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: exblink 2.4s ease-in-out infinite; }
@keyframes exblink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.case-example h4 { margin-top: 12px; font-size: 22px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; }
.case-example .case-sum { margin-top: 10px; font-size: 15.5px; color: #cfcfca; }
.case-example .case-list { margin-top: 16px; padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { .ex-label::before { animation: none; } }
