/* Страница разбора. Подключается после site.css и берёт его токены. */

.case-hero { display: flex; flex-direction: column; gap: 32px; padding-block: clamp(32px, 6vw, 72px) clamp(40px, 6vw, 72px); }
.case-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--ink); }
.case-num {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(64px, 11vw, 150px); line-height: .8; letter-spacing: -.05em;
  color: var(--line-soft); user-select: none;
}
.case-title-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; text-align: right; }
.case-title {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(36px, 6.4vw, 92px); line-height: 1; letter-spacing: -.035em;
  text-wrap: balance;
}
.case-lead { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.55; max-width: 60ch; text-wrap: pretty; }

.case-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.case-facts > div { background: var(--sheet); padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.case-facts dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.case-facts dd { font-size: 15px; line-height: 1.5; }
.case-facts a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; transition: text-decoration-color .2s ease; }

.shot-row { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.shot-row--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shot-caption { margin-top: 10px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.shot-row .frame--phone { position: relative; right: auto; bottom: auto; width: 100%; min-width: 0; }

.case-body { display: flex; flex-direction: column; gap: clamp(56px, 7vw, 88px); padding-bottom: clamp(56px, 8vw, 104px); }
.case-block { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px clamp(24px, 4vw, 64px); padding-top: 24px; border-top: 1px solid var(--line); }
.case-block__label { display: flex; flex-direction: column; gap: 10px; align-self: start; position: sticky; top: calc(var(--header) + 24px); }
.case-block__label h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(24px, 2.6vw, 36px); line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
.case-block__content { display: flex; flex-direction: column; gap: 28px; min-width: 0; }

.prose { max-width: 68ch; }
.prose p { font-size: 17px; line-height: 1.7; text-wrap: pretty; }
.prose p + p { margin-top: 14px; }
.prose strong { font-weight: 500; }

.structure { list-style: none; counter-reset: s; border-top: 1px solid var(--ink); }
.structure li {
  counter-increment: s;
  display: grid; grid-template-columns: 44px minmax(0, 230px) minmax(0, 1fr); gap: 4px 20px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: 15px; line-height: 1.55;
}
.structure li::before { content: counter(s, decimal-leading-zero); font-family: var(--f-mono); font-size: 13px; color: var(--muted); padding-top: 2px; }
.structure b { font-weight: 500; }
.structure span { color: var(--muted); }

.stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; }
.stack li { padding: 16px 18px; background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.stack b { display: block; margin-bottom: 6px; font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }

.decisions { display: flex; flex-direction: column; gap: 14px; list-style: none; }
.decision { display: flex; flex-direction: column; gap: 10px; padding: 24px 26px; background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; }
.decision h3 { font-family: var(--f-display); font-weight: 600; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.3; letter-spacing: -.015em; text-wrap: balance; }
.decision p { font-size: 15px; line-height: 1.7; color: var(--muted); max-width: 74ch; }
.decision p b { color: var(--ink); font-weight: 500; }
.decision code, .decision p b.code { font-family: var(--f-mono); font-size: .92em; }
.evidence { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; list-style: none; }
.evidence a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px;
  padding: 0 14px; border-radius: 100px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px; color: var(--ink); text-decoration: none;
  transition: box-shadow .2s ease, background-color .2s ease, transform .16s var(--ease-out);
}
.evidence a:active { transform: scale(.97); }
.evidence code { font-family: var(--f-mono); font-size: 12px; color: var(--accent-ink); }

.limits { padding: 20px 22px; background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; }
.limits h3 { font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; }
.limits ul { padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.limits li { font-size: 15px; line-height: 1.6; }

.checklist { list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.checklist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.checklist a {
  display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent-ink); text-decoration: none;
}

.case-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.case-nav a {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px 26px; border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--ink);
  text-decoration: none;
  transition: transform .16s var(--ease-out);
}
.case-nav a::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .34s var(--ease-out);
}
.case-nav a[rel='next'] { text-align: right; }
.case-nav a[rel='next']::before { transform-origin: right center; }
.case-nav a:active { transform: scale(.985); }
.case-nav small { transition: color .2s ease; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.case-nav strong { color: var(--ink); transition: color .2s ease; font-family: var(--f-display); font-weight: 600; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.05; letter-spacing: -.025em; }

@media (hover: hover) and (pointer: fine) {
  .evidence a:hover { box-shadow: inset 0 0 0 1px var(--ink); }
  .checklist a:hover { text-decoration: underline; text-underline-offset: 4px; }
  .case-facts a:hover { text-decoration-color: var(--ink); }
  .case-nav a:hover::before { transform: scaleX(1); }
  .case-nav a:hover small,
  .case-nav a:hover strong { color: var(--on-accent); }
}

@media (max-width: 1100px) {
  .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shot-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shot-row > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .case-block { grid-template-columns: 1fr; }
  .case-block__label { position: static; }
  .structure li { grid-template-columns: 36px minmax(0, 1fr); }
  .structure li span { grid-column: 2; }
  .stack { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .case-head { flex-direction: column; align-items: flex-start; }
  .case-title-wrap { align-items: flex-start; text-align: left; }
  .case-facts { grid-template-columns: 1fr; }
  .prose p { font-size: 16px; }
  .decision { padding: 20px 18px; }
  .shot-row, .shot-row--two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .shot-row--two > * { grid-column: 1 / -1; }
  .case-nav { grid-template-columns: 1fr; }
  .case-nav a[rel='next'] { text-align: left; }
  .checklist li { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .case-nav a::before { transition: none; }
}
