.ad-hero-line { display: block; }

.ad-count-frame {
  display: inline-grid;
  font-variant-numeric: tabular-nums;
}
.ad-count-frame > span { grid-area: 1 / 1; }
.ad-count-visual { display: none; }

@property --ad-orbit-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@media (prefers-reduced-motion: no-preference) {
  .ad-count-reference { opacity: 0; }
  .ad-count-visual { display: block; }

  .ad-hero-copy > :not(h1), .ad-hero-board {
    animation: ad-motion-rise .7s cubic-bezier(.2,.75,.25,1) both;
  }
  .ad-hero .ad-hero-line {
    animation: ad-motion-title .86s cubic-bezier(.16,1,.3,1) .06s both;
  }
  .ad-hero .ad-hero-line + .ad-hero-line { animation-delay: .16s; }
  .ad-hero-intro, .ad-hero-board { animation-delay: .18s; }
  .ad-hero .ad-actions, .ad-hero .ad-hero-proof { animation-delay: .25s; }
  .ad-hero-work, .ad-hero-creatives, .ad-hero-meta {
    animation: ad-motion-rise .76s cubic-bezier(.2,.75,.25,1) .24s both;
  }
  .ad-hero-creatives { animation-delay: .35s; }
  .ad-hero-meta { animation-delay: .43s; }
  .ad-hero-outdoor { position: relative; }
  .ad-hero-outdoor::after {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(108deg, transparent 24%, #ceffe229 50%, transparent 76%);
    animation: ad-motion-sweep 1.25s ease-in-out .54s both;
    content: "";
  }

  .ad-motion-in {
    --ad-motion-delay: 0s;
  }
  .ad-motion-in:not(.ad-hero-proof, .ad-hero-meta, .ad-services > article, .ad-plan-form, .ad-system-layout) {
    animation: ad-motion-rise .65s cubic-bezier(.2,.75,.25,1) var(--ad-motion-delay) both;
  }
  :is(.ad-result, .ad-work-card, .ad-outdoor-card, .ad-partner-card, .ad-team-grid article, .ad-team-photos > a, .ad-stat-grid > div, .ad-digital-channels > div, .ad-questions details).ad-motion-in:nth-child(3n + 2) {
    --ad-motion-delay: .07s;
  }
  :is(.ad-result, .ad-work-card, .ad-outdoor-card, .ad-partner-card, .ad-team-grid article, .ad-team-photos > a, .ad-stat-grid > div, .ad-digital-channels > div, .ad-questions details).ad-motion-in:nth-child(3n) {
    --ad-motion-delay: .14s;
  }
  .ad-services > article {
    position: relative;
    isolation: isolate;
    --ad-service-accent: #159253;
    --ad-service-glow: #11b86418;
  }
  .ad-services > .ad-services-buy {
    --ad-service-accent: #8af7af;
    --ad-service-glow: #9df5b226;
  }
  .ad-services > .ad-services-buy.ad-motion-in { --ad-motion-delay: .10s; }
  .ad-services > article.ad-motion-in:last-child { --ad-motion-delay: .20s; }
  .ad-services > .ad-motion-in::before,
  .ad-services > .ad-motion-in::after {
    position: absolute;
    z-index: -1;
    pointer-events: none;
    content: "";
  }
  .ad-services > .ad-motion-in::before {
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--ad-service-accent);
    transform-origin: top;
    animation: ad-motion-trace .64s ease-out var(--ad-motion-delay) both;
  }
  .ad-services > .ad-motion-in::after {
    inset: 0;
    background: linear-gradient(105deg, transparent 25%, var(--ad-service-glow) 50%, transparent 75%);
    animation: ad-motion-sweep .9s ease-out var(--ad-motion-delay) both;
  }
  .ad-services > .ad-motion-in > * {
    animation: ad-motion-rise .52s ease-out var(--ad-motion-delay) both;
  }

  .ad-stat-grid .ad-motion-in dt,
  .ad-result .ad-result-metric strong {
    position: relative;
    width: fit-content;
    max-width: 100%;
  }
  :is(.ad-stat-grid > .ad-motion-in dt, .ad-result.ad-motion-in .ad-result-metric strong)::after {
    position: absolute;
    inset: auto 0 -3px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    opacity: .52;
    transform-origin: left;
    animation: ad-motion-rule .8s cubic-bezier(.2,.75,.25,1) var(--ad-motion-delay) both;
    content: "";
  }
  .ad-digital-channels > .ad-motion-in {
    position: relative;
  }
  .ad-digital-channels > .ad-motion-in::before {
    position: absolute;
    inset: -1px auto auto 0;
    width: 44px;
    height: 2px;
    background: #28975c;
    transform-origin: left;
    animation: ad-motion-rule .66s ease-out var(--ad-motion-delay) both;
    content: "";
  }

  .ad-outdoor-card.ad-motion-in .ad-outdoor-photo::after {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(112deg, transparent 25%, #d2ffe82b 50%, transparent 75%);
    animation: ad-motion-sweep 1.05s ease-in-out var(--ad-motion-delay) both;
    content: "";
  }
  .ad-plan-atlas > img:not([hidden]) { animation: ad-motion-map .42s ease-out both; }
  .ad-plan-form.ad-motion-in .ad-plan-atlas::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 27%, #54f2a02c 49%, #a2ffd362 50%, transparent 52%);
    animation: ad-motion-radar 1.3s cubic-bezier(.2,.75,.25,1) both;
    content: "";
  }
  .ad-plan-pin[aria-pressed="true"]::after {
    position: absolute;
    inset: 25%;
    border: 1px solid #8bffc0;
    border-radius: 50%;
    pointer-events: none;
    animation: ad-motion-ping .65s ease-out both;
    content: "";
  }

  .ad-system-layout.ad-motion-in .ad-orbit-track::after {
    position: absolute;
    inset: -2px;
    padding: 3px;
    border-radius: 50%;
    pointer-events: none;
    background: conic-gradient(from var(--ad-orbit-angle), transparent 0 289deg, #63ffac 347deg, #edfff3 358deg, transparent);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    animation: ad-motion-orbit 1.65s ease-in-out both;
    content: "";
  }
  .ad-system-layout.ad-motion-in .ad-system-step:not([hidden]) {
    animation: ad-motion-rise .45s cubic-bezier(.2,.75,.25,1) both;
  }
  :is(.ad-results, .ad-questions) details[open] > :not(summary) {
    animation: ad-motion-rise .28s ease-out both;
  }
  .ad-brief .ad-brief-copy.ad-motion-in h2 em {
    display: inline-block;
    animation: ad-motion-title .85s cubic-bezier(.16,1,.3,1) .14s both;
  }
  .ad-brief .ad-brief-checklist.ad-motion-in { --ad-motion-delay: .12s; }
  .ad-brief .ad-brief-copy.ad-motion-in .ad-button {
    animation: ad-motion-cta 1.2s ease-out .26s both;
  }
  .ad-preview[open] img { animation: ad-motion-rise .32s ease-out both; }
  .ad-orbit-node, .ad-plan-market-switch button, .ad-plan-cities label > span,
  .ad-plan-type-grid label > span, .ad-button {
    transition: color .2s, background-color .24s, border-color .24s, box-shadow .24s;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :is(.ad-outdoor-card, .ad-work-card, .ad-partner-card:has(a), .ad-team-photos > a, .ad-service-case-media a) {
    transition: transform .28s cubic-bezier(.2,.75,.25,1), box-shadow .28s, border-color .25s;
  }
  :is(.ad-outdoor-card, .ad-work-card, .ad-partner-card:has(a), .ad-team-photos > a, .ad-service-case-media a):hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 34px #0f5e3933;
  }
  :is(.ad-outdoor-photo, .ad-work-card, .ad-partner-card:has(a), .ad-hero-outdoor) img { transition: filter .3s ease-out; }
  :is(.ad-outdoor-card, .ad-work-card, .ad-partner-card:has(a), .ad-hero-outdoor):hover img { filter: brightness(1.13) saturate(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  html:has(body.ad-site) { scroll-behavior: auto; }
  .ad-site .trusted img {
    width: 100%;
    min-height: 0;
    object-fit: contain;
    animation: none;
    transform: none;
  }
}

@keyframes ad-motion-rise {
  from { opacity: .74; translate: 0 11px; }
  to { opacity: 1; translate: none; }
}
@keyframes ad-motion-title {
  from { opacity: .78; translate: 0 .23em; clip-path: inset(0 0 22%); }
  to { opacity: 1; translate: none; clip-path: inset(0 0 -12%); }
}
@keyframes ad-motion-trace { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes ad-motion-sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes ad-motion-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes ad-motion-map { from { opacity: .56; } to { opacity: 1; } }
@keyframes ad-motion-radar {
  0% { opacity: 0; transform: translateY(-38%); }
  22%, 76% { opacity: 1; }
  100% { opacity: 0; transform: translateY(38%); }
}
@keyframes ad-motion-ping { from { opacity: .9; scale: .7; } to { opacity: 0; scale: 2.1; } }
@keyframes ad-motion-orbit {
  0% { --ad-orbit-angle: 0deg; opacity: 0; }
  18%, 72% { opacity: 1; }
  100% { --ad-orbit-angle: 380deg; opacity: 0; }
}
@keyframes ad-motion-cta {
  from, to { box-shadow: 0 0 0 0 #51f19100; }
  42% { box-shadow: 0 0 28px #51f19155; }
}
