/* =========================================================
   HAEGL Hero Animation — "Solving What Matters"
   Covers ~80% of Card with Real 3D Vectors & Mathematical Grouping
   ========================================================= */

.hero-formula-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 8px 16px 10px;
  box-sizing: border-box;
  user-select: none;
}

/* Hero Stage: Crisp, stable and centered */
.hero-stage-zoom {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

/* Top Title Header (Clean Typewriter Animation) */
.hero-formula-header {
  text-align: center;
  margin-bottom: 2px;
  position: relative;
  z-index: 5;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-formula-title {
  font-family: var(--font-heading, 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  font-weight: 600;
  color: #1e293b;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.15;
  display: inline-flex;
  align-items: center;
}

.typewriter-text {
  display: inline;
}

.typewriter-cursor {
  display: inline-block;
  margin-left: 3px;
  font-weight: 400;
  color: #e60026;
  animation: typeBlink 0.75s infinite ease-in-out;
  transform: translateY(-1px);
}

@keyframes typeBlink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* Equation Stage (Fills ~80% of card) */
.hero-equation-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 88%;
  max-width: 860px;
  margin: 0 auto;
}

/* Mathematical Brackets & Groupings */
.math-bracket {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
}

.bracket-curly-left,
.bracket-curly-right {
  width: 22px;
  height: 116px;
}

.bracket-paren-left,
.bracket-paren-right {
  width: 18px;
  height: 104px;
}

.math-bracket svg {
  width: 100%;
  height: 100%;
}

/* Freestanding Artwork Nodes */
.art-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 4;
  min-width: 0;
  flex-shrink: 0;
}

.art-node:hover,
.art-node:focus-visible {
  transform: translateY(-4px) scale(1.05);
}

/* Prominent Real Icon Artwork Containers */
.art-visual {
  position: relative;
  width: 82px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.art-visual--king {
  width: 78px;
  height: 96px;
}

.art-visual--brain {
  width: 90px;
  height: 90px;
}

.art-visual--cloud {
  width: 94px;
  height: 90px;
}

.art-visual--code {
  width: 88px;
  height: 90px;
}

.art-visual--solutions {
  width: 84px;
  height: 92px;
}

.real-svg-icon {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  transition: filter 0.3s ease;
}

.art-node:hover .real-svg-icon {
  filter: drop-shadow(0 8px 18px rgba(230, 0, 38, 0.38));
}

/* Operators (+ and ->) */
.art-operator {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
}

.plus-symbol {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
}

/* Transform Operator: Arrow -> */
.art-operator--arrow {
  width: 28px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.math-arrow-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Typography Labels Below Icons */
.art-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 3px;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
}

.label-title {
  font-family: var(--font-body, 'IBM Plex Sans', sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
  white-space: nowrap;
  word-break: keep-all;
}

.label-passion {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.96rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: 0.02em;
  white-space: nowrap;
  word-break: keep-all;
}

/* =========================================================
   Responsive Scaling — Perfectly Sized Across All Views
   ========================================================= */

/* Laptop View (1024px - 1200px) */
@media (max-width: 1200px) {
  .hero-formula-wrap {
    padding: 7px 12px 9px;
  }
  .hero-equation-stage {
    gap: 9px;
    width: 90%;
    max-width: 760px;
  }
  .art-visual {
    width: 68px;
    height: 76px;
  }
  .art-visual--king {
    width: 64px;
    height: 80px;
  }
  .art-visual--brain {
    width: 76px;
    height: 76px;
  }
  .art-visual--cloud {
    width: 80px;
    height: 76px;
  }
  .art-visual--code {
    width: 74px;
    height: 76px;
  }
  .art-visual--solutions {
    width: 72px;
    height: 78px;
  }
  .bracket-curly-left,
  .bracket-curly-right {
    width: 18px;
    height: 100px;
  }
  .bracket-paren-left,
  .bracket-paren-right {
    width: 15px;
    height: 90px;
  }
  .plus-symbol {
    font-size: 1.9rem;
  }
  .art-operator--arrow {
    width: 24px;
    height: 16px;
  }
  .label-title {
    font-size: 0.74rem;
    white-space: nowrap;
  }
  .label-passion {
    font-size: 0.86rem;
    white-space: nowrap;
  }
}

/* Tablet View (769px - 1024px) */
@media (max-width: 1024px) {
  .hero-formula-wrap {
    padding: 6px 10px 8px;
  }
  .hero-formula-title {
    font-size: 1.25rem;
  }
  .hero-equation-stage {
    gap: 7px;
    width: 92%;
    max-width: 640px;
  }
  .art-visual {
    width: 54px;
    height: 60px;
  }
  .art-visual--king {
    width: 50px;
    height: 66px;
  }
  .art-visual--brain {
    width: 60px;
    height: 60px;
  }
  .art-visual--cloud {
    width: 62px;
    height: 60px;
  }
  .art-visual--code {
    width: 58px;
    height: 60px;
  }
  .art-visual--solutions {
    width: 56px;
    height: 62px;
  }
  .plus-symbol {
    font-size: 1.55rem;
  }
  .art-operator--arrow {
    width: 20px;
    height: 14px;
  }
  .bracket-curly-left,
  .bracket-curly-right {
    width: 14px;
    height: 80px;
  }
  .bracket-paren-left,
  .bracket-paren-right {
    width: 11px;
    height: 72px;
  }
  .label-title {
    font-size: 0.65rem;
    white-space: nowrap;
  }
  .label-passion {
    font-size: 0.76rem;
    white-space: nowrap;
  }
}

/* Small Tablet / Large Mobile View (577px - 768px) */
@media (max-width: 768px) and (min-width: 577px) {
  .hero-formula-wrap {
    padding: 6px 8px 8px;
  }
  .hero-stage-zoom {
    gap: 4px;
  }
  .hero-formula-title {
    font-size: 1.08rem;
  }
  .hero-equation-stage {
    gap: 5px;
    width: 94%;
    max-width: 480px;
  }
  .bracket-curly-left,
  .bracket-curly-right {
    width: 12px;
    height: 66px;
  }
  .bracket-paren-left,
  .bracket-paren-right {
    width: 10px;
    height: 58px;
  }
  .art-visual {
    width: 44px;
    height: 50px;
  }
  .art-visual--king {
    width: 40px;
    height: 54px;
  }
  .art-visual--brain {
    width: 48px;
    height: 48px;
  }
  .art-visual--cloud {
    width: 50px;
    height: 48px;
  }
  .art-visual--code {
    width: 46px;
    height: 48px;
  }
  .art-visual--solutions {
    width: 44px;
    height: 50px;
  }
  .plus-symbol {
    font-size: 1.3rem;
  }
  .art-operator--arrow {
    width: 17px;
    height: 12px;
  }
  .label-title {
    font-size: 0.54rem;
    white-space: nowrap;
  }
  .label-passion {
    font-size: 0.65rem;
    white-space: nowrap;
  }
}

/* iPhone & Standard Mobile Devices (376px - 576px) */
@media (max-width: 576px) {
  .hero-formula-wrap {
    padding: 5px 6px 6px;
  }
  .hero-stage-zoom {
    gap: 2px;
  }
  .hero-formula-title {
    font-size: 0.92rem;
    font-weight: 600;
  }
  .hero-equation-stage {
    gap: 3px;
    width: 96%;
    max-width: 370px;
  }
  .bracket-curly-left,
  .bracket-curly-right {
    width: 9px;
    height: 50px;
  }
  .bracket-paren-left,
  .bracket-paren-right {
    width: 7px;
    height: 42px;
  }
  .art-visual {
    width: 34px;
    height: 40px;
  }
  .art-visual--king {
    width: 32px;
    height: 44px;
  }
  .art-visual--brain {
    width: 38px;
    height: 38px;
  }
  .art-visual--cloud {
    width: 40px;
    height: 38px;
  }
  .art-visual--code {
    width: 36px;
    height: 38px;
  }
  .art-visual--solutions {
    width: 36px;
    height: 40px;
  }
  .plus-symbol {
    font-size: 1.05rem;
  }
  .art-operator--arrow {
    width: 13px;
    height: 9px;
  }
  .label-title {
    font-size: 0.45rem;
    white-space: nowrap;
    word-break: keep-all;
    letter-spacing: -0.02em;
    line-height: 1.12;
  }
  .label-passion {
    font-size: 0.55rem;
    white-space: nowrap;
    word-break: keep-all;
  }
}

/* Small Android Screens (max-width: 375px, e.g. 320px - 360px) */
@media (max-width: 375px) {
  .hero-formula-wrap {
    padding: 4px 4px 5px;
  }
  .hero-stage-zoom {
    gap: 1.5px;
  }
  .hero-formula-title {
    font-size: 0.82rem;
    font-weight: 600;
  }
  .hero-equation-stage {
    gap: 1.5px;
    width: 98%;
    max-width: 295px;
  }
  .bracket-curly-left,
  .bracket-curly-right {
    width: 6.5px;
    height: 36px;
  }
  .bracket-paren-left,
  .bracket-paren-right {
    width: 5px;
    height: 30px;
  }
  .art-visual {
    width: 26px;
    height: 30px;
  }
  .art-visual--king {
    width: 24px;
    height: 33px;
  }
  .art-visual--brain {
    width: 28px;
    height: 28px;
  }
  .art-visual--cloud {
    width: 30px;
    height: 28px;
  }
  .art-visual--code {
    width: 27px;
    height: 28px;
  }
  .art-visual--solutions {
    width: 27px;
    height: 30px;
  }
  .plus-symbol {
    font-size: 0.82rem;
  }
  .art-operator--arrow {
    width: 10px;
    height: 7px;
  }
  .label-title {
    font-size: 0.36rem;
    letter-spacing: -0.03em;
    white-space: nowrap;
    word-break: keep-all;
    line-height: 1.1;
  }
  .label-passion {
    font-size: 0.44rem;
    white-space: nowrap;
    word-break: keep-all;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-stage-zoom {
    animation: none !important;
  }
}
