/* ProAI Expert Homepage Hero — Signature System Narrative R3
   Single responsive authority for the Homepage Hero. The stable Cube runtime is
   mounted into the object slot without camera, geometry, materials, lighting,
   or interaction changes. */

#hero {
  --proai-hero-void: #020304;
  --proai-hero-page: #050607;
  --proai-hero-surface: #090b0e;
  --proai-hero-panel: #0e1217;
  --proai-hero-elevated: #171c22;
  --proai-hero-pearl: #f1efe9;
  --proai-hero-silver: #c9cdd1;
  --proai-hero-body: #a6abb1;
  --proai-hero-muted: #858a90;
  --proai-hero-header-h: 85px;
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  padding: calc(var(--proai-hero-header-h) + clamp(28px, 4.2vh, 46px)) 0 clamp(44px, 6vh, 70px);
  overflow: clip;
  background:
    radial-gradient(ellipse 34% 46% at 83% 42%, rgba(217,220,222,.027) 0%, rgba(134,139,144,.010) 34%, transparent 72%),
    linear-gradient(180deg, var(--proai-hero-void) 0%, var(--proai-hero-page) 18%, var(--proai-hero-page) 80%, var(--proai-hero-void) 100%);
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 24% 34% at 85% 40%, rgba(241,242,242,.010), transparent 72%);
}

#hero .hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr);
  align-items: center;
  gap: clamp(26px, 3vw, 48px);
  width: min(100%, 1500px);
  min-height: calc(100svh - var(--proai-hero-header-h) - clamp(94px, 13vh, 136px));
  margin: 0 auto;
  padding: 0 clamp(26px, 3.5vw, 50px);
}

#hero .hero-left {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 760px;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: none;
}

body.scrolled #hero .hero-left {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

#hero .hero-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: #c0c3c6;
  font-family: var(--font);
  font-size: clamp(11px, .8vw, 13px);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: .155em;
  text-transform: uppercase;
}

#hero .hero-label::before {
  content: "";
  width: 30px;
  height: 1px;
  flex: 0 0 30px;
  background: linear-gradient(90deg, rgba(201,205,209,.72), rgba(201,205,209,.08));
}

#hero .proai-hero-title {
  max-width: 760px;
  margin: 0;
  color: #f2f0eb;
  font-family: var(--font);
  font-size: clamp(68px, 5.15vw, 76px);
  font-weight: 500;
  font-synthesis: none;
  line-height: .985;
  letter-spacing: -.044em;
  text-wrap: balance;
  background: none;
  -webkit-text-fill-color: currentColor;
  text-shadow: none;
}

body.lang-ru #hero .proai-hero-title {
  max-width: clamp(455px, 34vw, 500px);
  font-size: clamp(62px, 4.45vw, 66px);
  line-height: .99;
  letter-spacing: -.036em;
  text-wrap: pretty;
}

#hero .proai-hero-support {
  max-width: 650px;
  margin: 26px 0 0;
  color: var(--proai-hero-body);
  font-family: var(--font);
  font-size: clamp(17px, 1.2vw, 19px);
  font-weight: 400;
  line-height: 1.55;
  text-wrap: pretty;
}

#hero .hero-cta-group.proai-hero-actions {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 18px;
  margin: 32px 0 0;
}

#hero .proai-hero-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

#hero .proai-hero-cta--primary {
  min-width: 164px;
  padding: 0 24px;
  overflow: hidden;
  border: 1px solid rgba(218,221,224,.19);
  border-radius: 9px;
  color: #f0eee8;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055) 0%, rgba(255,255,255,.012) 22%, rgba(0,0,0,.10) 100%),
    linear-gradient(180deg, #171c22 0%, #11161c 48%, #0e1217 100%);
  box-shadow:
    inset 0 1px 0 rgba(245,246,246,.17),
    inset 0 -1px 0 rgba(0,0,0,.72),
    inset 0 -8px 18px rgba(0,0,0,.16),
    0 13px 30px rgba(0,0,0,.30),
    0 1px 0 rgba(255,255,255,.025);
  transition: transform 160ms ease, border-color 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

#hero .proai-hero-cta--primary::before {
  content: "";
  position: absolute;
  left: 12%;
  top: 0;
  width: 58%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(231,229,223,.18) 18%, rgba(231,229,223,.58) 52%, rgba(201,205,209,.18) 84%, transparent 100%);
}

