/* ═══════════════════════════════════════════════════════════════════
   ZamaniAuto — Blog Hero (v2.0) — harmonized with site design system
   ===================================================================
   This stylesheet keeps the provided template's *interactions* (word reveal,
   mouse glow, ripple, floating elements, grid, corner elements) but maps every
   visual token to the ZamaniAuto brand, so it feels native to zamaniauto.ir.

   Brand tokens (from --za-* / --bl-* in za-theme.css & blog.css):
     navy  #0A1628 / #0D3840       teal  #0D7377 / #14A3A8
     turquoise #40E0D0 / #5EEAD4   yellow #E6C200
     blog hero gradient: linear-gradient(160deg,#061220,#0A1628,#0D3840,#0D7377)
     font: Vazirmatn (fa) / Inter (en)
   ═══════════════════════════════════════════════════════════════════ */

.blog-hero {
  position: relative;
  width: 100%;
  min-height: 82vh;
  /* site's own blog hero gradient (dark navy → teal) */
  background: linear-gradient(160deg, #061220 0%, #0A1628 30%, #0D3840 70%, #0D7377 100%);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
}

/* subtle teal radial glows over the gradient (matches blog.css ::before) */
.blog-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(13,115,119,0.35) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 100%, rgba(64,224,208,0.10) 0%, transparent 60%);
}

/* ── Grid (turquoise, brand-tinted) ── */
.blog-hero-grid {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.bh-grid-line {
  stroke: rgba(64,224,208,0.13); stroke-width: 0.5; stroke-dasharray: 4 6;
  opacity: 0; animation: bhGridDraw 2.6s ease-out forwards;
}
@keyframes bhGridDraw {
  from { opacity: 0; stroke-dashoffset: 800; }
  to   { opacity: 1; stroke-dashoffset: 0; }
}
.bh-dot {
  fill: #5EEAD4; opacity: 0;
  animation: bhDotIn 1.2s ease-out forwards;
}
@keyframes bhDotIn {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: .8; transform: scale(1); }
}

/* ── Corner elements (turquoise) ── */
.bh-corner {
  position: absolute; width: 8px; height: 8px; background: #5EEAD4;
  opacity: 0; transform: scale(.4) rotate(-45deg); z-index: 1;
  animation: bhCornerIn 1s ease-out forwards;
}
@keyframes bhCornerIn {
  from { opacity: 0; transform: scale(.4) rotate(-45deg); }
  to   { opacity: .4; transform: scale(1) rotate(0deg); }
}

/* ── Floating elements (turquoise) ── */
.bh-float {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: #40E0D0; opacity: 0; filter: blur(0.4px); z-index: 1;
  animation: bhFloatUp 7s ease-in-out infinite;
  animation-play-state: paused;
}
@keyframes bhFloatUp {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  15%  { opacity: .7; }
  85%  { opacity: .5; }
  100% { transform: translateY(-130px) translateX(18px); opacity: 0; }
}

/* ── Word reveal ── */
.bh-word { display: inline-block; opacity: 0; }
@keyframes bhWordIn {
  0%   { opacity: 0; transform: translateY(14px); filter: blur(6px); letter-spacing: .08em; }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); letter-spacing: normal; }
}

/* ── Content layout ── */
.blog-hero-content {
  position: relative; z-index: 10; width: 100%;
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  padding: 56px 24px; gap: 24px;
}

/* ── Tagline / eyebrow — site's Vazirmatn, not mono ── */
.bh-tagline { text-align: center; }

/* ── State-space formula (beautiful math font, typewriter, single line) ── */
/* positioned bottom-left, ABOVE the cycling equation box (.bh-eq) */

