/* Page polish is scoped to its mounted enhancement. No spacing or camera
   geometry is changed: all artwork lives inside existing empty space. */
[data-page-polish="mounted"] { --pp-pearl: #dcdee2; --pp-blue: #1730ed; }
.pp-reveal { opacity: 1; translate: 0 0; transition: opacity .9s cubic-bezier(.2,.65,.2,1), translate .9s cubic-bezier(.2,.65,.2,1); transition-delay: var(--pp-delay,0ms); }
.pp-reveal:not(.pp-revealed) { opacity: .12; translate: 0 22px; }
.pp-reveal:focus-within { opacity: 1; translate: 0 0; }

/* A large, quiet field frames the luminous emblem. Open arcs and moving
   points give it a direction without interfering with the approved title. */
.pp-orbit { position: absolute; pointer-events: none; width: min(46vw,620px); aspect-ratio: 1; left: 50%; top: 47%; translate: -50% -50%; opacity: 0; visibility: hidden; transition: opacity .75s ease, visibility .75s; }
.pp-orbit-on { opacity: .55; visibility: visible; }
.pp-orbit-art { display: block; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--pp-pearl); stroke-width: .65; }
.pp-orbit-track { transform-origin: 310px 310px; animation: pp-orbit-turn 36s linear infinite; animation-play-state: paused; }
.pp-orbit-track > circle:first-child { opacity: .14; }
.pp-orbit-track--one { transform: rotate(-30deg); }
.pp-orbit-track--two { animation-duration: 48s; animation-direction: reverse; }
.pp-orbit-track--two > circle:first-child { opacity: .08; }
.pp-orbit-track--one .pp-orbit-arc { stroke-dasharray: 155 1453; stroke-dashoffset: 80; opacity: .35; }
.pp-orbit-track--two .pp-orbit-arc { stroke-dasharray: 210 1550; stroke-dashoffset: 380; opacity: .2; }
.pp-orbit-bead { fill: var(--pp-blue); stroke: var(--pp-pearl); stroke-width: 1; filter: drop-shadow(0 0 6px #1730ed); }
.pp-orbit-dot { fill: var(--pp-pearl); stroke: none; opacity: .5; }
.pp-orbit-ticks { opacity: .2; }
.pp-orbit-on .pp-orbit-track { animation-play-state: running; }
.pp-orbit--closing { width: min(42vw,570px); }
.addon-intro-playing .pp-orbit--hero { opacity: .22; }

/* Proof: a restrained wave across the real brands, then a single light
   response beneath each number while the original counter does its work. */
[data-page-polish="mounted"] .proof-logo { position: relative; }
[data-page-polish="mounted"] .proof-logo::after { content: ""; position: absolute; left: 24%; right: 24%; bottom: -1px; height: 1px; background: linear-gradient(90deg,transparent,var(--pp-blue),transparent); opacity: 0; transform: scaleX(.1); }
[data-page-polish="mounted"] .proof-logo.pp-revealed::after { animation: pp-brand-signal 1.6s ease-out var(--pp-delay,0ms) both; }
[data-page-polish="mounted"] .proof-metrics > div { position: relative; }
[data-page-polish="mounted"] .proof-metrics > div::after { content: ""; position: absolute; width: 42px; height: 2px; bottom: -18px; left: calc(50% - 21px); background: linear-gradient(90deg,transparent,var(--pp-blue),transparent); transform: scaleX(0); opacity: .35; }
[data-page-polish="mounted"] .proof-metrics > .pp-revealed::after { animation: pp-metric-line 1.9s cubic-bezier(.2,.65,.2,1) var(--pp-delay,0ms) both; }
[data-page-polish="mounted"] .proof-metrics > .pp-revealed dd { animation: pp-metric-light 2s ease-out var(--pp-delay,0ms) both; }

/* The overview echoes the five disciplines without adding another row or
   moving the names. Each emblem animates only while this section is visible. */
[data-page-polish="mounted"] .service-index-button { position: relative; }
.pp-service-emblem { position: absolute; pointer-events: none; right: 50%; top: 15px; translate: 50% 0; width: 43px; height: 43px; fill: none; stroke: var(--pp-pearl); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.pp-service-emblem .pp-accent { stroke: var(--pp-blue); stroke-width: 2; }
.pp-service-emblem .pp-nodes { fill: var(--pp-blue); stroke: none; }
.pp-service-emblem .pp-draw { stroke-dasharray: 190; stroke-dashoffset: 0; animation: pp-emblem-draw 8s ease-in-out infinite; animation-play-state: paused; }
.pp-service-emblem .pp-wave { animation: pp-wave 4s ease-in-out infinite; animation-play-state: paused; transform-origin: 32px 32px; }
.pp-service-emblem.pp-inview .pp-draw,.pp-service-emblem.pp-inview .pp-wave { animation-play-state: running; }
.services-index > li:nth-child(2) .pp-draw { animation-delay: -.8s; }
.services-index > li:nth-child(3) .pp-draw { animation-delay: -1.6s; }
.services-index > li:nth-child(4) .pp-draw { animation-delay: -2.4s; }
.services-index > li:nth-child(5) .pp-draw { animation-delay: -3.2s; }

/* Contact: a luminous message moves through an open route to an envelope.
   The graphic is inert decoration; only the real contact buttons send drafts. */
[data-page-polish="mounted"] .contact-intro { position: relative; }
.pp-contact-signal { position: absolute; top: calc(100% + 11px); left: 0; width: min(100%,340px); height: 59px; pointer-events: none; fill: none; stroke: var(--pp-pearl); stroke-width: 1; opacity: .75; overflow: visible; }
.pp-signal-route { stroke: var(--pp-pearl); opacity: .18; }
.pp-signal-packet { stroke: var(--pp-blue); stroke-width: 2; stroke-dasharray: 24 350; animation: pp-send-path 5.6s cubic-bezier(.4,.1,.4,1) infinite; animation-play-state: paused; filter: drop-shadow(0 0 3px #1730ed); }
.pp-signal-origin { fill: var(--pp-blue); stroke: none; }
.pp-signal-halo { stroke: var(--pp-blue); opacity: .35; }
.pp-envelope { transform-origin: 336px 19px; animation: pp-envelope-receive 5.6s ease-in-out infinite; animation-play-state: paused; }
.pp-signal-after { stroke: var(--pp-blue); opacity: .6; }
.pp-contact-signal.pp-inview .pp-signal-packet,.pp-contact-signal.pp-inview .pp-envelope { animation-play-state: running; }

/* End on a single deliberate line. The existing compact footer stays compact. */
[data-page-polish="mounted"] .site-footer::before { content: ""; position: absolute; top: -1px; left: var(--gutter); right: var(--gutter); height: 1px; background: linear-gradient(90deg, transparent,#1730ed 38%,#dcdee2 50%,#1730ed 62%,transparent); transform: scaleX(0); transform-origin: center; opacity: 0; transition: transform 1.8s cubic-bezier(.2,.65,.2,1), opacity 1.5s ease; }
[data-page-polish="mounted"] .site-footer.pp-inview::before { transform: scaleX(1); opacity: .7; }

/* The native dialog remains responsible for focus, Escape and scroll locking. */
[data-page-polish="mounted"] .service-detail[open],
[data-page-polish="mounted"] .proof-dialog[open] { animation: pp-dialog-arrive .38s cubic-bezier(.2,.65,.2,1); }
[data-page-polish="mounted"] .site-menu[open] .site-menu-links > a { animation: pp-dialog-arrive .55s cubic-bezier(.2,.65,.2,1) both; }
[data-page-polish="mounted"] .site-menu[open] .site-menu-links > a:nth-child(2) { animation-delay: .06s; }
[data-page-polish="mounted"] .site-menu[open] .site-menu-links > a:nth-child(3) { animation-delay: .12s; }

/* Navigation and form feedback use the same signal line as the page motion. */
[data-page-polish="mounted"] .header-nav a { position: relative; }
[data-page-polish="mounted"] .header-nav a::after { content: ""; position: absolute; left: 0; bottom: 4px; width: 24px; height: 2px; background: var(--pp-blue); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.proof-reading[data-page-polish="mounted"] .header-nav a[href="#brands-results"]::after,
.services-reading[data-page-polish="mounted"] .header-nav a[href="#services"]::after,
[data-page-polish="mounted"]:has(.service-nav.is-visible) .header-nav a[href="#services"]::after { transform: scaleX(1); }
[data-page-polish="mounted"] .contact-form input:not([type="checkbox"]),
[data-page-polish="mounted"] .contact-form textarea { transition: border-color .25s ease, box-shadow .25s ease; }
[data-page-polish="mounted"] .contact-form input:not([type="checkbox"]):focus,
[data-page-polish="mounted"] .contact-form textarea:focus { border-color: var(--pp-blue); box-shadow: 0 1px 0 var(--pp-blue); }
.proof-section:not(.pp-inview) .proof-logo::after,
.proof-section:not(.pp-inview) .proof-metrics > div::after,
.proof-section:not(.pp-inview) .proof-metrics dd { animation-play-state: paused !important; }

@keyframes pp-orbit-turn { from { rotate: 0deg; } to { rotate: 360deg; } }
@keyframes pp-brand-signal { 0% { opacity: 0; transform: scaleX(.1); } 35% { opacity: .9; } 100% { opacity: .2; transform: scaleX(1); } }
@keyframes pp-metric-line { 0% { transform: scaleX(0); opacity: 0; } 45% { opacity: 1; } 100% { transform: scaleX(1); opacity: .5; } }
@keyframes pp-metric-light { 0%,100% { text-shadow: 0 0 0 transparent; } 45% { text-shadow: 0 0 30px rgba(23,48,237,.38); } }
@keyframes pp-emblem-draw { 0%,18%,100% { stroke-dashoffset: 0; opacity: 1; } 44% { stroke-dashoffset: 190; opacity: .4; } 72% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes pp-wave { 0%,100% { transform: scaleY(.75); opacity: .4; } 50% { transform: scaleY(1); opacity: .9; } }
@keyframes pp-send-path { 0% { stroke-dashoffset: 28; opacity: 0; } 12% { opacity: 1; } 70% { opacity: 1; } 82%,100% { stroke-dashoffset: -344; opacity: 0; } }
@keyframes pp-envelope-receive { 0%,65%,100% { transform: translateY(0); opacity: .5; } 78% { transform: translateY(-3px); opacity: 1; } }
@keyframes pp-dialog-arrive { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }

@media (max-width: 1100px) { .pp-service-emblem { width: 34px; height: 34px; top: 19px; } }
@media (max-width: 900px) {
  .pp-orbit { width: min(77vw,560px); top: 47%; }
  .pp-orbit--closing { width: min(70vw,500px); top: 49%; }
}
@media (max-width: 800px) {
  .pp-service-emblem { display: none; }
  .pp-contact-signal { width: min(100%,310px); top: calc(100% + 3px); height: 30px; opacity: .65; }
  .pp-reveal:not(.pp-revealed) { translate: 0 14px; }
}
@media (max-height: 600px) { .pp-orbit { width: min(38vw,76svh); top: 48%; } }

/* Both the OS preference and Scaled's existing motion control stop motion. */
.pp-reduced .pp-reveal { opacity: 1; translate: none; transition: none; }
.pp-reduced .pp-orbit-track,
.pp-reduced .pp-service-emblem *,
.pp-reduced .pp-contact-signal *,
.pp-reduced .proof-logo::after,
.pp-reduced .proof-metrics > div::after,
.pp-reduced .proof-metrics dd,
.pp-reduced .service-detail[open],
.pp-reduced .site-menu[open] .site-menu-links > a,
.pp-reduced .proof-dialog[open] { animation: none !important; }
.pp-reduced .pp-orbit,.pp-reduced .site-footer::before,.pp-reduced .header-nav a::after,.pp-reduced .contact-form input,.pp-reduced .contact-form textarea { transition: none; }
.pp-reduced .pp-signal-packet { stroke-dasharray: 14 350; stroke-dashoffset: -140; }
.pp-reduced .proof-metrics > div::after { transform: scaleX(1); opacity: .5; }
.pp-hidden .pp-orbit *, .pp-hidden .pp-service-emblem *, .pp-hidden .pp-contact-signal *, .pp-hidden .proof-logo::after, .pp-hidden .proof-metrics > div::after, .pp-hidden .proof-metrics dd { animation-play-state: paused !important; }
.pp-dialog-open .pp-orbit *, .pp-dialog-open .pp-service-emblem *, .pp-dialog-open .pp-contact-signal *, .pp-dialog-open .proof-logo::after, .pp-dialog-open .proof-metrics > div::after, .pp-dialog-open .proof-metrics dd { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .pp-reveal { opacity: 1; translate: none; transition: none; }
  .pp-orbit, [data-page-polish="mounted"] .site-footer::before { transition: none; }
  .pp-orbit *, .pp-service-emblem *, .pp-contact-signal *,
  [data-page-polish="mounted"] .proof-logo::after,
  [data-page-polish="mounted"] .proof-metrics > div::after,
  [data-page-polish="mounted"] .proof-metrics dd,
  [data-page-polish="mounted"] .service-detail[open],
  [data-page-polish="mounted"] .site-menu[open] .site-menu-links > a,
  [data-page-polish="mounted"] .proof-dialog[open] { animation: none !important; }
  [data-page-polish="mounted"] .header-nav a::after,[data-page-polish="mounted"] .contact-form input,[data-page-polish="mounted"] .contact-form textarea { transition: none; }
}
