/* Homepage hero — Porcelain production treatment */
.hero-demo .demo-window {
  min-height: 640px;
  padding: 0;
  background:
    radial-gradient(ellipse 70% 42% at 82% 0%, rgba(255, 255, 255, 0.98), transparent 66%),
    radial-gradient(ellipse 58% 46% at 16% 3%, rgba(255, 255, 255, 0.9), transparent 64%),
    linear-gradient(145deg, #f8f8f6 0%, #f0f0ed 55%, #e9ebe9 100%);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 0 0 1px rgba(29, 29, 31, 0.025),
    0 3px 12px rgba(18, 22, 28, 0.07),
    0 34px 80px rgba(31, 47, 66, 0.13),
    0 88px 158px rgba(29, 29, 31, 0.12);
}

.hero-demo .demo-window::before {
  content: none;
}

.demo-zone-label {
  position: absolute;
  z-index: 4;
  top: 24px;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.demo-zone-hardware {
  left: 24px;
  color: rgba(29, 29, 31, 0.35);
}

.demo-zone-software {
  right: 24px;
  color: rgba(29, 29, 31, 0.34);
}

.hero-demo .menu-bar-preview {
  --hero-menu-preview-width: 284px;
  position: absolute;
  z-index: 5;
  top: 68px;
  right: auto;
  left: calc(100% - 34px - var(--hero-menu-preview-width));
  display: block;
  width: var(--hero-menu-preview-width);
  margin: 0;
  transform: none;
}

.hero-demo .menu-bar-preview-label {
  display: none;
}

.hero-demo .menu-bar-cluster {
  --menu-bar-icon-width: 42px;
  --menu-bar-icon-height: 24px;
  --menu-bar-icon-radius: 999px;
  --menu-bar-icon-background: #595a5f;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  gap: 8px;
  padding: 8px 11px;
  color: #58585d;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(246, 249, 253, 0.7));
  box-shadow:
    0 10px 24px rgba(35, 49, 67, 0.11),
    0 28px 60px rgba(35, 49, 67, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(104, 118, 134, 0.08);
}

.hero-demo .menu-bar-cluster::before {
  content: none;
}

.hero-demo .menu-bar-volumekeys {
  color: inherit;
}

.hero-demo .menu-bar-item {
  gap: 7px;
}

.hero-demo .menu-bar-item small {
  color: #6e6e73;
  font-size: 9px;
  font-weight: 680;
  line-height: 1;
}

.hero-demo .menu-bar-item > svg {
  flex: 0 0 var(--menu-bar-icon-width);
  width: var(--menu-bar-icon-width);
  height: var(--menu-bar-icon-height);
}

.hero-demo .menu-bar-item:not(.menu-bar-volumekeys) > svg {
  box-sizing: border-box;
  display: block;
  width: var(--menu-bar-icon-width);
  height: var(--menu-bar-icon-height);
  padding: 3px 8px;
  color: #fff;
  border: 0;
  border-radius: var(--menu-bar-icon-radius);
  background: var(--menu-bar-icon-background);
  box-shadow: none;
}

.hero-demo .menu-bar-item:not(.menu-bar-volumekeys) > svg path:first-child {
  fill: #fff;
}

.hero-demo .menu-bar-item:not(.menu-bar-volumekeys) > svg path:not(:first-child) {
  stroke: #fff;
}

.hero-demo .menu-bar-divider {
  height: 25px;
}

.hero-demo .menu-bars {
  display: flex;
  box-sizing: border-box;
  flex: 0 0 var(--menu-bar-icon-width);
  width: var(--menu-bar-icon-width);
  height: var(--menu-bar-icon-height);
  align-items: center;
  justify-content: center;
  gap: 1.7px;
  padding: 0;
  border: 0;
  border-radius: var(--menu-bar-icon-radius);
  background: var(--menu-bar-icon-background);
  box-shadow: none;
}

.hero-demo .menu-bars i {
  display: block;
  width: 4.2px;
  border-radius: 999px;
  background: #fff;
}

.hero-demo .menu-bars i:nth-child(1) { height: 6px; opacity: 0.48; }
.hero-demo .menu-bars i:nth-child(2) { height: 10px; opacity: 0.72; }
.hero-demo .menu-bars i:nth-child(3) { height: 14px; opacity: 1; }

.hero-demo .system-feedback {
  position: static;
  display: block;
  margin: 0;
}

.hero-demo .demo-context {
  position: absolute;
  z-index: 3;
  top: 68px;
  left: 34px;
  width: 280px;
  max-width: none;
  color: rgba(29, 29, 31, 0.9);
}

.hero-demo .demo-context span {
  color: inherit;
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-transform: none;
}

.hero-demo .demo-context small {
  color: rgba(29, 29, 31, 0.5);
  font-size: 9.5px;
  line-height: 1.48;
}

.hero-demo .macos-hud {
  position: absolute;
  z-index: 4;
  top: 206px;
  left: 34px;
  width: 294px;
  padding: 13px 16px 14px;
  transform: scale(0.8);
  transform-origin: top left;
}

.hero-demo .macos-hud.is-awake {
  transform: translateY(-2px) scale(0.8);
}

.hero-demo .product-surface {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: block;
  pointer-events: none;
}

.hero-demo :is(.key-stage, .actual-ui) {
  pointer-events: auto;
}

.hero-demo .product-surface:has(.actual-ui.has-open-submenu) {
  z-index: 400;
}

.hero-demo .key-stage {
  position: absolute;
  z-index: 4;
  top: 286px;
  left: 54.8px;
  width: 242px;
  transform: scale(0.8);
  transform-origin: top left;
}

.hero-demo .actual-ui {
  position: absolute;
  z-index: 4;
  /* The label sits above; the actual menu surface aligns with the HUD. */
  top: 185.3px;
  right: 20px;
  left: auto;
  width: 360px;
  max-height: 470px;
  transform: scale(0.8);
  transform-origin: top right;
}

.hero-demo .actual-ui.is-closed {
  max-height: 24px;
}

.hero-demo .native-menu-shell {
  max-height: 455px;
  padding: 0;
  border: 1px solid rgba(29, 29, 31, 0.14);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(251, 253, 255, 0.96), rgba(241, 246, 252, 0.94));
  box-shadow:
    0 16px 38px rgba(39, 49, 61, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.hero-demo .native-menu {
  padding: 7px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  box-shadow: none;
}

.hero-demo .native-menu-row {
  min-height: 22px;
  gap: 6px;
  padding: 2px 6px;
}

.hero-demo .native-menu-row > span,
.hero-demo .native-menu-row > strong,
.hero-demo .native-menu-row kbd {
  font-size: 12.5px;
}

.hero-demo .menu-check {
  width: 14px;
}

.hero-demo .native-menu-choice span {
  margin-left: 0;
}

.hero-demo .native-menu-choice-has-check > .menu-check {
  display: none;
}

.hero-demo .native-menu-choice b {
  order: -1;
  flex: 0 0 14px;
  margin: 0;
  font-size: 16px;
  line-height: 1;
  text-align: center;
  transform: rotate(180deg);
}

.hero-demo button.native-menu-choice.is-open b {
  transform: rotate(90deg);
}

.hero-demo .menu-separator {
  margin: 4px 6px;
}

.hero-demo .native-status-card {
  box-sizing: border-box;
  min-height: 82px;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 10px 12px;
  border-color: rgba(52, 199, 89, 0.55);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
}

.hero-demo .native-status-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: none;
  font-size: 12px;
}

.hero-demo .native-status-copy {
  flex: 1;
}

.hero-demo .native-status-copy p {
  margin: 0;
  color: rgba(29, 29, 31, 0.94);
  line-height: 1.35;
}

.hero-demo .native-status-copy p:first-child {
  font-size: 13.5px;
  font-weight: 650;
}

.hero-demo .native-status-copy p:nth-child(2) {
  font-size: 12.5px;
  font-weight: 550;
}

.hero-demo .native-status-copy p span {
  color: inherit;
}

.hero-demo .native-status-copy p strong {
  font-weight: 650;
}

.hero-demo .native-status-copy small {
  margin-top: 3px;
  color: rgba(29, 29, 31, 0.68);
  font-size: 11.5px;
}

.hero-demo .native-about-row {
  margin-bottom: 2px;
}

@media (max-width: 640px) {
  .demo-zone-hardware {
    top: 22px;
    left: 22px;
  }

  .demo-zone-software {
    top: calc(42% + 20px);
    right: 22px;
  }

  .hero-demo .demo-context {
    top: 58px;
    left: 22px;
    width: min(185px, calc(100% - 44px));
  }

  .hero-demo .macos-hud {
    top: 164px;
    left: 50%;
    width: 278px;
    transform: translateX(-50%) scale(0.82);
    transform-origin: top center;
  }

  .hero-demo .macos-hud.is-awake {
    transform: translateX(-50%) translateY(-2px) scale(0.82);
  }

  .hero-demo .key-stage {
    top: 246px;
    left: 50%;
    transform: translateX(-50%) scale(0.82);
    transform-origin: top center;
  }

  .hero-demo .menu-bar-preview {
    top: calc(42% + 52px);
    right: auto;
    left: 50%;
    width: min(320px, calc(100% - 32px));
    transform: translateX(-50%);
  }

  .hero-demo .menu-bar-cluster {
    align-self: auto;
  }

  .hero-demo .actual-ui {
    top: calc(42% + 113px);
    right: auto;
    left: 50%;
    width: 360px;
    transform: translateX(-50%) scale(0.92);
    transform-origin: top center;
  }
}

@media (max-width: 470px) {
  .hero-demo .actual-ui {
    top: calc(42% + 113px);
    transform: translateX(-50%) scale(0.88);
  }
}

/* Fluid bridge between the desktop and stacked hero compositions. */
.hero-demo .demo-window {
  min-height: clamp(608px, calc(1417.7778px - 74.0741vw), 840px);
  border-radius: var(--vk-fluid-radius-lg, clamp(26px, calc(1.1111vw + 22px), 38px));
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 0 0 1px rgba(29, 29, 31, 0.025),
    0 3px 12px rgba(18, 22, 28, 0.07),
    0 24px 58px rgba(31, 47, 66, 0.12),
    0 54px 96px rgba(29, 29, 31, 0.1);
}

.hero-demo .demo-context {
  width: min(calc(100% - 44px), clamp(185px, 42%, 280px));
}

.hero-demo .menu-bar-preview {
  --hero-menu-preview-width: min(clamp(284px, calc(424px - 13.3333vw), 320px), calc(100% - 32px));
}

.hero-demo .macos-hud {
  transform: scale(0.8);
}

.hero-demo .macos-hud.is-awake {
  transform: translateY(-2px) scale(0.8);
}

.hero-demo .key-stage {
  transform: scale(0.8);
}

.hero-demo .actual-ui {
  transform: scale(0.8);
}

@media (max-width: 640px) {
  .hero-demo .macos-hud {
    transform: translateX(-50%) scale(0.8);
  }

  .hero-demo .macos-hud.is-awake {
    transform: translateX(-50%) translateY(-2px) scale(0.8);
  }

  .hero-demo .key-stage {
    transform: translateX(-50%) scale(0.8);
  }

  .hero-demo .actual-ui {
    transform: translateX(-50%) scale(0.82);
  }
}

@media (max-width: 470px) {
  .hero-demo .actual-ui {
    transform: translateX(-50%) scale(0.78);
  }
}

/* Keep the hero composition compact while preserving the current AppKit menu
   geometry and typography inside it. */
.hero-demo .actual-ui {
  top: 174px;
  right: 34px;
  z-index: 30;
  max-height: 520px;
  overflow: visible;
  transform: scale(1);
}

.hero-demo .actual-ui.is-closed {
  overflow: hidden;
}

.hero-demo .demo-window:has(.actual-ui.has-open-submenu) {
  overflow: visible;
}

.hero-demo .native-submenu {
  z-index: 320;
}

.hero-demo .macos-hud {
  transform: scale(0.66);
}

.hero-demo .macos-hud.is-awake {
  transform: translateY(-2px) scale(0.66);
}

.hero-demo .key-stage {
  transform: scale(0.72);
}

.hero-demo .native-menu-shell {
  width: 360px;
  max-height: 520px;
  padding: 5px;
  border: 0.5px solid rgba(29, 29, 31, 0.22);
  border-radius: 16px;
  background: rgba(248, 248, 248, 0.96);
  direction: ltr;
  text-align: left;
}

.hero-demo .native-menu {
  padding: 0;
  border-radius: 12px;
}

.hero-demo .native-menu-row {
  min-height: 26px;
  gap: 0;
  padding: 0 7px;
}

.hero-demo .native-menu-row > span,
.hero-demo .native-menu-row > strong,
.hero-demo .native-menu-row kbd {
  font-size: 13px;
}

.hero-demo .menu-check {
  width: 20px;
  flex-basis: 20px;
}

.hero-demo .native-menu-choice b {
  width: 20px;
  flex-basis: 20px;
  font-size: 22px;
  text-align: left;
  transform: none;
}

.hero-demo .actual-ui.submenus-open-right .native-menu-choice b {
  order: 0;
  margin-left: auto;
  text-align: right;
}

.hero-demo .native-submenu[data-open-side="right"] {
  transform-origin: top right;
}

.hero-demo button.native-menu-choice.is-open b {
  transform: none;
}

.hero-demo .menu-separator {
  margin: 4px 9px;
}

.hero-demo .native-status-card {
  min-height: 104px;
  margin: 5px 3px 0;
  padding: 12px 13px 12px 15px;
  background: rgba(255, 255, 255, 0.34);
}

.hero-demo .native-status-copy p:first-child {
  font-size: 13.5px;
  font-weight: 600;
}

.hero-demo .native-status-copy p:nth-child(2) {
  font-size: 12.5px;
  font-weight: 500;
}

.hero-demo .native-status-copy small {
  margin-top: 4px;
  color: rgba(29, 29, 31, 0.52);
  font-size: 11.5px;
}

@media (max-width: 640px) {
  .hero-demo .macos-hud {
    transform: translateX(-50%) scale(0.8);
  }

  .hero-demo .macos-hud.is-awake {
    transform: translateX(-50%) translateY(-2px) scale(0.8);
  }

  .hero-demo .key-stage {
    transform: translateX(-50%) scale(0.8);
  }

  .hero-demo .actual-ui {
    top: calc(42% + 113px);
    right: auto;
    transform: translateX(-50%) scale(0.82);
  }
}

@media (max-width: 470px) {
  .hero-demo .actual-ui {
    transform: translateX(-50%) scale(0.78);
  }
}

/* The outer Hero stacks at 1240 px, but its demo remains 590 px wide until
   the mobile composition takes over. Keep a dedicated compact two-column
   layout in that interval so none of the fixed AppKit surfaces collide. */
@media (min-width: 641px) and (max-width: 1240px) {
  .hero-demo {
    margin-inline: 0;
    justify-self: start;
  }

  .hero-demo .demo-window {
    min-height: 608px;
  }

  .hero-demo .demo-context {
    left: 34px;
    width: 230px;
  }

  .hero-demo .menu-bar-preview {
    --hero-menu-preview-width: 284px;
    right: auto;
    left: calc(100% - 34px - var(--hero-menu-preview-width));
    transform: none;
  }

  .hero-demo .actual-ui {
    top: 174px;
    right: 34px;
    left: auto;
    width: 360px;
    transform: scale(0.84);
    transform-origin: top right;
  }
}
