:root {
  color-scheme: light;
  --page: #f6f7f5;
  --surface: #ffffff;
  --surface-soft: #eef1ed;
  --text: #171918;
  --muted: #626862;
  --line: #dfe3de;
  --line-strong: #cbd1cb;
  --accent: #21c9a4;
  --accent-strong: #08745f;
  --accent-soft: #dff8f0;
  --dark: #0d1728;
  --dark-soft: #162238;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radius: 8px;
  --shadow: 0 18px 48px rgb(24 38 32 / 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--text);
  font-family: Onest, Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.case-shell {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.case-skip {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  border-radius: 6px;
  background: #111;
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
}

.case-skip:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 52%, transparent);
  outline-offset: 3px;
}

.case-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  background: color-mix(in srgb, var(--page) 92%, transparent);
  backdrop-filter: blur(16px);
}

.case-header__inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.case-brand {
  text-decoration: none;
  font-size: 17px;
  font-weight: 800;
}

.case-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.case-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: color 160ms ease, background-color 160ms ease, transform 140ms var(--ease-out);
}

.case-nav__contact {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text) !important;
}

.case-hero {
  padding: 88px 0 80px;
}

.case-kicker {
  margin: 0 0 16px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-hero__heading {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 64px;
  align-items: end;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

h1 {
  max-width: 900px;
  font-size: 64px;
  line-height: 1.02;
  font-weight: 820;
}

h2 {
  max-width: 760px;
  font-size: 42px;
  line-height: 1.08;
  font-weight: 800;
}

.case-hero__heading > p,
.case-section__heading > p:last-child,
.case-cta p {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.case-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 18px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  transition: transform 140ms var(--ease-out), box-shadow 180ms ease, background-color 180ms ease;
}

.case-button--primary {
  background: var(--text);
  color: #fff;
  box-shadow: 0 8px 18px rgb(23 25 24 / 0.16);
}

.case-button--primary span {
  color: var(--accent);
  font-size: 18px;
}

.case-button--secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 64px 0 40px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-metrics > div {
  min-width: 0;
  padding: 24px;
  border-right: 1px solid var(--line);
}

.case-metrics > div:first-child {
  padding-left: 0;
}

.case-metrics > div:last-child {
  border-right: 0;
}

.case-metrics dt,
.case-quality dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
}

.case-metrics dd,
.case-quality dd {
  margin: 10px 0 0;
  font-size: 34px;
  line-height: 1;
  font-weight: 820;
  letter-spacing: -0.03em;
}

.case-cover {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--dark);
  box-shadow: var(--shadow);
  animation: case-enter 520ms var(--ease-out) both;
}

.case-cover img {
  width: 100%;
  height: auto;
}

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

.case-section--soft {
  background: var(--surface-soft);
}

.case-section--dark {
  border-top: 0;
  background: var(--dark);
  color: #f7fafc;
}

.case-section--dark .case-kicker {
  color: #5ee5c4;
}

.case-split,
.case-problem,
.case-delivery {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 96px;
  align-items: start;
}

.case-prose {
  max-width: 700px;
}

.case-prose p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
}

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

.case-section__heading {
  margin-bottom: 48px;
}

.case-section__heading--wide > p:last-child {
  margin-top: 20px;
}

.case-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
}

.case-steps li {
  min-height: 136px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 28px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-steps li:nth-child(even) {
  border-right: 0;
}

.case-steps span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.case-steps p {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
}

.case-table-wrap {
  overflow-x: auto;
  border-top: 1px solid #33435c;
  border-bottom: 1px solid #33435c;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  padding: 22px 16px;
  border-bottom: 1px solid #2a3850;
  text-align: left;
}

thead th {
  color: #9eacc2;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody th {
  font-size: 18px;
}

tbody td {
  font-size: 25px;
  font-weight: 800;
}

.case-table__total th,
.case-table__total td {
  border-bottom: 0;
  color: #5ee5c4;
}

.case-note {
  max-width: 760px;
  margin: 24px 0 0;
  color: #9eacc2;
  font-size: 14px;
  line-height: 1.55;
}

.case-quality {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line-strong);
}

