/* Clairyx / quiet, purposeful motion. Loaded after the unchanged design system. */
:root {
  --motion-ease:cubic-bezier(.22,.72,.25,1);
  --motion-fast:180ms;
  --motion-page:200ms;
}

/* Navigation has a WAAPI fallback in every browser with Element.animate.
   No native view-transition dependency; real browser history remains intact. */
@view-transition { navigation:none; }
html { scroll-behavior:smooth; scroll-padding-top:104px; }
main { transform-origin:center top; }
.language-switch { position:relative; }
.language-switch a { border-radius:18px; transition:background-color 200ms,color 200ms,box-shadow 200ms!important; }
.language-switch a[aria-current="true"] { background:#17191a; color:#f4f2ed; }
.language-switch a.is-switching { background:#ff6438; color:#17191a; box-shadow:0 0 0 4px #ff643815; }
/* Interaction feedback is shared by pointer and keyboard, without moving targets. */
.button,.ui-button,.filter-button,.circle-arrow,.play-circle,.next-icon,
.dialog-close,.document-link,.integration-node,.service-icon,.next-case {
  transition-timing-function:var(--motion-ease);
}
.button .arrow,.header-cta .arrow,.next-case .arrow,.service-card .arrow,
.document-link .arrow,.route-recovery .arrow {
  transition:translate var(--motion-fast) var(--motion-ease);
}
.button:focus-visible .arrow,.header-cta:focus-visible .arrow,
.next-case:focus-visible .arrow,.service-card:focus-visible .arrow {
  translate:3px 0;
}
.button:active,.ui-button:active,.filter-button:active,.dialog-close:active {
  scale:.98;
}
.button,.ui-button,.filter-button,.dialog-close {
  transition-property:transform,background-color,border-color,color,box-shadow,scale;
  transition-duration:var(--motion-fast);
}
.filter-button { transition:background-color 180ms,color 180ms,border-color 180ms,scale 120ms; }
.primary-nav a:focus-visible::after { transform:scaleX(1); }
.language-switch a { transition:color var(--motion-fast); }
.project-form input:not([type=checkbox]),.project-form select,.project-form textarea {
  transition:border-color var(--motion-fast),background-color var(--motion-fast),box-shadow var(--motion-fast);
}
.project-form :is(input:not([type=checkbox]),select,textarea):focus-visible {
  border-color:var(--orange-ink);
  box-shadow:0 0 0 3px #ff5b2b0e;
}
.case-card { transition:border-color 200ms,box-shadow 240ms; }
.case-card:focus-within { border-color:var(--orange-ink); }
.case-card-visual { transition:transform 350ms var(--motion-ease); }
.case-grid { align-content:start; overflow-anchor:none; }
.bar-chart > span { transform-origin:center bottom; }
.switch > i { will-change:auto; }
.toast { transition:opacity 200ms var(--motion-ease),transform 240ms var(--motion-ease),visibility 240ms; }
.faq-answer { display:flow-root; }
.faq-list details[data-cx-expanded=false] summary .icon { transform:none; }

@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .button:hover .arrow,.header-cta:hover .arrow,.next-case:hover .arrow,
  .service-card:hover .arrow,.document-link:hover .arrow { translate:3px 0; }
  .case-card:hover { box-shadow:0 9px 28px #1619180b; }
  .service-card:hover .service-icon { translate:0 -2px; }
  .service-icon { transition:translate 260ms var(--motion-ease); }
  .next-case:hover .next-icon { transform:translateX(3px); }
}
/* Touch taps never leave a stuck lifted card or a displaced button. */
@media (hover:none), (pointer:coarse) {
  .button:hover,.case-card:hover .case-card-visual,.service-card:hover,
  .route-recovery>a:hover,.header-cta:hover .circle-arrow { transform:none; }
  .text-link:hover .arrow { transform:none; }
}

/* Native dialog semantics + WAAPI open/close (including Firefox/Safari fallback). */
dialog { transform-origin:center; }
dialog[open]::backdrop { animation:cx-backdrop-in 200ms ease-out both; }
@keyframes cx-backdrop-in { from{opacity:0} to{opacity:1} }
/* No JS-hidden text. Reduced motion also handles changes made while on the page. */
@media (prefers-reduced-motion:reduce) {
  @view-transition { navigation:none; }
  html:focus-within,html { scroll-behavior:auto!important; }
  *,*::before,*::after { transition:none!important;animation:none!important; }
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*) { animation:none!important; }
  .button:active,.ui-button:active,.filter-button:active,.dialog-close:active { scale:1; }
  .button .arrow,.header-cta .arrow,.next-case .arrow,.service-card .arrow,.document-link .arrow { translate:none!important; }
  .button:hover,.service-card:hover,.route-recovery>a:hover { transform:none!important; }
}
@media print {
  [data-cx-revealed] { opacity:1!important;translate:none!important; }
  .case-grid,.home-demo-stage,.faq-list details { height:auto!important;overflow:visible!important; }
}

/* Animated dropdowns use a portal, so they never get cropped by demo panels. */
.cx-select { position:relative; display:block; min-width:0; width:100%; }
.cx-native-select { position:absolute!important; width:1px!important; height:1px!important; margin:0!important; padding:0!important; border:0!important; opacity:0!important; clip-path:inset(50%)!important; overflow:hidden!important; pointer-events:none; }
.cx-select-trigger { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:40px; width:100%; margin:0; padding:10px 13px; border:1px solid #dcded6; border-radius:5px; background:#faf9f6; color:#303330; font:inherit; font-size:12px; text-align:left; cursor:pointer; transition:background-color 180ms,border-color 180ms,box-shadow 180ms; }
.project-form .cx-select-trigger { min-height:46px; font-size:13px; padding:12px 14px; background:transparent; text-transform:none; letter-spacing:normal; }
.cx-select-trigger:hover { border-color:#b8bdb5; }
.cx-select-trigger[aria-expanded=true],.cx-select-trigger:focus-visible { border-color:#c84724; outline:none; box-shadow:0 0 0 3px #ff643814; }
.cx-select-trigger:disabled { opacity:.6; cursor:wait; }
.cx-select-value { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cx-select-chevron { width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;rotate:45deg;flex-shrink:0; translate:0 -2px; transition:rotate 200ms,translate 200ms; }
.cx-select-trigger[aria-expanded=true] .cx-select-chevron { rotate:225deg;translate:0 2px; }
.cx-select-list { position:fixed; z-index:5000; box-sizing:border-box; overflow-y:auto; overscroll-behavior:contain; padding:6px; border:1px solid #d8dad2; border-radius:9px; background:#faf9f6; color:#17191a; box-shadow:0 12px 38px #17191a26; font:13px/1.5 Manrope,Arial,sans-serif; scrollbar-width:thin; transform-origin:center top; }
.cx-select-list[data-side=top] { transform-origin:center bottom; }
.cx-select-option { position:relative; border-radius:5px; padding:11px 31px 11px 12px; min-height:42px; cursor:pointer; overflow-wrap:anywhere; transition:color 140ms,background-color 140ms; }
.cx-select-option.is-highlighted { background:#eceae3; }
.cx-select-option[aria-selected=true] { color:#a53616;background:#ff64380d; }
.cx-select-option[aria-selected=true]::after { content:'✓'; position:absolute; right:10px;top:11px;color:#c84724; }
.cx-select-option[aria-disabled=true] { opacity:.45;cursor:not-allowed; }
.report-controls .cx-select-trigger { font-size:11px; }
.ui-controls .cx-select { width:auto; min-width:140px; }
.ui-controls .cx-select-trigger { min-height:32px;font-size:10px;padding:8px 10px; }
.ui-controls label:has(.cx-select) { min-width:0; }
input[type=checkbox] { transition:accent-color 160ms,box-shadow 160ms; }
@media (max-width:600px) {
 .cx-select-trigger { min-height:44px; }
 .ui-controls .cx-select { min-width:120px; }
 .cx-select-option { padding-top:13px;padding-bottom:13px;min-height:46px; }
 .cx-select-option[aria-selected=true]::after { top:13px; }
 html { scroll-padding-top:82px; }
}
@media (prefers-reduced-motion:reduce) { html{scroll-behavior:auto!important;} dialog[open]::backdrop{animation:none!important;} }
@media print { .cx-select-list{display:none!important;} }

.language-switch a { padding:6px 7px; }
@media(max-width:600px){.language-switch a{padding:6px 5px;}}
