/* Gentle motion shared by the public pages. Layout and content stay native. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-away .22s ease both; }
::view-transition-new(root) { animation: page-arrive .38s ease both; }
@keyframes page-away { to { opacity: 0; } }
@keyframes page-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes intro-arrive { from { opacity: .3; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

body { isolation: isolate; transition: background-color .55s ease, color .4s ease; }
.ambient-background { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient-background::before, .ambient-background::after { content: ''; position: absolute; inset: -22%; background: radial-gradient(ellipse at 24% 30%, #c88971 0%, transparent 58%); opacity: .20; animation: ambient-drift 14s ease-in-out infinite alternate; }
.ambient-background::after { background: radial-gradient(ellipse at 74% 66%, #b7c2ad 0%, transparent 55%); opacity: .09; animation-name: ambient-return; animation-duration: 18s; }
[data-theme=light] .ambient-background::before { background: radial-gradient(ellipse at 24% 30%, #aa6a4f 0%, transparent 58%); opacity: .16; }
[data-theme=light] .ambient-background::after { background: radial-gradient(ellipse at 74% 66%, #7a8b73 0%, transparent 55%); opacity: .11; }
@keyframes ambient-drift { from { transform: translate(-12%, -8%) scale(.95); } to { transform: translate(16%, 12%) scale(1.16); } }
@keyframes ambient-return { from { transform: translate(12%, 8%) scale(1.12); } to { transform: translate(-16%, -10%) scale(.96); } }
[data-background-paused=true] .ambient-background::before, [data-background-paused=true] .ambient-background::after { animation-play-state: paused; }

.site-header, .mobile-call, .language-switch nav, .enquiry-strip, .services-section, .sector-ribbon, .field input, .field textarea, .field select { transition: background-color .45s ease, color .35s ease, border-color .35s ease; }
a, a:hover { transition: color .25s ease, background-color .3s ease, border-color .3s ease, transform .3s ease; }
.button, .nav-cta, .theme-toggle, .text-link, .project-filters a, .service-list > a, .motion-toggle { transition: color .25s ease, background-color .3s ease, border-color .3s ease, transform .3s ease; }
.button span, .text-link span, .service-arrow { display: inline-block; transition: transform .3s ease; }
.button:hover span, .text-link:hover span, .service-list > a:hover .service-arrow { transform: translate(3px, -3px); }
.button:active, .theme-toggle:active { transform: scale(.98); }
.language-switch[open] nav { animation: intro-arrive .22s ease both; }
.lightbox[open], .lightbox[open]::backdrop { animation: page-arrive .25s ease both; }
.page-intro, .hero-content { animation: intro-arrive .65s cubic-bezier(.22,1,.36,1) both; }
.count-up { font-variant-numeric: tabular-nums; }
.count-up > [aria-hidden] { display: inline-block; }
.experience-grid .count-up > [aria-hidden], .process-grid .count-up > [aria-hidden] { font: inherit; letter-spacing: inherit; margin: 0; }
.motion-toggle { color: var(--muted); background: transparent; border: 1px solid var(--line); padding: 8px 12px; min-height: 44px; font-size: 12px; }
.motion-toggle:hover { color: var(--ink); border-color: var(--accent); }
.footer-bottom { flex-wrap: wrap; }
.page-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; overflow: hidden; opacity: 0; pointer-events: none; background: var(--line); transition: opacity .15s ease; }
.page-progress::after { content: ''; display: block; width: 40%; height: 100%; background: var(--accent); transform: translateX(-100%); }
.is-navigating .page-progress { opacity: 1; }
.is-navigating .page-progress::after { animation: loading-progress 1.1s ease-in-out infinite; }
@keyframes loading-progress { from { transform: translateX(-100%); } to { transform: translateX(350%); } }
main { transition: opacity .18s ease; }
.is-navigating main { opacity: .7; }
@media(max-width:900px) { .menu-enhanced .main-nav:not([hidden]) { animation: intro-arrive .25s ease both; } }

[data-motion=paused] *, [data-motion=paused] *::before, [data-motion=paused] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html[data-motion=paused] { scroll-behavior: auto; }
[data-motion=paused]::view-transition-old(root), [data-motion=paused]::view-transition-new(root) { animation: none; }
[data-motion=paused] .page-progress::after { transform: none; width: 100%; }
@media(prefers-reduced-motion:reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .page-progress::after { transform: none; width: 100%; }
}
@media print {
  .ambient-background, .page-progress, .motion-toggle { display: none !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .is-navigating main { opacity: 1; }
}
