.case-studies-section {
  background:
    radial-gradient(circle at 88% 8%, rgba(38, 120, 255, .09), transparent 25%),
    linear-gradient(180deg, #fff 0%, #f6f8fc 100%);
  overflow: hidden;
}

.case-studies-heading {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: end;
  gap: 90px;
}

.case-studies-heading h2 {
  margin: 18px 0 0;
  max-width: 720px;
  font-size: clamp(42px, 5vw, 66px);
  line-height: 1;
  letter-spacing: -.055em;
}

.case-studies-heading > p {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.case-studies-list {
  display: grid;
  gap: 30px;
  margin-top: 66px;
}

.case-study {
  --case-accent: #2678ff;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
  min-height: 590px;
  border: 1px solid rgba(11, 27, 52, .1);
  border-radius: 32px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 26px 75px rgba(25, 48, 82, .08);
  overflow: hidden;
  opacity: .7;
  transform: translateY(30px);
  transition: opacity .65s ease, transform .65s ease, box-shadow .35s ease;
}

.case-study.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.case-study:hover {
  box-shadow: 0 34px 95px rgba(25, 48, 82, .14);
}

.case-study-kohe { --case-accent: #ff8700; }
.case-study-klaiyi { --case-accent: #a45cff; }

.case-study:nth-child(even) .case-study-visual { order: 2; }
.case-study:nth-child(even) .case-study-copy { order: 1; }

.case-study-visual {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 54px;
  background:
    radial-gradient(circle at 18% 15%, color-mix(in srgb, var(--case-accent) 22%, transparent), transparent 30%),
    linear-gradient(145deg, #071326, #102440);
  perspective: 1300px;
}

.case-browser {
  position: relative;
  width: min(100%, 700px);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform .22s ease, box-shadow .3s ease;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .38);
}

.case-study.is-visible .case-browser {
  animation: case-float 7s ease-in-out infinite;
}

.case-browser-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 42px;
  padding: 0 15px;
  color: #718096;
  border-bottom: 1px solid #e5e9f0;
  background: #f7f9fc;
  font-size: 10px;
}

.case-browser-bar span { display: flex; gap: 5px; }
.case-browser-bar i { width: 7px; height: 7px; border-radius: 50%; background: #c5ccd6; }
.case-browser-bar i:first-child { background: #ff7a59; }
.case-browser-bar i:nth-child(2) { background: #ffc14f; }
.case-browser-bar i:nth-child(3) { background: #59c98c; }
.case-browser-bar b { color: #526176; font-weight: 700; }
.case-browser-bar em { justify-self: end; color: #2c9e69; font-style: normal; font-weight: 800; }

.case-browser img {
  display: block;
  width: 100%;
  height: 410px;
  object-fit: cover;
  object-position: top center;
}

.case-visual-tag {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 10px 13px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  background: rgba(5, 14, 29, .78);
  backdrop-filter: blur(12px);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.case-study-copy {
  display: flex;
  flex-direction: column;
  padding: 54px 50px 46px;
}

.case-study-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #7a8798;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.case-study-copy h3 {
  margin: 58px 0 18px;
  color: var(--ink);
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -.052em;
}

.case-study-lead {
  margin: 0;
  color: #5f6b7d;
  font-size: 15px;
  line-height: 1.75;
}

.case-primary {
  display: grid;
  gap: 6px;
  margin-top: 26px;
  padding: 17px 18px;
  border-left: 3px solid var(--case-accent);
  background: color-mix(in srgb, var(--case-accent) 7%, white);
}

.case-primary span,
.case-result small {
  color: #8792a1;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.case-primary strong { color: var(--ink); font-size: 14px; }

.case-scope {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 25px 0 0;
  padding: 0;
  list-style: none;
}

.case-scope li {
  position: relative;
  padding-left: 14px;
  color: #657184;
  font-size: 11px;
  line-height: 1.45;
}

.case-scope li::before {
  content: "";
  position: absolute;
  top: .48em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--case-accent);
}

.case-study-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-top: auto;
  padding-top: 32px;
}

.case-result { display: grid; gap: 5px; }
.case-result strong { color: var(--ink); font-size: 27px; letter-spacing: -.035em; }

.case-study-footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  color: #fff;
  border-radius: 11px;
  background: var(--ink);
  font-size: 11px;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease;
}

.case-study-footer a:hover { transform: translateY(-2px); background: var(--case-accent); }

.case-results-note {
  max-width: 760px;
  margin: 24px 0 0;
  color: #8a94a4;
  font-size: 11px;
  line-height: 1.6;
}

.klaiyi-store {
  height: 410px;
  color: #291d31;
  background: linear-gradient(145deg, #fff9fd, #f1e8f7);
  overflow: hidden;
}

.klaiyi-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 60px;
  padding: 0 26px;
  border-bottom: 1px solid rgba(70, 36, 82, .1);
}

.klaiyi-nav strong { font-size: 23px; letter-spacing: .1em; }
.klaiyi-nav span { color: #796b80; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.klaiyi-nav i { justify-self: end; font-style: normal; }

.klaiyi-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  height: 235px;
  padding: 25px 42px;
  background: radial-gradient(circle at 75% 44%, rgba(169, 97, 201, .27), transparent 30%);
}

.klaiyi-hero small { color: #a45cff; font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.klaiyi-hero h4 { margin: 12px 0 18px; font-family: Georgia, serif; font-size: 34px; font-weight: 500; line-height: .98; }
.klaiyi-hero > div > span { display: inline-block; padding-bottom: 4px; border-bottom: 1px solid; font-size: 10px; font-weight: 800; }

.hair-sculpture { position: relative; height: 190px; }
.hair-sculpture i {
  position: absolute;
  left: 50%;
  width: 58px;
  height: 172px;
  border-radius: 55% 45% 48% 52%;
  background: linear-gradient(105deg, #120f13, #704764 46%, #1b151d 82%);
  transform-origin: top;
  box-shadow: inset 12px 0 16px rgba(255, 255, 255, .08);
}
.hair-sculpture i:nth-child(1) { transform: translateX(-95px) rotate(20deg); }
.hair-sculpture i:nth-child(2) { transform: translateX(-52px) rotate(8deg); }
.hair-sculpture i:nth-child(3) { transform: translateX(-10px) rotate(-8deg); }
.hair-sculpture i:nth-child(4) { transform: translateX(32px) rotate(-20deg); }
.hair-sculpture b { position: absolute; top: 5px; left: 50%; width: 72px; height: 42px; border-radius: 50%; background: #231722; transform: translateX(-50%); }

.klaiyi-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, .68);
}
.klaiyi-products span { display: grid; grid-template-columns: 33px 1fr; align-items: center; gap: 9px; color: #6c5c70; font-size: 8px; }
.klaiyi-products i { width: 33px; height: 33px; border-radius: 9px; background: linear-gradient(145deg, #2d202b, #a45cff); }
.klaiyi-products span:nth-child(2) i { background: linear-gradient(145deg, #3f211a, #d39272); }
.klaiyi-products span:nth-child(3) i { background: linear-gradient(145deg, #161219, #6a566f); }

@keyframes case-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

@media (width <= 1000px) {
  .case-studies-heading { grid-template-columns: 1fr; gap: 28px; }
  .case-study { grid-template-columns: 1fr; }
  .case-study:nth-child(even) .case-study-visual,
  .case-study:nth-child(even) .case-study-copy { order: initial; }
  .case-study-visual { min-height: 520px; }
  .case-study-copy { min-height: 510px; }
}

@media (width <= 700px) {
  .case-studies-heading h2 { font-size: 43px; }
  .case-studies-list { margin-top: 45px; gap: 22px; }
  .case-study { min-height: auto; border-radius: 23px; }
  .case-study-visual { min-height: 370px; padding: 26px 16px; }
  .case-browser img, .klaiyi-store { height: 300px; }
  .case-study-copy { min-height: 540px; padding: 35px 25px 30px; }
  .case-study-copy h3 { margin-top: 40px; font-size: 42px; }
  .case-study-meta { display: grid; }
  .case-scope { grid-template-columns: 1fr; }
  .case-study-footer { align-items: flex-start; flex-direction: column; }
  .case-study-footer a { width: 100%; justify-content: center; }
  .klaiyi-nav { grid-template-columns: 1fr auto; padding: 0 16px; }
  .klaiyi-nav span { display: none; }
  .klaiyi-hero { height: 170px; padding: 18px 20px; }
  .klaiyi-hero h4 { font-size: 26px; }
  .hair-sculpture { height: 140px; transform: scale(.72); }
  .klaiyi-products { padding: 10px 12px; }
  .klaiyi-products span { grid-template-columns: 1fr; }
  .klaiyi-products b { display: none; }
}

@media (width <= 430px) {
  .case-browser-bar b { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .case-browser img, .klaiyi-store { height: 270px; }
  .case-study-visual { min-height: 330px; }
}

@media (prefers-reduced-motion: reduce) {
  .case-study { opacity: 1; transform: none; }
  .case-study.is-visible .case-browser { animation: none; }
  .case-browser { transform: none !important; }
}
