/* ===== RESET & GLOBAL ===== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow: hidden;
}

body {
  background: #F2F2F7;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100vh;
}

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

/* ===== LAYOUT ===== */

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 20px 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ===== HERO BLOCK — 316x316, slideshow ===== */

.hero {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 340px;
  background: #F2F2F7;
  flex-shrink: 0;
}

.info-card-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Red pulsing dot */
.hero__dot {
  position: absolute;
  top: 32px;
  left: 50%;
  width: 16px;
  height: 16px;
  background: #FF3B30;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
}

.hero__dot--visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: pulse 2s infinite ease-in-out;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.25s ease, width 0.3s ease, height 0.3s ease, background 0.3s ease;
}

.hero__dot--visible:hover {
  animation: none;
  transform: translate(-50%, -50%) scale(2.2);
}

.hero__dot--visible:hover .hero__dot-eye {
  opacity: 1;
}

.hero__dot-eye {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hero__dot-avatar {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero__dot--photo .hero__dot-avatar {
  opacity: 1;
}

.hero__dot--photo .hero__dot-eye {
  opacity: 0 !important;
}

.hero__dot--visible.hero__dot--photo,
.hero__dot--visible.hero__dot--photo:hover {
  animation: none;
  width: 80px;
  height: 80px;
  transform: translate(-50%, -50%);
  background: transparent;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.4);
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 59, 48, 0);
    transform: translate(-50%, -50%) scale(1.15);
  }
}

.hero__sway {
  animation: sway 4s infinite ease-in-out;
}

.hero__frame {
  position: relative;
  width: 316px;
  height: 316px;
}

@keyframes sway {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

/* Corner brackets SVG overlay */
.hero__corners {
  position: absolute;
  top: 0;
  left: 0;
  width: 316px;
  height: 316px;
  pointer-events: none;
  z-index: 2;
}

/* Slideshow container — centered inside frame */
.hero__slideshow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 280px;
  height: 280px;
  z-index: 1;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
  .hero__slideshow:hover {
    transform: translate(-50%, -50%) scale(0.88);
  }
}

/* Each slide — absolute, fills container, fades in/out */
.hero__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 280px;
  height: 280px;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero__slide--active {
  opacity: 1;
}

/* ===== STICKY BAR (inside info-card) ===== */

.info-card__sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  margin-bottom: -68px;
  padding: 12px;
  height: 68px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.info-card__sticky--visible {
  opacity: 1;
  pointer-events: auto;
}

.info-card__sticky-copy {
  background: rgba(255, 255, 255, 0.8);
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  flex-shrink: 0;
  box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.15);
  transition: width 0.3s ease, border-radius 0.3s ease, background 0.3s ease;
  overflow: hidden;
  position: relative;
}

.info-card__sticky-copy:hover {
  background: rgba(255, 255, 255, 0.9);
}

.info-card__sticky-copy--copied:hover {
  background: rgba(60, 60, 60, 0.85);
}

.info-card__sticky-copy-icon {
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.info-card__sticky-copy-text {
  position: absolute;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.info-card__sticky-copy--copied {
  width: 130px;
  border-radius: 18px;
  background: rgba(60, 60, 60, 0.85);
}

.info-card__sticky-copy--copied .info-card__sticky-copy-icon {
  opacity: 0;
}

.info-card__sticky-copy--copied .info-card__sticky-copy-text {
  opacity: 1;
}

.info-card__sticky-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-card__sticky-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
}

.info-card__sticky-name {
  font-size: 17px;
  font-weight: 600;
  color: #000000;
  letter-spacing: -0.2px;
}

.info-card__sticky-cv {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  background: #007AFF;
  border-radius: 200px;
  height: 44px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  text-decoration: none;
  box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.15);
  transition: opacity 0.2s ease;
}

.info-card__sticky-cv:hover {
  opacity: 0.8;
}

/* ===== INFO CARD ===== */

.info-card {
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  flex: 1;
  min-height: 0;
  overflow-y: hidden;
}

/* Figma: Frame 2147240138, vertical, gap=24 */
.info-card__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 28px;
}

/* Figma: Frame 2147240137, horizontal, gap=72 */
.info-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 72px;
}

/* Figma: Frame 2147239841, vertical, gap=4 */
.info-card__intro {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 280px;
}

/* Figma: SF Pro 38/590, lh=46, ls=0, fill=#000 */
.info-card__title {
  font-size: 38px;
  font-weight: 600;
  color: #000000;
  line-height: 46px;
  letter-spacing: 0;
}

