.platform-section {
  padding: 128px 0;
  overflow: hidden;
  color: var(--foreground);
  background: var(--background);
  font-family: var(--font-ui);
}

.platform-section *,
.platform-section *::before,
.platform-section *::after {
  box-sizing: border-box;
}

.platform-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.platform-header {
  max-width: 672px;
  margin: 0 auto 64px;
  text-align: center;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  margin-bottom: 16px;
  padding: 3px 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--foreground);
  background: var(--background);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.platform-heading {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
}

.platform-lede {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.5;
}

.platform-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 32px;
}

.platform-row:first-of-type {
  margin-bottom: 96px;
}

.platform-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.platform-copy-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.platform-copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.14;
}

.platform-copy-header p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.5;
}

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

.platform-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px;
  border-radius: 8px;
}

.platform-feature > svg {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--foreground);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.platform-feature h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.platform-feature p {
  margin: 4px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.45;
}

.platform-actions {
  display: flex;
  gap: 16px;
  padding-top: 8px;
  padding-right: 16px;
}

.platform-button {
  display: inline-flex;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--foreground);
  background: var(--background);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.platform-button:hover {
  background: var(--muted);
}

.platform-button.primary {
  border-color: var(--primary);
  color: var(--primary-foreground);
  background: var(--primary);
}

.platform-button.primary:hover {
  background: color-mix(in srgb, var(--primary) 90%, var(--background));
}

.platform-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.platform-mockup {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  perspective: 1200px;
  transform-style: preserve-3d;
}

.platform-scene {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.platform-glow {
  display: none;
}

.platform-plane {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateZ(var(--tilt-z, 0px)) scale(var(--tilt-scale, 1));
  transition: transform 180ms ease-out;
  will-change: transform;
}

.platform-mockup:hover .platform-plane {
  --tilt-z: 10px;
  --tilt-scale: 1.005;
}

.platform-mockup:hover .platform-glow {
  opacity: 1;
}

.platform-depth {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: var(--muted);
  box-shadow: var(--shadow-sm);
  transform: translate3d(8px, 16px, -32px);
}

.platform-image-plane {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.platform-shimmer,
.platform-fade,
.platform-image-ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.platform-shimmer {
  z-index: 3;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--background) 20%, transparent), transparent);
  transform: translateX(-100%) skewX(-12deg);
  transition: transform 1000ms ease-out;
}

.platform-mockup.is-right .platform-shimmer {
  transform: translateX(100%) skewX(-12deg);
}

.platform-mockup:hover .platform-shimmer {
  transform: translateX(100%) skewX(-12deg);
}

.platform-mockup.is-right:hover .platform-shimmer {
  transform: translateX(-100%) skewX(-12deg);
}

.platform-fade {
  z-index: 2;
  background: linear-gradient(90deg, var(--background) 0%, color-mix(in srgb, var(--background) 85%, transparent) 15%, transparent 40%);
}

.platform-mockup.is-right .platform-fade {
  background: linear-gradient(270deg, var(--background) 0%, color-mix(in srgb, var(--background) 85%, transparent) 15%, transparent 40%);
}

.platform-image-plane img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  transition: transform 700ms ease;
}

.platform-mockup.is-right .platform-image-plane img {
  object-position: center;
}

.platform-image-plane .platform-image-dark {
  display: none;
}

:root[data-theme="dark"] .platform-image-plane .platform-image-light {
  display: none;
}

:root[data-theme="dark"] .platform-image-plane .platform-image-dark {
  display: block;
}

.platform-mockup:hover .platform-image-plane img {
  transform: scale(1.05);
}

.platform-image-ring {
  z-index: 4;
  border: 1px solid color-mix(in srgb, var(--background) 20%, transparent);
  border-radius: 16px;
  transition: border-color 500ms ease;
}

:root[data-theme="dark"] .platform-image-ring {
  border-color: color-mix(in srgb, var(--background) 10%, transparent);
}

.platform-mockup:hover .platform-image-ring {
  border-color: var(--border-strong);
}

@media (prefers-reduced-motion: reduce) {
  .platform-plane,
  .platform-mockup:hover .platform-plane {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    --tilt-z: 0px;
    --tilt-scale: 1;
    transition: none;
  }
}

@media (min-width: 1280px) {
  .platform-row {
    gap: 64px;
  }
}

@media (max-width: 1023px) {
  .platform-row {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .platform-row-second .platform-copy {
    order: 2;
  }

  .platform-row-second .platform-mockup {
    order: 1;
  }
}

@media (max-width: 639px) {
  .platform-section {
    padding: 96px 0;
  }

  .platform-container {
    padding: 0 16px;
  }

  .platform-heading {
    font-size: 24px;
  }

  .platform-lede {
    font-size: 12px;
  }

  .platform-copy h3 {
    font-size: 20px;
  }

  .platform-features {
    grid-template-columns: 1fr;
  }

  .platform-actions {
    flex-direction: column;
    padding-right: 0;
  }

  .platform-glow {
    inset: 0;
  }
}