/* A service page within the existing studio and case-study reading system. */
.automation-page .case-hero h1 { max-width: 15ch; }
.automation-page .case-intro .case-text-link { margin-top: 18px; }
.automation-page .case-back a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.automation-page .automation-decision {
  padding-block: clamp(56px, 7vw, 100px);
  border-top: 1px solid var(--case-line);
}
.automation-page .automation-decision .case-section-heading p { color: var(--case-muted); }
.automation-fit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 6vw, 96px);
}
.automation-fit-grid > div { border-top: 1px solid var(--case-line); padding-top: 25px; }
.automation-fit-grid h3 {
  font-size: clamp(25px, 2.6vw, 38px);
  line-height: 1.1;
  max-width: 22ch;
}
.automation-fit-grid ul { padding-left: 20px; margin-top: 22px; }
.automation-fit-grid li { padding-left: 3px; margin-bottom: 15px; max-width: 54ch; line-height: 1.65; }
.automation-examples > section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(25px, 7vw, 112px);
  border-top: 1px solid #54564e;
  padding-block: 30px;
}
.automation-examples h3 { font-size: clamp(26px, 2.7vw, 39px); line-height: 1.1; max-width: 19ch; }
.automation-examples p { color: #b6b8ae; line-height: 1.7; max-width: 60ch; }
.automation-proof {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(30px, 6vw, 96px);
  align-items: center;
  padding-block: clamp(72px, 8vw, 128px);
}
.automation-proof h2 { font-size: clamp(34px, 4vw, 58px); line-height: 1.05; max-width: 18ch; }
.automation-proof p { margin-top: 23px; line-height: 1.7; }
.automation-proof .case-image-mat { padding: clamp(12px, 2.3vw, 36px); }
.automation-proof figcaption { display: block; margin-top: 14px; }
.automation-proof figcaption p { margin-top: 0; }
.automation-proof .case-text-link { margin-top: 16px; }
.automation-page .automation-proof .automation-proof-note {
  color: var(--case-muted);
  font-size: 14px;
  line-height: 1.65;
  margin-top: 16px;
}
.automation-page .faq-list { min-width: 0; }
.automation-page .faq-item summary { min-height: 76px; align-items: center; }
.automation-page .faq-item p { max-width: 65ch; }
.automation-page .faq-item p a { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 767px) {
  .automation-page .case-hero h1 { font-size: clamp(49px, 12.5vw, 84px); }
  .automation-page .case-back { flex-wrap: wrap; gap: 5px 12px; }
  .automation-fit-grid { grid-template-columns: minmax(0, 1fr); gap: 25px; }
  .automation-examples > section { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .automation-proof { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .automation-proof h2 { max-width: 18ch; }
  .automation-page .faq-item summary { font-size: 16px; gap: 20px; }
  .automation-page .faq-item p { padding-right: 0; }
}

/* A working diagram carries the service's motion, in the existing studio world. */
.automation-page .automation-hero { padding-top: 18px; }
.automation-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  grid-template-areas: 'title machine' 'copy machine';
  gap: 22px clamp(30px, 5vw, 80px);
  align-items: start;
  grid-template-rows: auto 1fr;
}
.automation-hero-title { grid-area: title; }
.automation-page .automation-hero h1 { font-size: clamp(60px, 7.4vw, 112px); max-width: 12ch; }
.automation-hero-description { grid-area: copy; align-self: start; padding-bottom: 20px; }
.automation-page .automation-hero-description .case-premise { font-size: clamp(25px, 2.6vw, 36px); max-width: 20ch; margin-bottom: 19px; }
.automation-page .automation-hero-description .case-lead { font-size: 16px; max-width: 44ch; }
.automation-page .automation-hero-description .case-text-link { margin-top: 18px; }
.automation-page .automation-hero .case-facts { margin-top: 34px; }
.workflow-machine { grid-area: machine; margin: 0; min-width: 0; }
.workflow-machine-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.workflow-machine-top > p { font-size: 13px; line-height: 1.4; max-width: 13ch; }
.workflow-scenarios { display: flex; gap: 2px; }
.workflow-scenarios button { min-height: 44px; padding: 9px 12px; border-radius: 100px; font-size: 12px; }
.workflow-scenarios button:hover { background: #1819180c; }
.workflow-scenarios button[aria-pressed='true'] { background: var(--studio-ink); color: var(--studio-paper); }
.workflow-machine-stage { position: relative; margin: 1px -12px 0; }
.workflow-machine-art { display: block; width: 100%; height: auto; overflow: visible; }
.workflow-stage-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; list-style: none; }
.workflow-stage-list li { border-top: 1px solid var(--case-line); padding-top: 12px; min-width: 0; }
.workflow-stage-list li[aria-current='step'] { border-color: var(--studio-orange); }
.workflow-stage-list span { display: block; color: var(--case-muted); font-size: 11px; margin-bottom: 5px; }
.workflow-stage-list strong { display: block; font-size: 14px; line-height: 1.35; font-weight: 500; }
.workflow-machine-actions { display: flex; gap: 8px; align-items: center; margin-top: 20px; }
.workflow-machine-actions button { min-height: 44px; border-radius: 100px; padding: 11px 19px; font-size: 13px; }
.workflow-play { background: var(--studio-ink); color: var(--studio-paper); min-width: 178px; }
.workflow-play:hover { background: #363830; }
.workflow-reset { border: 1px solid #18191870; }
.workflow-reset:hover { background: #1819180c; }
.automation-page .workflow-machine-caption { display: block; margin-top: 13px; font-size: 12px; }
.workflow-machine-caption p { min-height: 2.8em; max-width: 55ch; line-height: 1.5; color: var(--studio-ink); }
.workflow-machine-caption > span { display: block; margin-top: 6px; font-size: 11px; color: var(--case-muted); }
.automation-page .automation-examples > section { position: relative; }
.automation-example-route { grid-column: 1 / -1; position: relative; margin-top: 12px; }
.automation-example-route::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: #54564e; }
.automation-example-route > i { position: absolute; top: -4px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--studio-orange); transform: translateX(0); }
.automation-example-route ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; padding-top: 15px; }
.automation-example-route li { font-size: 13px; color: var(--studio-paper); line-height: 1.4; }
.automation-page .automation-proof .case-image-mat { overflow: hidden; perspective: 1000px; }
.automation-motion .automation-proof img { transform: translateY(var(--workflow-image-y,0px)) rotateZ(var(--workflow-image-r,0deg)); transform-origin: 50% 60%; }
@media (min-width: 768px) and (max-height: 800px) {
  .automation-page .automation-hero h1 { font-size: clamp(58px, 6.7vw, 100px); }
  .automation-hero-grid { gap: 17px 5vw; }
  .automation-page .automation-hero-description .case-premise { font-size: 29px; margin-bottom: 14px; }
  .workflow-machine-stage { margin-top: -12px; }
  .workflow-machine-art { height: clamp(260px, 26vw, 345px); }
  .workflow-machine-actions { margin-top: 15px; }
  .workflow-machine-caption p { min-height: 2.5em; }
}
@media (max-width: 1000px) and (min-width: 768px) {
  .automation-hero-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px 28px; }
  .workflow-machine-top { align-items: flex-start; flex-direction: column; gap: 4px; }
  .workflow-machine-top > p { max-width: none; }
  .workflow-scenarios button { padding-inline: 12px; }
}
@media (max-width: 767px) {
  .automation-hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'title' 'machine' 'copy'; grid-template-rows: auto auto auto; gap: 28px; }
  .automation-page .automation-hero h1 { font-size: clamp(49px, 13vw, 84px); }
  .automation-page .automation-hero-description .case-premise { font-size: 29px; margin-bottom: 18px; }
  .automation-page .automation-hero-description .case-lead { font-size: 16px; }
  .workflow-machine-top { gap: 8px; }
  .workflow-machine-top > p { max-width: 12ch; font-size: 12px; }
  .workflow-scenarios button { font-size: 11px; padding-inline: 10px; }
  .workflow-machine-stage { margin: 0 -10px; }
  .workflow-stage-list { gap: 12px; }
  .workflow-stage-list strong { font-size: 13px; }
  .workflow-machine-caption p { min-height: 3em; }
  .automation-example-route ol { gap: 15px; }
  .automation-example-route li { font-size: 12px; }
}
@media (max-width: 359px) {
  .workflow-machine-top { flex-direction: column; align-items: flex-start; gap: 2px; }
  .workflow-machine-top > p { max-width: none; }
  .workflow-scenarios { margin-left: -10px; }
  .workflow-stage-list strong { font-size: 12px; }
  .workflow-play { min-width: 170px; }
}
@media (prefers-reduced-motion: reduce) {
  .automation-motion .automation-proof img { transform: none; }
}

/* Detailed workflow diagrams extend the existing mechanism into the examples. */
.automation-page .automation-examples > section {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  grid-template-areas: 'copy art' 'route route';
  gap: 22px clamp(36px, 7vw, 112px);
  align-items: center;
  padding-block: 44px;
}
.automation-example-copy { grid-area: copy; }
.automation-examples .automation-example-copy h3 { max-width: 18ch; font-size: clamp(30px, 3.5vw, 49px); }
.automation-examples .automation-example-copy p { margin-top: 22px; max-width: 44ch; }
.automation-example-art { grid-area: art; min-width: 0; color: var(--studio-paper); }
.automation-example-art svg { display: block; width: 100%; height: auto; }
.automation-page .automation-examples > section:nth-child(2) { grid-template-areas: 'art copy' 'route route'; }
.automation-page .automation-example-route { grid-area: route; margin-top: 0; }
.automation-page .automation-example-link { display: inline-flex; align-items: center; min-height: 44px; gap: 15px; color: var(--studio-paper); font-size: 14px; text-decoration: underline; text-underline-offset: 5px; margin-top: 17px; }
.automation-example-link svg { width: 20px; height: 20px; transform: rotate(-45deg); }
.automation-example-link:hover { text-decoration-thickness: 2px; }
.automation-page .automation-examples-note { margin-top: 27px; max-width: none; font-size: 12px; line-height: 1.5; color: #b6b8ae; }
.workflow-machine:focus-visible { outline: 2px solid var(--studio-ink); outline-offset: 8px; }
.automation-contact-heading { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.automation-page .automation-contact-heading h2 { max-width: 15ch; }
.automation-contact-ribbon { display: block; width: 100%; height: auto; }
.automation-contact-ribbon > g { transform-origin: 50% 50%; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .automation-motion:has([data-workflow-machine][data-motion="full"]) .automation-contact-ribbon > g { transition: transform 550ms cubic-bezier(.16,1,.3,1); }
  .automation-motion:has([data-workflow-machine][data-motion="full"]) .automation-contact:has(.case-cta:hover) .automation-contact-ribbon > g,
  .automation-motion:has([data-workflow-machine][data-motion="full"]) .automation-contact:has(.case-cta:focus-visible) .automation-contact-ribbon > g { transform: translate(5px,-5px) rotate(-3deg); }
}
@media (max-width: 767px) {
  .automation-page .automation-examples > section,
  .automation-page .automation-examples > section:nth-child(2) { grid-template-columns: minmax(0,1fr); grid-template-areas: 'copy' 'art' 'route'; gap: 25px; padding-block: 34px; }
  .automation-examples .automation-example-copy h3 { font-size: clamp(29px, 7.8vw, 43px); max-width: 22ch; }
  .automation-examples .automation-example-copy p { margin-top: 15px; }
  .automation-example-art { max-width: 540px; width: 100%; justify-self: center; }
  .automation-example-link { margin-top: 10px; }
  .automation-contact-heading { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .automation-contact-ribbon { max-width: 360px; width: 100%; height: 140px; justify-self: end; }
  .automation-page .automation-contact .case-contact-bottom { margin-top: 15px; }
}