/* Figma: SF Pro 20/400, lh=25, ls=-0.4, fill=#3c3c43 op=0.6 */
.info-card__description {
  font-size: 20px;
  font-weight: 400;
  color: rgba(60, 60, 67, 0.6);
  line-height: 25px;
  letter-spacing: -0.4px;
}

/* Figma: SF Pro 13/600, lh=18, ls=0.2, fill=#aeaeb2 */
.info-card__location {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  cursor: pointer;
}

.info-card__location-text {
  font-size: 13px;
  font-weight: 600;
  color: #AEAEB2;
  line-height: 18px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  transition: opacity 0.25s ease;
}

.info-card__location-icon {
  flex-shrink: 0;
  transition: opacity 0.25s ease;
}

.info-card__location:hover .info-card__location-text {
  opacity: 0.5;
}

.info-card__location:hover .info-card__location-icon {
  filter: brightness(0.4);
}

.info-card__map-popup {
  position: fixed;
  width: 180px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transform: translateY(10px) rotate(6deg) scale(0.8);
  transform-origin: bottom center;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

.info-card__map-popup--visible {
  opacity: 1;
  transform: translateY(0) rotate(3deg) scale(1);
  pointer-events: auto;
}

.info-card__map-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

/* ===== BADGES ===== */

/* Figma: Frame 2147240136, horizontal, gap=8 */
.info-card__badges {
  display: flex;
  gap: 8px;
  perspective: 600px;
}

/* Figma: 150.5x69, fill=#f2f2f7 op=0.38, r=21, vertical, pad=11, gap=3 */
.badge {
  background: rgba(242, 242, 247, 0.38);
  border-radius: 21px;
  padding: 11px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.badge--flip {
  animation: badge-flip 0.7s ease-in-out;
}

@keyframes badge-flip {
  0%   { transform: translateY(0)    rotateX(0)      scale(1);    }
  20%  { transform: translateY(-50px) rotateX(180deg) scale(0.92); }
  40%  { transform: translateY(-70px) rotateX(450deg) scale(0.88); }
  65%  { transform: translateY(-15px) rotateX(700deg) scale(0.96); }
  80%  { transform: translateY(4px)   rotateX(720deg) scale(1.04); }
  92%  { transform: translateY(-2px)  rotateX(720deg) scale(1);    }
  100% { transform: translateY(0)     rotateX(720deg) scale(1);    }
}

/* Figma: SF Pro 11/510, lh=18, ls=0.2, fill=#aeaeb2, uppercase */
.badge__label {
  font-size: 11px;
  font-weight: 500;
  color: #AEAEB2;
  line-height: 18px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

/* Figma: SF Pro Rounded 20/600, lh=26 */
.badge__value {
  font-family: 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
  color: #919193;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Figma: fill=#7543ff */
.badge__value--accent {
  color: #7543FF;
}

.badge__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ===== CASES SECTION ===== */

/* Figma: vertical, gap=12 */
.cases {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Figma: SF Pro 22/700, lh=28, ls=-0.26, fill=#000 */
.cases__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: -0.26px;
  color: #000000;
}

/* Figma: horizontal, gap=19 */
.cases__grid {
  display: flex;
  gap: 19px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-left: -28px;
  margin-right: -28px;
  padding-left: 28px;
  padding-right: 28px;
}

.cases__grid::-webkit-scrollbar {
  display: none;
}

/* Figma: 290x388, r=18 */
.case-card {
  border-radius: 18px;
  width: 290px;
  height: 388px;
  flex-shrink: 0;
  overflow: hidden;
  display: block;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.case-card:hover {
  transform: scale(0.97);
}

.case-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Figma: SF Pro 11/510, lh=18, ls=0.2, fill=#aeaeb2 */
.case-card__label {
  font-size: 11px;
  font-weight: 500;
  color: #AEAEB2;
  line-height: 18px;
  letter-spacing: 0.2px;
}

/* Figma: SF Pro Rounded 22/600, lh=28 */
.case-card__value {
  font-family: 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 28px;
  color: #919193;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Figma: fill=#7543ff */
.case-card__value--accent {
  color: #7543FF;
}

.case-card__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ===== WORK SECTION ===== */

.work {
  margin-top: 32px;
}

/* Figma: SF Pro 22/700, lh=26, ls=-0.3, fill=#000, 610×26 Fill×Hug */
.work__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 26px;
  letter-spacing: -0.3px;
  color: #000000;
}

.work__list {
  list-style: none;
}

/* Figma: 610×59 Fill×Hug, stroke-bottom 0.33px #D9D9D9 inside */
.work__item {
  padding: 14px 0;
  border-bottom: 0.33px solid #D9D9D9;
}

.work__item:last-child {
  border-bottom: none;
}

.work__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

/* Figma: SF Pro 15/400, lh=20, ls=-0.2, fill=#0088FF or #000 */
.work__name {
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: -0.2px;
  color: #000000;
}

a.work__name {
  text-decoration: none;
}

.work__name--accent {
  color: #0088FF;
}

/* Figma: SF Pro 13/400, lh=14, ls=-0.2, fill=#000 (Labels/Primary) */
.work__year {
  font-size: 13px;
  font-weight: 400;
  line-height: 14px;
  letter-spacing: -0.2px;
  color: #000000;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Figma: SF Pro 13/400, lh=14, ls=-0.1, fill=Labels/Secondary */
.work__desc {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
  line-height: 14px;
  letter-spacing: -0.1px;
  color: rgba(60, 60, 67, 0.6);
}

/* ===== FOOTER ===== */

.footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 0.33px solid #D9D9D9;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer__link {
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  color: #000000;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer__link:hover {
  opacity: 0.5;
}

.footer__year {
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  color: #AEAEB2;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 600px) {
  /* Single fixed shell — prevents iOS rubber-band & horizontal bounce */
  body {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  /* Height chain: body(100%) → .page(100%) → .container(100%) */
  .page {
    height: 100%;
  }

  .container {
    padding: 16px 0 0;
    gap: 16px;
    height: 100%;
  }

  /* GPU-promote animated hero elements */
  .hero__frame {
    will-change: transform, opacity;
  }

  .hero__frame {
    will-change: transform, opacity;
  }

  .hero__dot {
    will-change: transform, opacity;
  }

  .info-card__sticky {
    border-radius: 0;
  }

  .info-card__content {
    padding: 24px;
  }

  .info-card__header {
    flex-direction: column;
    gap: 16px;
  }

  /* Cases carousel — narrower margins to match mobile padding */
  .cases__grid {
    margin-left: -24px;
    margin-right: -24px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .case-card {
    min-width: 260px;
    min-height: 160px;
  }

  .info-card__badges {
    gap: 8px;
  }

  .badge {
    padding: 8px 10px;
    border-radius: 16px;
  }

  .badge__label {
    font-size: 10px;
  }

  .badge__value {
    font-size: 14px;
  }

  .badge__icon {
    width: 16px;
    height: 16px;
  }
}

/* ===== CASE PAGE ===== */

/* Layout — same structure as main page */
.case-layout {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 20px 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* White card — scrollable, like .info-card */
.case-card-body {
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* Sticky bar — like .info-card__sticky but with back button only */
.case-sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  margin-bottom: -68px;
  padding: 12px;
  height: 68px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
  display: flex;
  align-items: center;
}

/* Back button — styled like .info-card__sticky-copy */
.case-sticky__back {
  background: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  flex-shrink: 0;
  box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.case-sticky__back:hover {
  opacity: 0.8;
}

/* Content inside card */
.case-card-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 68px 28px 48px;
}

/* Header */
.case-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case-meta {
  font-size: 13px;
  font-weight: 500;
  color: #AEAEB2;
  letter-spacing: 0.2px;
}

.case-title {
  font-size: 38px;
  font-weight: 700;
  color: #000000;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.case-subtitle {
  font-size: 20px;
  font-weight: 400;
  color: rgba(60, 60, 67, 0.6);
  line-height: 1.3;
  letter-spacing: -0.4px;
}

/* Info Grid */
.case-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.case-info-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.case-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.case-info-item__label {
  font-size: 13px;
  font-weight: 500;
  color: #AEAEB2;
  letter-spacing: 0.2px;
}

.case-info-item__value {
  font-size: 15px;
  font-weight: 500;
  color: #000000;
  line-height: 1.4;
}

/* Cover */
.case-cover {
  position: relative;
  width: 100%;
  min-height: 400px;
  background: #D1D1D6;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.case-cover:has(img) {
  min-height: 0;
  background: none;
}

.case-cover__link {
  position: absolute;
  bottom: 28px;
  left: 28px;
  background: #FFFFFF;
  border-radius: 100px;
  padding: 14px 28px;
  font-size: 17px;
  font-weight: 600;
  color: #000000;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.case-cover__link:hover {
  opacity: 0.85;
}

.case-cover__text {
  font-size: 17px;
  font-weight: 500;
  color: #8E8E93;
}

.case-cover__img {
  width: 100%;
  display: block;
  border-radius: 24px;
}

.case-cover-wrap {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
}

.case-cover-wrap__img {
  width: 100%;
  display: block;
}

/* Context card */
.case-context {
  background: #F2F2F7;
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Section */
.case-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-section__title {
  font-size: 22px;
  font-weight: 700;
  color: #000000;
  line-height: 1.3;
  letter-spacing: -0.26px;
}

.case-section__text {
  font-size: 15px;
  font-weight: 400;
  color: rgba(60, 60, 67, 0.85);
  line-height: 1.6;
  letter-spacing: -0.1px;
}

/* Intros block */
.case-intros {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 64px;
}

/* Competitors */
.case-competitors-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 64px;
}

.case-competitors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.case-competitor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.case-competitor__logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  background: #D1D1D6;
}

.case-competitor__name {
  font-size: 13px;
  font-weight: 500;
  color: #8E8E93;
}

/* Findings */
.case-findings {
  background: #F2F2F7;
  border-radius: 20px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-findings__title {
  font-size: 17px;
  font-weight: 600;
  color: #000000;
}

.case-findings__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.case-findings__list li {
  font-size: 15px;
  font-weight: 400;
  color: rgba(60, 60, 67, 0.85);
  line-height: 1.5;
  padding-left: 16px;
  position: relative;
}

.case-findings__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #AEAEB2;
}

/* Solutions */
.case-solutions {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-top: 64px;
}

.case-solution {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Mockup placeholder */
.case-mockup {
  width: 100%;
  min-height: 320px;
  background: #D1D1D6;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  overflow: hidden;
}

.case-mockup:has(img) {
  min-height: 0;
  background: none;
  display: block;
}

.case-mockup__text {
  font-size: 17px;
  font-weight: 500;
  color: #8E8E93;
}

.case-mockup__img {
  width: 100%;
  display: block;
  border-radius: 20px;
}

/* Results */
.case-results {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 64px;
}

.case-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.case-result {
  background: #F2F2F7;
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case-result__number {
  font-size: 32px;
  font-weight: 700;
  color: #000000;
  letter-spacing: -0.5px;
}

.case-result__label {
  font-size: 14px;
  font-weight: 400;
  color: rgba(60, 60, 67, 0.6);
  line-height: 1.4;
}

/* Conclusions */
.case-conclusions {
  background: #F2F2F7;
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 64px;
}

/* Case page responsive */
@media (max-width: 600px) {
  .case-layout {
    padding: 0;
    height: 100%;
  }

  .case-card-body {
    border-radius: 0;
  }

  .case-sticky {
    border-radius: 0;
  }

  .case-cover__link {
    display: none;
  }

  .case-title {
    font-size: 28px;
  }

  .case-subtitle {
    font-size: 17px;
  }

  .case-info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .case-cover {
    border-radius: 16px;
  }

  .case-competitors {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .case-mockup {
    border-radius: 16px;
  }

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

  .cv-qr {
    display: none;
  }
}

/* ===== CV PAGE ===== */

.cv-sticky-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.cv-sticky-btn {
  background: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 200px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  cursor: pointer;
  box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.15);
  transition: opacity 0.2s ease;
}

.cv-sticky-btn:hover {
  opacity: 0.8;
}

.cv-content {
  gap: 0 !important;
}

.cv-header {
  display: flex;
  gap: 20px;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 0.33px solid #D9D9D9;
  margin-bottom: 28px;
}

.cv-qr {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cv-qr__img {
  border-radius: 8px;
}

.cv-qr__label {
  font-size: 11px;
  font-weight: 500;
  color: #8E8E93;
  letter-spacing: -0.1px;
}

.cv-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.cv-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cv-name {
  font-size: 24px;
  font-weight: 700;
  color: #000000;
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.cv-role {
  font-size: 17px;
  font-weight: 500;
  color: #8E8E93;
  line-height: 1.3;
}

.cv-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 4px;
}

.cv-contact {
  font-size: 13px;
  font-weight: 400;
  color: #8E8E93;
  text-decoration: none;
  transition: color 0.2s ease;
}

a.cv-contact:hover {
  color: #000000;
}

.cv-section {
  padding-bottom: 28px;
  border-bottom: 0.33px solid #D9D9D9;
  margin-bottom: 28px;
}

.cv-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.cv-section__title {
  font-size: 20px;
  font-weight: 700;
  color: #000000;
  letter-spacing: -0.3px;
  margin-bottom: 16px;
}

.cv-section__text {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: #3C3C43;
  letter-spacing: -0.1px;
}

.cv-section__text strong {
  font-weight: 600;
  color: #000000;
}

/* Jobs */
.cv-job {
  margin-bottom: 24px;
}

.cv-job:last-child {
  margin-bottom: 0;
}

.cv-job__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.cv-job__company {
  font-size: 17px;
  font-weight: 600;
  color: #000000;
  letter-spacing: -0.2px;
  line-height: 1.3;
}

.cv-job__role {
  font-size: 15px;
  font-weight: 400;
  color: #8E8E93;
  line-height: 1.3;
}

.cv-job__year {
  font-size: 15px;
  font-weight: 500;
  color: #8E8E93;
  white-space: nowrap;
  flex-shrink: 0;
}

.cv-job__desc {
  font-size: 14px;
  font-weight: 400;
  color: #8E8E93;
  line-height: 1.4;
  margin-bottom: 12px;
}

.cv-job__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cv-job__list li {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: #3C3C43;
  letter-spacing: -0.1px;
  padding-left: 16px;
  position: relative;
}

.cv-job__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #C7C7CC;
}

/* Skills */
.cv-skills {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cv-skill-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cv-skill-group__label {
  font-size: 15px;
  font-weight: 600;
  color: #000000;
}

.cv-skill-group__items {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: #3C3C43;
  letter-spacing: -0.1px;
}

/* Languages */
.cv-languages {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cv-language {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.cv-language__name {
  font-size: 15px;
  font-weight: 600;
  color: #000000;
}

.cv-language__level {
  font-size: 15px;
  font-weight: 400;
  color: #8E8E93;
}

/* Closing */
.cv-closing {
  padding-top: 0;
}

/* Print styles */
@media print {
  /* === Reset scroll/fixed layout to normal document flow === */
  html {
    overflow: visible !important;
    height: auto !important;
  }

  body {
    overflow: visible !important;
    height: auto !important;
    position: static !important;
    width: auto !important;
    background: #ffffff !important;
  }

  /* Break out of flex — flex doesn't paginate across print pages */
  .case-layout {
    display: block !important;
    height: auto !important;
    padding: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .case-card-body {
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .case-card-content {
    display: block !important;
    overflow: visible !important;
  }

  .case-sticky,
  .cv-qr-overlay {
    display: none !important;
  }

  /* === CV print-specific === */
  .case-card-content.cv-content {
    padding: 16px 20px !important;
  }

  .cv-qr {
    display: flex !important;
  }

  /* --- Print colors: make all gray text readable --- */
  .cv-role,
  .cv-contact,
  .cv-job__role,
  .cv-job__year,
  .cv-job__desc,
  .cv-qr__label {
    color: #444444 !important;
  }

  .cv-section__text,
  .cv-job__list li,
  .cv-skill-group__items {
    color: #222222 !important;
  }

  .cv-job__list li::before {
    background: #555555 !important;
  }

  /* --- Tighter spacing for print --- */
  .cv-header {
    padding-bottom: 16px !important;
    margin-bottom: 16px !important;
  }

  .cv-section {
    padding-bottom: 14px !important;
    margin-bottom: 14px !important;
  }

  .cv-section__title {
    margin-bottom: 10px !important;
    font-size: 18px !important;
  }

  .cv-section__text {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  .cv-job {
    margin-bottom: 14px !important;
  }

  .cv-job__desc {
    margin-bottom: 8px !important;
    font-size: 13px !important;
  }

  .cv-job__company {
    font-size: 15px !important;
  }

  .cv-job__list {
    gap: 4px !important;
  }

  .cv-job__list li {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  .cv-skills {
    gap: 10px !important;
  }

  .cv-skill-group__label {
    font-size: 13px !important;
    color: #000000 !important;
  }

  .cv-skill-group__items {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  .cv-name {
    font-size: 22px !important;
  }

  .cv-role {
    font-size: 15px !important;
  }

  .cv-contact {
    font-size: 12px !important;
  }

  /* --- Page break rules: individual blocks stay whole, sections can split --- */
  .cv-header,
  .cv-job,
  .cv-closing {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