.case-quality > div {
  min-height: 144px;
  padding: 28px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-quality > div:nth-child(3n) {
  border-right: 0;
}

.case-quality dd {
  color: var(--accent-strong);
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.case-gallery figure {
  min-width: 0;
  margin: 0;
}

.case-gallery__wide {
  grid-column: 1 / -1;
}

.case-gallery a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 24px rgb(24 38 32 / 0.06);
}

.case-gallery img {
  width: 100%;
  height: auto;
  transition: transform 260ms var(--ease-out);
}

.case-gallery figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.case-delivery ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.case-delivery li {
  position: relative;
  padding: 18px 0 18px 34px;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  line-height: 1.45;
}

.case-delivery li::before {
  position: absolute;
  top: 18px;
  left: 0;
  color: var(--accent-strong);
  content: "✓";
  font-weight: 900;
}

.case-cta {
  padding: 80px 0;
  background: var(--accent-soft);
}

.case-cta__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 64px;
  align-items: end;
}

.case-cta h2 {
  margin-bottom: 20px;
}

.case-cta__actions {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.case-text-link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.case-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.case-footer .case-shell {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.case-footer p,
.case-footer a {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

@keyframes case-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (hover: hover) and (pointer: fine) {
  .case-nav a:hover {
    color: var(--text);
    background: var(--surface-soft);
  }

  .case-button:hover {
    transform: translateY(-2px);
  }

  .case-button--primary:hover {
    box-shadow: 0 12px 26px rgb(23 25 24 / 0.22);
  }

  .case-gallery a:hover img {
    transform: scale(1.012);
  }

  .case-text-link:hover,
  .case-footer a:hover {
    color: var(--accent-strong);
  }
}

.case-nav a:active,
.case-button:active,
.case-text-link:active {
  transform: scale(0.98);
}

@media (max-width: 960px) {
  .case-hero {
    padding: 72px 0 64px;
  }

  .case-hero__heading,
  .case-split,
  .case-problem,
  .case-delivery,
  .case-cta__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  h1 {
    font-size: 50px;
  }

  h2 {
    font-size: 36px;
  }

  .case-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .case-metrics > div:first-child,
  .case-metrics > div:nth-child(3) {
    padding-left: 0;
  }

  .case-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 700px) {
  .case-shell {
    width: min(100% - 32px, 1180px);
  }

  .case-header__inner {
    min-height: 64px;
  }

  .case-nav > a:first-child {
    display: none;
  }

  .case-nav__contact {
    min-height: 40px !important;
    padding-inline: 10px !important;
  }

  .case-hero {
    padding: 56px 0 48px;
  }

  h1 {
    font-size: 40px;
    line-height: 1.05;
  }

  h2 {
    font-size: 31px;
    line-height: 1.12;
  }

  .case-hero__heading > p,
  .case-prose p,
  .case-section__heading > p:last-child,
  .case-cta p {
    font-size: 16px;
  }

  .case-actions {
    display: grid;
    margin-top: 32px;
  }

  .case-button {
    width: 100%;
  }

  .case-metrics {
    margin-top: 48px;
  }

  .case-metrics > div {
    padding: 20px 16px;
  }

  .case-metrics dd,
  .case-quality dd {
    font-size: 28px;
  }

  .case-section {
    padding: 72px 0;
  }

  .case-section__heading {
    margin-bottom: 36px;
  }

  .case-steps,
  .case-quality,
  .case-gallery {
    grid-template-columns: 1fr;
  }

  .case-steps li,
  .case-quality > div {
    border-right: 0;
  }

  .case-gallery__wide {
    grid-column: auto;
  }

  .case-gallery {
    gap: 28px;
  }

  table {
    min-width: 100%;
    table-layout: fixed;
  }

  thead th {
    padding: 14px 8px;
    font-size: 9px;
    line-height: 1.3;
  }

  thead th:first-child {
    width: 46%;
  }

  thead th:not(:first-child) {
    width: 27%;
  }

  tbody th,
  tbody td {
    padding: 16px 8px;
  }

  tbody th {
    font-size: 14px;
  }

  tbody td {
    font-size: 19px;
  }

  .case-cta {
    padding: 64px 0;
  }

  .case-footer .case-shell {
    min-height: 112px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 390px) {
  .case-shell {
    width: min(100% - 24px, 1180px);
  }

  .case-brand {
    font-size: 15px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  .case-metrics {
    grid-template-columns: 1fr;
  }

  .case-metrics > div,
  .case-metrics > div:first-child,
  .case-metrics > div:nth-child(3) {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .case-metrics > div:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
