/* =========================================================
   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: 10px 16px 12px;
  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: 8px;
}

/* Top Title Header (Clean Typewriter Animation) */
.hero-formula-header {
  text-align: center;
  margin-bottom: 4px;
  position: relative;
  z-index: 5;
  min-height: 2.2rem;
  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.4rem, 2.2vw, 1.85rem);
  font-weight: 500;
  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: 16px;
  width: 98%;
  max-width: 920px;
  margin: 0 auto;
}

/* Math Start Angle Symbol > */
.math-gt {
  flex-shrink: 0;
  width: 20px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
}

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

/* 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: 26px;
  height: 134px;
}

.bracket-paren-left,
.bracket-paren-right {
  width: 20px;
  height: 122px;
}

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

/* Closing Bracket + Top Right Exponent Caret ^ */
.math-bracket-group {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.exponent-caret {
  position: absolute;
  top: -12px;
  right: -13px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exponent-caret 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;
}

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

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

.art-visual--king {
  width: 92px;
  height: 110px;
}

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

.art-visual--cloud {
  width: 110px;
  height: 104px;
}

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

.art-visual--passion,
.art-visual--solutions {
  width: 98px;
  height: 106px;
}

.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));
}

/* Plus Operators */
.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.75rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
}

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

.art-brand-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-h {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 0.94rem;
  font-weight: 800;
  color: #e60026;
  letter-spacing: 0.05em;
}

.brand-t {
  font-family: var(--font-body, 'IBM Plex Sans', sans-serif);
  font-size: 0.6rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.08em;
}

.label-title {
  font-family: var(--font-body, 'IBM Plex Sans', sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
}

.label-passion {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: 1.04rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: 0.02em;
}

/* =========================================================
   Responsive Scaling — Prominent & Balanced
   ========================================================= */

@media (max-width: 1200px) {
  .hero-equation-stage {
    gap: 13px;
    max-width: 840px;
  }
  .art-visual {
    width: 84px;
    height: 92px;
  }
  .art-visual--king {
    width: 80px;
    height: 98px;
  }
  .art-visual--brain {
    width: 92px;
    height: 92px;
  }
  .art-visual--cloud {
    width: 96px;
    height: 92px;
  }
  .art-visual--code {
    width: 90px;
    height: 92px;
  }
  .art-visual--passion,
  .art-visual--solutions {
    width: 86px;
    height: 94px;
  }
  .bracket-curly-left,
  .bracket-curly-right {
    width: 22px;
    height: 118px;
  }
  .bracket-paren-left,
  .bracket-paren-right {
    width: 18px;
    height: 106px;
  }
  .plus-symbol {
    font-size: 2.3rem;
  }
}

@media (max-width: 1024px) {
  .hero-equation-stage {
    gap: 10px;
    max-width: 760px;
  }
  .art-visual {
    width: 74px;
    height: 80px;
  }
  .art-visual--king {
    width: 70px;
    height: 86px;
  }
  .art-visual--brain {
    width: 80px;
    height: 80px;
  }
  .art-visual--cloud {
    width: 84px;
    height: 80px;
  }
  .art-visual--code {
    width: 78px;
    height: 80px;
  }
  .art-visual--passion,
  .art-visual--solutions {
    width: 74px;
    height: 82px;
  }
  .plus-symbol {
    font-size: 2.0rem;
  }
  .bracket-curly-left,
  .bracket-curly-right {
    width: 19px;
    height: 102px;
  }
  .bracket-paren-left,
  .bracket-paren-right {
    width: 15px;
    height: 92px;
  }
  .brand-h {
    font-size: 0.82rem;
  }
  .label-title {
    font-size: 0.78rem;
  }
  .label-passion {
    font-size: 0.92rem;
  }
}

/* Tablet View (768px - 577px) */
@media (max-width: 768px) and (min-width: 577px) {
  .hero-formula-wrap {
    padding: 8px 12px;
    justify-content: center;
  }
  .hero-stage-zoom {
    gap: 6px;
    justify-content: center;
  }
  .hero-formula-title {
    font-size: 1.2rem;
    font-weight: 500;
  }
  .hero-equation-stage {
    gap: 8px;
    width: 98%;
    max-width: 100%;
  }
  .math-gt {
    width: 13px;
    height: 38px;
  }
  .bracket-curly-left,
  .bracket-curly-right {
    width: 16px;
    height: 90px;
  }
  .bracket-paren-left,
  .bracket-paren-right {
    width: 13px;
    height: 80px;
  }
  .art-visual {
    width: 64px;
    height: 70px;
  }
  .art-visual--king {
    width: 60px;
    height: 76px;
  }
  .art-visual--brain {
    width: 70px;
    height: 70px;
  }
  .art-visual--cloud {
    width: 72px;
    height: 70px;
  }
  .art-visual--code {
    width: 68px;
    height: 70px;
  }
  .art-visual--passion,
  .art-visual--solutions {
    width: 64px;
    height: 70px;
  }
  .plus-symbol {
    font-size: 1.7rem;
  }
  .exponent-caret {
    width: 13px;
    height: 13px;
    top: -7px;
    right: -9px;
  }
  .brand-h {
    font-size: 0.74rem;
  }
  .brand-t {
    font-size: 0.48rem;
  }
  .label-title {
    font-size: 0.7rem;
  }
  .label-passion {
    font-size: 0.84rem;
  }
}

@media (max-width: 576px) {
  .hero-formula-wrap {
    padding: 6px 4px;
    justify-content: center;
  }
  .hero-stage-zoom {
    gap: 4px;
    justify-content: center;
  }
  .hero-formula-title {
    font-size: 0.96rem;
    font-weight: 500;
  }
  .hero-equation-stage {
    gap: 4px;
    width: 100%;
  }
  .math-gt {
    width: 9px;
    height: 26px;
  }
  .bracket-curly-left,
  .bracket-curly-right {
    width: 11px;
    height: 60px;
  }
  .bracket-paren-left,
  .bracket-paren-right {
    width: 9px;
    height: 52px;
  }
  .art-visual {
    width: 42px;
    height: 46px;
  }
  .art-visual--king {
    width: 38px;
    height: 50px;
  }
  .art-visual--brain {
    width: 46px;
    height: 46px;
  }
  .art-visual--cloud {
    width: 48px;
    height: 46px;
  }
  .art-visual--code {
    width: 44px;
    height: 46px;
  }
  .art-visual--passion,
  .art-visual--solutions {
    width: 42px;
    height: 46px;
  }
  .plus-symbol {
    font-size: 1.25rem;
  }
  .exponent-caret {
    width: 10px;
    height: 10px;
    top: -4px;
    right: -5px;
  }
  .brand-h {
    font-size: 0.6rem;
  }
  .brand-t {
    display: none;
  }
  .label-title {
    font-size: 0.56rem;
  }
  .label-passion {
    font-size: 0.68rem;
  }
}

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