/*
 * v0.7.2 Motion Discipline
 * Apple-style restrained feedback: motion should be felt, not watched.
 * No layout, palette or component changes in this layer.
 */

/* 1. The canvas is calm. Ambient light is static. */
html { scroll-behavior:auto; }
.ambient__mesh { animation:none !important; transform:none !important; }

/* 2. Page changes use a short fade, without float, scale or spring. */
.view.is-active { animation:viewQuietIn .16s ease-out; }
@keyframes viewQuietIn { from { opacity:.01; } to { opacity:1; } }

/* 3. Material is stable. Remove hotspot pursuit and theatrical highlights. */
.liquid::before {
  opacity:calc(var(--shine) * .58);
  transform:translate3d(-1%, -1%, 0) rotate(-5deg);
  transition:opacity .16s ease-out;
}
.liquid.is-lit::before { opacity:calc(var(--shine) * .66); transform:translate3d(-1%, -1%, 0) rotate(-5deg); }

/* 4. Press feedback: one quiet compression, no overshoot and no ripple. */
.pressable {
  transition:transform .12s ease-out, box-shadow .16s ease-out, filter .16s ease-out;
  will-change:auto;
}
.pressable.is-pressed { transform:scale(.985); filter:none; }

/* 5. Lenses migrate quickly and directly. No sweep or jelly deformation. */
.liquid-lens {
  transition:transform .18s cubic-bezier(.2,.8,.2,1), width .18s cubic-bezier(.2,.8,.2,1), height .18s cubic-bezier(.2,.8,.2,1), box-shadow .16s ease-out;
}
.segmented .liquid-lens { transition-duration:.16s; }

/* 6. Native controls are calm and deterministic. */
.segmented button { transition:color .16s ease-out; }
.secondary-tabs button,
.quick-range,
.filter-chip,
.page-button { transition:background .16s ease-out, color .16s ease-out, border-color .16s ease-out; }
.stepper button { transition:transform .12s ease-out, background .16s ease-out; }
.stepper button:active { transform:scale(.985); }
.switch { transition:background .18s ease-out, box-shadow .18s ease-out, border-color .18s ease-out; }
.switch::before { transition:transform .18s ease-out; }
.bottom-nav button { transition:color .16s ease-out; }
.bottom-nav button svg { transition:none; }

/* 7. Overlays: short, single-stage transitions. */
.sheet-backdrop { transition:opacity .16s ease-out; }
.bottom-sheet { transition:transform .22s cubic-bezier(.2,.8,.2,1); }
.dialog-backdrop { transition:opacity .16s ease-out; }
.confirm-dialog {
  transform:translate(-50%,-48%);
  transition:opacity .18s ease-out, transform .18s ease-out;
}
.confirm-dialog.is-open { transform:translate(-50%,-50%); }
.toast { transform:translate(-50%,-4px); transition:opacity .16s ease-out, transform .16s ease-out; }
.toast.is-show { transform:translate(-50%,0); }
body.sheet-open .toast { transform:translate(-50%,-4px); }

/* 8. Success acknowledgement is allowed once, but stays quiet. */
.submit-button.is-success { animation:submitQuietSuccess .40s ease-out; }
@keyframes submitQuietSuccess {
  0% { box-shadow:inherit; }
  45% { box-shadow:0 0 0 4px var(--success-soft), 0 10px 22px rgba(65,91,124,.10); }
  100% { box-shadow:inherit; }
}

/* 9. Low-power and reduced-motion modes remain strict. */
body.low-power .liquid::before { opacity:.10; }
body.reduce-motion .view.is-active,
body.reduce-motion .submit-button.is-success { animation:none !important; }