#hero .proai-hero-cta--primary::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 7px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.018);
}

#hero .proai-hero-cta--primary:hover {
  transform: translateY(-1px);
  border-color: rgba(218,221,224,.27);
  box-shadow:
    inset 0 1px 0 rgba(245,246,246,.23),
    inset 0 -1px 0 rgba(0,0,0,.76),
    inset 0 -8px 18px rgba(0,0,0,.14),
    0 15px 34px rgba(0,0,0,.35),
    0 1px 0 rgba(255,255,255,.03);
}

#hero .proai-hero-cta--primary:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 2px 5px rgba(0,0,0,.52),
    inset 0 1px 0 rgba(255,255,255,.08),
    0 7px 18px rgba(0,0,0,.26);
}

#hero .proai-hero-cta--secondary {
  gap: 6px;
  min-height: 44px;
  padding: 0 2px;
  color: #c9cdd1;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  opacity: .82;
  transition: color 160ms ease, opacity 160ms ease;
}

#hero .proai-hero-cta--secondary span {
  display: inline-block;
  transition: transform 160ms ease;
}

#hero .proai-hero-cta--secondary:hover {
  color: #f0eee8;
  opacity: 1;
}

#hero .proai-hero-cta--secondary:hover span {
  transform: translateX(3px);
}

#hero .proai-hero-cta:focus-visible {
  outline: 2px solid rgba(218,221,224,.82);
  outline-offset: 4px;
}

#hero .proai-hero-cta--primary:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(245,246,246,.22),
    inset 0 -1px 0 rgba(0,0,0,.74),
    0 0 0 1px #050607,
    0 0 0 5px rgba(201,205,209,.17),
    0 14px 32px rgba(0,0,0,.33);
}

#hero .hero-visual.proai-hero-object-region {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 720px);
  justify-self: end;
  align-self: center;
  margin: 0;
  transform: none;
  overflow: visible;
  isolation: isolate;
}

#hero .hero-visual.proai-hero-object-region::before,
#hero .hero-visual.proai-hero-object-region::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

#hero .hero-visual.proai-hero-object-region::before {
  inset: 5% -4% 4% 1%;
  background: radial-gradient(ellipse at 58% 43%, rgba(218,221,223,.026) 0%, rgba(112,118,124,.010) 36%, transparent 70%);
  filter: blur(14px);
}

#hero .hero-visual.proai-hero-object-region::after {
  top: 15%;
  right: 4%;
  width: 68%;
  height: 60%;
  background: none;
  filter: none;
}

#hero .proai-hero-object-slot {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1;
  overflow: visible;
  isolation: isolate;
}

#hero .proai-hero-cube-mount {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 260ms ease, visibility 0s linear 260ms;
}

#hero .proai-hero-object-slot[data-cube-mounted="true"] .proai-hero-cube-mount {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 260ms ease, visibility 0s linear 0s;
}

#hero .proai-hero-cube-mount canvas {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 1260px) and (min-width: 901px) {
  #hero .hero-content {
    grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr);
    gap: clamp(22px, 2.5vw, 32px);
    padding-inline: 30px;
  }

  #hero .proai-hero-title {
    font-size: clamp(56px, 5vw, 64px);
  }

  body.lang-ru #hero .proai-hero-title {
    font-size: clamp(52px, 4.6vw, 59px);
  }

  #hero .proai-hero-support {
    font-size: 17px;
  }
}

@media (max-width: 900px) {
  #hero {
    min-height: auto;
    padding: calc(var(--proai-hero-header-h) + 26px) 0 42px;
  }

  #hero .hero-content {
    display: flex;
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 30px;
    padding-inline: clamp(20px, 5vw, 38px);
  }

  #hero .hero-left {
    max-width: 760px;
  }

  #hero .proai-hero-title,
  body.lang-ru #hero .proai-hero-title {
    max-width: 760px;
    font-size: clamp(44px, 8.8vw, 58px);
    line-height: .99;
  }

  body.lang-ru #hero .proai-hero-title {
    font-size: clamp(42px, 8.1vw, 54px);
    letter-spacing: -.034em;
  }

  #hero .proai-hero-support {
    max-width: 680px;
    margin-top: 22px;
    font-size: 16.5px;
    line-height: 1.55;
  }

  #hero .hero-cta-group.proai-hero-actions {
    width: fit-content;
    max-width: 100%;
    flex-flow: row nowrap;
    justify-content: flex-start;
    gap: 14px;
    margin-top: 26px;
  }

  #hero .hero-visual.proai-hero-object-region {
    order: 2;
    width: min(92vw, 560px);
    max-width: 100%;
    align-self: center;
    justify-self: auto;
  }

  #hero .proai-hero-object-slot[data-cube-mounted="false"] {
    min-height: 88px;
    aspect-ratio: auto;
  }

  #hero .proai-hero-object-slot[data-cube-mounted="true"] {
    min-height: 0;
    aspect-ratio: 1;
  }
}