/* ── 230V AC sine oscilloscope chart — above the formula, bottom-left ── */
.bh-voltsine {
  position: absolute; inset-inline-start: 24px; bottom: 168px; z-index: 2;
  width: 220px; height: 76px;
  opacity: 0; animation: bhTechIn 1.6s ease-out forwards; animation-delay: 4.6s;
}
.bh-volt-grid path { fill: none; stroke: rgba(94,234,212,.10); stroke-width: .8; }
.bh-volt-wave {
  fill: none; stroke: rgba(94,234,212,.45); stroke-width: 1.4; stroke-linecap: round;
  filter: drop-shadow(0 0 2px rgba(94,234,212,.35));
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
  animation: bhVoltDraw 4s ease-out forwards;
}
@keyframes bhVoltDraw { to { stroke-dashoffset: 0; } }
.bh-volt-dot {
  fill: rgba(230,194,0,.75); filter: drop-shadow(0 0 2px rgba(230,194,0,.6));
  animation: bhVoltDot 4.5s ease-in-out infinite;
}
@keyframes bhVoltDot {
  0%,100% { transform: translateX(0); }
  50%     { transform: translateX(160px); }
}
.bh-volt-label { fill: rgba(203,213,225,.45); font-family: 'SF Mono',Consolas,monospace; font-size: 10px; letter-spacing: .06em; }
.bh-volt-label-ac { fill: rgba(94,234,212,.6); font-family: 'SF Mono',Consolas,monospace; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.bh-volt-peak { fill: rgba(230,194,0,.6); font-family: 'SF Mono',Consolas,monospace; font-size: 9px; letter-spacing: .08em; }

.bh-stateeq {
  position: absolute; inset-inline-start: 24px; bottom: 106px; z-index: 2;
  font-family: 'Cambria Math','STIX Two Math',Georgia,'Times New Roman',serif;
  font-size: clamp(10px, 2.2vw, 20px); font-weight: 400;
  color: rgba(203,213,225,.55); line-height: 1.45; letter-spacing: .01em;
  max-width: 380px; white-space: nowrap; overflow: hidden;
  text-align: start;
}
.bh-stateeq-line { white-space: nowrap; text-align: start; }
.bh-stateeq-text { font-style: italic; }
.bh-stateeq-caret {
  font-style: normal; color: #5EEAD4; font-weight: 400; margin-inline-start: 2px;
  animation: bhCaret .9s steps(1) infinite;
}
@keyframes bhCaret { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }

.bh-eyebrow {
  font-family: 'Vazirmatn','IRANSans',Tahoma,Arial,sans-serif;
  font-size: 13px; font-weight: 400; letter-spacing: .08em;
  color: #5EEAD4; opacity: .85; margin: 0; line-height: 2;
}
.blog-hero[dir="ltr"] .bh-eyebrow { font-family: Inter,sans-serif; }
@media (min-width: 768px) { .bh-eyebrow { font-size: 15px; } }

.bh-divider {
  display: block; margin: 14px auto 0; width: 64px; height: 1px; opacity: .35;
  background: linear-gradient(to right, transparent, #5EEAD4, transparent);
}

/* ── Headline (Vazirmatn, brand weight) ── */
.bh-headline { position: relative; text-align: center; max-width: 64rem; margin: 0 auto; }
.bh-headline h1 {
  margin: 0; font-weight: 800; line-height: 1.35; letter-spacing: -.01em; color: #fff;
  font-family: 'Vazirmatn','IRANSans',Tahoma,Arial,sans-serif;
}
.blog-hero[dir="ltr"] .bh-headline h1 { font-family: Inter,sans-serif; font-weight: 700; }
.bh-line { display: block; }
.bh-line-1 { font-size: clamp(28px, 5.5vw, 54px); }
.bh-line-2 {
  font-size: clamp(19px, 3.2vw, 32px); font-weight: 400; color: #5EEAD4; margin-top: 4px;
}

/* ── Flank decorative lines (turquoise) ── */
.bh-flank {
  position: absolute; top: 50%; width: 16px; height: 1px;
  background: #5EEAD4; opacity: 0;
  animation: bhWordIn 1s ease-out forwards;
}
.bh-flank-l { inset-inline-start: -32px; }
.bh-flank-r { inset-inline-end: -32px; }
@media (max-width: 480px) { .bh-flank { display: none; } }

/* ── Stats (glass capsules, teal accent — matches .bl-stat-capsule) ── */
.bh-stats {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px;
}
.bh-stat {
  font-family: 'Vazirmatn','IRANSans',Tahoma,Arial,sans-serif;
  font-size: 13px; font-weight: 500; letter-spacing: .01em;
  color: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.14);
  padding: 8px 18px; border-radius: 10px; background: rgba(255,255,255,.07);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}
.blog-hero[dir="ltr"] .bh-stat { font-family: Inter,sans-serif; }
.bh-stat b { color: #5EEAD4; font-weight: 700; font-size: 1.08em; }
.bh-stat b.bh-count { font-variant-numeric: tabular-nums; display: inline-block; min-width: 1.4em; text-align: center; }

/* ── Glass search (matches .hero-glass-search in style.css) ── */
.bh-search {
  position: relative; width: 100%; max-width: 500px; margin: 28px auto 0;
}
.bh-search-icon {
  position: absolute; inset-inline-end: 16px; top: 50%; transform: translateY(-50%);
  font-size: 1.05rem; opacity: .6; pointer-events: none; z-index: 2;
}
.bh-search-input {
  width: 100%; padding: 14px 20px; text-align: start;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.09); color: #fff; font-size: .95rem;
  font-family: 'Vazirmatn','IRANSans',Tahoma,Arial,sans-serif;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  outline: none; transition: all .3s cubic-bezier(.4,0,.2,1);
  padding-inline-end: 48px; padding-inline-start: 20px;
}
.bh-search-input::placeholder { color: rgba(255,255,255,.45); }
.bh-search-input:focus {
  border-color: rgba(94,234,212,.55);
  box-shadow: 0 0 0 3px rgba(94,234,212,.12);
  background: rgba(255,255,255,.14);
}
.bh-search-clear {
  position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,.5); text-decoration: none; font-size: .9rem;
  padding: 4px 8px; border-radius: 50%; transition: .3s; z-index: 2;
}
.bh-search-clear:hover { color: #fff; background: rgba(255,255,255,.12); }

/* ── Mouse glow (turquoise-tinted) ── */
.bh-mouse-glow {
  position: fixed; width: 384px; height: 384px; border-radius: 50%;
  filter: blur(90px); pointer-events: none; z-index: 5;
  background: radial-gradient(circle, rgba(13,115,119,.20) 0%, transparent 70%);
  transition: opacity .5s ease-out, left .06s linear, top .06s linear; opacity: 0;
}

/* ── Bottom three dots ── */
.bh-dots {
  display: flex; justify-content: center; gap: 16px; margin-top: 24px;
  opacity: 0; animation: bhWordIn 1s ease-out forwards;
}
.bh-dots span { width: 5px; height: 5px; border-radius: 50%; background: #5EEAD4; }
.bh-dots .bh-dot-a { opacity: .4; }
.bh-dots .bh-dot-b { opacity: .65; }
.bh-dots .bh-dot-c { opacity: .4; }

/* ── Click ripple (teal) ── */
.bh-ripple {
  position: fixed; width: 4px; height: 4px; background: rgba(64,224,208,.6);
  border-radius: 50%; transform: translate(-50%,-50%); pointer-events: none; z-index: 9999;
  animation: bhRipple 1s ease-out forwards;
}
@keyframes bhRipple {
  0%   { transform: translate(-50%,-50%) scale(.5); opacity: .8; }
  100% { transform: translate(-50%,-50%) scale(40); opacity: 0; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .blog-hero { min-height: 70vh; }
  .blog-hero-content { padding: 40px 16px; }
  .bh-stats { gap: 8px; }
  .bh-stat { padding: 6px 12px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .bh-word, .bh-grid-line, .bh-dot, .bh-corner { animation: none !important; opacity: 1 !important; }
  .bh-float { animation: none !important; opacity: 0 !important; }
  .bh-mouse-glow { display: none; }
}

/* ── Dark-theme guard (hero is already dark on light theme) ── */
[data-theme="dark"] .blog-hero {
  background: linear-gradient(160deg, #040B18 0%, #060F1E 30%, #0A2030 70%, #0D7377 100%);
}

/* ═══════════════════════════════════════════════════════════════════
   TECHNICAL ANIMATED ELEMENTS (subtle / in the margins)
   ===================================================================
   These reinforce the "engineering / control / academic research" feel:
   1. PLC ladder diagram (stepped rungs light up)
   2. live sine wave with a moving cursor (oscilloscope)
   3. typewriter control equation G(s) = K/(τs+1)
   4. HUD sensor readouts (RPM / TEMP / I)
   5. PID block with feedback loop
   All are low-opacity, positioned in the hero margins, hidden on small
   screens and reduced-motion, and never intercept pointer events.
   ═══════════════════════════════════════════════════════════════════ */

.bh-tech {
  position: absolute; z-index: 2; pointer-events: none;
  opacity: 0; animation: bhTechIn 1.6s ease-out forwards;
}
@keyframes bhTechIn { from { opacity: 0; } to { opacity: 1; } }

/* ── ۱) PLC ladder (mid-right) ── */
.bh-plc { inset-inline-end: 22px; top: 34%; width: 104px; height: 190px; animation-delay: 5s; opacity: 0; }
.bh-plc-rail line { stroke: rgba(94,234,212,.35); stroke-width: 1.4; }
.bh-plc-rail line:last-child { stroke: rgba(94,234,212,.35); }
.bh-plc-rung line { stroke: rgba(94,234,212,.5); stroke-width: 1.2; }
.bh-plc-rung circle { fill: none; stroke: rgba(64,224,208,.9); stroke-width: 1.6; }
.bh-plc-rung rect { fill: none; stroke: rgba(64,224,208,.9); stroke-width: 1.4; }
.bh-plc-rung {
  opacity: 0;
  animation: bhRungOn .9s ease-out forwards;
}
@keyframes bhRungOn {
  0%   { opacity: 0; }
  60%  { opacity: 1; filter: drop-shadow(0 0 4px rgba(94,234,212,.8)); }
  100% { opacity: .55; filter: none; }
}

/* ── ۲) 4-20mA current loop (sensor + regulator) — bottom-right ── */
.bh-maloop { inset-inline-start: 22px; top: 44%; width: 190px; height: 70px; animation-delay: 5.2s; opacity: 0; }
.bh-mal-path { fill: none; stroke: rgba(94,234,212,.4); stroke-width: 1.4; }
.bh-mal-box { fill: rgba(13,115,119,.14); stroke: rgba(94,234,212,.55); stroke-width: 1.3; }
.bh-mal-box-rx { fill: rgba(230,194,0,.10); stroke: rgba(230,194,0,.5); stroke-width: 1.3; }
.bh-mal-txt { fill: rgba(203,213,225,.75); font-family: 'SF Mono','JetBrains Mono',Consolas,monospace; font-size: 9px; letter-spacing: .08em; }
.bh-mal-dim { fill: rgba(203,213,225,.45); font-family: 'SF Mono',Consolas,monospace; font-size: 8px; letter-spacing: .08em; }
.bh-mal-rx { fill: none; stroke: rgba(230,194,0,.5); stroke-width: 1.1; }
.bh-mal-pulse { fill: #5EEAD4; filter: drop-shadow(0 0 4px rgba(94,234,212,.95)); }
.bh-mal-pulse2 { fill: #E6C200; filter: drop-shadow(0 0 3px rgba(230,194,0,.9)); }

/* ── ۳) Equation (typewriter) — bottom-left ── */
.bh-eq {
  inset-inline-start: 24px; bottom: 60px;
  font-family: 'SF Mono','JetBrains Mono',Consolas,monospace;
  font-size: 12px; letter-spacing: .05em; color: rgba(94,234,212,.75);
  animation-delay: 5.4s;
  max-width: 300px; white-space: nowrap; overflow: hidden;
}
.bh-eq-caret { color: #5EEAD4; animation: bhCaret 1s steps(1) infinite; }
@keyframes bhCaret { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }

/* ── ۴) HUD sensors (top-right corner) ── */
.bh-hud {
  inset-inline-end: 18px; top: 78px;
  font-family: 'SF Mono','JetBrains Mono',Consolas,monospace;
  font-size: 10px; letter-spacing: .08em; line-height: 1.9;
  color: rgba(94,234,212,.8); text-align: left; animation-delay: 4.6s;
  background: rgba(10,22,40,.3); border: 1px solid rgba(94,234,212,.12);
  padding: 8px 12px; border-radius: 8px;
}
.bh-hud-row { display: flex; gap: 12px; justify-content: space-between; }
.bh-hud-key { opacity: .55; }
.bh-hud-val { color: #5EEAD4; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── ۵) PID block + feedback (top-left) ── */
.bh-pid { inset-inline-start: 22px; top: 200px; width: 124px; height: 80px; animation-delay: 5.6s; opacity: 0; }.bh-pid-wire line { stroke: rgba(94,234,212,.4); stroke-width: 1.3; }
.bh-pid-fb { stroke: rgba(94,234,212,.55); stroke-width: 1.2; stroke-dasharray: 4 3;
  animation: bhFbFlow 2.4s linear infinite; }
@keyframes bhFbFlow { to { stroke-dashoffset: -28; } }
.bh-pid-box { fill: rgba(13,115,119,.12); stroke: rgba(94,234,212,.6); stroke-width: 1.5; }
.bh-pid-label { fill: #5EEAD4; font-family: 'SF Mono',Consolas,monospace; font-size: 14px; font-weight: 700; letter-spacing: .05em; }
.bh-pid-node { fill: #5EEAD4; }

/* ── hide on small screens (avoid clutter) ── */
@media (max-width: 900px) { .bh-plc, .bh-pid { display: none; } }
@media (max-width: 640px) { .bh-maloop, .bh-eq, .bh-stateeq, .bh-voltsine, .bh-hud { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .bh-tech { animation: none !important; opacity: .5 !important; }
  .bh-mal-pulse, .bh-mal-pulse2, .bh-eq-caret { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   COMPLEMENTARY ELEMENTS — fill remaining empty margin/corner space
   ═══════════════════════════════════════════════════════════════════ */

/* ── ۶/۷) Gears (rotating) — silver tone ── */
.bh-gear { pointer-events: none; }
.bh-gear-tl { left: 24%; top: 12%; width: 60px; height: 60px; animation-delay: 5.4s; }
.bh-gear-br { right: 24%; bottom: 16%; width: 46px; height: 46px; animation-delay: 6.2s; }
.bh-gear-ring { stroke: rgba(203,213,225,.4); stroke-width: 2; }
.bh-gear-teeth line { stroke: rgba(203,213,225,.5); stroke-width: 2.2; }
.bh-gear-spin { transform-origin: 40px 40px; animation: bhSpin 14s linear infinite; }
.bh-gear-spin-rev { transform-origin: 30px 30px; animation: bhSpin 10s linear infinite reverse; }
@keyframes bhSpin { to { transform: rotate(360deg); } }

/* ── ۸) Blueprint frame + dimensions (silver outline) ── */
.bh-blueprint {
  inset-inline-start: 5%; top: 56%; width: 140px; height: 140px;
  animation-delay: 5.8s; opacity: 0;
}
.bh-bp-frame { fill: none; stroke: rgba(203,213,225,.2); stroke-width: 1; }
.bh-bp-ticks line { stroke: rgba(203,213,225,.28); stroke-width: 1; }
.bh-bp-dim { fill: rgba(203,213,225,.5); font-family: 'SF Mono',Consolas,monospace; font-size: 9px; letter-spacing: .05em; }

/* ── ۹) Scattered math symbols (gold + turquoise mix) ── */
.bh-math {
  font-family: 'SF Mono','JetBrains Mono',Consolas,monospace;
  font-size: 18px; color: rgba(94,234,212,.4);
  animation: bhMathFloat 6s ease-in-out infinite;
}
/* every other math symbol is gold */
.bh-math:nth-child(3n) { color: rgba(230,194,0,.45); }
.bh-math:nth-child(4n) { color: rgba(203,213,225,.4); }
@keyframes bhMathFloat {
  0%    { transform: translateY(0); opacity: 0; }
  20%   { opacity: .5; }
  50%   { transform: translateY(-10px); opacity: .6; }
  100%  { transform: translateY(0); opacity: .35; }
}

/* ── ۱۰) SCADA network (moved lower-right, gold hub accent) ── */
.bh-scada { inset-inline-start: 5%; top: 78%; width: 140px; height: 82px; animation-delay: 6.4s; opacity: 0; }
.bh-scada-links line { stroke: rgba(94,234,212,.3); stroke-width: 1; }
.bh-scada-node { fill: rgba(13,115,119,.5); stroke: #5EEAD4; stroke-width: 1.2; }
.bh-scada-hub { fill: rgba(230,194,0,.15); stroke: rgba(230,194,0,.7); }
.bh-scada-pulse {
  fill: none; stroke: #5EEAD4; stroke-width: 1.4;
  animation: bhScadaPulse 2.2s ease-out infinite;
  transform-origin: 90px 50px;
}
@keyframes bhScadaPulse {
  0%   { transform: scale(.6); opacity: .8; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* ── ۱۱) Horizontal scan line (gold-tinted) ── */
.bh-scan {
  top: 50%; inset-inline-start: 0; width: 100%; height: 1px; overflow: hidden;
  animation-delay: 5.4s;
}
.bh-scan-bar {
  position: absolute; top: 0; left: 0; height: 100%; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(230,194,0,.4), transparent);
  animation: bhScan 4.5s linear infinite;
}
@keyframes bhScan {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(460%); }
}

/* ── ۱۲) IEEE citation badge (top-left, below PID) ── */
.bh-ieee {
  top: 186px; inset-inline-start: 22px;
  font-family: 'SF Mono',Consolas,monospace; font-size: 9px; letter-spacing: .08em;
  color: rgba(94,234,212,.6); text-align: left; line-height: 1.9;
  animation-delay: 5s;
}
.bh-ieee-vol { display: block; }
.bh-ieee-issn { display: block; opacity: .55; }

/* ── ۱۳) Secondary HUD sensors (left-mid, fixed width, single anchor) ── */
.bh-hud2 {
  inset-inline-start: 30px; top: 64%;
  inset-inline-end: auto;
  width: 132px;
  animation-delay: 5.6s;
}

/* ── ۱۴) Bode / gain curve (lower-right, below PLC) ── */
.bh-bode { inset-inline-start: 5%; top: 34%; width: 120px; height: 70px; animation-delay: 6.8s; opacity: 0; }
.bh-bode-path { fill: none; stroke: rgba(230,194,0,.4); stroke-width: 1.4; }
.bh-bode-dot { fill: #E6C200; }
.bh-bode-dim { fill: rgba(230,194,0,.5); font-family: 'SF Mono',Consolas,monospace; font-size: 9px; }

/* ── ۱۴ب) Root locus / s-plane (control theory) — right-middle empty zone ── */
.bh-rootlocus {
  right: 11%; top: 7%; width: 150px; height: 130px; opacity: 0;
  animation: bhTechIn 1.6s ease-out forwards; animation-delay: 6.0s;
}
.bh-rl-axis { stroke: rgba(94,234,212,.28); stroke-width: 1; }
.bh-rl-pole path { stroke: #E6C200; stroke-width: 1.6; stroke-linecap: round; fill: none; }
.bh-rl-zero { fill: none; stroke: #5EEAD4; stroke-width: 1.6; }
.bh-rl-branch { fill: none; stroke: rgba(94,234,212,.55); stroke-width: 1.3; stroke-dasharray: 5 3;
  stroke-dashoffset: 60; animation: bhRlDraw 4.5s ease-out forwards; }
@keyframes bhRlDraw { to { stroke-dashoffset: 0; } }
.bh-rl-arrow { fill: rgba(94,234,212,.7); }
.bh-rl-dim { fill: rgba(203,213,225,.5); font-family: 'SF Mono',Consolas,monospace; font-size: 9px; letter-spacing: .04em; }

/* ── ۱۴ج) Second-order transfer function + step response — top-right ── */
.bh-secondorder {
  right: auto; left: 8%; top: 18%; width: 150px; height: 130px; opacity: 0;
  direction: ltr; unicode-bidi: isolate;
  animation: bhTechIn 1.6s ease-out forwards; animation-delay: 6.1s;
}
.bh-so-axis-x { stroke: rgba(203,213,225,.16); stroke-width: 1; }
.bh-so-axis-y { stroke: rgba(203,213,225,.16); stroke-width: 1; }
.bh-so-step { stroke: rgba(203,213,225,.20); stroke-width: 1; stroke-dasharray: 4 3; }
.bh-so-curve { fill: none; stroke: rgba(94,234,212,.40); stroke-width: 1.5; stroke-linecap: round;
  stroke-dasharray: 260; stroke-dashoffset: 260;
  filter: drop-shadow(0 0 2px rgba(94,234,212,.30));
  animation: bhSoDraw 4s ease-out forwards; }
@keyframes bhSoDraw { to { stroke-dashoffset: 0; } }
.bh-so-peak { fill: rgba(230,194,0,.55); filter: drop-shadow(0 0 2px rgba(230,194,0,.45)); }
.bh-so-settle { stroke: rgba(230,194,0,.22); stroke-width: 1; }
.bh-so-dim { fill: rgba(203,213,225,.38); font-family: 'SF Mono',Consolas,monospace; font-size: 7px; letter-spacing: .03em; }
.bh-so-tf { fill: rgba(94,234,212,.45); font-family: 'Cambria Math','STIX Two Math',Georgia,serif; font-size: 9px; font-style: italic; letter-spacing: .01em; }
.bh-so-sub { font-size: 6px; baseline-shift: sub; }
.bh-so-sup { font-size: 6px; baseline-shift: super; }
.bh-so-italic { fill: rgba(203,213,225,.40); font-family: 'SF Mono',Consolas,monospace; font-size: 8px; font-style: italic; letter-spacing: .04em; }

/* ── ۱۵ب) ترمومتر + گیج فشار فرآیند (HUD صنعتی) — پایین-راست ── */
.bh-pressgauge {
  right: 2%; bottom: 2%; width: 180px; height: 135px; opacity: 0;
  animation: bhTechIn 1.6s ease-out forwards; animation-delay: 5.8s;
}
.bh-thermo-tube { fill: none; stroke: rgba(203,213,225,.40); stroke-width: 1.4; }
.bh-thermo-bulb { fill: none; stroke: rgba(203,213,225,.40); stroke-width: 1.4; }
.bh-thermo-fill { fill: rgba(230,194,0,.75); }
.bh-thermo-ticks line { stroke: rgba(203,213,225,.35); stroke-width: 1; }
.bh-pg-ring { fill: none; stroke: rgba(94,234,212,.40); stroke-width: 1.4; }
.bh-pg-inner { fill: rgba(13,115,119,.08); stroke: rgba(94,234,212,.18); stroke-width: 1; }
.bh-pg-arc { fill: none; stroke: rgba(94,234,212,.55); stroke-width: 2; }
.bh-pg-arc-min { fill: none; stroke: rgba(230,194,0,.45); stroke-width: 2; }
.bh-pg-ticks line { stroke: rgba(203,213,225,.4); stroke-width: 1.1; }
.bh-pg-needle { stroke: #E6C200; stroke-width: 2; stroke-linecap: round; }
.bh-pg-hub { fill: #E6C200; }
.bh-pg-val { fill: #5EEAD4; font-family: 'SF Mono','JetBrains Mono',Consolas,monospace; font-size: 12px; font-weight: 700; letter-spacing: .05em; }
.bh-pg-key { fill: rgba(203,213,225,.6); font-family: 'SF Mono','JetBrains Mono',Consolas,monospace; font-size: 9px; letter-spacing: .12em; }

/* ── ۱۵) Binary data stream (mid-right edge) ── */
.bh-binary {
  inset-inline-end: 4%; top: 58%;
  font-family: 'SF Mono',Consolas,monospace; font-size: 11px; letter-spacing: .04em;
  color: rgba(94,234,212,.35); writing-mode: vertical-rl; text-orientation: upright;
  animation: bhBinary 5s linear infinite; animation-delay: 6s;
}
.bh-binary span { opacity: .5; }
@keyframes bhBinary {
  0%,100% { opacity: .3; }
  50%     { opacity: .7; }
}

/* ── ۱۶) Circuit trace (gold) — top-center ── */
.bh-trace { top: 6%; inset-inline-start: 50%; transform: translateX(-50%); width: 150px; height: 56px; animation-delay: 6.2s; opacity: 0; }
.bh-trace-gold { fill: none; stroke: rgba(230,194,0,.5); stroke-width: 1.6; }
.bh-trace-pad-gold { fill: #E6C200; opacity: .8; }
.bh-trace-pad { fill: none; stroke: rgba(203,213,225,.6); stroke-width: 1.3; }

/* ── ۱۷) Gauge dial (silver) — upper-left-mid ── */
.bh-gauge { top: 8%; inset-inline-start: 30%; width: 70px; height: 70px; animation-delay: 6.6s; opacity: 0; }
.bh-gauge-ring { fill: none; stroke: rgba(203,213,225,.35); stroke-width: 1.6; }
.bh-gauge-inner { fill: none; stroke: rgba(203,213,225,.15); stroke-width: 1; }
.bh-gauge-needle { stroke: rgba(230,194,0,.7); stroke-width: 2; stroke-linecap: round;
  transform-origin: 40px 40px; animation: bhNeedle 5s ease-in-out infinite; }
@keyframes bhNeedle { 0%,100% { transform: rotate(-45deg); } 50% { transform: rotate(45deg); } }
.bh-gauge-hub { fill: #E6C200; }
.bh-gauge-ticks line { stroke: rgba(203,213,225,.4); stroke-width: 1.2; }

/* ── ۱۸) Gold/silver scattered dots ── */
.bh-golddot { width: 5px; height: 5px; border-radius: 50%; background: #E6C200; opacity: 0;
  animation: bhDotPulse 3s ease-in-out infinite; }
.bh-silverdot { width: 5px; height: 5px; border-radius: 50%; background: #CBD5E1; opacity: 0;
  animation: bhDotPulse 3.6s ease-in-out infinite; }
@keyframes bhDotPulse { 0%,100% { opacity: .25; transform: scale(.7); } 50% { opacity: .7; transform: scale(1.15); } }

/* ── ۱۹) Square wave (silver) — bottom-center ── */
.bh-sqwave { bottom: 6%; inset-inline-start: 50%; transform: translateX(-50%); width: 200px; height: 52px; animation-delay: 7s; opacity: 0; }
.bh-sqwave-path { fill: none; stroke: rgba(203,213,225,.5); stroke-width: 1.6; }
.bh-pwm-level { stroke: rgba(94,234,212,.20); stroke-width: 0.8; stroke-dasharray: 3 4; }
.bh-pwm-tick { stroke: rgba(203,213,225,.5); stroke-width: 0.8; }
.bh-pwm-dim { stroke: rgba(203,213,225,.35); stroke-width: 0.8; }
.bh-pwm-label { fill: rgba(94,234,212,.65); font-family: 'SF Mono','JetBrains Mono',Consolas,monospace; font-size: 8px; letter-spacing: .06em; }

/* ── ۲۰) Year reference (silver) — bottom-center ── */
.bh-year {
  bottom: 3%; inset-inline-start: 50%; transform: translateX(-50%);
  font-family: 'SF Mono',Consolas,monospace; font-size: 10px; letter-spacing: .08em;
  color: rgba(203,213,225,.5); animation-delay: 7.4s;
}

/* ── responsive: hide overlapping elements on smaller widths ── */
@media (max-width: 1200px) { .bh-gear-tl, .bh-gear-br, .bh-scada, .bh-gauge, .bh-rootlocus, .bh-secondorder { display: none; } }
@media (max-width: 1560px) and (min-width: 1201px) { .bh-scada { display: none; } }
@media (max-width: 900px) {
  .bh-plc, .bh-pid, .bh-bode, .bh-binary, .bh-ieee, .bh-blueprint, .bh-math,
  .bh-trace, .bh-sqwave, .bh-golddot, .bh-silverdot, .bh-year, .bh-rootlocus, .bh-pressgauge, .bh-secondorder { display: none; }
}
@media (max-width: 640px) {
  .bh-maloop, .bh-eq, .bh-stateeq, .bh-voltsine, .bh-hud, .bh-hud2, .bh-scan { display: none; }
}

/* Height guards — prevent vertical compression overlaps on short/narrow screens.
   As the hero gets shorter, progressively hide the densest margin elements so
   none of them can ever collide. */
@media (max-height: 860px) {
  .bh-blueprint, .bh-scada, .bh-binary { display: none; }
}
@media (max-height: 900px) {
  .bh-hud2 { display: none; }
}

@media (max-height: 800px) {
  .bh-bode, .bh-pid, .bh-ieee { display: none; }
}
@media (max-height: 740px) {
  .bh-plc, .bh-hud2, .bh-math { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bh-gear-spin, .bh-gear-spin-rev, .bh-scan-bar,
  .bh-scada-pulse, .bh-binary, .bh-math, .bh-needle, .bh-golddot, .bh-silverdot { animation: none !important; }
  .bh-gauge-needle { animation: none !important; }
}
