.automation-hero {
  margin: 0 0 24px;
  padding: clamp(22px, 4vw, 38px);
  overflow: hidden;
  color: #17352f;
  background:
    radial-gradient(circle at 85% 15%, rgba(78, 212, 153, .22), transparent 30%),
    linear-gradient(135deg, #fff 0%, #eef8f5 100%);
  border: 1px solid #c9dfd5;
  border-radius: 24px;
  text-align: left;
}

.automation-copy { max-width: 660px; }
.automation-copy h1 { margin: 8px 0 12px; font-size: clamp(1.75rem, 4vw, 2.65rem); }
.automation-copy p { max-width: 630px; margin: 0 0 24px; color: #48645e; font-size: 1.06rem; }
.automation-eyebrow {
  color: #0f6659;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.automation-card {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  color: #17352f;
  background: rgba(255, 255, 255, .9);
  border: 1px solid #b8d8cf;
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(15, 76, 129, .09);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform .2s ease, box-shadow .2s ease;
}
.automation-card:hover { transform: translateY(-3px); box-shadow: 0 22px 55px rgba(15, 76, 129, .15); }
.automation-card:focus-visible { outline: 4px solid rgba(15, 76, 129, .28); outline-offset: 4px; }
.automation-visual { position: relative; display: block; aspect-ratio: 720 / 350; min-height: 260px; }
.automation-visual svg { display: block; width: 100%; height: 100%; }

.task rect, .result rect { fill: #fff; stroke: #c9dfd5; stroke-width: 2; }
.task path, .result path, .result circle {
  fill: none; stroke: #247c70; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
}
.task text { fill: #61746f; font: 600 14px Arial, sans-serif; text-anchor: middle; }
.automation-lines path { fill: none; stroke: #b9d8d0; stroke-width: 2.5; stroke-dasharray: 7 8; }
.automation-core path { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; }
.automation-core circle:not(:first-child) { fill: #4ed499; }
.result .chart-rise, .result .chart-arrow { stroke: #cf4782; }

.automation-core-label {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -45%);
  color: #fff; font-size: clamp(.68rem, 2vw, .94rem); line-height: 1.25; text-align: center; pointer-events: none;
}
.automation-status {
  position: absolute; left: 50%; bottom: 5%; transform: translateX(-50%);
  padding: 6px 12px; color: #36534d; background: #eef8f5; border-radius: 999px;
  font-size: clamp(.68rem, 2vw, .82rem); font-weight: 700; white-space: nowrap;
}
.automation-cta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; color: #fff; background: #0f4c81; font-weight: 700;
}
.automation-cta span { font-size: 1.4rem; transition: transform .2s ease; }
.automation-card:hover .automation-cta span { transform: translateX(4px); }

.task { transform-box: view-box; transform-origin: center; }
.task-mail { animation: task-mail-flow 8s ease-in-out infinite; }
.task-sheet { animation: task-sheet-flow 8s ease-in-out infinite; }
.task-invoice { animation: task-invoice-flow 8s ease-in-out infinite; }
.automation-lines path { animation: line-flow 8s linear infinite; }
.automation-core { animation: core-pulse 8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.result { transform-box: view-box; transform-origin: center; }
.result-client { animation: result-client-flow 8s ease-in-out infinite; }
.result-calendar { animation: result-calendar-flow 8s ease-in-out infinite; }
.result-chart { animation: result-chart-flow 8s ease-in-out infinite; }
.chart-rise, .chart-arrow { stroke-dasharray: 110; stroke-dashoffset: 110; animation: chart-draw 8s ease infinite; }

@keyframes task-mail-flow {
  0%, 13% { opacity: 1; transform: translate(54px, 48px) rotate(-2deg); }
  32%, 48% { opacity: .12; transform: translate(270px, 142px) scale(.55); }
  62%, 100% { opacity: .45; transform: translate(54px, 48px) scale(.92); }
}
@keyframes task-sheet-flow {
  0%, 15% { opacity: 1; transform: translate(35px, 133px) rotate(2deg); }
  34%, 50% { opacity: .12; transform: translate(270px, 142px) scale(.55); }
  64%, 100% { opacity: .45; transform: translate(35px, 133px) scale(.92); }
}
@keyframes task-invoice-flow {
  0%, 17% { opacity: 1; transform: translate(60px, 224px) rotate(-1deg); }
  36%, 52% { opacity: .12; transform: translate(270px, 142px) scale(.55); }
  66%, 100% { opacity: .45; transform: translate(60px, 224px) scale(.92); }
}
@keyframes result-client-flow {
  0%, 38% { opacity: .12; transform: translate(310px, 142px) scale(.65); }
  58%, 92% { opacity: 1; transform: translate(548px, 54px); }
  100% { opacity: .12; transform: translate(310px, 142px) scale(.65); }
}
@keyframes result-calendar-flow {
  0%, 40% { opacity: .12; transform: translate(310px, 142px) scale(.65); }
  60%, 94% { opacity: 1; transform: translate(558px, 130px); }
  100% { opacity: .12; transform: translate(310px, 142px) scale(.65); }
}
@keyframes result-chart-flow {
  0%, 42% { opacity: .12; transform: translate(310px, 142px) scale(.65); }
  62%, 96% { opacity: 1; transform: translate(548px, 212px); }
  100% { opacity: .12; transform: translate(310px, 142px) scale(.65); }
}
@keyframes line-flow { 0% { stroke-dashoffset: 90; opacity: .25; } 45%, 82% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: .25; } }
@keyframes core-pulse { 0%, 25%, 100% { transform: scale(.94); } 42%, 65% { transform: scale(1.06); } }
@keyframes chart-draw { 0%, 58% { stroke-dashoffset: 110; } 78%, 96% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 110; } }

@media (max-width: 600px) {
  .automation-hero { padding: 20px 14px; border-radius: 18px; }
  .automation-visual { min-height: 220px; }
  .automation-status { bottom: 2%; }
}

@media (prefers-reduced-motion: reduce) {
  .automation-card, .automation-card *, .automation-card *::before, .automation-card *::after {
    animation: none !important; transition: none !important;
  }
  .result { opacity: 1; }
  .task { opacity: .45; }
  .task-mail { transform: translate(54px, 48px); }
  .task-sheet { transform: translate(35px, 133px); }
  .task-invoice { transform: translate(60px, 224px); }
  .result-client { transform: translate(548px, 54px); }
  .result-calendar { transform: translate(558px, 130px); }
  .result-chart { transform: translate(548px, 212px); }
  .chart-rise, .chart-arrow { stroke-dashoffset: 0; }
}