@media (max-width: 640px) {
  #hero {
    --proai-hero-header-h: 84px;
    padding: calc(var(--proai-hero-header-h) + 20px) 0 32px;
  }

  #hero .hero-content {
    gap: 24px;
    padding-inline: 18px;
  }

  #hero .hero-label {
    gap: 8px;
    margin-bottom: 16px;
    font-size: 10px;
    line-height: 1.45;
    letter-spacing: .13em;
  }

  #hero .hero-label::before {
    width: 22px;
    flex-basis: 22px;
  }

  #hero .proai-hero-title {
    font-size: clamp(42px, 11.2vw, 49px);
    line-height: .995;
    letter-spacing: -.040em;
  }

  body.lang-ru #hero .proai-hero-title {
    font-size: clamp(40px, 10.45vw, 46px);
    letter-spacing: -.032em;
  }

  #hero .proai-hero-support {
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.52;
  }

  #hero .hero-cta-group.proai-hero-actions {
    gap: 10px;
    margin-top: 24px;
  }

  #hero .proai-hero-cta {
    font-size: 13px;
  }

  #hero .proai-hero-cta--primary {
    min-width: 0;
    min-height: 50px;
    padding-inline: 14px;
    flex: 0 0 auto;
  }

  #hero .proai-hero-cta--secondary {
    flex: 0 1 auto;
  }

  #hero .hero-visual.proai-hero-object-region {
    width: min(92vw, 520px);
  }
}

@media (max-width: 380px) {
  #hero .hero-content {
    padding-inline: 16px;
  }

  #hero .proai-hero-title {
    font-size: 41px;
  }

  body.lang-ru #hero .proai-hero-title {
    font-size: 39px;
  }
}

@media (max-width: 1000px) and (max-height: 540px) and (orientation: landscape) {
  #hero {
    --proai-hero-header-h: 68px;
    min-height: auto;
    padding: calc(var(--proai-hero-header-h) + 20px) 0 38px;
  }

  #hero .hero-content {
    display: flex;
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 34px;
    width: min(100%, 980px);
    padding-inline: clamp(24px, 5vw, 48px);
  }

  #hero .hero-left {
    width: 100%;
    max-width: 820px;
    padding: 0;
  }

  #hero .hero-label {
    margin-bottom: 16px;
    font-size: 10px;
  }

  #hero .proai-hero-title {
    max-width: 820px;
    font-size: clamp(48px, 6.2vw, 58px);
    line-height: .98;
  }

  body.lang-ru #hero .proai-hero-title {
    max-width: 840px;
    font-size: clamp(46px, 5.7vw, 54px);
    line-height: .99;
  }

  #hero .proai-hero-support {
    max-width: 760px;
    margin-top: 18px;
    font-size: 16px;
    line-height: 1.5;
  }

  #hero .hero-cta-group.proai-hero-actions {
    width: fit-content;
    max-width: 100%;
    flex-flow: row nowrap;
    justify-content: flex-start;
    gap: 14px;
    margin-top: 22px;
  }

  #hero .hero-visual.proai-hero-object-region {
    width: clamp(360px, 50vw, 520px);
    max-width: calc(100vw - 48px);
    align-self: center;
    justify-self: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hero .proai-hero-cta,
  #hero .proai-hero-cta--secondary span,
  #hero .proai-hero-cube-mount {
    transition: none;
  }

  #hero .proai-hero-cta:hover,
  #hero .proai-hero-cta:active,
  #hero .proai-hero-cta--secondary:hover span {
    transform: none;
  }
}