/* Avanza AI Studio v30 — centered hero experience and modern transition system */

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .brand-copy {
  display: flex;
  align-items: center;
  min-height: 43px;
  line-height: 1;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .brand-copy strong {
  display: block;
  font-size: .91rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .site-header.scrolled .brand-copy {
  min-height: 38px;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .nav-cta {
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .main-nav > a.nav-cta:hover,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .main-nav > a.nav-cta:focus-visible {
  color: #fff;
  background: #111;
  box-shadow: 0 8px 21px rgba(0, 0, 0, .17);
  transform: translateY(-2px);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .site-header.on-dark .main-nav > a.nav-cta:hover,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .site-header.on-dark .main-nav > a.nav-cta:focus-visible {
  color: #111;
  background: #fff;
  box-shadow: 0 8px 21px rgba(0, 0, 0, .17);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero {
  display: flex;
  min-height: 100svh;
  align-items: stretch;
  overflow: hidden;
  padding-top: 132px;
  padding-bottom: 52px;
  background:
    radial-gradient(circle at 79% 40%, rgba(255, 255, 255, .98), transparent 31%),
    radial-gradient(circle at 12% 76%, rgba(255, 255, 255, .72), transparent 30%),
    linear-gradient(180deg, #f8f8f6 0%, #efefec 100%);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-grid {
  display: grid;
  min-height: calc(100svh - 184px);
  grid-template-columns: minmax(0, .94fr) minmax(550px, 1.06fr);
  grid-template-areas: "copy visual";
  align-items: stretch;
  gap: clamp(42px, 4.5vw, 76px);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-copy {
  grid-area: copy;
  width: 100%;
  max-width: 660px;
  align-self: start;
  margin-top: clamp(20px, 5.2vh, 54px);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 {
  max-width: 680px;
  font-size: clamp(3.6rem, 4.5vw, 5.4rem);
  line-height: .955;
  letter-spacing: -.058em;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 .hero-phrase {
  display: block;
  color: #0b0c0e;
  background: none;
  background-clip: initial;
  -webkit-background-clip: initial;
  white-space: nowrap;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 .hero-phrase-payoff {
  color: #111215;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 em {
  color: transparent;
  background: linear-gradient(110deg, #30343a 4%, #858a92 48%, #1a1c20 96%);
  background-clip: text;
  -webkit-background-clip: text;
  font-style: normal;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-text {
  max-width: 555px;
  margin-top: 28px;
  color: #5c6067;
  font-size: clamp(1rem, 1.08vw, 1.09rem);
  line-height: 1.7;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions {
  gap: 13px;
  margin-top: 32px;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions .button-primary,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions .button-primary:hover,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions .button-primary:focus-visible {
  color: #fff;
  background: #0e0f11;
  box-shadow: 0 13px 28px rgba(10, 11, 13, .18);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions .button-primary {
  transform: translateY(0);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions .button-primary:hover,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions .button-primary:focus-visible {
  transform: translateY(-2px);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
  grid-area: visual;
  position: relative;
  display: grid;
  width: min(100%, 710px);
  min-height: 470px;
  align-self: end;
  justify-self: end;
  place-items: end center;
  margin: 0 -8px 2px 0;
  isolation: isolate;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-story {
  display: grid;
  position: relative;
  width: 100%;
  min-width: 0;
  place-items: center;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-story::before {
  position: absolute;
  z-index: -1;
  top: -8%;
  right: 1%;
  width: 73%;
  aspect-ratio: 1;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(255, 255, 255, .94), rgba(255, 255, 255, .24) 49%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
  display: grid;
  width: 100%;
  min-height: 365px;
  grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  grid-template-areas: "chaos axis calm";
  align-items: center;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
  display: grid;
  position: relative;
  width: min(100%, 286px);
  aspect-ratio: 1;
  place-items: center;
  pointer-events: none;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-chaos {
  grid-area: chaos;
  justify-self: end;
  opacity: .94;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-calm {
  grid-area: calm;
  justify-self: start;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-video {
  display: block;
  height: auto;
  border: 0;
  background: transparent;
  object-fit: contain;
  transform-origin: center;
  will-change: transform;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-chaos .hero-sculpture-video {
  width: 125.5%;
  max-width: none;
  filter: drop-shadow(0 30px 34px rgba(8, 10, 14, .15)) drop-shadow(0 8px 11px rgba(8, 10, 14, .065));
  animation: hero-v29-chaos-drift 6.8s ease-in-out infinite alternate;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-calm .hero-sculpture-video {
  width: 100%;
  filter: drop-shadow(0 30px 34px rgba(8, 10, 14, .15)) drop-shadow(0 8px 11px rgba(8, 10, 14, .065));
  animation: hero-v29-calm-drift 8.5s ease-in-out infinite alternate;
}

@keyframes hero-v29-chaos-drift {
  from { transform: translate3d(-2px, 5px, 0) rotate(-.3deg) scale(.99); }
  to { transform: translate3d(2px, -6px, 0) rotate(.3deg) scale(1.008); }
}

@keyframes hero-v29-calm-drift {
  from { transform: translate3d(0, 4px, 0) rotate(-.1deg) scale(.994); }
  to { transform: translate3d(0, -6px, 0) rotate(.1deg) scale(1.006); }
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-axis {
  grid-area: axis;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #5e6269;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-axis span {
  width: 17px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14, 15, 17, .17));
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-axis span:last-child {
  background: linear-gradient(90deg, rgba(14, 15, 17, .17), transparent);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-axis i {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(14, 15, 17, .09);
  border-radius: 50%;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 10px 26px rgba(9, 10, 12, .065), inset 0 1px 0 rgba(255, 255, 255, .95);
  font-size: .74rem;
  font-style: normal;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: -5px;
  color: #777b82;
  font-size: .69rem;
  font-weight: 650;
  letter-spacing: .015em;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-caption i {
  color: #9a9da3;
  font-style: normal;
  font-weight: 500;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-caption strong {
  color: #24272b;
  font-weight: 720;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-assurances,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-footnote {
  display: none;
}

@media (max-width: 1300px) and (min-width: 1161px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-grid {
    grid-template-columns: minmax(0, .9fr) minmax(520px, 1.1fr);
    gap: 34px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 {
    font-size: clamp(3.45rem, 4.35vw, 4.15rem);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
    min-height: 430px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    min-height: 335px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
    width: min(100%, 258px);
  }
}

@media (max-width: 1160px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero {
    min-height: auto;
    padding-top: 126px;
    padding-bottom: 72px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-grid {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "visual";
    gap: 37px;
    text-align: center;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-copy {
    max-width: 840px;
    align-self: auto;
    justify-self: center;
    margin-top: 0;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 {
    max-width: 860px;
    margin-inline: auto;
    font-size: clamp(4rem, 7vw, 5.35rem);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-text {
    max-width: 625px;
    margin-inline: auto;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions {
    justify-content: center;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
    width: min(100%, 720px);
    min-height: 370px;
    align-self: auto;
    justify-self: center;
    margin: 0 auto;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    min-height: 340px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
    width: min(100%, 270px);
  }
}

@media (max-width: 720px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero {
    padding-top: 110px;
    padding-bottom: 62px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-grid {
    gap: 30px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 {
    font-size: clamp(3.05rem, 13.1vw, 4.25rem);
    line-height: .98;
    letter-spacing: -.055em;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 .hero-phrase {
    white-space: normal;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-text {
    max-width: 540px;
    margin-top: 24px;
    font-size: .98rem;
    line-height: 1.67;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions {
    display: grid;
    width: min(100%, 350px);
    grid-template-columns: 1fr;
    margin: 27px auto 0;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions .button {
    width: 100%;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
    width: calc(100% + 10px);
    min-height: 264px;
    margin-inline: -5px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    min-height: 235px;
    grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
    width: min(100%, 178px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-axis {
    gap: 4px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-axis span {
    width: 6px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-axis i {
    width: 27px;
    height: 27px;
    font-size: .64rem;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-caption {
    gap: 9px;
    margin-top: -2px;
    font-size: .63rem;
  }
}

@media (max-width: 430px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .brand-copy strong {
    font-size: .85rem;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
    min-height: 235px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    min-height: 207px;
    grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
    width: min(100%, 151px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-caption {
    max-width: 290px;
    gap: 7px;
    font-size: .59rem;
    line-height: 1.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-video {
    animation: none !important;
    transform: none !important;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .nav-cta,
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions .button-primary {
    transition: none;
  }
}


/* v30 centered hero composition */
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero {
  display: flex;
  min-height: 100svh;
  align-items: stretch;
  overflow: hidden;
  padding-top: 126px;
  padding-bottom: 48px;
  background:
    radial-gradient(circle at 50% 62%, rgba(255, 255, 255, .98), transparent 36%),
    radial-gradient(circle at 14% 21%, rgba(255, 255, 255, .72), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(255, 255, 255, .66), transparent 27%),
    linear-gradient(180deg, #f8f8f6 0%, #efefec 100%);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-grid {
  display: grid;
  width: 100%;
  min-height: calc(100svh - 174px);
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "copy"
    "visual";
  grid-template-rows: auto minmax(300px, 1fr);
  align-items: start;
  justify-items: center;
  gap: clamp(28px, 3.5vh, 42px);
  text-align: center;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-copy {
  grid-area: copy;
  width: min(100%, 1040px);
  max-width: none;
  align-self: start;
  justify-self: center;
  margin: 0 auto;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 {
  display: grid;
  max-width: 1000px;
  margin-inline: auto;
  gap: .055em;
  font-size: clamp(4rem, 5.35vw, 5.35rem);
  line-height: 1.04;
  letter-spacing: -.061em;
  text-wrap: balance;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 .hero-phrase {
  display: block;
  white-space: nowrap;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-text {
  max-width: 700px;
  margin: 25px auto 0;
  color: #5c6067;
  font-size: clamp(1rem, 1.05vw, 1.08rem);
  line-height: 1.72;
  text-wrap: pretty;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions {
  justify-content: center;
  gap: 13px;
  margin: 29px auto 0;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
  grid-area: visual;
  position: relative;
  display: grid;
  width: min(100%, 850px);
  min-height: 0;
  align-self: stretch;
  justify-self: center;
  place-items: center;
  margin: 0 auto;
  isolation: isolate;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-story {
  display: grid;
  position: relative;
  width: 100%;
  min-width: 0;
  place-items: center;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-story::before {
  top: 0;
  right: 50%;
  width: 70%;
  transform: translateX(50%);
  background: radial-gradient(circle, rgba(255, 255, 255, .98), rgba(255, 255, 255, .28) 48%, transparent 73%);
  filter: blur(13px);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
  display: grid;
  width: 100%;
  min-height: 310px;
  grid-template-columns: minmax(0, 1fr) 118px minmax(0, 1fr);
  grid-template-areas: "chaos flow calm";
  align-items: center;
  justify-items: center;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-state {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-rows: auto auto;
  justify-items: center;
  align-items: start;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-chaos {
  grid-area: chaos;
  justify-self: end;
  opacity: .95;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-calm {
  grid-area: calm;
  justify-self: start;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
  display: grid;
  position: relative;
  width: min(100%, 284px);
  aspect-ratio: 1;
  place-items: center;
  pointer-events: none;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-state-label {
  position: relative;
  z-index: 2;
  margin: -11px 0 0;
  color: #4d5157;
  font-size: .72rem;
  font-weight: 720;
  letter-spacing: .012em;
  line-height: 1.2;
  text-transform: none;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-calm .hero-state-label {
  color: #1f2226;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-flow {
  grid-area: flow;
  position: relative;
  display: grid;
  width: 100%;
  height: 58px;
  place-items: center;
  align-self: center;
  margin-top: -21px;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-trail,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-flow::before {
  position: absolute;
  width: 100%;
  height: 1px;
  border-radius: 999px;
  content: "";
  background: linear-gradient(90deg, transparent 0%, rgba(43, 47, 53, .08) 13%, rgba(43, 47, 53, .25) 50%, rgba(43, 47, 53, .08) 87%, transparent 100%);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-flow::before {
  height: 10px;
  opacity: .38;
  background: radial-gradient(ellipse at center, rgba(63, 68, 76, .2), transparent 70%);
  filter: blur(7px);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-trail::before,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-trail::after {
  position: absolute;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  content: "";
  background: rgba(29, 32, 37, .28);
  transform: translateY(-50%);
  box-shadow: 9px 0 0 rgba(29, 32, 37, .13), 18px 0 0 rgba(29, 32, 37, .055);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-trail::before {
  left: 8px;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-trail::after {
  right: 8px;
  transform: translateY(-50%) rotate(180deg);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core {
  position: relative;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(17, 19, 22, .085);
  border-radius: 50%;
  background: rgba(255, 255, 255, .72);
  box-shadow:
    0 13px 30px rgba(9, 11, 14, .085),
    inset 0 1px 0 rgba(255, 255, 255, .98),
    0 0 0 7px rgba(255, 255, 255, .24);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core::before,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core::before {
  width: 19px;
  height: 19px;
  border: 1px solid rgba(19, 22, 26, .13);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core::after {
  width: 5px;
  height: 5px;
  background: #202329;
  box-shadow: 0 0 0 4px rgba(32, 35, 41, .06), 0 0 16px rgba(32, 35, 41, .2);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core i {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(20, 23, 27, .055);
  border-radius: 50%;
  animation: hero-v30-signal-breathe 3.8s ease-in-out infinite;
}

@keyframes hero-v30-signal-breathe {
  0%, 100% { transform: scale(.88); opacity: .22; }
  50% { transform: scale(1.08); opacity: .72; }
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-axis,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-caption {
  display: none !important;
}

@media (max-width: 1160px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero {
    min-height: auto;
    padding-top: 122px;
    padding-bottom: 66px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-grid {
    min-height: 0;
    grid-template-rows: auto auto;
    gap: 34px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-copy {
    width: min(100%, 900px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 {
    max-width: 880px;
    font-size: clamp(3.8rem, 7vw, 5rem);
    line-height: 1.045;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
    width: min(100%, 760px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    min-height: 300px;
    grid-template-columns: minmax(0, 1fr) 104px minmax(0, 1fr);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
    width: min(100%, 268px);
  }
}

@media (max-width: 720px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero {
    padding-top: 108px;
    padding-bottom: 58px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-grid {
    gap: 29px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 {
    gap: .085em;
    font-size: clamp(3rem, 12.65vw, 4.15rem);
    line-height: 1.055;
    letter-spacing: -.057em;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 .hero-phrase {
    white-space: normal;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-text {
    max-width: 545px;
    margin-top: 23px;
    font-size: .98rem;
    line-height: 1.68;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions {
    display: grid;
    width: min(100%, 350px);
    grid-template-columns: 1fr;
    margin-top: 26px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions .button {
    width: 100%;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
    width: calc(100% + 10px);
    margin-inline: -5px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    min-height: 225px;
    grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
    width: min(100%, 176px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-state-label {
    margin-top: -7px;
    font-size: .64rem;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-flow {
    height: 44px;
    margin-top: -17px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core {
    width: 32px;
    height: 32px;
    box-shadow: 0 10px 24px rgba(9, 11, 14, .075), inset 0 1px 0 rgba(255, 255, 255, .98), 0 0 0 5px rgba(255, 255, 255, .22);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core::before {
    width: 15px;
    height: 15px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core i {
    width: 23px;
    height: 23px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-trail::before,
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-trail::after {
    display: none;
  }
}

@media (max-width: 430px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    min-height: 198px;
    grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
    width: min(100%, 148px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-state-label {
    max-width: 125px;
    margin-top: -5px;
    font-size: .595rem;
    line-height: 1.35;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-flow {
    margin-top: -13px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core {
    width: 28px;
    height: 28px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core i {
    width: 20px;
    height: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core i {
    animation: none !important;
  }
}

/* v30 viewport rhythm refinements */
@media (max-width: 1400px) and (min-width: 1161px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero {
    padding-top: 112px;
    padding-bottom: 38px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-grid {
    min-height: calc(100svh - 150px);
    grid-template-rows: auto auto;
    align-content: start;
    gap: 22px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 {
    max-width: 900px;
    font-size: 4.55rem;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-text {
    margin-top: 20px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions {
    margin-top: 24px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
    width: min(100%, 750px);
    align-self: start;
    place-items: start center;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    min-height: 250px;
    grid-template-columns: minmax(0, 1fr) 102px minmax(0, 1fr);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
    width: min(100%, 232px);
  }
}

@media (max-width: 1160px) and (min-width: 721px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero {
    padding-top: 106px;
    padding-bottom: 50px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-grid {
    gap: 20px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 {
    max-width: 820px;
    font-size: clamp(3.7rem, 6.65vw, 4.4rem);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-text {
    max-width: 660px;
    margin-top: 19px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions {
    margin-top: 22px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
    width: min(100%, 680px);
    align-self: start;
    place-items: start center;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    min-height: 238px;
    grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
    width: min(100%, 220px);
  }
}

@media (max-width: 720px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 {
    max-width: 390px;
    font-size: clamp(2.75rem, 11.7vw, 3.3rem);
    line-height: 1.06;
  }
}

/* v31 first-screen fit — preserve the centered concept while keeping the hero inside one viewport */
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero {
  height: 100svh;
  min-height: 0;
  max-height: 100svh;
  padding-top: clamp(96px, 12.5svh, 112px);
  padding-bottom: clamp(14px, 2.4svh, 23px);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-grid {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: clamp(10px, 1.8svh, 18px);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-copy {
  width: min(100%, 940px);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 {
  max-width: 900px;
  gap: .045em;
  font-size: clamp(3.35rem, min(5vw, 8.35svh), 4.75rem);
  line-height: 1.025;
  letter-spacing: -.059em;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-text {
  max-width: 680px;
  margin-top: clamp(14px, 2.1svh, 19px);
  font-size: clamp(.95rem, min(1.05vw, 2.25svh), 1.04rem);
  line-height: 1.58;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions {
  margin-top: clamp(16px, 2.3svh, 21px);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
  width: min(100%, 720px);
  height: 100%;
  min-height: 0;
  align-self: stretch;
  place-items: center;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-story {
  height: 100%;
  align-content: center;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
  height: clamp(198px, 30.5svh, 258px);
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) clamp(76px, 8.1vw, 100px) minmax(0, 1fr);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
  width: min(100%, clamp(174px, 26.5svh, 224px));
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-state-label {
  margin-top: -8px;
  font-size: .68rem;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-flow {
  height: 48px;
  margin-top: -17px;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core {
  width: 36px;
  height: 36px;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core::before {
  width: 17px;
  height: 17px;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core i {
  width: 26px;
  height: 26px;
}

@media (max-width: 1160px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero {
    height: 100svh;
    min-height: 0;
    max-height: 100svh;
    padding-top: clamp(94px, 12.4svh, 106px);
    padding-bottom: clamp(13px, 2.2svh, 19px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-grid {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(10px, 1.65svh, 15px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 {
    max-width: 820px;
    font-size: clamp(3.25rem, min(6.3vw, 8.15svh), 4.25rem);
    line-height: 1.03;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-text {
    max-width: 650px;
    margin-top: clamp(13px, 1.9svh, 17px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions {
    margin-top: clamp(15px, 2.1svh, 19px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
    width: min(100%, 670px);
    height: 100%;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    height: clamp(190px, 29svh, 232px);
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) clamp(68px, 8.5vw, 88px) minmax(0, 1fr);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
    width: min(100%, clamp(166px, 25svh, 205px));
  }
}

@media (max-width: 720px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero {
    height: 100svh;
    min-height: 0;
    max-height: 100svh;
    padding-top: clamp(84px, 11.2svh, 96px);
    padding-bottom: clamp(10px, 1.8svh, 15px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-grid {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(9px, 1.4svh, 12px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-copy {
    width: 100%;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 {
    max-width: 380px;
    gap: .065em;
    font-size: clamp(2.55rem, min(11.2vw, 7.2svh), 3rem);
    line-height: 1.055;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-text {
    max-width: 520px;
    margin-top: clamp(13px, 1.9svh, 16px);
    font-size: clamp(.88rem, 3.9vw, .95rem);
    line-height: 1.56;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions {
    width: min(100%, 336px);
    gap: 9px;
    margin-top: clamp(15px, 2svh, 18px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-actions .button {
    min-height: 48px;
    padding-block: 13px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
    width: calc(100% + 8px);
    height: 100%;
    margin-inline: -4px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    height: clamp(160px, 24svh, 190px);
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) clamp(40px, 12vw, 52px) minmax(0, 1fr);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
    width: min(100%, clamp(126px, 19.5svh, 152px));
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-state-label {
    margin-top: -5px;
    font-size: .59rem;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-flow {
    height: 36px;
    margin-top: -12px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core {
    width: 27px;
    height: 27px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core::before {
    width: 13px;
    height: 13px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core i {
    width: 19px;
    height: 19px;
  }
}

@media (max-width: 430px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 {
    max-width: 365px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    height: clamp(148px, 22.5svh, 174px);
    grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
    width: min(100%, clamp(118px, 18.4svh, 142px));
  }
}

/* Keep the scaled visual connected to the CTA block instead of centering it inside leftover height. */
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
  place-items: start center;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-story {
  align-content: start;
}

/* v32 hero spacing + label alignment + diamond transition */
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero {
  padding-top: clamp(114px, 14.8svh, 136px);
  padding-bottom: clamp(10px, 1.8svh, 18px);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-grid {
  gap: clamp(8px, 1.35svh, 14px);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 {
  line-height: 1.075;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-copy {
  padding-top: clamp(6px, .8svh, 12px);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
  width: min(100%, 700px);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
  height: clamp(184px, 28.2svh, 238px);
  grid-template-columns: minmax(0, 1fr) clamp(64px, 7vw, 84px) minmax(0, 1fr);
  align-items: start;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-state {
  grid-template-rows: minmax(0, 1fr) auto;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
  width: min(100%, clamp(170px, 25.6svh, 216px));
  align-self: end;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-state-label {
  margin-top: -4px;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-chaos .hero-state-label {
  margin-top: -6px;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-calm .hero-state-label {
  margin-top: 4px;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-flow {
  height: 34px;
  margin-top: 0;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-flow::before,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-trail,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-trail::before,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-trail::after,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core i,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core::before,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core::after {
  display: none !important;
  content: none !important;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core {
  width: clamp(48px, 5.6vw, 62px);
  height: clamp(20px, 2.35vw, 24px);
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #26292e 0%, #111316 100%);
  box-shadow: 0 12px 28px rgba(7, 9, 12, .14), 0 0 0 1px rgba(17, 19, 22, .04);
  transform: none;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  overflow: hidden;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core > * {
  display: none !important;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core::after {
  display: block !important;
  content: "" !important;
  position: absolute;
  inset: 1px 11px 11px;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0));
  clip-path: inherit;
  opacity: .7;
}

@media (max-width: 1160px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero {
    padding-top: clamp(108px, 14.2svh, 124px);
    padding-bottom: clamp(9px, 1.55svh, 16px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-grid {
    gap: clamp(8px, 1.25svh, 12px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
    width: min(100%, 650px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    height: clamp(176px, 26.4svh, 220px);
    grid-template-columns: minmax(0, 1fr) clamp(58px, 7.4vw, 74px) minmax(0, 1fr);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
    width: min(100%, clamp(158px, 23.2svh, 196px));
  }
}

@media (max-width: 720px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero {
    padding-top: clamp(96px, 13.1svh, 108px);
    padding-bottom: clamp(8px, 1.4svh, 12px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-grid {
    gap: clamp(7px, 1.1svh, 10px);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero h1 {
    line-height: 1.085;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-agent-visual {
    width: calc(100% + 4px);
    margin-inline: -2px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    height: clamp(150px, 22.5svh, 176px);
    grid-template-columns: minmax(0, 1fr) clamp(34px, 10vw, 42px) minmax(0, 1fr);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
    width: min(100%, clamp(118px, 17.8svh, 146px));
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-state-label {
    margin-top: -2px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-chaos .hero-state-label {
    margin-top: -4px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-calm .hero-state-label {
    margin-top: 2px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-flow {
    height: 24px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core {
    width: 40px;
    height: 16px;
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core::after {
    inset: 1px 9px 8px;
  }
}

@media (max-width: 430px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    height: clamp(144px, 21.6svh, 168px);
    grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
    width: min(100%, clamp(112px, 17.1svh, 138px));
  }

  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-core {
    width: 36px;
    height: 14px;
  }
}

/* v36 shared descriptor baseline — one source of truth */
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
  --hero-calm-offset: 20px;
  --hero-label-baseline: 30px;
}

/* Keep the calm sculpture at the approved v34 visual position. */
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-calm .hero-sculpture-piece {
  transform: translateY(var(--hero-calm-offset));
}

/* Reserve a fixed descriptor row so both labels share the exact same baseline. */
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-state {
  grid-template-rows: minmax(0, 1fr) var(--hero-label-baseline);
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-state-label,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-chaos .hero-state-label,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-calm .hero-state-label {
  align-self: end;
  margin: 0;
  line-height: 1.2;
}

@media (max-width: 1160px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    --hero-calm-offset: 18px;
    --hero-label-baseline: 28px;
  }
}

@media (max-width: 720px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    --hero-calm-offset: 16px;
    --hero-label-baseline: 24px;
  }
}

@media (max-width: 430px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    --hero-calm-offset: 14px;
    --hero-label-baseline: 22px;
  }
}

/* v37 rebuild the descriptor layer from scratch */
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
  --hero-calm-offset: 20px;
  --hero-piece-width: min(100%, clamp(170px, 25.6svh, 216px));
  grid-template-columns: minmax(0, 1fr) clamp(64px, 7vw, 84px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas:
    "chaos flow calm"
    "chaos-label . calm-label";
  align-items: end;
  row-gap: 0;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-state {
  display: contents !important;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-piece {
  width: var(--hero-piece-width);
  align-self: end;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-chaos .hero-sculpture-piece {
  grid-area: chaos;
  justify-self: end;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-calm .hero-sculpture-piece {
  grid-area: calm;
  justify-self: start;
  transform: translateY(var(--hero-calm-offset));
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-transition-flow {
  grid-area: flow;
  align-self: center;
  justify-self: center;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-state-label,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-chaos .hero-state-label,
body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-calm .hero-state-label {
  width: var(--hero-piece-width);
  margin: 0 !important;
  padding: 0;
  align-self: start;
  line-height: 1.2;
  text-align: center;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-chaos .hero-state-label {
  grid-area: chaos-label;
  justify-self: end;
}

body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-calm .hero-state-label {
  grid-area: calm-label;
  justify-self: start;
}

@media (max-width: 1160px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    --hero-calm-offset: 18px;
    --hero-piece-width: min(100%, clamp(158px, 23.2svh, 196px));
    grid-template-columns: minmax(0, 1fr) clamp(58px, 7.4vw, 74px) minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    --hero-calm-offset: 16px;
    --hero-piece-width: min(100%, clamp(118px, 17.8svh, 146px));
    grid-template-columns: minmax(0, 1fr) clamp(34px, 10vw, 42px) minmax(0, 1fr);
  }
}

@media (max-width: 430px) {
  body[data-build="avanza-ai-studio-v31-first-screen-hero"] .hero-sculpture-stage {
    --hero-calm-offset: 14px;
    --hero-piece-width: min(100%, clamp(112px, 17.1svh, 138px));
    grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
  }
}
